CGEM BOSS 6.6.5.g
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 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 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 47 of file EvtAngSam3.cc.

47{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtAngSam3::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 55 of file EvtAngSam3.cc.

55 {
56
57 return new EvtAngSam3;
58
59}

◆ decay()

void EvtAngSam3::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 80 of file EvtAngSam3.cc.

80 {
81
82loop:
84
85 EvtParticle *v,*s1,*s2;
86 EvtVector4R pv,ps;
87 EvtVector4R Lpt,xp;
88
89 v =p->getDaug(0);
90 s1=p->getDaug(1);
91 s2=p->getDaug(2);
92 pv=v->getP4();
93 ps=s1->getP4();
94 Lpt=p->getP4();
95 xp=pv.cross(ps);
96
97 // calculate the cos (theta) between xp and Lpt
98 double costheta;
99 if(Lpt.d3mag()<0.0001){
100 costheta = xp.get(3)/xp.d3mag();
101 } else{
102 costheta = (xp.get(1)*Lpt.get(1) + xp.get(2)*Lpt.get(2) + xp.get(3)*Lpt.get(3))/xp.d3mag()/Lpt.d3mag();
103 }
104 int narg=getNArg();
105 double c0,c2,c4,c6,c8,c10;
106 c0=0;c2=0;c4=0;c6=0;c8=0;c10=0;
107 if(narg==2) {
108 c0=getArg(0);
109 c2=getArg(1);
110 } else if (narg==3){
111 c0=getArg(0);
112 c2=getArg(1);
113 c4=getArg(2);
114 } else if (narg==4){
115 c0=getArg(0);
116 c2=getArg(1);
117 c4=getArg(2);
118 c6=getArg(3);
119 } else if (narg==5){
120 c0=getArg(0);
121 c2=getArg(1);
122 c4=getArg(2);
123 c6=getArg(3);
124 c8=getArg(4);
125 } else if (narg==6){
126 c0=getArg(0);
127 c2=getArg(1);
128 c4=getArg(2);
129 c6=getArg(3);
130 c8=getArg(4);
131 c10=getArg(5);
132 }
133
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+c10*costheta10);
141 double a0,a2,a4,a6,a8,a10;
142 double ampflag;
143 if(c0<0) {a0=0;}else{a0=c0;}
144 if(c2<0) {a2=0;}else{a2=c2;}
145 if(c4<0) {a4=0;}else{a4=c4;}
146 if(c6<0) {a6=0;}else{a6=c6;}
147 if(c8<0) {a8=0;}else{a8=c8;}
148 if(c10<0) {a10=0;}else{a10=c10;}
149 ampflag=a0+a2+a4+a6+a8+a10;
150 if( ampflag<=0 ) {
151 report(ERROR,"EvtGen")<<" The maxium value of amplitude square should be positive, but it is "<< ampflag<<endl;
152 ::abort();
153 }
154 ampflag = amp1/ampflag;
155 double rd1=EvtRandom::Flat(0.0, 1.0);
156 if(rd1>=ampflag) goto loop;
157 return ;
158}
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ 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()
Definition: EvtDecayBase.hh:65
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:121
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:73
double get(int i) const
Definition: EvtVector4R.hh:179
EvtVector4R cross(const EvtVector4R &v2)
Definition: EvtVector4R.cc:171
double d3mag() const
Definition: EvtVector4R.cc:186

◆ getName()

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

Implements EvtDecayBase.

Definition at line 49 of file EvtAngSam3.cc.

49 {
50
51 model_name="AngSam3";
52
53}

◆ init()

void EvtAngSam3::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 62 of file EvtAngSam3.cc.

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

◆ initProbMax()

void EvtAngSam3::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 74 of file EvtAngSam3.cc.

74 {
75
76 noProbMax();
77
78}
void noProbMax()

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