BOSS 7.0.6
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 ()
 
- Public Member Functions inherited from EvtDecayIncoherent
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 ()
 

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 EvtDecayBase
bool _daugsDecayedByParentModel
 

Detailed Description

Definition at line 30 of file EvtEtap2gpipiB.hh.

Constructor & Destructor Documentation

◆ EvtEtap2gpipiB()

EvtEtap2gpipiB::EvtEtap2gpipiB ( )
inline

Definition at line 34 of file EvtEtap2gpipiB.hh.

34{}

Referenced by clone().

◆ ~EvtEtap2gpipiB()

EvtEtap2gpipiB::~EvtEtap2gpipiB ( )
virtual

Definition at line 45 of file EvtEtap2gpipiB.cc.

45{}

Member Function Documentation

◆ AmplitudeSquare()

double EvtEtap2gpipiB::AmplitudeSquare ( )

Definition at line 163 of file 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}
double getArg(int j)
EvtVector4R GetDaugMomCM(int i)

Referenced by decay().

◆ AmplitudeSquare_p()

double EvtEtap2gpipiB::AmplitudeSquare_p ( )

Definition at line 179 of file EvtAmpsEtap2gpipiB.cc.

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

◆ clone()

EvtDecayBase * EvtEtap2gpipiB::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 53 of file EvtEtap2gpipiB.cc.

53 {
54
55 return new EvtEtap2gpipiB;
56
57}

◆ decay()

void EvtEtap2gpipiB::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 75 of file 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)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
Definition: EvtId.hh:27
static EvtId getId(const std::string &name)
Definition: EvtPDL.cc:287
EvtVector4R getP4Lab()
Definition: EvtParticle.cc:685
EvtId getId() const
Definition: EvtParticle.cc:113
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:121
int getNDaug() const
Definition: EvtParticle.cc:125
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:85
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
static double Flat()
Definition: EvtRandom.cc:74

◆ GetDaugMomCM()

EvtVector4R EvtEtap2gpipiB::GetDaugMomCM ( int  i)
inline

Definition at line 51 of file EvtEtap2gpipiB.hh.

51{return _p4CM[i];}

Referenced by AmplitudeSquare(), and AmplitudeSquare_p().

◆ GetDaugMomHel()

EvtVector4R EvtEtap2gpipiB::GetDaugMomHel ( int  i)
inline

Definition at line 52 of file EvtEtap2gpipiB.hh.

52{return _p4Hel[i];}

◆ GetDaugMomLab()

EvtVector4R EvtEtap2gpipiB::GetDaugMomLab ( int  i)
inline

Definition at line 50 of file EvtEtap2gpipiB.hh.

50{return _p4Lab[i];}

◆ getName()

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

Implements EvtDecayBase.

Definition at line 47 of file EvtEtap2gpipiB.cc.

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

◆ GetNdaug()

int EvtEtap2gpipiB::GetNdaug ( )
inline

Definition at line 55 of file EvtEtap2gpipiB.hh.

55{return _nd;}

◆ init()

void EvtEtap2gpipiB::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 60 of file EvtEtap2gpipiB.cc.

60 {
61
62// check that there are 1 arguments:angular distribution parameter
63 checkNArg(1);
64 checkNDaug(3);
66}
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 EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.hh:61

◆ initProbMax()

void EvtEtap2gpipiB::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 67 of file EvtEtap2gpipiB.cc.

67 {
68 noProbMax();
69}
void noProbMax()

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