BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtVSSBMixCPT Class Reference

#include <EvtVSSBMixCPT.hh>

Inheritance diagram for EvtVSSBMixCPT:

Public Member Functions

 EvtVSSBMixCPT ()
virtual ~EvtVSSBMixCPT ()
void getName (std::string &name)
EvtDecayBaseclone ()
void decay (EvtParticle *p)
void init ()
void initProbMax ()
int nRealDaughters ()
Public Member Functions inherited from EvtDecayAmp
void makeDecay (EvtParticle *p)
void setWeight (double weight)
void vertex (const EvtComplex &amp)
void vertex (int i1, const EvtComplex &amp)
void vertex (int i1, int i2, const EvtComplex &amp)
void vertex (int i1, int i2, int i3, const EvtComplex &amp)
void vertex (int *i1, const EvtComplex &amp)
virtual ~EvtDecayAmp ()
Public Member Functions inherited from EvtDecayBase
virtual std::string commandName ()
virtual void command (std::string cmd)
double getProbMax (double prob)
double resetProbMax (double prob)
 EvtDecayBase ()
virtual ~EvtDecayBase ()
virtual bool matchingDecay (const EvtDecayBase &other) const
EvtId getParentId ()
double getBranchingFraction ()
void disableCheckQ ()
void checkQ ()
int getNDaug ()
EvtIdgetDaugs ()
EvtId getDaug (int i)
int getNArg ()
int getPHOTOS ()
void setPHOTOS ()
void setVerbose ()
void setSummary ()
double * getArgs ()
std::string * getArgsStr ()
double getArg (int j)
std::string getArgStr (int j)
std::string getModelName ()
int getDSum ()
int summary ()
int verbose ()
void saveDecayInfo (EvtId ipar, int ndaug, EvtId *daug, int narg, std::vector< std::string > &args, std::string name, double brfr)
void printSummary ()
void setProbMax (double prbmx)
void noProbMax ()
void checkNArg (int a1, int a2=-1, int a3=-1, int a4=-1)
void checkNDaug (int d1, int d2=-1)
void checkSpinParent (EvtSpinType::spintype sp)
void checkSpinDaughter (int d1, EvtSpinType::spintype sp)

Additional Inherited Members

Static Public Member Functions inherited from EvtDecayBase
static void findMasses (EvtParticle *p, int ndaugs, EvtId daugs[10], double masses[10])
static void findMass (EvtParticle *p)
static double findMaxMass (EvtParticle *p)
Protected Member Functions inherited from EvtDecayBase
bool daugsDecayedByParentModel ()
Protected Attributes inherited from EvtDecayAmp
EvtAmp _amp2
Protected Attributes inherited from EvtDecayBase
bool _daugsDecayedByParentModel

Detailed Description

Definition at line 31 of file EvtVSSBMixCPT.hh.

Constructor & Destructor Documentation

◆ EvtVSSBMixCPT()

EvtVSSBMixCPT::EvtVSSBMixCPT ( )
inline

Definition at line 33 of file EvtVSSBMixCPT.hh.

33{}

Referenced by clone().

◆ ~EvtVSSBMixCPT()

EvtVSSBMixCPT::~EvtVSSBMixCPT ( )
virtual

Definition at line 38 of file EvtVSSBMixCPT.cc.

38{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtVSSBMixCPT::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 42 of file EvtVSSBMixCPT.cc.

42{ return new EvtVSSBMixCPT; }

◆ decay()

void EvtVSSBMixCPT::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 196 of file EvtVSSBMixCPT.cc.

196 {
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)
void vertex(const EvtComplex &amp)
EvtId * getDaugs()
EvtId getDaug(int i)
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:272
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

◆ getName()

void EvtVSSBMixCPT::getName ( std::string & name)
virtual

Implements EvtDecayBase.

Definition at line 40 of file EvtVSSBMixCPT.cc.

40{ model_name = "VSS_BMIX"; }

◆ init()

void EvtVSSBMixCPT::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 44 of file EvtVSSBMixCPT.cc.

44 {
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}
Double_t x[10]
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 checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(int j)
EvtId getParentId()
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static std::string name(EvtId i)
Definition EvtPDL.hh:70
static EvtId chargeConj(EvtId id)
Definition EvtPDL.cc:193
static double getctau(EvtId i)
Definition EvtPDL.hh:60

◆ initProbMax()

void EvtVSSBMixCPT::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 191 of file EvtVSSBMixCPT.cc.

191 {
192 // this value is ok for reasonable values of all the parameters
193 setProbMax( 4.0 );
194}
void setProbMax(double prbmx)

◆ nRealDaughters()

int EvtVSSBMixCPT::nRealDaughters ( )
inlinevirtual

Reimplemented from EvtDecayBase.

Definition at line 43 of file EvtVSSBMixCPT.hh.

43{ return 2; }

The documentation for this class was generated from the following files: