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

#include <EvtHelAmp.hh>

+ Inheritance diagram for EvtHelAmp:

Public Member Functions

 EvtHelAmp ()
 
virtual ~EvtHelAmp ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void init ()
 
void initProbMax ()
 
void decay (EvtParticle *p)
 
- Public Member Functions inherited from EvtDecayAmp
void makeDecay (EvtParticle *p)
 
void setWeight (double weight)
 
void vertex (const EvtComplex &amp)
 
void vertex (int i1, const EvtComplex &amp)
 
void vertex (int i1, int i2, const EvtComplex &amp)
 
void vertex (int i1, int i2, int i3, const EvtComplex &amp)
 
void vertex (int *i1, const EvtComplex &amp)
 
virtual ~EvtDecayAmp ()
 
- 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 EvtDecayAmp
EvtAmp _amp2
 
- Protected Attributes inherited from EvtDecayBase
bool _daugsDecayedByParentModel
 

Detailed Description

Definition at line 35 of file EvtHelAmp.hh.

Constructor & Destructor Documentation

◆ EvtHelAmp()

EvtHelAmp::EvtHelAmp ( )
inline

Definition at line 39 of file EvtHelAmp.hh.

39{}

Referenced by clone().

◆ ~EvtHelAmp()

EvtHelAmp::~EvtHelAmp ( )
virtual

Definition at line 37 of file EvtHelAmp.cc.

37 {
38
39 delete _evalHelAmp;
40
41}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtHelAmp::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 50 of file EvtHelAmp.cc.

50 {
51
52 return new EvtHelAmp;
53
54}

◆ decay()

void EvtHelAmp::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 173 of file EvtHelAmp.cc.

173 {
174
175 //first generate simple phase space
177
178 _evalHelAmp->evalAmp(p,_amp2);
179
180 return ;
181
182}
EvtAmp _amp2
Definition: EvtDecayAmp.hh:66
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
void evalAmp(EvtParticle *p, EvtAmp &amp)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)

◆ getName()

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

Implements EvtDecayBase.

Definition at line 43 of file EvtHelAmp.cc.

43 {
44
45 model_name="HELAMP";
46
47}

◆ init()

void EvtHelAmp::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 56 of file EvtHelAmp.cc.

56 {
57
58 checkNDaug(2);
59
60
61 //find out how many states each particle have
65
66 if (verbose()){
67 report(INFO,"EvtGen")<<"_nA,_nB,_nC:"
68 <<_nA<<","<<_nB<<","<<_nC<<endl;
69 }
70
71 //find out what 2 times the spin is
75
76 if (verbose()){
77 report(INFO,"EvtGen")<<"_JA2,_JB2,_JC2:"
78 <<_JA2<<","<<_JB2<<","<<_JC2<<endl;
79 }
80
81 //allocate memory
82 int* _lambdaA2=new int[_nA];
83 int* _lambdaB2=new int[_nB];
84 int* _lambdaC2=new int[_nC];
85
86 EvtComplexPtr* _HBC=new EvtComplexPtr[_nB];
87 int ib,ic;
88 for(ib=0;ib<_nB;ib++){
89 _HBC[ib]=new EvtComplex[_nC];
90 }
91
92 int i;
93 //find the allowed helicities (actually 2*times the helicity!)
94 fillHelicity(_lambdaA2,_nA,_JA2,getParentId());
95 fillHelicity(_lambdaB2,_nB,_JB2,getDaug(0));
96 fillHelicity(_lambdaC2,_nC,_JC2,getDaug(1));
97
98 if (verbose()){
99 report(INFO,"EvtGen")<<"Helicity states of particle A:"<<endl;
100 for(i=0;i<_nA;i++){
101 report(INFO,"EvtGen")<<_lambdaA2[i]<<endl;
102 }
103
104 report(INFO,"EvtGen")<<"Helicity states of particle B:"<<endl;
105 for(i=0;i<_nB;i++){
106 report(INFO,"EvtGen")<<_lambdaB2[i]<<endl;
107 }
108
109 report(INFO,"EvtGen")<<"Helicity states of particle C:"<<endl;
110 for(i=0;i<_nC;i++){
111 report(INFO,"EvtGen")<<_lambdaC2[i]<<endl;
112 }
113 }
114
115 //now read in the helicity amplitudes
116
117 int argcounter=0;
118
119 for(ib=0;ib<_nB;ib++){
120 for(ic=0;ic<_nC;ic++){
121 _HBC[ib][ic]=0.0;
122 if (abs(_lambdaB2[ib]-_lambdaC2[ic])<=_JA2) argcounter+=2;
123 }
124 }
125
126 checkNArg(argcounter);
127
128 argcounter=0;
129
130 for(ib=0;ib<_nB;ib++){
131 for(ic=0;ic<_nC;ic++){
132 if (abs(_lambdaB2[ib]-_lambdaC2[ic])<=_JA2) {
133 _HBC[ib][ic]=getArg(argcounter)*exp(EvtComplex(0.0,getArg(argcounter+1)));;
134 argcounter+=2;
135 if (verbose()){
136 report(INFO,"EvtGen")<<"_HBC["<<ib<<"]["<<ic<<"]="
137 <<_HBC[ib][ic]<<endl;
138 }
139 }
140 }
141 }
142
146 _HBC);
147
148 // Note: these are not class data members but local variables.
149 delete [] _lambdaA2;
150 delete [] _lambdaB2;
151 delete [] _lambdaC2;
152 for(int ib=0;ib<_nB;ib++){
153 delete [] _HBC[ib];
154 }
155 delete [] _HBC; // _HBC is copied in ctor of EvtEvalHelAmp above.
156
157}
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:252
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ INFO
Definition: EvtReport.hh:52
double getArg(int j)
EvtId getParentId()
Definition: EvtDecayBase.hh:60
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtId getDaug(int i)
Definition: EvtDecayBase.hh:66
static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.hh:61
static int getSpin2(spintype stype)
Definition: EvtSpinType.hh:34
static int getSpinStates(spintype stype)
Definition: EvtSpinType.hh:64

◆ initProbMax()

void EvtHelAmp::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 160 of file EvtHelAmp.cc.

160 {
161
162 double maxprob=_evalHelAmp->probMax();
163
164 if (verbose()){
165 report(INFO,"EvtGen")<<"Calculated probmax"<<maxprob<<endl;
166 }
167
168 setProbMax(maxprob);
169
170}
void setProbMax(double prbmx)
double probMax()

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