BOSS 8.0.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 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 32 of file EvtDIY.hh.

32{}

Referenced by clone().

◆ ~EvtDIY()

EvtDIY::~EvtDIY ( )
virtual

Definition at line 44 of file BOSS_Gen/BesEvtGen/src/EvtGen/EvtGenModels/EvtDIY.cc.

44{}

Member Function Documentation

◆ AmplitudeSquare()

double EvtDIY::AmplitudeSquare ( )

Definition at line 182 of file UserDIY.cc.

182 {
183 EvtVector4R dp1 = GetDaugMomLab( 0 );
184 EvtVector4R dp2 = GetDaugMomLab( 1 ), dp3 = GetDaugMomLab( 2 );
185
186 // AngularSam ppbar(0.7,dp1);
187 // return ppbar.amps();
188
189 // rhopi Jpsi2rhopi(dp1,dp2,dp3);
190 // return Jpsi2rhopi.amps();
191
192 rhopifull Jpsi2rhopi( dp1, dp2, dp3 );
193 return Jpsi2rhopi.amps();
194}
EvtVector4R GetDaugMomLab(int i)
Definition EvtDIY.hh:47

Referenced by decay().

◆ clone()

EvtDecayBase * EvtDIY::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 48 of file BOSS_Gen/BesEvtGen/src/EvtGen/EvtGenModels/EvtDIY.cc.

48{ return new EvtDIY; }
EvtDIY()
Definition EvtDIY.hh:32

◆ decay()

void EvtDIY::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 66 of file BOSS_Gen/BesEvtGen/src/EvtGen/EvtGenModels/EvtDIY.cc.

66 {
67
68 double amps, SamAmps, rd1;
69 // calculated the max amplitude square in 20000 events, is it enough larger?
70 if ( nrun == 1 )
71 {
72 int ir, nd;
73 for ( ir = 0; ir <= 200000; ir++ )
74 {
75 loop0:
77 int nd = p->getNDaug(), i;
78 _nd = nd;
79 for ( i = 0; i <= nd - 1; i++ )
80 {
81 _p4Lab[i] = p->getDaug( i )->getP4Lab();
82 _p4CM[i] = p->getDaug( i )->getP4();
83 }
84 amps = AmplitudeSquare();
85 if ( amps < 0 ) goto loop0;
86 if ( amps > max_amps ) max_amps = amps * 1.01;
87 nrun++;
88 }
89 }
90 if ( max_amps == 0.0 )
91 {
92 report( ERROR, "EvtGen" ) << "The decay amplitude square should be positive number"
93 << endl;
94 abort();
95 }
96 // cout<<"max_amp="<<max_amps<<endl;
97
98loop:
100 int i;
101 for ( i = 0; i <= p->getNDaug() - 1; i++ )
102 {
103 _p4Lab[i] = p->getDaug( i )->getP4Lab();
104 _p4CM[i] = p->getDaug( i )->getP4();
105 }
106 // Put phase space results into the daughters.
107 amps = AmplitudeSquare();
108 if ( amps < 0 ) goto loop;
109 SamAmps = amps / max_amps;
110 rd1 = EvtRandom::Flat( 0.0, 1.0 );
111 if ( rd1 >= SamAmps ) goto loop;
112 return;
113}
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
double AmplitudeSquare()
Definition UserDIY.cc:182
EvtId * getDaugs()
EvtVector4R getP4Lab()
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)
static double Flat()
Definition EvtRandom.cc:69

◆ GetDaugMomCM()

EvtVector4R EvtDIY::GetDaugMomCM ( int i)
inline

Definition at line 48 of file EvtDIY.hh.

48{ return _p4CM[i]; }

◆ GetDaugMomHel()

EvtVector4R EvtDIY::GetDaugMomHel ( int i)
inline

Definition at line 49 of file EvtDIY.hh.

49{ return _p4Hel[i]; }

◆ GetDaugMomLab()

EvtVector4R EvtDIY::GetDaugMomLab ( int i)
inline

Definition at line 47 of file EvtDIY.hh.

47{ return _p4Lab[i]; }

Referenced by AmplitudeSquare().

◆ getName()

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

Implements EvtDecayBase.

Definition at line 46 of file BOSS_Gen/BesEvtGen/src/EvtGen/EvtGenModels/EvtDIY.cc.

46{ model_name = "DIY"; }

◆ GetNdaug()

int EvtDIY::GetNdaug ( )
inline

Definition at line 51 of file EvtDIY.hh.

51{ return _nd; }

◆ init()

void EvtDIY::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 50 of file BOSS_Gen/BesEvtGen/src/EvtGen/EvtGenModels/EvtDIY.cc.

50 {
51
52 // check that there are 1 arguments:angular distribution parameter
53 // checkNArg(0);
54 // checkNDaug(2);
56 // if ( parenttype == EvtSpinType::SCALAR ){
57 // report(ERROR,"EvtGen")<<"Scalar decays with flat distribution"<<endl;
58 // ::abort();
59 // }
60}
EvtId getParentId()
static EvtSpinType::spintype getSpinType(EvtId i)
Definition EvtPDL.hh:66

◆ initProbMax()

void EvtDIY::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 61 of file BOSS_Gen/BesEvtGen/src/EvtGen/EvtGenModels/EvtDIY.cc.

61{ noProbMax(); }

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