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

#include <EvtBtoKD3P.hh>

Inheritance diagram for EvtBtoKD3P:

Public Member Functions

 EvtBtoKD3P ()
 EvtBtoKD3P (const EvtBtoKD3P &other)
virtual ~EvtBtoKD3P ()
EvtDecayBaseclone ()
virtual void init ()
virtual void initProbMax ()
virtual void decay (EvtParticle *p)
virtual int nRealDaughters ()
void getName (std::string &model_name)
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)

Protected Attributes

double _r
EvtComplex _exp
const EvtDecayBase_model1
const EvtDecayBase_model2
bool _decayedOnce
Protected Attributes inherited from EvtDecayAmp
EvtAmp _amp2
Protected Attributes inherited from EvtDecayBase
bool _daugsDecayedByParentModel

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 ()

Detailed Description

Definition at line 50 of file EvtBtoKD3P.hh.

Constructor & Destructor Documentation

◆ EvtBtoKD3P() [1/2]

EvtBtoKD3P::EvtBtoKD3P ( )

Definition at line 34 of file EvtBtoKD3P.cc.

34: _model1( 0 ), _model2( 0 ), _decayedOnce( false ) {}
bool _decayedOnce
Definition EvtBtoKD3P.hh:76
const EvtDecayBase * _model2
Definition EvtBtoKD3P.hh:75
const EvtDecayBase * _model1
Definition EvtBtoKD3P.hh:74

Referenced by clone(), and EvtBtoKD3P().

◆ EvtBtoKD3P() [2/2]

EvtBtoKD3P::EvtBtoKD3P ( const EvtBtoKD3P & other)

Definition at line 37 of file EvtBtoKD3P.cc.

37{}

◆ ~EvtBtoKD3P()

EvtBtoKD3P::~EvtBtoKD3P ( )
virtual

Definition at line 40 of file EvtBtoKD3P.cc.

