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

#include <EvtAngSam3.hh>

Inheritance diagram for EvtAngSam3:

Public Member Functions

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

Constructor & Destructor Documentation

◆ EvtAngSam3()

EvtAngSam3::EvtAngSam3 ( )
inline

Definition at line 32 of file EvtAngSam3.hh.

32{}

Referenced by clone().

◆ ~EvtAngSam3()

EvtAngSam3::~EvtAngSam3 ( )
virtual

Definition at line 48 of file EvtAngSam3.cc.

48{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtAngSam3::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 52 of file EvtAngSam3.cc.

52{ return new EvtAngSam3; }

◆ decay()

void EvtAngSam3::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 70 of file EvtAngSam3.cc.

70 {
71
72loop:
74
75 EvtParticle *v, *s1, *s2;
76 EvtVector4R pv, ps;
77 EvtVector4R Lpt, xp;
78
79 v = p->getDaug( 0 );
80 s1 = p->getDaug( 1 );
81 s2 = p->getDaug( 2 );
82 pv = v->getP4();
83 ps = s1->getP4();
84 Lpt = p->getP4();
85 xp = pv.cross( ps );
86
87 // calculate the cos (theta) between xp and Lpt
88 double costheta;
89 if ( Lpt.d3mag() < 0.0001 ) { costheta = xp.get( 3 ) / xp.d3mag(); }
90 else
91 {
92 costheta = ( xp.get( 1 ) * Lpt.get( 1 ) + xp.get( 2 ) * Lpt.get( 2 ) +
93 xp.get( 3 ) * Lpt.get( 3 ) ) /
94 xp.d3mag() / Lpt.d3mag();
95 }
96 int narg = getNArg();
97 double c0, c2, c4, c6, c8, c10;
98 c0 = 0;
99 c2 = 0;
100 c4 = 0;
101 c6 = 0;
102 c8 = 0;
103 c10 = 0;
104 if ( narg == 2 )
105 {
106 c0 = getArg( 0 );
107 c2 = getArg( 1 );
108 }
109 else if ( narg == 3 )
110 {
111 c0 = getArg( 0 );
112 c2 = getArg( 1 );
113 c4 = getArg( 2 );
114 }
115 else if ( narg == 4 )
116 {
117 c0 = getArg( 0 );
118 c2 = getArg( 1 );
119 c4 = getArg( 2 );
120 c6 = getArg( 3 );
121 }
122 else if ( narg == 5 )
123 {
124 c0 = getArg( 0 );
125 c2 = getArg( 1 );
126 c4 = getArg( 2 );
127 c6 = getArg( 3 );
128 c8 = getArg( 4 );
129 }
130 else if ( narg == 6 )
131 {
132 c0 = getArg( 0 );
133 c2 = getArg( 1 );
134 c4 = getArg( 2 );
135 c6 = getArg( 3 );
136 c8 = getArg( 4 );
137 c10 = getArg( 5 );
138 }
139
140 double costheta2 = costheta * costheta;
141 double costheta4 = costheta2 * costheta2;
142 double costheta6 = costheta4 * costheta2;
143 double costheta8 = costheta6 * costheta2;
144 double costheta10 = costheta8 * costheta2;
145
146 double amp1 = ( c0 + c2 * costheta2 + c4 * costheta4 + c6 * costheta6 + c8 * costheta8 +
147 c10 * costheta10 );
148 double a0, a2, a4, a6, a8, a10;
149 double ampflag;
150 if ( c0 < 0 ) { a0 = 0; }
151 else { a0 = c0; }
152 if ( c2 < 0 ) { a2 = 0; }
153 else { a2 = c2; }
154 if ( c4 < 0 ) { a4 = 0; }
155 else { a4 = c4; }
156 if ( c6 < 0 ) { a6 = 0; }
157 else { a6 = c6; }
158 if ( c8 < 0 ) { a8 = 0; }
159 else { a8 = c8; }
160 if ( c10 < 0 ) { a10 = 0; }
161 else { a10 = c10; }
162 ampflag = a0 + a2 + a4 + a6 + a8 + a10;
163 if ( ampflag <= 0 )
164 {
165 report( ERROR, "EvtGen" )
166 << " The maxium value of amplitude square should be positive, but it is " << ampflag
167 << endl;
168 ::abort();
169 }
170 ampflag = amp1 / ampflag;
171 double rd1 = EvtRandom::Flat( 0.0, 1.0 );
172 if ( rd1 >= ampflag ) goto loop;
173 return;
174}
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()
const EvtVector4R & getP4() 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
double get(int i) const
EvtVector4R cross(const EvtVector4R &v2)
double d3mag() const

◆ getName()

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

Implements EvtDecayBase.

Definition at line 50 of file EvtAngSam3.cc.

50{ model_name = "AngSam3"; }

◆ init()

void EvtAngSam3::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 54 of file EvtAngSam3.cc.

54 {
55
56 // check angular distribution parameters
57 checkNDaug( 3 );
59
60 if ( getNArg() > 6 || getNArg() < 2 )
61 {
62 report( ERROR, "EvtGen" ) << " 2<= expected parameters <=6, but it is " << getNArg()
63 << endl;
64 ::abort();
65 }
66}
EvtId getParentId()
void checkNDaug(int d1, int d2=-1)
static EvtSpinType::spintype getSpinType(EvtId i)
Definition EvtPDL.hh:66

◆ initProbMax()

void EvtAngSam3::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 68 of file EvtAngSam3.cc.

68{ noProbMax(); }

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