BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtSSDCP Class Reference

#include <EvtSSDCP.hh>

+ Inheritance diagram for EvtSSDCP:

Public Member Functions

 EvtSSDCP ()
 
virtual ~EvtSSDCP ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void initProbMax ()
 
void init ()
 
void decay (EvtParticle *p)
 
 EvtSSDCP ()
 
virtual ~EvtSSDCP ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void initProbMax ()
 
void init ()
 
void decay (EvtParticle *p)
 
- 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 ()
 
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 ()
 
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)
 
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 ()
 
bool daugsDecayedByParentModel ()
 
- Protected Attributes inherited from EvtDecayAmp
EvtAmp _amp2
 
- Protected Attributes inherited from EvtDecayBase
bool _daugsDecayedByParentModel
 

Detailed Description

Constructor & Destructor Documentation

◆ EvtSSDCP() [1/2]

EvtSSDCP::EvtSSDCP ( )
inline

Definition at line 34 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSSDCP.hh.

34{}

Referenced by clone().

◆ ~EvtSSDCP() [1/2]

EvtSSDCP::~EvtSSDCP ( )
virtual

◆ EvtSSDCP() [2/2]

EvtSSDCP::EvtSSDCP ( )
inline

◆ ~EvtSSDCP() [2/2]

virtual EvtSSDCP::~EvtSSDCP ( )
virtual

Member Function Documentation

◆ clone() [1/2]

EvtDecayBase * EvtSSDCP::clone ( )
virtual

◆ clone() [2/2]

EvtDecayBase * EvtSSDCP::clone ( )
virtual

Implements EvtDecayBase.

◆ decay() [1/2]

void EvtSSDCP::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 168 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSSDCP.cc.

