BOSS 8.0.0
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)
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)
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 30 of file EvtSSDCP.hh.

Constructor & Destructor Documentation

◆ EvtSSDCP()

EvtSSDCP::EvtSSDCP ( )
inline

Definition at line 33 of file EvtSSDCP.hh.

33{}

Referenced by clone().

◆ ~EvtSSDCP()

EvtSSDCP::~EvtSSDCP ( )
virtual

Definition at line 37 of file EvtSSDCP.cc.

37{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtSSDCP::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 41 of file EvtSSDCP.cc.

41{ return new EvtSSDCP; }

◆ decay()

void EvtSSDCP::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 163 of file EvtSSDCP.cc.

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

◆ getName()

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

Implements EvtDecayBase.

Definition at line 39 of file EvtSSDCP.cc.

39{ model_name = "SSD_CP"; }

◆ init()

void EvtSSDCP::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 43 of file EvtSSDCP.cc.

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

◆ initProbMax()

void EvtSSDCP::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 150 of file EvtSSDCP.cc.

150 {
151 double theProbMax = abs( _A_f ) * abs( _A_f ) + abs( _Abar_f ) * abs( _Abar_f ) +
152 abs( _A_fbar ) * abs( _A_fbar ) + abs( _Abar_fbar ) * abs( _Abar_fbar );
153
154 if ( _eigenstate ) theProbMax *= 2;
155
158 if ( d1type == EvtSpinType::TENSOR || d2type == EvtSpinType::TENSOR ) theProbMax *= 10;
159
160 setProbMax( theProbMax );
161}
void setProbMax(double prbmx)

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