BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtPartWave Class Reference

#include <EvtPartWave.hh>

+ Inheritance diagram for EvtPartWave:

Public Member Functions

 EvtPartWave ()
 
virtual ~EvtPartWave ()
 
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 31 of file EvtPartWave.hh.

Constructor & Destructor Documentation

◆ EvtPartWave()

EvtPartWave::EvtPartWave ( )
inline

Definition at line 35 of file EvtPartWave.hh.

35{}

Referenced by clone().

◆ ~EvtPartWave()

EvtPartWave::~EvtPartWave ( )
virtual

Definition at line 41 of file EvtPartWave.cc.

41{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtPartWave::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 50 of file EvtPartWave.cc.

50 {
51
52 return new EvtPartWave;
53
54}

◆ decay()

void EvtPartWave::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 227 of file EvtPartWave.cc.

227 {
228
229 //first generate simple phase space
231
232 _evalHelAmp->evalAmp(p,_amp2);
233
234 return;
235
236}
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 EvtPartWave::getName ( std::string &  name)
virtual

Implements EvtDecayBase.

Definition at line 43 of file EvtPartWave.cc.

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

◆ init()

void EvtPartWave::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 56 of file EvtPartWave.cc.

56 {
57
58 checkNDaug(2);
59
60 //find out how many states each particle have
64
65 if (verbose()){
66 report(INFO,"EvtGen")<<"_nA,_nB,_nC:"
67 <<_nA<<","<<_nB<<","<<_nC<<endl;
68 }
69
70 //find out what 2 times the spin is
74
75 if (verbose()){
76 report(INFO,"EvtGen")<<"_JA2,_JB2,_JC2:"
77 <<_JA2<<","<<_JB2<<","<<_JC2<<endl;
78 }
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
93 int i;
94 //find the allowed helicities (actually 2*times the helicity!)
95
96 fillHelicity(_lambdaA2,_nA,_JA2);
97 fillHelicity(_lambdaB2,_nB,_JB2);
98 fillHelicity(_lambdaC2,_nC,_JC2);
99
100 if (verbose()){
101 report(INFO,"EvtGen")<<"Helicity states of particle A:"<<endl;
102 for(i=0;i<_nA;i++){
103 report(INFO,"EvtGen")<<_lambdaA2[i]<<endl;
104 }
105
106 report(INFO,"EvtGen")<<"Helicity states of particle B:"<<endl;
107 for(i=0;i<_nB;i++){
108 report(INFO,"EvtGen")<<_lambdaB2[i]<<endl;
109 }
110
111 report(INFO,"EvtGen")<<"Helicity states of particle C:"<<endl;
112 for(i=0;i<_nC;i++){
113 report(INFO,"EvtGen")<<_lambdaC2[i]<<endl;
114 }
115
116 report(INFO,"EvtGen")<<"Will now figure out the valid (M_LS) states:"<<endl;
117
118 }
119
120 int Lmin=std::max(_JA2-_JB2-_JC2,std::max(_JB2-_JA2-_JC2,_JC2-_JA2-_JB2));
121 if (Lmin<0) Lmin=0;
122 //int Lmin=_JA2-_JB2-_JC2;
123 int Lmax=_JA2+_JB2+_JC2;
124
125 int L;
126
127 int _nPartialWaveAmp=0;
128
129 int _nL[50];
130 int _nS[50];
131
132 for (L=Lmin;L<=Lmax;L+=2){
133 int Smin=abs(L-_JA2);
134 if (Smin<abs(_JB2-_JC2)) Smin=abs(_JB2-_JC2);
135 int Smax=L+_JA2;
136 if (Smax>abs(_JB2+_JC2)) Smax=abs(_JB2+_JC2);
137 int S;
138 for (S=Smin;S<=Smax;S+=2){
139 _nL[_nPartialWaveAmp]=L;
140 _nS[_nPartialWaveAmp]=S;
141
142 _nPartialWaveAmp++;
143 if (verbose()){
144 report(INFO,"EvtGen")<<"M["<<L<<"]["<<S<<"]"<<endl;
145 }
146 }
147 }
148
149 checkNArg(_nPartialWaveAmp*2);
150
151 int argcounter=0;
152
153 EvtComplex _M[50];
154
155 for(i=0;i<_nPartialWaveAmp;i++){
156 _M[i]=getArg(argcounter)*exp(EvtComplex(0.0,getArg(argcounter+1)));;
157 argcounter+=2;
158 if (verbose()){
159 report(INFO,"EvtGen")<<"M["<<_nL[i]<<"]["<<_nS[i]<<"]="<<_M[i]<<endl;
160 }
161 }
162
163 //Now calculate the helicity amplitudes
164
165
166
167 for(ib=0;ib<_nB;ib++){
168 for(ic=0;ic<_nC;ic++){
169 _HBC[ib][ic]=0.0;
170 if (abs(_lambdaB2[ib]-_lambdaC2[ic])<=_JA2){
171 for(i=0;i<_nPartialWaveAmp;i++){
172 int L=_nL[i];
173 int S=_nS[i];
174 int lambda2=_lambdaB2[ib];
175 int lambda3=_lambdaC2[ic];
176 int s1=_JA2;
177 int s2=_JB2;
178 int s3=_JC2;
179 int m1=lambda2-lambda3;
180 EvtCGCoefSingle c1(s2,s3);
181 EvtCGCoefSingle c2(L,S);
182
183 if (verbose()){
184 report(INFO,"EvtGen") << "s2,lambda2:"<<s2<<" "<<lambda2<<endl;
185 }
186 //fkw changes to satisfy KCC
187 double fkwTmp = (L+1.0)/(s1+1.0);
188
189 if (S>=abs(m1)){
190
191 EvtComplex tmp=sqrt(fkwTmp)
192 *c1.coef(S,m1,s2,s3,lambda2,-lambda3)
193 *c2.coef(s1,m1,L,S,0,m1)*_M[i];
194 //fkw EvtComplex tmp=sqrt((L+1)/(s1+1))*c1.coef(S,m1,s2,s3,lambda2,-lambda3)*c2.coef(s1,m1,L,S,0,m1)*_M[i];
195 _HBC[ib][ic]+=tmp;
196 }
197 }
198 if (verbose()){
199 report(INFO,"EvtGen")<<"_HBC["<<ib<<"]["<<ic<<"]="<<_HBC[ib][ic]<<endl;
200 }
201 }
202 }
203 }
204
208 _HBC);
209
210
211}
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 EvtPartWave::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 214 of file EvtPartWave.cc.

214 {
215
216 double maxprob=_evalHelAmp->probMax();
217
218 if (verbose()){
219 report(INFO,"EvtGen")<<"Calculated probmax"<<maxprob<<endl;
220 }
221
222 setProbMax(maxprob);
223
224}
void setProbMax(double prbmx)
double probMax()

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