BOSS 7.0.8
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 void getName (std::string &name)=0
 
virtual void decay (EvtParticle *p)=0
 
virtual void makeDecay (EvtParticle *p)=0
 
virtual EvtDecayBaseclone ()=0
 
virtual void init ()
 
virtual void initProbMax ()
 
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)
 
virtual int nRealDaughters ()
 

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 45 of file EvtVSSBMixCPT.cc.

45 {
46 return new EvtVSSBMixCPT;
47}

◆ decay()

void EvtVSSBMixCPT::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 187 of file EvtVSSBMixCPT.cc.

187 {
188
189 static EvtId B0=EvtPDL::getId("B0");
190 static EvtId B0B=EvtPDL::getId("anti-B0");
191
192 // generate a final state according to phase space
193
194 double rndm= EvtRandom::random();
195
196 if ( getNDaug()==4) {
197 EvtId tempDaug[2];
198
199 if ( rndm < 0.5 ) { tempDaug[0]=getDaug(0); tempDaug[1]=getDaug(3); }
200 else{ tempDaug[0]=getDaug(2); tempDaug[1]=getDaug(1); }
201
202 p->initializePhaseSpace(2,tempDaug);
203 }
204 else{ //nominal case.
206 }
207
208 EvtParticle *s1,*s2;
209
210 s1 = p->getDaug(0);
211 s2 = p->getDaug(1);
212 //delete any daughters - if there are daughters, they
213 //are from the initialization and will be redone later
214 if ( s1->getNDaug() > 0 ) { s1->deleteDaughters();}
215 if ( s2->getNDaug() > 0 ) { s2->deleteDaughters();}
216
217 EvtVector4R p1= s1->getP4();
218 EvtVector4R p2= s2->getP4();
219
220 // throw a random number to decide if this final state should be mixed
221 rndm= EvtRandom::random();
222 int mixed= (rndm < 0.5) ? 1 : 0;
223
224 // if this decay is mixed, choose one of the 2 possible final states
225 // with equal probability (re-using the same random number)
226 if(mixed==1) {
227 EvtId mixedId= (rndm < 0.25) ? getDaug(0) : getDaug(1);
228 EvtId mixedId2= mixedId;
229 if (getNDaug()==4&&rndm<0.25) mixedId2=getDaug(2);
230 if (getNDaug()==4&&rndm>0.25) mixedId2=getDaug(3);
231 s1->init(mixedId, p1);
232 s2->init(mixedId2, p2);
233 }
234
235
236 // if this decay is unmixed, choose one of the 2 possible final states
237 // with equal probability (re-using the same random number)
238 if(mixed==0) {
239 EvtId unmixedId = (rndm < 0.75) ? getDaug(0) : getDaug(1);
240 EvtId unmixedId2= (rndm < 0.75) ? getDaug(1) : getDaug(0);
241 if (getNDaug()==4&&rndm<0.75) unmixedId2=getDaug(3);
242 if (getNDaug()==4&&rndm>0.75) unmixedId2=getDaug(2);
243 s1->init(unmixedId, p1);
244 s2->init(unmixedId2, p2);
245 }
246
247 // choose a decay time for each final state particle using the
248 // lifetime (which must be the same for both particles) in pdt.table
249 // and calculate the lifetime difference for this event
250 s1->setLifetime();
251 s2->setLifetime();
252 double dct= s1->getLifetime() - s2->getLifetime(); // in mm
253
254 // Convention: _dGamma=GammaLight-GammaHeavy
255 EvtComplex exp1(-0.25*_dGamma*dct,0.5*_freq*dct);
256
257 /*
258 //Find the flavor of the B that decayed first.
259 EvtId firstDec = (dct > 0 ) ? s2->getId() : s1->getId();
260
261 //This tags the flavor of the other particle at that time.
262 EvtId stateAtDeltaTeq0 = ( firstDec==B0 ) ? B0B : B0;
263 */
264 EvtId stateAtDeltaTeq0 = (s2->getId()==B0) ? B0B : B0;
265
266 // calculate the oscillation amplitude, based on wether this event is mixed or not
267 EvtComplex osc_amp;
268
269 //define some useful functions: (see BAD #188 eq. 39 for ref.)
270 EvtComplex gp=0.5*(exp(-1.0*exp1)+exp(exp1));
271 EvtComplex gm=0.5*(exp(-1.0*exp1)-exp(exp1));
272 EvtComplex sqz=sqrt(abs(1-_z*_z))*exp(EvtComplex(0,arg(1-_z*_z)/2));
273
274 EvtComplex BB=gp+_z*gm; // <B0|B0(t)>
275 EvtComplex barBB=-sqz*_qoverp*gm; // <B0bar|B0(t)>
276 EvtComplex BbarB=-sqz*_poverq*gm; // <B0|B0bar(t)>
277 EvtComplex barBbarB=gp-_z*gm; // <B0bar|B0bar(t)>
278
279 //
280 if ( !mixed&&stateAtDeltaTeq0==B0 ) {
281 osc_amp= BB*_A_f+barBB*_Abar_f;
282 }
283 if ( !mixed&&stateAtDeltaTeq0==B0B ) {
284 osc_amp= barBbarB*_Abar_fbar+BbarB*_A_fbar;
285 }
286
287 if ( mixed&&stateAtDeltaTeq0==B0 ) {
288 osc_amp=barBB*_Abar_fbar+BB*_A_fbar;
289 }
290 if ( mixed&&stateAtDeltaTeq0==B0B ) {
291 osc_amp=BbarB*_A_f+barBbarB*_Abar_f;
292 }
293
294 // store the amplitudes for each parent spin basis state
295 double norm=1.0/p1.d3mag();
296 vertex(0,norm*osc_amp*p1*(p->eps(0)));
297 vertex(1,norm*osc_amp*p1*(p->eps(1)));
298 vertex(2,norm*osc_amp*p1*(p->eps(2)));
299
300 return ;
301}
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:252
double arg(const EvtComplex &c)
Definition: EvtComplex.hh:227
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
EvtId getDaug(int i)
Definition: EvtDecayBase.hh:66
Definition: EvtId.hh:27
static EvtId getId(const std::string &name)
Definition: EvtPDL.cc:287
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtId getId() const
Definition: EvtParticle.cc:113
double getLifetime()
Definition: EvtParticle.cc:99
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:121
void setLifetime(double tau)
Definition: EvtParticle.cc:89
int getNDaug() const
Definition: EvtParticle.cc:125
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:85
void deleteDaughters(bool keepChannel=false)
Definition: EvtParticle.cc:540
virtual EvtVector4C eps(int i) const
Definition: EvtParticle.cc:576
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
static double random()
Definition: EvtRandom.cc:41
double d3mag() const
Definition: EvtVector4R.cc:186

