BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtFDC Class Reference

#include <EvtFDC.hh>

+ Inheritance diagram for EvtFDC:

Public Member Functions

 EvtFDC ()
 
virtual ~EvtFDC ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void initProbMax ()
 
void init ()
 
void decay (EvtParticle *p)
 
double AmplitudeSquare ()
 
int GetNdaug ()
 
void setEvtMomentum (EvtVector4R *p4)
 
- 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 EvtFDC.hh.

Constructor & Destructor Documentation

◆ EvtFDC()

EvtFDC::EvtFDC ( )
inline

Definition at line 33 of file EvtFDC.hh.

33{}

Referenced by clone().

◆ ~EvtFDC()

EvtFDC::~EvtFDC ( )
virtual

Definition at line 61 of file EvtFDC.cc.

61{}

Member Function Documentation

◆ AmplitudeSquare()

double EvtFDC::AmplitudeSquare ( )

◆ clone()

EvtDecayBase * EvtFDC::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 69 of file EvtFDC.cc.

69 {
70
71 return new EvtFDC;
72
73}
EvtFDC()
Definition EvtFDC.hh:33

◆ decay()

void EvtFDC::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 105 of file EvtFDC.cc.

105 {
106double amps,SamAmps,rd1;
107// calculated the max amplitude square in 20000 events, is it enough larger?
108 if(nrun==1){
109 int ir,nd;
110 std::cout<<"Wait for a moment for calculation of maxiumal amplitude squared"<<std::endl;
111 for(ir=0;ir<=200000;ir++){
112 loop0:
114 int nd=p->getNDaug();
115 _nd=nd;
116 for(int i=0;i<=nd-1;i++){
117 _p4[i]=p->getDaug(i)->getP4Lab();
118 }
119 for (int i=0; i<_nd; i++){
120 e[i] = _p4[i].get(0);
121 px[i] = _p4[i].get(1);
122 py[i] = _p4[i].get(2);
123 pz[i] = _p4[i].get(3);
124 }
125 //for debuging
126 amps = fdcevtgen_(e,px,py,pz);
127 //std::cout<<"nrun "<<nrun<<std::endl;
128 if(amps<0) goto loop0;
129 if(amps>max_amps) max_amps=amps*1.01;
130 nrun++;
131 }
132 }
133if(max_amps==0.0) {report(ERROR,"EvtGen")<<"The decay amplitude square should be positive number, but it is "<<max_amps<<endl;abort();}
134//cout<<"max_amp="<<max_amps<<endl;
135
136
137loop:
139 int i;
140 for(i=0;i<=p->getNDaug()-1;i++){
141 _p4[i]=p->getDaug(i)->getP4Lab();
142 }
143 setEvtMomentum(_p4);
144// Put phase space results into the daughters.
145 amps = fdcevtgen_(e,px,py,pz);
146 if(amps < 0) goto loop;
147 SamAmps=amps/max_amps;
148 rd1=EvtRandom::Flat(0.0, 1.0);
149 if(rd1>=SamAmps) goto loop;
150 if(amps>max_amps) max_amps=amps*1.01;
151 nrun++;
152}
double fdcevtgen_(double *, double *, double *, double *)
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:36
@ ERROR
Definition EvtReport.hh:49
EvtId * getDaugs()
void setEvtMomentum(EvtVector4R *p4)
Definition EvtFDC.cc:96
EvtVector4R getP4Lab()
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:74
double get(int i) const

◆ getName()

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

Implements EvtDecayBase.

Definition at line 63 of file EvtFDC.cc.

63 {
64
65 model_name="FDC";
66
67}

◆ GetNdaug()

int EvtFDC::GetNdaug ( )
inline

Definition at line 49 of file EvtFDC.hh.

49{return _nd;}

◆ init()

void EvtFDC::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 76 of file EvtFDC.cc.

76 {
77 init_fit_();
79 int ndiag = -1; //Feyman diagram number, started from 1, if -1, generate all intermediate states including interference effects
80 if (getNArg()==1) {
81 ndiag = getArg(0);
82 }
83 setamp_( &ndiag );
84
86}
void setamp_(int *)
void initevtgen_()
void init_fit_()
double getArg(int j)
EvtId getParentId()
static EvtSpinType::spintype getSpinType(EvtId i)
Definition EvtPDL.hh:61

◆ initProbMax()

void EvtFDC::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 87 of file EvtFDC.cc.

87 {
88 noProbMax();
89
90}

◆ setEvtMomentum()

void EvtFDC::setEvtMomentum ( EvtVector4R * p4)

Definition at line 96 of file EvtFDC.cc.

96 {
97 for (int i=0; i<_nd; i++){
98 e[i] = _p4[i].get(0);
99 px[i] = _p4[i].get(1);
100 py[i] = _p4[i].get(2);
101 pz[i] = _p4[i].get(3);
102 }
103}

Referenced by decay().


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