BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtPycont Class Reference

#include <EvtPycont.hh>

+ Inheritance diagram for EvtPycont:

Public Member Functions

 EvtPycont ()
 
virtual ~EvtPycont ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void init ()
 
void initProbMax ()
 
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 28 of file EvtPycont.hh.

Constructor & Destructor Documentation

◆ EvtPycont()

EvtPycont::EvtPycont ( )
inline

Definition at line 32 of file EvtPycont.hh.

32{}

Referenced by clone().

◆ ~EvtPycont()

EvtPycont::~EvtPycont ( )
virtual

Definition at line 45 of file EvtPycont.cc.

45 {
46 // int i=1;
47 // pystat_(i);
48}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtPycont::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 55 of file EvtPycont.cc.

56{
57 return new EvtPycont;
58}

◆ decay()

void EvtPycont::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 101 of file EvtPycont.cc.

102{
104 EvtVector4R p4[100];
105
106 double energy=p->mass();
107
108 int i,more;
109 int ndaugjs;
110 int kf[100];
111 EvtId id[100];
112 int type[MAX_DAUG];
113
114 double px[100],py[100],pz[100],e[100];
115
116 if ( p->getNDaug() != 0 ) { return;}
117 do{
118 EvtPythia::pythiacont(&energy,&ndaugjs,kf,px,py,pz,e);
119
120 for(i=0;i<ndaugjs;i++)
121 {
122
123 id[i]=EvtPDL::evtIdFromStdHep(kf[i]);
124
125 type[i]=EvtPDL::getSpinType(id[i]);
126
127 //std::cout<<"i, id[i] "<<i<<" "<<EvtPDL::getStdHep(id[i])<<std::endl;
128
129 // have to protect against negative mass^2 for massless particles
130 // i.e. neutrinos and photons.
131 // this is uggly but I need to fix it right now....
132
133 if (px[i]*px[i]+py[i]*py[i]+pz[i]*pz[i]>=e[i]*e[i])
134 e[i]=sqrt(px[i]*px[i]+py[i]*py[i]+pz[i]*pz[i])+0.0000000000001;
135
136 p4[i].set(e[i],px[i],py[i],pz[i]);
137
138 }
139
140 int channel=EvtDecayTable::inChannelList(p->getId(),ndaugjs,id);
141
142 more=((channel!=-1)&&(channel!=p->getChannel()));
143
144 }while(more);
145
146 p->makeDaughters(ndaugjs,id);
147
148 for(i=0;i<ndaugjs;i++)
149 p->getDaug(i)->init( id[i], p4[i] );
150
151 return ;
152}
const int MAX_DAUG
Definition: EvtParticle.hh:38
************Class m_ypar INTEGER m_KeyWgt INTEGER m_nphot INTEGER m_KeyGPS INTEGER m_IsBeamPolarized INTEGER m_EvtGenInterface DOUBLE PRECISION m_Emin DOUBLE PRECISION m_sphot DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_q2 DOUBLE PRECISION m_PolBeam2 DOUBLE PRECISION m_xErrPb *COMMON c_KK2f $ !CMS energy average $ !Spin Polarization vector first beam $ !Spin Polarization vector second beam $ !Beam energy spread[GeV] $ !minimum hadronization energy[GeV] $ !input READ never touch them !$ !debug facility $ !maximum weight $ !inverse alfaQED $ !minimum real photon energy
Definition: KK2f.h:50
static int inChannelList(EvtId parent, int ndaug, EvtId *daugs)
Definition: EvtId.hh:27
static EvtId evtIdFromStdHep(int stdhep)
Definition: EvtPDL.cc:244
static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.hh:61
void makeDaughters(int ndaug, EvtId *id)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtId getId() const
Definition: EvtParticle.cc:113
int getNDaug() const
Definition: EvtParticle.cc:125
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:85
double mass() const
Definition: EvtParticle.cc:127
int getChannel() const
Definition: EvtParticle.cc:123
static void pythiaInit(int f)
Definition: EvtPythia.cc:1046
static void pythiacont(double *, int *, int *, double *, double *, double *, double *)
Definition: EvtPythia.cc:200
void set(int i, double d)
Definition: EvtVector4R.hh:183

◆ getName()

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

Implements EvtDecayBase.

Definition at line 50 of file EvtPycont.cc.

51{
52 model_name="PYCONT";
53}

◆ init()

void EvtPycont::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 60 of file EvtPycont.cc.

61{
62 // check that there are 1 argument
63 if ( getNArg() != 12 && getNArg() != 0 ) {
64 report(ERROR,"EvtGen") << "EvtPYCONT expects "
65 << " 12 arguments (d u s c b t e nu_e mu nu_mu tau nu_tau) but found: "
66 << getNArg() <<endl;
67
68 }
69 checkNArg(0,12);
70
71 for( int i=0; i<18; i++)
72 decaych_.dc[i]=0;
73 if ( getNArg() == 12 ) {
74 decaych_.dc[0]=(int)getArg(0);
75 decaych_.dc[1]=(int)getArg(1);
76 decaych_.dc[2]=(int)getArg(2);
77 decaych_.dc[3]=(int)getArg(3);
78 decaych_.dc[4]=(int)getArg(4);
79 decaych_.dc[5]=(int)getArg(5);
80 decaych_.dc[10]=(int)getArg(6);
81 decaych_.dc[11]=(int)getArg(7);
82 decaych_.dc[12]=(int)getArg(8);
83 decaych_.dc[13]=(int)getArg(9);
84 decaych_.dc[14]=(int)getArg(10);
85 decaych_.dc[15]=(int)getArg(11);
86 }
87 else{
88 decaych_.dc[0]=1;
89 decaych_.dc[1]=1;
90 decaych_.dc[2]=1;
91 decaych_.dc[3]=1;
92 }
93
94}
struct @9 decaych_
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
double getArg(int j)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)

◆ initProbMax()

void EvtPycont::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 96 of file EvtPycont.cc.

97{
98 noProbMax();
99}
void noProbMax()

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