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

#include <EvtEtap2gpipiB.hh>

+ Inheritance diagram for EvtEtap2gpipiB:

Public Member Functions

 EvtEtap2gpipiB ()
 
virtual ~EvtEtap2gpipiB ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void initProbMax ()
 
void init ()
 
void decay (EvtParticle *p)
 
double AmplitudeSquare ()
 
double AmplitudeSquare_p ()
 
EvtVector4R GetDaugMomLab (int i)
 
EvtVector4R GetDaugMomCM (int i)
 
EvtVector4R GetDaugMomHel (int i)
 
int GetNdaug ()
 
 EvtEtap2gpipiB ()
 
virtual ~EvtEtap2gpipiB ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void initProbMax ()
 
void init ()
 
void decay (EvtParticle *p)
 
double AmplitudeSquare ()
 
double AmplitudeSquare_p ()
 
EvtVector4R GetDaugMomLab (int i)
 
EvtVector4R GetDaugMomCM (int i)
 
EvtVector4R GetDaugMomHel (int i)
 
int GetNdaug ()
 
- Public Member Functions inherited from EvtDecayIncoherent
void makeDecay (EvtParticle *p)
 
virtual ~EvtDecayIncoherent ()
 
void setDaughterSpinDensity (int daughter)
 
int isDaughterSpinDensitySet (int daughter)
 
void makeDecay (EvtParticle *p)
 
virtual ~EvtDecayIncoherent ()
 
void setDaughterSpinDensity (int daughter)
 
int isDaughterSpinDensitySet (int daughter)
 
- 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 EvtDecayBase
bool _daugsDecayedByParentModel
 

Detailed Description

Constructor & Destructor Documentation

◆ EvtEtap2gpipiB() [1/2]

EvtEtap2gpipiB::EvtEtap2gpipiB ( )
inline

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

34{}

Referenced by clone().

◆ ~EvtEtap2gpipiB() [1/2]

EvtEtap2gpipiB::~EvtEtap2gpipiB ( )
virtual

◆ EvtEtap2gpipiB() [2/2]

EvtEtap2gpipiB::EvtEtap2gpipiB ( )
inline

◆ ~EvtEtap2gpipiB() [2/2]

virtual EvtEtap2gpipiB::~EvtEtap2gpipiB ( )
virtual

Member Function Documentation

◆ AmplitudeSquare() [1/2]

double EvtEtap2gpipiB::AmplitudeSquare ( )

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

163 {
167 //cout<<"CMS:"<<(dp1+dp2+dp3).get(0)<<","<<(dp1+dp2+dp3).get(1)<<","<<(dp1+dp2+dp3).get(2)<<","<<(dp1+dp2+dp3).get(3)<<endl;
168 //cout<<(dp1.get(0)+dp2.get(0)+dp3.get(0))<<endl;
169 //cout<<(dp1.get(1)+dp2.get(1)+dp3.get(1))<<endl;
170 //cout<<(dp1.get(2)+dp2.get(2)+dp3.get(2))<<endl;
171 //cout<<(dp1.get(3)+dp2.get(3)+dp3.get(3))<<endl;
172 angular_boxrho2 Rho2pipi(dp1,dp2,dp3,true);
173 //angular_boxrho2 Rho2pipi(dp1,dp2,dp3,false);
174 int xbd=getArg(0);
175 //cout<<"xbd= "<<xbd<<" amps= "<<Rho2pipi.amps(xbd) <<endl;
176 return Rho2pipi.amps(xbd);
177}

Referenced by decay().

◆ AmplitudeSquare() [2/2]

double EvtEtap2gpipiB::AmplitudeSquare ( )

◆ AmplitudeSquare_p() [1/2]

double EvtEtap2gpipiB::AmplitudeSquare_p ( )

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

179 {
183 angular_boxrho2 tmp(dp1,dp2,dp3,false);
184 int xbd=getArg(0);
185 return tmp.amps(xbd);
186}

◆ AmplitudeSquare_p() [2/2]

double EvtEtap2gpipiB::AmplitudeSquare_p ( )

◆ clone() [1/2]

EvtDecayBase * EvtEtap2gpipiB::clone ( )
virtual

◆ clone() [2/2]

EvtDecayBase * EvtEtap2gpipiB::clone ( )
virtual

Implements EvtDecayBase.

◆ decay() [1/2]

void EvtEtap2gpipiB::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

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

