BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtPHOTOS Class Reference

#include <EvtPHOTOS.hh>

+ Inheritance diagram for EvtPHOTOS:

Public Member Functions

void doRadCorr (EvtParticle *p)
 
void doRadCorr (EvtParticle *p)
 
virtual void doRadCorr (EvtParticle *p)=0
 
virtual void doRadCorr (EvtParticle *p)=0
 

Detailed Description

Member Function Documentation

◆ doRadCorr() [1/2]

void EvtPHOTOS::doRadCorr ( EvtParticle p)
virtual

Implements EvtAbsRadCorr.

Definition at line 50 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtPHOTOS.cc.

50 {
51
52 static int first=1;
53
54 //added by Lange Jan4,2000
55 static EvtId GAMM=EvtPDL::getId("gammaFSR"); //pingrg, 2009/02/19
56
57 if (first) {
58
59 first=0;
60 phoini_();
61 }
62
63 int entry,eventnum,numparticle,istat,partnum,mother;
64 int daugfirst,dauglast;
65
66 int numparticlephotos;
67
68 double px,py,pz,e,m,x,y,z,t;
69
70 static EvtId dq=EvtPDL::getId("d");
71 static EvtId adq=EvtPDL::getId("anti-d");
72 static EvtId uq=EvtPDL::getId("u");
73 static EvtId auq=EvtPDL::getId("anti-u");
74 static EvtId sq=EvtPDL::getId("s");
75 static EvtId asq=EvtPDL::getId("anti-s");
76 static EvtId cq=EvtPDL::getId("c");
77 static EvtId acq=EvtPDL::getId("anti-c");
78 static EvtId bq=EvtPDL::getId("b");
79 static EvtId abq=EvtPDL::getId("anti-b");
80 static EvtId tq=EvtPDL::getId("t");
81 static EvtId atq=EvtPDL::getId("anti-t");
82 static EvtIdSet quarks(dq,adq,uq,auq,sq,asq,cq,acq,bq,abq,tq,atq);\
83
84 px=0.0;
85 py=0.0;
86 pz=0.0;
87 e=p->mass();
88 m=p->mass();
89 x=0.0;
90 y=0.0;
91 z=0.0;
92 t=0.0;
93
94 entry=1;
95 eventnum=1;
96 numparticle=1;
97 istat=2;
98 partnum=EvtPDL::getStdHep(p->getId());
99 mother=0;
100 daugfirst=2;
101 dauglast=1+p->getNDaug();
102
103 begevtgenstorex_(&entry,&eventnum,&numparticle,&istat,&partnum,
104 &mother,&daugfirst,&dauglast,
105 &px,&py,&pz,&e,&m,&x,&y,&z,&t);
106
107 int i;
108 // std::cout << EvtPDL::name(p->getId()) <<" " ;
109 for(i=0;i<p->getNDaug();i++){
110
111 //No quarks to photos
112 if (quarks.contains(p->getDaug(i)->getId())==1) continue;
113
114 px=p->getDaug(i)->getP4().get(1);
115 py=p->getDaug(i)->getP4().get(2);
116 pz=p->getDaug(i)->getP4().get(3);
117 e=p->getDaug(i)->getP4().get(0);
118 m=p->getDaug(i)->mass();
119 x=0.0;
120 y=0.0;
121 z=0.0;
122 t=0.0;
123
124 // std::cout << EvtPDL::name(p->getDaug(i)->getId()) << " " ;
125 entry+=1;
126 eventnum=1;
127 numparticle+=1;
128 istat=1;
129 partnum=EvtPDL::getStdHep(p->getDaug(i)->getId());
130 mother=1;
131 daugfirst=0;
132 dauglast=0;
133
134 begevtgenstorex_(&entry,&eventnum,&numparticle,&istat,&partnum,
135 &mother,&daugfirst,&dauglast,
136 &px,&py,&pz,&e,&m,&x,&y,&z,&t);
137
138
139 }
140 // std::cout << std::endl;
141 //can't use heplst since the common block used by the BaBar
142 //implementation of PHOTOS is renamed due to real*4 vs real*8
143 //problems.
144
145 //int mlst=1;
146
147 //heplst_(&mlst);
148
149 entry=1;
150
151 // report(INFO,"EvtGen") << "Doing photos " << EvtPDL::name(p->getId()) << endl;
152 photos_(&entry);
153 // report(INFO,"EvtGen") << "done\n";
154 begevtgengetx_(&entry,&eventnum,&numparticlephotos,&istat,&partnum,
155 &mother,&daugfirst,&dauglast,
156 &px,&py,&pz,&e,&m,&x,&y,&z,&t);
157
158
159 //report(INFO,"EvtGen") << "numparticlephotos:"<<numparticlephotos<<endl;
160
161 if (numparticle==numparticlephotos) return;
162
163 EvtVector4R new4mom;
164
165 int np;
166
167 for(i=0;i<p->getNDaug();i++){
168
169 entry=i+2;
170
171 begevtgengetx_(&entry,&eventnum,&np,&istat,&partnum,
172 &mother,&daugfirst,&dauglast,
173 &px,&py,&pz,&e,&m,&x,&y,&z,&t);
174
175 //this is needed to ensure that photos does not
176 //change the masses. But it will violate energy conservation!
177 double mp=p->getDaug(i)->mass();
178 e=sqrt(mp*mp+px*px+py*py+pz*pz);
179
180 new4mom.set(e,px,py,pz);
181
182 p->getDaug(i)->setP4(new4mom);
183
184 }
185
186 for(entry=numparticle+1;entry<=numparticlephotos;entry++){
187
188 begevtgengetx_(&entry,&eventnum,&np,&istat,&partnum,
189 &mother,&daugfirst,&dauglast,
190 &px,&py,&pz,&e,&m,&x,&y,&z,&t);
191
192 new4mom.set(e,px,py,pz);
193
194 //new4mom.dump();
195
196 EvtPhotonParticle* gamma;
197 gamma=new EvtPhotonParticle;
198 gamma->init(GAMM,new4mom);
199 // report(INFO,"EvtGen") << gamma << " " << p << " "<< px << " " << py << " " << pz << " " << p->getNDaug() << " " << EvtPDL::name(p->getId())<<" " << entry << " " <<numparticlephotos<<endl;
200 gamma->addDaug(p);
201
202// p->getDaug(i)->set_type(EvtSpinType::PHOTON);
203
204 }
205 return ;
206}
Double_t x[10]
void begevtgengetx_(int *, int *, int *, int *, int *, int *, int *, int *, double *, double *, double *, double *, double *, double *, double *, double *, double *)
void begevtgenstorex_(int *, int *, int *, int *, int *, int *, int *, int *, double *, double *, double *, double *, double *, double *, double *, double *, double *)
void photos_(int *)
void phoini_()
TTree * t
Definition: binning.cxx:23
static EvtId getId(const std::string &name)
void init(EvtId part_n, double e, double px, double py, double pz)
double y[1000]
const double mp
Definition: incllambda.cxx:45

◆ doRadCorr() [2/2]

void EvtPHOTOS::doRadCorr ( EvtParticle p)
virtual

Implements EvtAbsRadCorr.


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