BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtAngSamX Class Reference

#include <EvtAngSamX.hh>

+ Inheritance diagram for EvtAngSamX:

Public Member Functions

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

Constructor & Destructor Documentation

◆ EvtAngSamX()

EvtAngSamX::EvtAngSamX ( )
inline

Definition at line 32 of file EvtAngSamX.hh.

32{}

Referenced by clone().

◆ ~EvtAngSamX()

EvtAngSamX::~EvtAngSamX ( )
virtual

Definition at line 46 of file EvtAngSamX.cc.

46{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtAngSamX::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 54 of file EvtAngSamX.cc.

54 {
55
56 return new EvtAngSamX;
57
58}

◆ decay()

void EvtAngSamX::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 79 of file EvtAngSamX.cc.

79 {
80
81loop:
83
84 EvtParticle *v,*s1;
85 EvtVector4R pv,ps,ppr;
86
87 v =p->getDaug(0);
88 pv=v->getP4();
89 s1=p->getDaug(1);
90 ps=s1->getP4();
91 ppr=p->getP4();
92// Put phase space results into the daughters.
93 EvtHelSys angles(ppr,pv); //using helicity sys. angles
94 double theta =angles.getHelAng(1);
95
96// The angular form is: c0 + c2*cos^2(theta) + c4*cos^4(theta) + c6*cos^6(theta) + c8*cos^8(theta) + c10*cos^10(theta)
97// The parameters c0-c10 are specified by user in the decay list
98 int narg=getNArg();
99 double c0,c2,c4,c6,c8,c10;
100 c0=0;c2=0;c4=0;c6=0;c8=0;c10=0;
101 if(narg==2) {
102 c0=getArg(0);
103 c2=getArg(1);
104 } else if (narg==3){
105 c0=getArg(0);
106 c2=getArg(1);
107 c4=getArg(2);
108 } else if (narg==4){
109 c0=getArg(0);
110 c2=getArg(1);
111 c4=getArg(2);
112 c6=getArg(3);
113 } else if (narg==5){
114 c0=getArg(0);
115 c2=getArg(1);
116 c4=getArg(2);
117 c6=getArg(3);
118 c8=getArg(4);
119 } else if (narg==6){
120 c0=getArg(0);
121 c2=getArg(1);
122 c4=getArg(2);
123 c6=getArg(3);
124 c8=getArg(4);
125 c10=getArg(5);
126 }
127
128 double costheta= cos(theta);
129 double costheta2= costheta*costheta;
130 double costheta4= costheta2*costheta2;
131 double costheta6= costheta4*costheta2;
132 double costheta8= costheta6*costheta2;
133 double costheta10= costheta8*costheta2;
134
135 double amp1=(c0+c2*costheta2+c4*costheta4+c6*costheta6+c8*costheta8+c10*costheta10);
136 double a0,a2,a4,a6,a8,a10;
137 double ampflag;
138 if(c0<0) {a0=0;}else{a0=c0;}
139 if(c2<0) {a2=0;}else{a2=c2;}
140 if(c4<0) {a4=0;}else{a4=c4;}
141 if(c6<0) {a6=0;}else{a6=c6;}
142 if(c8<0) {a8=0;}else{a8=c8;}
143 if(c10<0) {a10=0;}else{a10=c10;}
144 ampflag=a0+a2+a4+a6+a8+a10;
145 if( ampflag<=0 ) {
146 report(ERROR,"EvtGen")<<" The maxium value of amplitude square should be positive, but it is "<< ampflag<<endl;
147 ::abort();
148 }
149 ampflag = amp1/ampflag;
150 double rd1=EvtRandom::Flat(0.0, 1.0);
151 if(rd1>=ampflag) goto loop;
152 return ;
153}
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
double cos(const BesAngle a)
**********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:74

◆ getName()

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

Implements EvtDecayBase.

Definition at line 48 of file EvtAngSamX.cc.

48 {
49
50 model_name="AngSamX";
51
52}

◆ init()

void EvtAngSamX::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 61 of file EvtAngSamX.cc.

61 {
62
64// if ( parenttype == EvtSpinType::SCALAR ){
65// report(ERROR,"EvtGen")<<"Scalar decays with flat distribution"<<endl;
66// ::abort();
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
static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.hh:61

◆ initProbMax()

void EvtAngSamX::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 73 of file EvtAngSamX.cc.

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

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