168 {
169
170 static EvtId B0=EvtPDL::getId("B0");
171 static EvtId B0B=EvtPDL::getId("anti-B0");
172
173 double t;
174 EvtId other_b;
175 EvtId daugs[2];
176
177 int flip=0;
178 if (!_eigenstate){
179 if (EvtRandom::Flat(0.0,1.0)<0.5) flip=1;
180 }
181
182 if (!flip) {
183 daugs[0]=getDaug(0);
184 daugs[1]=getDaug(1);
185 }
186 else{
187 daugs[0]=EvtPDL::chargeConj(getDaug(0));
188 daugs[1]=EvtPDL::chargeConj(getDaug(1));
189 }
190
191 EvtParticle *d;
192 p->initializePhaseSpace(2, daugs);
193
194 EvtComplex amp;
195
196
197 EvtCPUtil::OtherB(p,t,other_b,0.5); // t is c*Dt (mm)
198
199 //if (flip) t=-t;
200
201 //FS We assume DGamma=GammaLow-GammaHeavy and Dm=mHeavy-mLow
202 EvtComplex expL=exp(-EvtComplex(-0.25*_dgamma*t,0.5*_dm*t));
203 EvtComplex expH=exp(EvtComplex(-0.25*_dgamma*t,0.5*_dm*t));
204 //FS Definition of gp and gm
205 EvtComplex gp=0.5*(expL+expH);
206 EvtComplex gm=0.5*(expL-expH);
207 //FS Calculation os sqrt(1-z^2)
208 EvtComplex sqz=sqrt(abs(1-_z*_z))*exp(EvtComplex(0,arg(1-_z*_z)/2));
209
210 //EvtComplex BB=0.5*(expL+expH); // <B0|B0(t)>
211 //EvtComplex barBB=_qoverp*0.5*(expL-expH); // <B0bar|B0(t)>
212 //EvtComplex BbarB=_poverq*0.5*(expL-expH); // <B0|B0bar(t)>
213 //EvtComplex barBbarB=BB; // <B0bar|B0bar(t)>
214 // FS redefinition of these guys... (See BAD #188 eq.35 for ref.)
215 // q/p is taken as in the BaBar Phys. Book (opposite sign wrt ref.)
216 EvtComplex BB=gp+_z*gm; // <B0|B0(t)>
217 EvtComplex barBB=sqz*_qoverp*gm; // <B0bar|B0(t)>
218 EvtComplex BbarB=sqz*_poverq*gm; // <B0|B0bar(t)>
219 EvtComplex barBbarB=gp-_z*gm; // <B0bar|B0bar(t)>
220
221 if (!flip){
222 if (other_b==B0B){
223 //at t=0 we have a B0
224 //report(INFO,"EvtGen") << "B0B"<<endl;
225 amp=BB*_A_f+BbarB*_Abar_f;
226 //std::cout << "noflip B0B tag:"<<amp<<std::endl;
227 //amp=0.0;
228 }
229 if (other_b==B0){
230 //report(INFO,"EvtGen") << "B0"<<endl;
231 amp=barBB*_A_f+barBbarB*_Abar_f;
232 }
233 }else{
234 if (other_b==B0){
235 amp=barBB*_A_fbar+barBbarB*_Abar_fbar;
236 //std::cout << "flip B0 tag:"<<amp<<std::endl;
237 //amp=0.0;
238 }
239 if (other_b==B0B){
240 amp=BB*_A_fbar+BbarB*_Abar_fbar;
241 }
242 }
243
244
245 EvtVector4R p4_parent=p->getP4Restframe();
246 double m_parent=p4_parent.mass();
247
249
250 EvtVector4R momv;
251 EvtVector4R moms;
252
253 if (d2type==EvtSpinType::SCALAR){
254 d2type=EvtPDL::getSpinType(getDaug(0));
255 d= p->getDaug(0);
256 momv = d->getP4();
257 moms = p->getDaug(1)->getP4();
258 }
259 else{
260 d= p->getDaug(1);
261 momv = d->getP4();
262 moms = p->getDaug(0)->getP4();
263 }
264
265
266
267 if (d2type==EvtSpinType::SCALAR) {
268 vertex(amp);
269 }
270
271 if (d2type==EvtSpinType::VECTOR) {
272
273 double norm=momv.mass()/(momv.d3mag()*p->mass());
274
275 vertex(0,amp*norm*p4_parent*(d->epsParent(0)));
276 vertex(1,amp*norm*p4_parent*(d->epsParent(1)));
277 vertex(2,amp*norm*p4_parent*(d->epsParent(2)));
278
279 }
280
281 if (d2type==EvtSpinType::TENSOR) {
282
283 double norm=d->mass()*d->mass()/(m_parent*d->getP4().d3mag()*d->getP4().d3mag());
284
285
286 vertex(0,amp*norm*d->epsTensorParent(0).cont1(p4_parent)*p4_parent);
287 vertex(1,amp*norm*d->epsTensorParent(1).cont1(p4_parent)*p4_parent);
288 vertex(2,amp*norm*d->epsTensorParent(2).cont1(p4_parent)*p4_parent);
289 vertex(3,amp*norm*d->epsTensorParent(3).cont1(p4_parent)*p4_parent);
290 vertex(4,amp*norm*d->epsTensorParent(4).cont1(p4_parent)*p4_parent);
291
292 }
293
294
295 return ;
296}
EvtComplex exp(const EvtComplex &c)
TTree * t
Definition: binning.cxx:23
static void OtherB(EvtParticle *p, double &t, EvtId &otherb)
static EvtSpinType::spintype getSpinType(EvtId i)
static EvtId getId(const std::string &name)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
EvtVector4C cont1(const EvtVector4C &v4) const

◆ decay() [2/2]

void EvtSSDCP::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

◆ getName() [1/2]

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

Implements EvtDecayBase.

Definition at line 38 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSSDCP.cc.

38 {
39
40 model_name="SSD_CP";
41
42}

◆ getName() [2/2]

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

Implements EvtDecayBase.

◆ init() [1/2]

void EvtSSDCP::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 51 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSSDCP.cc.

