BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtAngSamLab Class Reference

#include <EvtAngSamLab.hh>

Inheritance diagram for EvtAngSamLab:

Public Member Functions

 EvtAngSamLab ()
virtual ~EvtAngSamLab ()
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 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 EvtAngSamLab.hh.

Constructor & Destructor Documentation

◆ EvtAngSamLab()

EvtAngSamLab::EvtAngSamLab ( )
inline

Definition at line 32 of file EvtAngSamLab.hh.

32{}

Referenced by clone().

◆ ~EvtAngSamLab()

EvtAngSamLab::~EvtAngSamLab ( )
virtual

Definition at line 47 of file EvtAngSamLab.cc.

47{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtAngSamLab::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 51 of file EvtAngSamLab.cc.

51{ return new EvtAngSamLab; }

◆ decay()

void EvtAngSamLab::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 71 of file EvtAngSamLab.cc.

71 {
72
73loop:
75
76 EvtParticle *v, *s1;
77 EvtVector4R pv;
78
79 v = p->getDaug( 0 );
80 s1 = p->getDaug( 1 );
81 pv = v->getP4Lab();
82 // Put phase space results into the daughters.
83
84 double theta = pv.theta();
85
86 // The angular form is: c0 + c2*cos^2(theta) + c4*cos^4(theta) + c6*cos^6(theta) +
87 // c8*cos^8(theta) + c10*cos^10(theta) The parameters c0-c10 are specified by user in the
88 // decay list
89 int narg = getNArg();
90 double c0, c2, c4, c6, c8, c10;
91 c0 = 0;
92 c2 = 0;
93 c4 = 0;
94 c6 = 0;
95 c8 = 0;
96 c10 = 0;
97 if ( narg == 2 )
98 {
99 c0 = getArg( 0 );
100 c2 = getArg( 1 );
101 }
102 else if ( narg == 3 )
103 {
104 c0 = getArg( 0 );
105 c2 = getArg( 1 );
106 c4 = getArg( 2 );
107 }
108 else if ( narg == 4 )
109 {
110 c0 = getArg( 0 );
111 c2 = getArg( 1 );
112 c4 = getArg( 2 );
113 c6 = getArg( 3 );
114 }
115 else if ( narg == 5 )
116 {
117 c0 = getArg( 0 );
118 c2 = getArg( 1 );
119 c4 = getArg( 2 );
120 c6 = getArg( 3 );
121 c8 = getArg( 4 );
122 }
123 else if ( narg == 6 )
124 {
125 c0 = getArg( 0 );
126 c2 = getArg( 1 );
127 c4 = getArg( 2 );
128 c6 = getArg( 3 );
129 c8 = getArg( 4 );
130 c10 = getArg( 5 );
131 }
132
133 double costheta = cos( theta );
134 double costheta2 = costheta * costheta;
135 double costheta4 = costheta2 * costheta2;
136 double costheta6 = costheta4 * costheta2;
137 double costheta8 = costheta6 * costheta2;
138 double costheta10 = costheta8 * costheta2;
139
140 double amp1 = ( c0 + c2 * costheta2 + c4 * costheta4 + c6 * costheta6 + c8 * costheta8 +
141 c10 * costheta10 );
142 double a0, a2, a4, a6, a8, a10;
143 double ampflag;
144 if ( c0 < 0 ) { a0 = 0; }
145 else { a0 = c0; }
146 if ( c2 < 0 ) { a2 = 0; }
147 else { a2 = c2; }
148 if ( c4 < 0 ) { a4 = 0; }
149 else { a4 = c4; }
150 if ( c6 < 0 ) { a6 = 0; }
151 else { a6 = c6; }
152 if ( c8 < 0 ) { a8 = 0; }
153 else { a8 = c8; }
154 if ( c10 < 0 ) { a10 = 0; }
155 else { a10 = c10; }
156 ampflag = a0 + a2 + a4 + a6 + a8 + a10;
157 if ( ampflag <= 0 )
158 {
159 report( ERROR, "EvtGen" )
160 << " The maxium value of amplitude square should be positive, but it is " << ampflag
161 << endl;
162 ::abort();
163 }
164 ampflag = amp1 / ampflag;
165 double rd1 = EvtRandom::Flat( 0.0, 1.0 );
166 if ( rd1 >= ampflag ) goto loop;
167 return;
168}
character *LEPTONflag integer iresonances real zeta5 real a0
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
double getArg(int j)
EvtId * getDaugs()
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
double theta()

◆ getName()

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

Implements EvtDecayBase.

Definition at line 49 of file EvtAngSamLab.cc.

49{ model_name = "AngSamLab"; }

◆ init()

void EvtAngSamLab::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 53 of file EvtAngSamLab.cc.

53 {
54
55 // check that there are 1 arguments:angular distribution parameter
56 checkNDaug( 2 );
58 // if ( parenttype == EvtSpinType::SCALAR ){
59 // report(ERROR,"EvtGen")<<"Scalar decays with flat distribution"<<endl;
60 // ::abort();
61 // }
62 if ( getNArg() > 6 || getNArg() < 2 )
63 {
64 report( ERROR, "EvtGen" ) << " 2<= expected parameters <=6, but it is " << getNArg()
65 << endl;
66 ::abort();
67 }
68}
EvtId getParentId()
void checkNDaug(int d1, int d2=-1)
static EvtSpinType::spintype getSpinType(EvtId i)
Definition EvtPDL.hh:66

◆ initProbMax()

void EvtAngSamLab::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 69 of file EvtAngSamLab.cc.

69{ noProbMax(); }

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