BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtEtap2gpipi Class Reference

#include <EvtEtap2gpipi.hh>

+ Inheritance diagram for EvtEtap2gpipi:

Public Member Functions

 EvtEtap2gpipi ()
 
virtual ~EvtEtap2gpipi ()
 
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 32 of file EvtEtap2gpipi.hh.

Constructor & Destructor Documentation

◆ EvtEtap2gpipi()

EvtEtap2gpipi::EvtEtap2gpipi ( )
inline

Definition at line 36 of file EvtEtap2gpipi.hh.

36{}

Referenced by clone().

◆ ~EvtEtap2gpipi()

EvtEtap2gpipi::~EvtEtap2gpipi ( )
virtual

Definition at line 45 of file EvtEtap2gpipi.cc.

45{}

Member Function Documentation

◆ AmplitudeSquare()

double EvtEtap2gpipi::AmplitudeSquare ( )

Definition at line 164 of file EvtAmpsEtap2gpipi.cc.

164 {
168 //cout<<"CMS:"<<(dp1+dp2+dp3).get(0)<<","<<(dp1+dp2+dp3).get(1)<<","<<(dp1+dp2+dp3).get(2)<<","<<(dp1+dp2+dp3).get(3)<<endl;
169 //cout<<(dp1.get(0)+dp2.get(0)+dp3.get(0))<<endl;
170 //cout<<(dp1.get(1)+dp2.get(1)+dp3.get(1))<<endl;
171 //cout<<(dp1.get(2)+dp2.get(2)+dp3.get(2))<<endl;
172 //cout<<(dp1.get(3)+dp2.get(3)+dp3.get(3))<<endl;
173 angular_rho2 Rho2pipi(dp1,dp2,dp3,true);
174 int xbd=getArg(0);
175// cout<<"amps(xbd) ="<<xbd<<endl;
176 return Rho2pipi.amps(xbd);
177}
double getArg(int j)
EvtVector4R GetDaugMomCM(int i)

Referenced by decay().

◆ AmplitudeSquare_p()

double EvtEtap2gpipi::AmplitudeSquare_p ( )

Definition at line 179 of file EvtAmpsEtap2gpipi.cc.

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

◆ clone()

EvtDecayBase * EvtEtap2gpipi::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 53 of file EvtEtap2gpipi.cc.

53 {
54 return new EvtEtap2gpipi;
55}

◆ decay()

void EvtEtap2gpipi::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 74 of file EvtEtap2gpipi.cc.

74 {
75
76double amps,SamAmps,rd1;
77
78// calculated the max amplitude square in 20000 events, is it enough larger?
79
80 if(nrun==1){
81 int ir,nd;
82 for(ir=0;ir<=2000000;ir++){
83 loop0:
85 int nd=p->getNDaug(),i;
86 _nd=nd;
87 for(i=0;i<=nd-1;i++){
88 _p4Lab[i]=p->getDaug(i)->getP4Lab();
89 _p4CM[i]=p->getDaug(i)->getP4();
90 }
91 amps=AmplitudeSquare();
92 if(amps<0) goto loop0;
93 if(amps>max_amps) max_amps=amps*1.01;
94
95 if(nrun<2){//check decay card
96 EvtId pid0= p->getId();//etaprime
97 EvtId pid1= p->getDaug(0)->getId();//pi+
98 EvtId pid2= p->getDaug(1)->getId();//pi-
99 EvtId pid3= p->getDaug(2)->getId();//gamma
100 if(pid0!= EvtPDL::getId("eta'")) { std::cout<<"Etap2gpipi need specify the parent as etaprime"<<std::endl;abort();}
101 if(pid3!= EvtPDL::getId("gamma")) { std::cout<<"Etap2gpipi need specify the daughters as pi+ pi- gamma"<<std::endl;abort();}
102 }
103
104 nrun++;
105 }
106 }
107
108
109
110if(max_amps==0.0) {report(ERROR,"EvtGen")<<"The decay amplitude square should be positive number"<<endl;abort();}
111
112
113loop:
115 int i;
116 for(i=0;i<=p->getNDaug()-1;i++){
117 _p4Lab[i]=p->getDaug(i)->getP4Lab();
118 _p4CM[i]=p->getDaug(i)->getP4();
119 }
120 amps=AmplitudeSquare();
121 if(amps < 0) goto loop;
122 SamAmps=amps/max_amps;
123 rd1=EvtRandom::Flat(0.0, 1.0);
124 if(rd1>=SamAmps) goto loop;
125 return ;
126}
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
double AmplitudeSquare()
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 EvtEtap2gpipi::GetDaugMomCM ( int  i)
inline

Definition at line 53 of file EvtEtap2gpipi.hh.

53{return _p4CM[i];}

Referenced by AmplitudeSquare(), and AmplitudeSquare_p().

◆ GetDaugMomHel()

EvtVector4R EvtEtap2gpipi::GetDaugMomHel ( int  i)
inline

Definition at line 54 of file EvtEtap2gpipi.hh.

54{return _p4Hel[i];}

◆ GetDaugMomLab()

EvtVector4R EvtEtap2gpipi::GetDaugMomLab ( int  i)
inline

Definition at line 52 of file EvtEtap2gpipi.hh.

52{return _p4Lab[i];}

◆ getName()

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

Implements EvtDecayBase.

Definition at line 47 of file EvtEtap2gpipi.cc.

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

◆ GetNdaug()

int EvtEtap2gpipi::GetNdaug ( )
inline

Definition at line 57 of file EvtEtap2gpipi.hh.

57{return _nd;}

◆ init()

void EvtEtap2gpipi::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 58 of file EvtEtap2gpipi.cc.

58 {
59 // check that there are 0 arguments
60 checkNArg(1);
61 checkNDaug(3);
63}
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 EvtEtap2gpipi::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 66 of file EvtEtap2gpipi.cc.

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

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