51 {
52
53 // check that there are 8 or 12 or 14 arguments
54
55 checkNArg(14,12,8);
56 checkNDaug(2);
57
60
61 // FS commented this check to include alias of B0
62 // if ( !((getParentId() == EvtPDL::getId("B0"))||(getParentId() == EvtPDL::getId("B0B"))) ) {
63 // report(ERROR, "EvtGen") << "EvtSSDCP cannot decay "
64 // << EvtPDL::name(getParentId())
65 // << ". Must be specified to decay"
66 // << " only B0 or a B0B ." << endl;
67 // report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
68 // ::abort();
69 //}
70
71 if ( (!(d1type == EvtSpinType::SCALAR || d2type == EvtSpinType::SCALAR))||
72 (!((d2type==EvtSpinType::SCALAR)||(d2type==EvtSpinType::VECTOR)||(d2type==EvtSpinType::TENSOR)))||
73 (!((d1type==EvtSpinType::SCALAR)||(d1type==EvtSpinType::VECTOR)||(d1type==EvtSpinType::TENSOR)))
74 ) {
75 report(ERROR,"EvtGen") << "EvtSSDCP generator expected "
76 << "one of the daugters to be a scalar, the other either scalar, vector, or tensor, found:"
77 << EvtPDL::name(getDaug(0)).c_str()<<" and "<<EvtPDL::name(getDaug(1)).c_str()<<endl;
78 report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
79 ::abort();
80 }
81
82 _dm=getArg(0)/EvtConst::c; //units of 1/mm
83
84 _dgog=getArg(1);
85
86
87 _qoverp=getArg(2)*EvtComplex(cos(getArg(3)),sin(getArg(3)));
88 _poverq=1.0/_qoverp;
89
90 _A_f=getArg(4)*EvtComplex(cos(getArg(5)),sin(getArg(5)));
91
92 _Abar_f=getArg(6)*EvtComplex(cos(getArg(7)),sin(getArg(7)));
93
94 if (getNArg()>=12){
95 _eigenstate=false;
96 _A_fbar=getArg(8)*EvtComplex(cos(getArg(9)),sin(getArg(9)));
97 _Abar_fbar=getArg(10)*EvtComplex(cos(getArg(11)),sin(getArg(11)));
98 }
99 else{
100 //I'm somewhat confused about this. For a CP eigenstate set the
101 //amplitudes to the same. For a non CP eigenstate CPT invariance
102 //is enforced. (ryd)
103 if (
108 _eigenstate=true;
109 }else{
110 _eigenstate=false;
111 _A_fbar=conj(_Abar_f);
112 _Abar_fbar=conj(_A_f);
113 }
114 }
115
116 //FS: new check for z
117 if (getNArg()==14){ //FS Set _z parameter if provided else set it 0
118 _z=EvtComplex(getArg(12),getArg(13));
119 }
120 else{
121 _z=EvtComplex(0.0,0.0);
122 }
123
124 // FS substituted next 2 lines...
125
126
127 //
128 // _gamma=EvtPDL::getctau(EvtPDL::getId("B0")); //units of 1/mm
129 //_dgamma=_gamma*0.5*_dgog;
130 //
131 // ...with:
132
133 _gamma=1/EvtPDL::getctau(EvtPDL::getId("B0")); //gamma/c (1/mm)
134 _dgamma=_gamma*_dgog; //dgamma/c (1/mm)
135
136 if (verbose()){
137 report(INFO,"EvtGen") << "SSD_CP will generate CP/CPT violation:"
138 << endl << endl
139 << " " << EvtPDL::name(getParentId()).c_str() << " --> "
140 << EvtPDL::name(getDaug(0)).c_str() << " + "
141 << EvtPDL::name(getDaug(1)).c_str() << endl << endl
142 << "using parameters:" << endl << endl
143 << " delta(m) = " << _dm << " hbar/ps" << endl
144 << "dGamma = " << _dgamma <<" ps-1" <<endl
145 << " q/p = " << _qoverp << endl
146 << " z = " << _z << endl
147 << " tau = " << 1./_gamma << " ps" << endl;
148 }
149
150}
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
Evt3Rank3C conj(const Evt3Rank3C &t2)
ostream & report(Severity severity, const char *facility)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)

◆ init() [2/2]

void EvtSSDCP::init ( )
virtual

Reimplemented from EvtDecayBase.

◆ initProbMax() [1/2]

void EvtSSDCP::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 152 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtSSDCP.cc.

152 {
153 double theProbMax =
154 abs(_A_f) * abs(_A_f) +
155 abs(_Abar_f) * abs(_Abar_f) +
156 abs(_A_fbar) * abs(_A_fbar) +
157 abs(_Abar_fbar) * abs(_Abar_fbar);
158
159 if (_eigenstate) theProbMax*=2;
160
163 if (d1type==EvtSpinType::TENSOR||d2type==EvtSpinType::TENSOR) theProbMax*=10;
164
165 setProbMax(theProbMax);
166}

◆ initProbMax() [2/2]

void EvtSSDCP::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.


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