◆ getName()

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

Implements EvtDecayBase.

Definition at line 40 of file EvtVSSBMixCPT.cc.

40 {
41 model_name="VSS_BMIX";
42}

◆ init()

void EvtVSSBMixCPT::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 49 of file EvtVSSBMixCPT.cc.

49 {
50
51 // check that there we are provided exactly one parameter
52 if ( getNArg()>3) checkNArg(14,12,8);
53
54 if (getNArg()<1) {
55 report(ERROR,"EvtGen") << "EvtVSSBMix generator expected "
56 << " at least 1 argument (deltam) but found:"<<getNArg()<<endl;
57 report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
58 ::abort();
59 }
60 // check that we are asked to produced exactly 2 daughters
61 //4 are allowed if they are aliased..
62 checkNDaug(2,4);
63
64 if ( getNDaug()==4) {
65 if ( getDaug(0)!=getDaug(2)||getDaug(1)!=getDaug(3)){
66 report(ERROR,"EvtGen") << "EvtVSSBMixCPT generator allows "
67 << " 4 daughters only if 1=3 and 2=4"
68 << " (but 3 and 4 are aliased "<<endl;
69 report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
70 ::abort();
71 }
72 }
73 // check that we are asked to decay a vector particle into a pair
74 // of scalar particles
75
77
80
81 // check that our daughter particles are charge conjugates of each other
82 if(!(EvtPDL::chargeConj(getDaug(0)) == getDaug(1))) {
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
92 report(ERROR,"EvtGen") << "EvtVSSBMixCPT generator expected daughters "
93 << "to have the same lifetime." << endl
94 << " Found ctau = "
95 << EvtPDL::getctau(getDaug(0)) << " mm and "
96 << EvtPDL::getctau(getDaug(1)) << " mm" << endl;
97 report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
98 ::abort();
99 }
100 // precompute quantities that will be used to generate events
101 // and print out a summary of parameters for this decay
102
103 // mixing frequency in hbar/mm
104 _freq= getArg(0)/EvtConst::c;
105
106 // deltaG
107 double gamma= 1/EvtPDL::getctau(getDaug(0)); // gamma/c (1/mm)
108 _dGamma=0.0;
109 double dgog=0.0;
110 if ( getNArg() > 1 ) {
111 dgog=getArg(1);
112 _dGamma=dgog*gamma;
113 }
114 // q/p
115 _qoverp = EvtComplex(1.0,0.0);
116 if ( getNArg() == 3){
117 _qoverp = EvtComplex(getArg(2),0.0);
118 }
119 if ( getNArg() > 3) {
120 _qoverp = getArg(2)*EvtComplex(cos(getArg(3)),sin(getArg(3)));
121 }
122 _poverq=1.0/_qoverp;
123
124 // decay amplitudes
125 _A_f=EvtComplex(1.0,0.0);
126 _Abar_f=EvtComplex(0.0,0.0);
127 _A_fbar=_Abar_f; // CPT conservation
128 _Abar_fbar=_A_f; // CPT conservation
129 if ( getNArg() > 3){
130 _A_f=getArg(4)*EvtComplex(cos(getArg(5)),sin(getArg(5))); // this allows for DCSD
131 _Abar_f=getArg(6)*EvtComplex(cos(getArg(7)),sin(getArg(7))); // this allows for DCSD
132 if ( getNArg() > 8 ){
133 // CPT violation in decay
134 _A_fbar=getArg(8)*EvtComplex(cos(getArg(9)),sin(getArg(9)));
135 _Abar_fbar=getArg(10)*EvtComplex(cos(getArg(11)),sin(getArg(11)));
136 } else {
137 // CPT conservation in decay
138 _A_fbar=_Abar_f;
139 _Abar_fbar=_A_f;
140 }
141 }
142
143 // CPT violation in mixing
144 _z = EvtComplex(0.0,0.0);
145 if ( getNArg() > 12 ){
146 _z = EvtComplex(getArg(12),getArg(13));
147 }
148
149
150 // some printout
151 double tau= 1e12*EvtPDL::getctau(getDaug(0))/EvtConst::c; // in ps
152 double dm= 1e-12*getArg(0); // B0/anti-B0 mass difference in hbar/ps
153 double x= dm*tau;
154 double y= dgog*0.5; //y=dgamma/(2*gamma)
155 double qop2 = abs(_qoverp*_qoverp);
156 _chib0_b0bar=qop2*(x*x+y*y)/(qop2*(x*x+y*y)+2+x*x-y*y); // does not include CPT in mixing
157 _chib0bar_b0=(1/qop2)*(x*x+y*y)/((1/qop2)*(x*x+y*y)+2+x*x-y*y); // does not include CPT in mixing
158
159 report(INFO,"EvtGen") << "VSS_BMIXCPT will generate mixing and CPT/CP effects in mixing:"
160 << endl << endl
161 << " " << EvtPDL::name(getParentId()).c_str() << " --> "
162 << EvtPDL::name(getDaug(0)).c_str() << " + "
163 << EvtPDL::name(getDaug(1)).c_str() << endl << endl
164 << "using parameters:" << endl << endl
165 << " delta(m) = " << dm << " hbar/ps" << endl
166 << " _freq = " << _freq << " hbar/mm" << endl
167 << " dgog = " << dgog <<endl
168 << " dGamma = " << _dGamma <<" hbar/mm" <<endl
169 << " q/p = " << _qoverp << endl
170 << " z = " << _z << endl
171 << " tau = " << tau << " ps" << endl
172 << " x = " << x << endl
173 << " chi(B0->B0bar) = " << _chib0_b0bar << endl
174 << " chi(B0bar->B0) = " << _chib0bar_b0 << endl
175 << " Af = " << _A_f << endl
176 << " Abarf = " << _Abar_f << endl
177 << " Afbar = " << _A_fbar << endl
178 << " Abarfbar = " << _Abar_fbar << endl
179 << endl;
180}
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
Double_t x[10]
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
@ INFO
Definition: EvtReport.hh:52
static const double c
Definition: EvtConst.hh:32
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(int j)
EvtId getParentId()
Definition: EvtDecayBase.hh:60
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:64
static EvtId chargeConj(EvtId id)
Definition: EvtPDL.cc:208
static double getctau(EvtId i)
Definition: EvtPDL.hh:55
double y[1000]

◆ initProbMax()

void EvtVSSBMixCPT::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 182 of file EvtVSSBMixCPT.cc.

182 {
183 // this value is ok for reasonable values of all the parameters
184 setProbMax(4.0);
185}
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: