BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtEvalHelAmp Class Reference

#include <EvtEvalHelAmp.hh>

Public Member Functions

 EvtEvalHelAmp (EvtSpinType::spintype A, EvtSpinType::spintype B, EvtSpinType::spintype C, EvtComplexPtrPtr HBC)
 
virtual ~EvtEvalHelAmp ()
 
double probMax ()
 
void evalAmp (EvtParticle *p, EvtAmp &amp)
 

Detailed Description

Definition at line 33 of file EvtEvalHelAmp.hh.

Constructor & Destructor Documentation

◆ EvtEvalHelAmp()

EvtEvalHelAmp::EvtEvalHelAmp ( EvtSpinType::spintype  A,
EvtSpinType::spintype  B,
EvtSpinType::spintype  C,
EvtComplexPtrPtr  HBC 
)

Definition at line 89 of file EvtEvalHelAmp.cc.

92 {
93
94 //find out how many states each particle have
98
99 //find out what 2 times the spin is
100 _JA2=EvtSpinType::getSpin2(typeA);
101 _JB2=EvtSpinType::getSpin2(typeB);
102 _JC2=EvtSpinType::getSpin2(typeC);
103
104
105 //allocate memory
106 _lambdaA2=new int[_nA];
107 _lambdaB2=new int[_nB];
108 _lambdaC2=new int[_nC];
109
110 _HBC=new EvtComplexPtr[_nB];
111 int ia,ib,ic;
112 for(ib=0;ib<_nB;ib++){
113 _HBC[ib]=new EvtComplex[_nC];
114 }
115
116
117 _RA=new EvtComplexPtr[_nA];
118 for(ia=0;ia<_nA;ia++){
119 _RA[ia]=new EvtComplex[_nA];
120 }
121 _RB=new EvtComplexPtr[_nB];
122 for(ib=0;ib<_nB;ib++){
123 _RB[ib]=new EvtComplex[_nB];
124 }
125 _RC=new EvtComplexPtr[_nC];
126 for(ic=0;ic<_nC;ic++){
127 _RC[ic]=new EvtComplex[_nC];
128 }
129
130 _amp=new EvtComplexPtrPtr[_nA];
131 _amp1=new EvtComplexPtrPtr[_nA];
132 _amp3=new EvtComplexPtrPtr[_nA];
133 for(ia=0;ia<_nA;ia++){
134 _amp[ia]=new EvtComplexPtr[_nB];
135 _amp1[ia]=new EvtComplexPtr[_nB];
136 _amp3[ia]=new EvtComplexPtr[_nB];
137 for(ib=0;ib<_nB;ib++){
138 _amp[ia][ib]=new EvtComplex[_nC];
139 _amp1[ia][ib]=new EvtComplex[_nC];
140 _amp3[ia][ib]=new EvtComplex[_nC];
141 }
142 }
143
144 //find the allowed helicities (actually 2*times the helicity!)
145
146 fillHelicity(_lambdaA2,_nA,_JA2);
147 fillHelicity(_lambdaB2,_nB,_JB2);
148 fillHelicity(_lambdaC2,_nC,_JC2);
149
150 for(ib=0;ib<_nB;ib++){
151 for(ic=0;ic<_nC;ic++){
152 _HBC[ib][ic]=HBC[ib][ic];
153 }
154 }
155}
static int getSpin2(spintype stype)
Definition: EvtSpinType.hh:34
static int getSpinStates(spintype stype)
Definition: EvtSpinType.hh:64

◆ ~EvtEvalHelAmp()

EvtEvalHelAmp::~EvtEvalHelAmp ( )
virtual

Definition at line 40 of file EvtEvalHelAmp.cc.

40 {
41
42 //allocate memory
43 delete [] _lambdaA2;
44 delete [] _lambdaB2;
45 delete [] _lambdaC2;
46
47 int ia,ib,ic;
48 for(ib=0;ib<_nB;ib++){
49 delete [] _HBC[ib];
50 }
51
52 delete [] _HBC;
53
54
55 for(ia=0;ia<_nA;ia++){
56 delete [] _RA[ia];
57 }
58 delete [] _RA;
59
60 for(ib=0;ib<_nB;ib++){
61 delete [] _RB[ib];
62 }
63 delete [] _RB;
64
65 for(ic=0;ic<_nC;ic++){
66 delete [] _RC[ic];
67 }
68 delete [] _RC;
69
70
71 for(ia=0;ia<_nA;ia++){
72 for(ib=0;ib<_nB;ib++){
73 delete [] _amp[ia][ib];
74 delete [] _amp1[ia][ib];
75 delete [] _amp3[ia][ib];
76 }
77 delete [] _amp[ia];
78 delete [] _amp1[ia];
79 delete [] _amp3[ia];
80 }
81
82 delete [] _amp;
83 delete [] _amp1;
84 delete [] _amp3;
85
86}

Member Function Documentation

◆ evalAmp()

void EvtEvalHelAmp::evalAmp ( EvtParticle p,
EvtAmp amp 
)

Definition at line 202 of file EvtEvalHelAmp.cc.

202 {
203
204 //find theta and phi of the first daughter
205
206 EvtVector4R pB=p->getDaug(0)->getP4();
207 EvtVector4R pC=p->getDaug(1)->getP4();
208 EvtVector4R pP=pB+pC;
209
210 EvtHelSys angles(pP,pB);
211 double theta=angles.getHelAng(1);
212 double phi =angles.getHelAng(2);
213// double theta=acos(pB.get(3)/pB.d3mag()); //pingrg ,2007,4,15
214// double phi=atan2(pB.get(2),pB.get(1));
215
216 double c=sqrt((_JA2+1)/(4*EvtConst::pi));
217
218 int ia,ib,ic;
219
220 double prob1=0.0;
221
222 for(ia=0;ia<_nA;ia++){
223 for(ib=0;ib<_nB;ib++){
224 for(ic=0;ic<_nC;ic++){
225 _amp[ia][ib][ic]=0.0;
226 if (abs(_lambdaB2[ib]-_lambdaC2[ic])<=_JA2) {
227 double dfun=EvtdFunction::d(_JA2,_lambdaA2[ia],
228 _lambdaB2[ib]-_lambdaC2[ic],theta);
229
230 _amp[ia][ib][ic]=c*_HBC[ib][ic]*
231 exp(EvtComplex(0.0,phi*0.5*(_lambdaA2[ia]-_lambdaB2[ib]+
232 _lambdaC2[ic])))*dfun;
233 }
234 prob1+=real(_amp[ia][ib][ic]*conj(_amp[ia][ib][ic]));
235 }
236 }
237 }
238
239 setUpRotationMatrices(p,theta,phi);
240
241 applyRotationMatrices();
242
243 double prob2=0.0;
244
245 for(ia=0;ia<_nA;ia++){
246 for(ib=0;ib<_nB;ib++){
247 for(ic=0;ic<_nC;ic++){
248 prob2+=real(_amp[ia][ib][ic]*conj(_amp[ia][ib][ic]));
249 if (_nA==1){
250 if (_nB==1){
251 if (_nC==1){
252 amp.vertex(_amp[ia][ib][ic]);
253 }
254 else{
255 amp.vertex(ic,_amp[ia][ib][ic]);
256 }
257 }
258 else{
259 if (_nC==1){
260 amp.vertex(ib,_amp[ia][ib][ic]);
261 }
262 else{
263 amp.vertex(ib,ic,_amp[ia][ib][ic]);
264 //report(INFO,"EvtGen") << "ib,ic:"<<ib<<" "<<ic<<" "<<_amp[ia][ib][ic]<<endl;
265 }
266 }
267 }else{
268 if (_nB==1){
269 if (_nC==1){
270 amp.vertex(ia,_amp[ia][ib][ic]);
271 }
272 else{
273 amp.vertex(ia,ic,_amp[ia][ib][ic]);
274 }
275 }
276 else{
277 if (_nC==1){
278 amp.vertex(ia,ib,_amp[ia][ib][ic]);
279 }
280 else{
281 amp.vertex(ia,ib,ic,_amp[ia][ib][ic]);
282 }
283 }
284 }
285 }
286 }
287 }
288
289 if (fabs(prob1-prob2)>0.000001*prob1){
290 report(INFO,"EvtGen") << "prob1,prob2:"<<prob1<<" "<<prob2<<endl;
291 ::abort();
292 }
293
294 return ;
295
296}
Evt3Rank3C conj(const Evt3Rank3C &t2)
Definition: Evt3Rank3C.cc:175
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
void vertex(const EvtComplex &amp)
Definition: EvtAmp.cc:477
static const double pi
Definition: EvtConst.hh:28
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:121
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:85
static double d(int j, int m1, int m2, double theta)
Definition: EvtdFunction.cc:30

Referenced by EvtHelAmp::decay(), EvtKstarstargamma::decay(), and EvtPartWave::decay().

◆ probMax()

double EvtEvalHelAmp::probMax ( )

Definition at line 162 of file EvtEvalHelAmp.cc.

162 {
163
164 double c=1.0/sqrt(4*EvtConst::pi/(_JA2+1));
165
166 int ia,ib,ic;
167
168
169 double theta;
170 int itheta;
171
172 double maxprob=0.0;
173
174 for(itheta=-10;itheta<=10;itheta++){
175 theta=acos(0.099999*itheta);
176 for(ia=0;ia<_nA;ia++){
177 double prob=0.0;
178 for(ib=0;ib<_nB;ib++){
179 for(ic=0;ic<_nC;ic++){
180 _amp[ia][ib][ic]=0.0;
181 if (abs(_lambdaB2[ib]-_lambdaC2[ic])<=_JA2) {
182 _amp[ia][ib][ic]=c*_HBC[ib][ic]*
183 EvtdFunction::d(_JA2,_lambdaA2[ia],
184 _lambdaB2[ib]-_lambdaC2[ic],theta);
185 prob+=real(_amp[ia][ib][ic]*conj(_amp[ia][ib][ic]));
186 }
187 }
188 }
189
190 prob*=sqrt(1.0*_nA);
191
192 if (prob>maxprob) maxprob=prob;
193
194 }
195 }
196
197 return maxprob;
198
199}

Referenced by EvtHelAmp::initProbMax(), and EvtPartWave::initProbMax().


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