BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtVSSBMixCPT.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 2002 INFN-Pisa
10//
11// Module: EvtVSSBMixCPT.cc
12//
13// Description:
14// Routine to decay vector-> scalar scalar with coherent BB-like mixing
15// including CPT effects
16// Based on VSSBMIX
17//
18// Modification history:
19//
20// F. Sandrelli, Fernando M-V March 03, 2002
21//
22//------------------------------------------------------------------------
23//
24#include "EvtVSSBMixCPT.hh"
34#include <stdlib.h>
35#include <string>
36using std::endl;
37
39
40void EvtVSSBMixCPT::getName( std::string& model_name ) { model_name = "VSS_BMIX"; }
41
43
45
46 // check that there we are provided exactly one parameter
47 if ( getNArg() > 3 ) checkNArg( 14, 12, 8 );
48
49 if ( getNArg() < 1 )
50 {
51 report( ERROR, "EvtGen" ) << "EvtVSSBMix generator expected "
52 << " at least 1 argument (deltam) but found:" << getNArg()
53 << endl;
54 report( ERROR, "EvtGen" ) << "Will terminate execution!" << endl;
55 ::abort();
56 }
57 // check that we are asked to produced exactly 2 daughters
58 // 4 are allowed if they are aliased..
59 checkNDaug( 2, 4 );
60
61 if ( getNDaug() == 4 )
62 {
63 if ( getDaug( 0 ) != getDaug( 2 ) || getDaug( 1 ) != getDaug( 3 ) )
64 {
65 report( ERROR, "EvtGen" ) << "EvtVSSBMixCPT generator allows "
66 << " 4 daughters only if 1=3 and 2=4"
67 << " (but 3 and 4 are aliased " << endl;
68 report( ERROR, "EvtGen" ) << "Will terminate execution!" << endl;
69 ::abort();
70 }
71 }
72 // check that we are asked to decay a vector particle into a pair
73 // of scalar particles
74
76
79
80 // check that our daughter particles are charge conjugates of each other
81 if ( !( EvtPDL::chargeConj( getDaug( 0 ) ) == getDaug( 1 ) ) )
82 {
83 report( ERROR, "EvtGen" ) << "EvtVSSBMixCPT generator expected daughters "
84 << "to be charge conjugate." << endl
85 << " Found " << EvtPDL::name( getDaug( 0 ) ).c_str() << " and "
86 << EvtPDL::name( getDaug( 1 ) ).c_str() << endl;
87 report( ERROR, "EvtGen" ) << "Will terminate execution!" << endl;
88 ::abort();
89 }
90 // check that both daughter particles have the same lifetime
91 if ( EvtPDL::getctau( getDaug( 0 ) ) != EvtPDL::getctau( getDaug( 1 ) ) )
92 {
93 report( ERROR, "EvtGen" ) << "EvtVSSBMixCPT generator expected daughters "
94 << "to have the same lifetime." << endl
95 << " Found ctau = " << EvtPDL::getctau( getDaug( 0 ) )
96 << " mm and " << EvtPDL::getctau( getDaug( 1 ) ) << " mm"
97 << endl;
98 report( ERROR, "EvtGen" ) << "Will terminate execution!" << endl;
99 ::abort();
100 }
101 // precompute quantities that will be used to generate events
102 // and print out a summary of parameters for this decay
103
104 // mixing frequency in hbar/mm
105 _freq = getArg( 0 ) / EvtConst::c;
106
107 // deltaG
108 double gamma = 1 / EvtPDL::getctau( getDaug( 0 ) ); // gamma/c (1/mm)
109 _dGamma = 0.0;
110 double dgog = 0.0;
111 if ( getNArg() > 1 )
112 {
113 dgog = getArg( 1 );
114 _dGamma = dgog * gamma;
115 }
116 // q/p
117 _qoverp = EvtComplex( 1.0, 0.0 );
118 if ( getNArg() == 3 ) { _qoverp = EvtComplex( getArg( 2 ), 0.0 ); }
119 if ( getNArg() > 3 )
120 { _qoverp = getArg( 2 ) * EvtComplex( cos( getArg( 3 ) ), sin( getArg( 3 ) ) ); }
121 _poverq = 1.0 / _qoverp;
122
123 // decay amplitudes
124 _A_f = EvtComplex( 1.0, 0.0 );
125 _Abar_f = EvtComplex( 0.0, 0.0 );
126 _A_fbar = _Abar_f; // CPT conservation
127 _Abar_fbar = _A_f; // CPT conservation
128 if ( getNArg() > 3 )
129 {
130 _A_f = getArg( 4 ) *
131 EvtComplex( cos( getArg( 5 ) ), sin( getArg( 5 ) ) ); // this allows for DCSD
132 _Abar_f = getArg( 6 ) *
133 EvtComplex( cos( getArg( 7 ) ), sin( getArg( 7 ) ) ); // this allows for DCSD
134 if ( getNArg() > 8 )
135 {
136 // CPT violation in decay
137 _A_fbar = getArg( 8 ) * EvtComplex( cos( getArg( 9 ) ), sin( getArg( 9 ) ) );
138 _Abar_fbar = getArg( 10 ) * EvtComplex( cos( getArg( 11 ) ), sin( getArg( 11 ) ) );
139 }
140 else
141 {
142 // CPT conservation in decay
143 _A_fbar = _Abar_f;
144 _Abar_fbar = _A_f;
145 }
146 }
147
148 // CPT violation in mixing
149 _z = EvtComplex( 0.0, 0.0 );
150 if ( getNArg() > 12 ) { _z = EvtComplex( getArg( 12 ), getArg( 13 ) ); }
151
152 // some printout
153 double tau = 1e12 * EvtPDL::getctau( getDaug( 0 ) ) / EvtConst::c; // in ps
154 double dm = 1e-12 * getArg( 0 ); // B0/anti-B0 mass difference in hbar/ps
155 double x = dm * tau;
156 double y = dgog * 0.5; // y=dgamma/(2*gamma)
157 double qop2 = abs( _qoverp * _qoverp );
158 _chib0_b0bar =
159 qop2 * ( x * x + y * y ) /
160 ( qop2 * ( x * x + y * y ) + 2 + x * x - y * y ); // does not include CPT in mixing
161 _chib0bar_b0 = ( 1 / qop2 ) * ( x * x + y * y ) /
162 ( ( 1 / qop2 ) * ( x * x + y * y ) + 2 + x * x - y * y ); // does not include
163 // CPT in mixing
164
165 report( INFO, "EvtGen" ) << "VSS_BMIXCPT will generate mixing and CPT/CP effects in mixing:"
166 << endl
167 << endl
168 << " " << EvtPDL::name( getParentId() ).c_str() << " --> "
169 << EvtPDL::name( getDaug( 0 ) ).c_str() << " + "
170 << EvtPDL::name( getDaug( 1 ) ).c_str() << endl
171 << endl
172 << "using parameters:" << endl
173 << endl
174 << " delta(m) = " << dm << " hbar/ps" << endl
175 << " _freq = " << _freq << " hbar/mm" << endl
176 << " dgog = " << dgog << endl
177 << " dGamma = " << _dGamma << " hbar/mm" << endl
178 << " q/p = " << _qoverp << endl
179 << " z = " << _z << endl
180 << " tau = " << tau << " ps" << endl
181 << " x = " << x << endl
182 << " chi(B0->B0bar) = " << _chib0_b0bar << endl
183 << " chi(B0bar->B0) = " << _chib0bar_b0 << endl
184 << " Af = " << _A_f << endl
185 << " Abarf = " << _Abar_f << endl
186 << " Afbar = " << _A_fbar << endl
187 << " Abarfbar = " << _Abar_fbar << endl
188 << endl;
189}
190
192 // this value is ok for reasonable values of all the parameters
193 setProbMax( 4.0 );
194}
195
197
198 static EvtId B0 = EvtPDL::getId( "B0" );
199 static EvtId B0B = EvtPDL::getId( "anti-B0" );
200
201 // generate a final state according to phase space
202
203 double rndm = EvtRandom::random();
204
205 if ( getNDaug() == 4 )
206 {
207 EvtId tempDaug[2];
208
209 if ( rndm < 0.5 )
210 {
211 tempDaug[0] = getDaug( 0 );
212 tempDaug[1] = getDaug( 3 );
213 }
214 else
215 {
216 tempDaug[0] = getDaug( 2 );
217 tempDaug[1] = getDaug( 1 );
218 }
219
220 p->initializePhaseSpace( 2, tempDaug );
221 }
222 else
223 { // nominal case.
225 }
226
227 EvtParticle *s1, *s2;
228
229 s1 = p->getDaug( 0 );
230 s2 = p->getDaug( 1 );
231 // delete any daughters - if there are daughters, they
232 // are from the initialization and will be redone later
233 if ( s1->getNDaug() > 0 ) { s1->deleteDaughters(); }
234 if ( s2->getNDaug() > 0 ) { s2->deleteDaughters(); }
235
236 EvtVector4R p1 = s1->getP4();
237 EvtVector4R p2 = s2->getP4();
238
239 // throw a random number to decide if this final state should be mixed
240 rndm = EvtRandom::random();
241 int mixed = ( rndm < 0.5 ) ? 1 : 0;
242
243 // if this decay is mixed, choose one of the 2 possible final states
244 // with equal probability (re-using the same random number)
245 if ( mixed == 1 )
246 {
247 EvtId mixedId = ( rndm < 0.25 ) ? getDaug( 0 ) : getDaug( 1 );
248 EvtId mixedId2 = mixedId;
249 if ( getNDaug() == 4 && rndm < 0.25 ) mixedId2 = getDaug( 2 );
250 if ( getNDaug() == 4 && rndm > 0.25 ) mixedId2 = getDaug( 3 );
251 s1->init( mixedId, p1 );
252 s2->init( mixedId2, p2 );
253 }
254
255 // if this decay is unmixed, choose one of the 2 possible final states
256 // with equal probability (re-using the same random number)
257 if ( mixed == 0 )
258 {
259 EvtId unmixedId = ( rndm < 0.75 ) ? getDaug( 0 ) : getDaug( 1 );
260 EvtId unmixedId2 = ( rndm < 0.75 ) ? getDaug( 1 ) : getDaug( 0 );
261 if ( getNDaug() == 4 && rndm < 0.75 ) unmixedId2 = getDaug( 3 );
262 if ( getNDaug() == 4 && rndm > 0.75 ) unmixedId2 = getDaug( 2 );
263 s1->init( unmixedId, p1 );
264 s2->init( unmixedId2, p2 );
265 }
266
267 // choose a decay time for each final state particle using the
268 // lifetime (which must be the same for both particles) in pdt.table
269 // and calculate the lifetime difference for this event
270 s1->setLifetime();
271 s2->setLifetime();
272 double dct = s1->getLifetime() - s2->getLifetime(); // in mm
273
274 // Convention: _dGamma=GammaLight-GammaHeavy
275 EvtComplex exp1( -0.25 * _dGamma * dct, 0.5 * _freq * dct );
276
277 /*
278 //Find the flavor of the B that decayed first.
279 EvtId firstDec = (dct > 0 ) ? s2->getId() : s1->getId();
280
281 //This tags the flavor of the other particle at that time.
282 EvtId stateAtDeltaTeq0 = ( firstDec==B0 ) ? B0B : B0;
283 */
284 EvtId stateAtDeltaTeq0 = ( s2->getId() == B0 ) ? B0B : B0;
285
286 // calculate the oscillation amplitude, based on wether this event is mixed or not
287 EvtComplex osc_amp;
288
289 // define some useful functions: (see BAD #188 eq. 39 for ref.)
290 EvtComplex gp = 0.5 * ( exp( -1.0 * exp1 ) + exp( exp1 ) );
291 EvtComplex gm = 0.5 * ( exp( -1.0 * exp1 ) - exp( exp1 ) );
292 EvtComplex sqz = sqrt( abs( 1 - _z * _z ) ) * exp( EvtComplex( 0, arg( 1 - _z * _z ) / 2 ) );
293
294 EvtComplex BB = gp + _z * gm; // <B0|B0(t)>
295 EvtComplex barBB = -sqz * _qoverp * gm; // <B0bar|B0(t)>
296 EvtComplex BbarB = -sqz * _poverq * gm; // <B0|B0bar(t)>
297 EvtComplex barBbarB = gp - _z * gm; // <B0bar|B0bar(t)>
298
299 //
300 if ( !mixed && stateAtDeltaTeq0 == B0 ) { osc_amp = BB * _A_f + barBB * _Abar_f; }
301 if ( !mixed && stateAtDeltaTeq0 == B0B )
302 { osc_amp = barBbarB * _Abar_fbar + BbarB * _A_fbar; }
303
304 if ( mixed && stateAtDeltaTeq0 == B0 ) { osc_amp = barBB * _Abar_fbar + BB * _A_fbar; }
305 if ( mixed && stateAtDeltaTeq0 == B0B ) { osc_amp = BbarB * _A_f + barBbarB * _Abar_f; }
306
307 // store the amplitudes for each parent spin basis state
308 double norm = 1.0 / p1.d3mag();
309 vertex( 0, norm * osc_amp * p1 * ( p->eps( 0 ) ) );
310 vertex( 1, norm * osc_amp * p1 * ( p->eps( 1 ) ) );
311 vertex( 2, norm * osc_amp * p1 * ( p->eps( 2 ) ) );
312
313 return;
314}
double p2[4]
double p1[4]
EvtComplex exp(const EvtComplex &c)
double arg(const EvtComplex &c)
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
@ INFO
Definition EvtReport.hh:52
static const double c
Definition EvtConst.hh:31
void vertex(const EvtComplex &amp)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(int j)
void setProbMax(double prbmx)
EvtId getParentId()
void checkNDaug(int d1, int d2=-1)
EvtId * getDaugs()
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtId getDaug(int i)
Definition EvtId.hh:27
static std::string name(EvtId i)
Definition EvtPDL.hh:70
static EvtId chargeConj(EvtId id)
Definition EvtPDL.cc:193
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:272
static double getctau(EvtId i)
Definition EvtPDL.hh:60
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtId getId() const
double getLifetime()
const EvtVector4R & getP4() const
void setLifetime(double tau)
int getNDaug() const
EvtParticle * getDaug(int i)
void deleteDaughters(bool keepChannel=false)
virtual EvtVector4C eps(int i) const
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
static double random()
Definition EvtRandom.cc:39
void getName(std::string &name)
void decay(EvtParticle *p)
virtual ~EvtVSSBMixCPT()
EvtDecayBase * clone()