BOSS 8.0.0
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 32 of file EvtFDC.hh.

32{}

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 65 of file EvtFDC.cc.

65{ return new EvtFDC; }
EvtFDC()
Definition EvtFDC.hh:32

◆ decay()

void EvtFDC::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 92 of file EvtFDC.cc.

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

◆ getName()

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

Implements EvtDecayBase.

Definition at line 63 of file EvtFDC.cc.

63{ model_name = "FDC"; }

◆ GetNdaug()

int EvtFDC::GetNdaug ( )
inline

Definition at line 47 of file EvtFDC.hh.

47{ return _nd; }

◆ init()

void EvtFDC::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 67 of file EvtFDC.cc.

67 {
68 init_fit_();
70 int ndiag = -1; // Feyman diagram number, started from 1, if -1, generate all intermediate
71 // states including interference effects
72 if ( getNArg() == 1 ) { ndiag = getArg( 0 ); }
73 setamp_( &ndiag );
74
76}
void setamp_(int *)
void initevtgen_()
void init_fit_()
double getArg(int j)
EvtId getParentId()
static EvtSpinType::spintype getSpinType(EvtId i)
Definition EvtPDL.hh:66

◆ initProbMax()

void EvtFDC::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 77 of file EvtFDC.cc.

77{ noProbMax(); }

◆ setEvtMomentum()

void EvtFDC::setEvtMomentum ( EvtVector4R * p4)

Definition at line 82 of file EvtFDC.cc.

82 {
83 for ( int i = 0; i < _nd; i++ )
84 {
85 e[i] = _p4[i].get( 0 );
86 px[i] = _p4[i].get( 1 );
87 py[i] = _p4[i].get( 2 );
88 pz[i] = _p4[i].get( 3 );
89 }
90}

Referenced by decay().


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