40{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtBtoKD3P::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 43 of file EvtBtoKD3P.cc.

43{ return new EvtBtoKD3P(); }

◆ decay()

void EvtBtoKD3P::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 74 of file EvtBtoKD3P.cc.

74 {
75 // tell the subclass that we decay the daughter:
77
78 // the K is the 1st daughter of the B EvtParticle.
79 // The decay mode of the allowed D (the one produced in b->c decay) is 2nd
80 // The decay mode of the suppressed D (the one produced in b->u decay) is 3rd
81 const int KIND = 0;
82 const int D1IND = 1;
83 const int D2IND = 2;
84
85 // generate kinematics of daughters (K and D):
86 EvtId tempDaug[2] = { getDaug( KIND ), getDaug( D1IND ) };
87 p->initializePhaseSpace( 2, tempDaug );
88
89 // Get the D daughter particle and the decay models of the allowed
90 // and suppressed D modes:
91 EvtParticle* theD = p->getDaug( D1IND );
92 EvtPto3P* model1 = (EvtPto3P*)( EvtDecayTable::getDecayFunc( theD ) );
93
94 // for the suppressed mode, re-initialize theD as the suppressed D alias:
95 theD->init( getDaug( D2IND ), theD->getP4() );
96 EvtPto3P* model2 = (EvtPto3P*)( EvtDecayTable::getDecayFunc( theD ) );
97
98 // on the first call:
99 if ( false == _decayedOnce )
100 {
101 _decayedOnce = true;
102
103 // store the D decay model pointers:
104 _model1 = model1;
105 _model2 = model2;
106
107 // check the decay models of the first 2 daughters and that they
108 // have the same final states:
109 std::string name1;
110 std::string name2;
111 model1->getName( name1 );
112 model2->getName( name2 );
113
114 if ( name1 != "PTO3P" )
115 {
116 report( ERROR, "EvtGen" )
117 << "D daughters of EvtBtoKD3P decay must decay via the \"PTO3P\" model" << endl
118 << " but found to decay via " << name1.c_str() << " or " << name2.c_str()
119 << ". Will terminate execution!" << endl;
120 assert( 0 );
121 }
122
123 EvtId* daugs1 = model1->getDaugs();
124 EvtId* daugs2 = model2->getDaugs();
125
126 bool idMatch = true;
127 int d;
128 for ( d = 0; d < 2; ++d )
129 {
130 if ( daugs1[d] != daugs2[d] ) { idMatch = false; }
131 }
132 if ( false == idMatch )
133 {
134 report( ERROR, "EvtGen" )
135 << "D daughters of EvtBtoKD3P decay must decay to the same final state" << endl
136 << " particles in the same order (not CP-conjugate order)," << endl
137 << " but they were found to decay to" << endl;
138 for ( d = 0; d < model1->getNDaug(); ++d )
139 { report( ERROR, "" ) << " " << EvtPDL::name( daugs1[d] ).c_str() << " "; }
140 report( ERROR, "" ) << endl;
141 for ( d = 0; d < model1->getNDaug(); ++d )
142 { report( ERROR, "" ) << " " << EvtPDL::name( daugs2[d] ).c_str() << " "; }
143 report( ERROR, "" ) << endl << ". Will terminate execution!" << endl;
144 assert( 0 );
145 }
146
147 // estimate the probmax. Need to know the probmax's of the 2
148 // models for this:
149 setProbMax( model1->getProbMax( 0 ) + _r * _r * model2->getProbMax( 0 ) +
150 2 * _r * sqrt( model1->getProbMax( 0 ) * model2->getProbMax( 0 ) ) );
151
152 } // end of things to do on the first call
153
154 // make sure the models haven't changed since the first call:
155 if ( _model1 != model1 || _model2 != model2 )
156 {
157 report( ERROR, "EvtGen" )
158 << "D daughters of EvtBtoKD3P decay should have only 1 decay modes, " << endl
159 << " but a new decay mode was found after the first call" << endl
160 << " Will terminate execution!" << endl;
161 assert( 0 );
162 }
163
164 // get the cover function for each of the models and add them up.
165 // They are summed with coefficients 1 because we are willing to
166 // take a small inefficiency (~50%) in order to ensure that the
167 // cover function is large enough without getting into complications
168 // associated with the smallness of _r:
169 EvtPdfSum<EvtDalitzPoint>* pc1 = model1->getPC();
170 EvtPdfSum<EvtDalitzPoint>* pc2 = model2->getPC();
171 EvtPdfSum<EvtDalitzPoint> pc;
172 pc.addTerm( 1.0, *pc1 );
173 pc.addTerm( 1.0, *pc2 );
174
175 // from this combined cover function, generate the Dalitz point:
176 EvtDalitzPoint x = pc.randomPoint();
177
178 // get the aptitude for each of the models on this point and add them up:
179 EvtComplex amp1 = model1->amplNonCP( x );
180 EvtComplex amp2 = model2->amplNonCP( x );
181 EvtComplex amp = amp1 + amp2 * _r * _exp;
182
183 // get the value of the cover function for this point and set the
184 // relative amplitude for this decay:
185
186 double comp = sqrt( pc.evaluate( x ) );
187 vertex( amp / comp );
188
189 // Make the daughters of theD:
190 theD->generateMassTree();
191
192 // Now generate the p4's of the daughters of theD:
193 std::vector<EvtVector4R> v = model2->initDaughters( x );
194
195 if ( v.size() != theD->getNDaug() )
196 {
197 report( ERROR, "EvtGen" ) << "Number of daughters " << theD->getNDaug() << " != "
198 << "Momentum vector size " << v.size() << endl
199 << " Terminating execution." << endl;
200 assert( 0 );
201 }
202
203 // Apply the new p4's to the daughters:
204 int i;
205 for ( i = 0; i < theD->getNDaug(); ++i )
206 { theD->getDaug( i )->init( model2->getDaugs()[i], v[i] ); }
207}
Double_t x[10]
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
EvtComplex _exp
Definition EvtBtoKD3P.hh:71
double _r
Definition EvtBtoKD3P.hh:70
void vertex(const EvtComplex &amp)
void setProbMax(double prbmx)
double getProbMax(double prob)
EvtId * getDaugs()
bool _daugsDecayedByParentModel
EvtId getDaug(int i)
static EvtDecayBase * getDecayFunc(EvtParticle *)
EvtPdfSum< T > * getPC()
EvtComplex amplNonCP(const T &x)
static std::string name(EvtId i)
Definition EvtPDL.hh:70
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
const EvtVector4R & getP4() const
int getNDaug() const
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
void generateMassTree()
void addTerm(double c, const EvtPdf< T > &pdf)
Definition EvtPdfSum.hh:29
virtual T randomPoint()
Definition EvtPdfSum.hh:104
double evaluate(const T &p) const
Definition EvtPdf.hh:64
void getName(std::string &model_name)
Definition EvtPto3P.hh:30
virtual std::vector< EvtVector4R > initDaughters(const EvtDalitzPoint &p) const
Definition EvtPto3P.cc:55

◆ getName()

void EvtBtoKD3P::getName ( std::string & model_name)
virtual

Implements EvtDecayBase.

Definition at line 46 of file EvtBtoKD3P.cc.

46{ model_name = "BTOKD3P"; }

◆ init()

void EvtBtoKD3P::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 49 of file EvtBtoKD3P.cc.

49 {
50 checkNArg( 2 ); // r, phase
51 checkNDaug( 3 ); // K, D0(allowed), D0(suppressed).
52 // The last two daughters are really one particle
53
54 // check that the mother and all daughters are scalars:
59
60 // Check that the B dtr types are K D D:
61
62 // get the parameters:
63 _r = getArg( 0 );
64 double phase = getArg( 1 );
65 _exp = EvtComplex( cos( phase ), sin( phase ) );
66}
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(int j)
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)

◆ initProbMax()

void EvtBtoKD3P::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 69 of file EvtBtoKD3P.cc.

69 {
70 setProbMax( 1 ); // this is later changed in decay()
71}

◆ nRealDaughters()

virtual int EvtBtoKD3P::nRealDaughters ( )
inlinevirtual

Reimplemented from EvtDecayBase.

Definition at line 64 of file EvtBtoKD3P.hh.

64{ return 2; }

Member Data Documentation

◆ _decayedOnce

bool EvtBtoKD3P::_decayedOnce
protected

Definition at line 76 of file EvtBtoKD3P.hh.

Referenced by decay(), and EvtBtoKD3P().

◆ _exp

EvtComplex EvtBtoKD3P::_exp
protected

Definition at line 71 of file EvtBtoKD3P.hh.

Referenced by decay(), and init().

◆ _model1

const EvtDecayBase* EvtBtoKD3P::_model1
protected

Definition at line 74 of file EvtBtoKD3P.hh.

Referenced by decay(), and EvtBtoKD3P().

◆ _model2

const EvtDecayBase* EvtBtoKD3P::_model2
protected

Definition at line 75 of file EvtBtoKD3P.hh.

Referenced by decay(), and EvtBtoKD3P().

◆ _r

double EvtBtoKD3P::_r
protected

Definition at line 70 of file EvtBtoKD3P.hh.

Referenced by decay(), and init().


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