BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtTrackGen Class Reference

#include <EvtTrackGen.hh>

+ Inheritance diagram for EvtTrackGen:

Public Member Functions

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

Constructor & Destructor Documentation

◆ EvtTrackGen()

EvtTrackGen::EvtTrackGen ( )
inline

Definition at line 39 of file EvtTrackGen.hh.

39{}

Referenced by clone().

◆ ~EvtTrackGen()

EvtTrackGen::~EvtTrackGen ( )
virtual

Definition at line 25 of file EvtTrackGen.cc.

25{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtTrackGen::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 33 of file EvtTrackGen.cc.

33 {
34
35 return new EvtTrackGen;
36
37}

◆ decay()

void EvtTrackGen::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 96 of file EvtTrackGen.cc.

96 {
97
99 int rdm= (int)Evt.size()*EvtRandom::Flat(0.0,1.0);
100 if(Evt.size()==0) {std::cout<<"EvtTrackGen: out of stored file record"<<std::endl;abort();}
101 EvtVector4R ptot(0,0,0,0);
102 for(int i=0;i<nParticles;i++){
103 EvtParticle* daug=p->getDaug(i);
104 ptot += Evt[rdm][i];
105 daug->init(daug->getId(),Evt[rdm][i]);
106 }
107 //p->init(p->getId(),ptot);
108
109 //debugging
110 // std::cout<<p->getDaug(getNDaug()-1)->getP4()<<" =? "<<eParticle<<" "<<pxParticle<<" "<<pyParticle<<" "<<pzParticle<<std::endl;
111
112 return ;
113}
*********Class see also m_nmax DOUBLE PRECISION m_MasPhot DOUBLE PRECISION m_phsu DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_r2 DOUBLE PRECISION m_WtMass INTEGER m_nmax INTEGER m_Nevgen INTEGER m_IsFSR INTEGER m_MarTot *COMMON c_KarFin $ !Output file $ !Event serial number $ !alpha QED at Thomson limit $ !minimum energy at CMS for remooval $ !infrared dimensionless $ !dummy photon IR regulator $ !crude photon multiplicity enhancement factor *EVENT $ !MC crude volume of PhhSpace *Sfactors $ !YFS formfactor IR part only $ !YFS formfactor non IR finite part $ !mass weight
Definition: KarFin.h:34
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtId getId() const
Definition: EvtParticle.cc:113
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

◆ getName()

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

Implements EvtDecayBase.

Definition at line 27 of file EvtTrackGen.cc.

27 {
28
29 model_name="TrackGen";
30
31}

◆ init()

void EvtTrackGen::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 40 of file EvtTrackGen.cc.

40 {
41
42 // check that there are 0 arguments
43 checkNArg(1);
44 int idx=getArg(0);
45 if(EvtGlobalSet::SV.size()==0){
46 std::cout<<"No track data file is available! "<<std::endl;abort();
47 }else{m_inputFileName=EvtGlobalSet::SV[idx];}
48
49 m_inputFile.open(m_inputFileName.c_str());
50 if (!m_inputFile){
51 cout << "EvtTrackGen: PROBLEMS OPENING FILE "
52 << m_inputFileName << endl;
53 exit(0);
54 }
55 //load the event P4
56 Evt.clear();
57 while(!m_inputFile.eof()){
58 m_inputFile >> nParticles;
59 std::vector<EvtVector4R> vp4;
60 for (int i = 0; i < nParticles; i++){
61 EvtVector4R p4;
62 m_inputFile >> idParticles[i];
63 m_inputFile >> pxParticle; p4.set(1,pxParticle);
64 m_inputFile >> pyParticle; p4.set(2,pyParticle);
65 m_inputFile >> pzParticle; p4.set(3,pzParticle);
66 m_inputFile >> eParticle; p4.set(0,eParticle);
67 vp4.push_back(p4);
68 }
69 Evt.push_back(vp4);
70 }
71 Evt.pop_back();
72 //check daughters id
73 if(nParticles!=getNDaug()){std::cout<<"The number of daughters are not cosistent with that the data file"<<std::endl;abort();}
74 for(int i=0;i<nParticles;i++){
75 EvtId pid = EvtPDL::evtIdFromStdHep(idParticles[i] );
76 if(pid!=getDaug(i) ){std::cout<<"The daughter particle pdg in your data file is not consistent with you decay card."<<std::endl;abort();}
77 }
78 //debugging
79 /*
80 for(int i=0;i<Evt.size();i++){
81 std::cout<<"Event "<<i<<std::endl;
82 for(int j=0;j<nParticles;j++){
83 std::cout<<Evt[i][j].get(0)<<" "<<Evt[i][j].get(1)<<" "<<Evt[i][j].get(2)<<" "<<Evt[i][j].get(3)<<std::endl;
84 }
85 }
86 */
87//---------
88}
double getArg(int j)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtId getDaug(int i)
Definition: EvtDecayBase.hh:66
static std::vector< std::string > SV
Definition: EvtGlobalSet.hh:19
Definition: EvtId.hh:27
static EvtId evtIdFromStdHep(int stdhep)
Definition: EvtPDL.cc:244
void set(int i, double d)
Definition: EvtVector4R.hh:183

◆ initProbMax()

void EvtTrackGen::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 90 of file EvtTrackGen.cc.

90 {
91
92 noProbMax();
93
94}
void noProbMax()

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