BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtDIY Class Reference

#include <EvtDIY.hh>

+ Inheritance diagram for EvtDIY:

Public Member Functions

 EvtDIY ()
 
virtual ~EvtDIY ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void initProbMax ()
 
void init ()
 
void decay (EvtParticle *p)
 
double AmplitudeSquare ()
 
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 29 of file EvtDIY.hh.

Constructor & Destructor Documentation

◆ EvtDIY()

EvtDIY::EvtDIY ( )
inline

Definition at line 33 of file EvtDIY.hh.

33{}

Referenced by clone().

◆ ~EvtDIY()

EvtDIY::~EvtDIY ( )
virtual

Member Function Documentation

◆ AmplitudeSquare()

double EvtDIY::AmplitudeSquare ( )

Definition at line 176 of file UserDIY.cc.

176 {
179
180// AngularSam ppbar(0.7,dp1);
181// return ppbar.amps();
182
183// rhopi Jpsi2rhopi(dp1,dp2,dp3);
184// return Jpsi2rhopi.amps();
185
186 rhopifull Jpsi2rhopi(dp1,dp2,dp3);
187 return Jpsi2rhopi.amps();
188 }
EvtVector4R GetDaugMomLab(int i)
Definition: EvtDIY.hh:48

Referenced by decay().

◆ clone()

EvtDecayBase * EvtDIY::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 52 of file Generator/BesEvtGen/BesEvtGen-00-04-26/src/EvtGen/EvtGenModels/EvtDIY.cc.

52 {
53
54 return new EvtDIY;
55
56}
EvtDIY()
Definition: EvtDIY.hh:33

◆ decay()

void EvtDIY::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 79 of file Generator/BesEvtGen/BesEvtGen-00-04-26/src/EvtGen/EvtGenModels/EvtDIY.cc.

79 {
80
81double amps,SamAmps,rd1;
82// calculated the max amplitude square in 20000 events, is it enough larger?
83 if(nrun==1){
84 int ir,nd;
85 for(ir=0;ir<=200000;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 nrun++;
98 }
99 }
100if(max_amps==0.0) {report(ERROR,"EvtGen")<<"The decay amplitude square should be positive number"<<endl;abort();}
101//cout<<"max_amp="<<max_amps<<endl;
102
103
104loop:
106 int i;
107 for(i=0;i<=p->getNDaug()-1;i++){
108 _p4Lab[i]=p->getDaug(i)->getP4Lab();
109 _p4CM[i]=p->getDaug(i)->getP4();
110 }
111// Put phase space results into the daughters.
112 amps=AmplitudeSquare();
113 if(amps < 0) goto loop;
114 SamAmps=amps/max_amps;
115 rd1=EvtRandom::Flat(0.0, 1.0);
116 if(rd1>=SamAmps) goto loop;
117 return ;
118}
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
double AmplitudeSquare()
Definition: UserDIY.cc:176
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
EvtVector4R getP4Lab()
Definition: EvtParticle.cc:684
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:120
int getNDaug() const
Definition: EvtParticle.cc:124
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:84
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
static double Flat()
Definition: EvtRandom.cc:74

◆ GetDaugMomCM()

EvtVector4R EvtDIY::GetDaugMomCM ( int  i)
inline

Definition at line 49 of file EvtDIY.hh.

49{return _p4CM[i];}

◆ GetDaugMomHel()

EvtVector4R EvtDIY::GetDaugMomHel ( int  i)
inline

Definition at line 50 of file EvtDIY.hh.

50{return _p4Hel[i];}

◆ GetDaugMomLab()

EvtVector4R EvtDIY::GetDaugMomLab ( int  i)
inline

Definition at line 48 of file EvtDIY.hh.

48{return _p4Lab[i];}

Referenced by AmplitudeSquare().

◆ getName()

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

Implements EvtDecayBase.

Definition at line 46 of file Generator/BesEvtGen/BesEvtGen-00-04-26/src/EvtGen/EvtGenModels/EvtDIY.cc.

46 {
47
48 model_name="DIY";
49
50}

◆ GetNdaug()

int EvtDIY::GetNdaug ( )
inline

Definition at line 53 of file EvtDIY.hh.

53{return _nd;}

◆ init()

void EvtDIY::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 59 of file Generator/BesEvtGen/BesEvtGen-00-04-26/src/EvtGen/EvtGenModels/EvtDIY.cc.

59 {
60
61// check that there are 1 arguments:angular distribution parameter
62// checkNArg(0);
63// checkNDaug(2);
65// if ( parenttype == EvtSpinType::SCALAR ){
66// report(ERROR,"EvtGen")<<"Scalar decays with flat distribution"<<endl;
67// ::abort();
68// }
69}
EvtId getParentId()
Definition: EvtDecayBase.hh:60
static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.hh:61

◆ initProbMax()

void EvtDIY::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 70 of file Generator/BesEvtGen/BesEvtGen-00-04-26/src/EvtGen/EvtGenModels/EvtDIY.cc.

70 {
71 noProbMax();
72
73}
void noProbMax()

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