75 {
76
77double amps,SamAmps,rd1;
78
79
80// calculated the max amplitude square in 20000 events, is it enough larger?
81
82 if(nrun==1){
83 int ir,nd;
84 for(ir=0;ir<=2000000;ir++){
85 // for(ir=0;ir<=20000;ir++){
86 loop0:
88 int nd=p->getNDaug(),i;
89 _nd=nd;
90 for(i=0;i<=nd-1;i++){
91 _p4Lab[i]=p->getDaug(i)->getP4Lab();
92 _p4CM[i]=p->getDaug(i)->getP4();
93 }
94 amps=AmplitudeSquare();
95 if(amps<0) goto loop0;
96 if(amps>max_amps) max_amps=amps*1.01;
97
98 //cout<<"amps= "<<amps<<endl;
99 //cout<<"max_amps= "<<max_amps<<endl;
100
101 if(nrun<2){//check decay card
102 EvtId pid0= p->getId();//etaprime
103 EvtId pid1= p->getDaug(0)->getId();//pi+
104 EvtId pid2= p->getDaug(1)->getId();//pi-
105 EvtId pid3= p->getDaug(2)->getId();//gamma
106 if(pid0!= EvtPDL::getId("eta'")) { std::cout<<"Etap2gpipiB need specify the parent as etaprime"<<std::endl;abort();}
107 if(pid3!= EvtPDL::getId("gamma")) { std::cout<<"Etap2gpipiB need specify the daughters as pi+ pi- gamma"<<std::endl;abort();}
108 }
109 nrun++;
110 }
111 }
112
113//cout<<"max_amps= "<<max_amps<<endl;
114
115
116if(max_amps==0.0) {report(ERROR,"EvtGen")<<"The decay amplitude square should be positive number"<<endl;abort();}
117
118//cout<<"max_amp="<<max_amps<<endl;
119
120loop:
122 int i;
123 for(i=0;i<=p->getNDaug()-1;i++){
124 _p4Lab[i]=p->getDaug(i)->getP4Lab();
125 _p4CM[i]=p->getDaug(i)->getP4();
126 }
127// Put phase space results into the daughters.
128 amps=AmplitudeSquare();
129 if(amps < 0) goto loop;
130 SamAmps=amps/max_amps;
131 rd1=EvtRandom::Flat(0.0, 1.0);
132 if(rd1>=SamAmps) goto loop;
133 return ;
134}
ostream & report(Severity severity, const char *facility)
static EvtId getId(const std::string &name)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)

◆ decay() [2/2]

void EvtEtap2gpipiB::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

◆ GetDaugMomCM() [1/2]

EvtVector4R EvtEtap2gpipiB::GetDaugMomCM ( int  i)
inline

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

51{return _p4CM[i];}

Referenced by AmplitudeSquare(), and AmplitudeSquare_p().

◆ GetDaugMomCM() [2/2]

EvtVector4R EvtEtap2gpipiB::GetDaugMomCM ( int  i)
inline

Definition at line 51 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtEtap2gpipiB.hh.

51{return _p4CM[i];}

◆ GetDaugMomHel() [1/2]

EvtVector4R EvtEtap2gpipiB::GetDaugMomHel ( int  i)
inline

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

52{return _p4Hel[i];}

◆ GetDaugMomHel() [2/2]

EvtVector4R EvtEtap2gpipiB::GetDaugMomHel ( int  i)
inline

Definition at line 52 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtEtap2gpipiB.hh.

52{return _p4Hel[i];}

◆ GetDaugMomLab() [1/2]

EvtVector4R EvtEtap2gpipiB::GetDaugMomLab ( int  i)
inline

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

50{return _p4Lab[i];}

◆ GetDaugMomLab() [2/2]

EvtVector4R EvtEtap2gpipiB::GetDaugMomLab ( int  i)
inline

Definition at line 50 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtEtap2gpipiB.hh.

50{return _p4Lab[i];}

◆ getName() [1/2]

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

Implements EvtDecayBase.

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

47 {
48
49 model_name="Etap2gpipiB";
50
51}

◆ getName() [2/2]

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

Implements EvtDecayBase.

◆ GetNdaug() [1/2]

int EvtEtap2gpipiB::GetNdaug ( )
inline

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

55{return _nd;}

◆ GetNdaug() [2/2]

int EvtEtap2gpipiB::GetNdaug ( )
inline

Definition at line 55 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtEtap2gpipiB.hh.

55{return _nd;}

◆ init() [1/2]

void EvtEtap2gpipiB::init ( )
virtual

Reimplemented from EvtDecayBase.

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

60 {
61
62// check that there are 1 arguments:angular distribution parameter
63 checkNArg(1);
64 checkNDaug(3);
66}
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static EvtSpinType::spintype getSpinType(EvtId i)

◆ init() [2/2]

void EvtEtap2gpipiB::init ( )
virtual

Reimplemented from EvtDecayBase.

◆ initProbMax() [1/2]

void EvtEtap2gpipiB::initProbMax ( )
virtual

◆ initProbMax() [2/2]

void EvtEtap2gpipiB::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.


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