65 {
66
67 int nGoodCharged = 0;
68 int nGoodChargedp = 0;
69 int nGoodChargedm = 0;
70 int nCharged = 0;
71 int nNeutrk = 0;
72
73 int nTottrk = 0;
74 int totCharged = 0;
75 int npionp = 0;
76 int npionm = 0;
77 int nprotonp = 0;
78 int nprotonm = 0;
79 int nkaonp = 0;
80 int nkaonm = 0;
81 int nlambda = 0;
82 int nalambda= 0;
83 int nks = 0;
84 int ngamma = 0;
85 int neta = 0;
86 int npi0 = 0;
87 int nmuonp = 0;
88 int nmuonm = 0;
89 int nelectronp = 0;
90 int nelectronm = 0;
91
92
93 Hep3Vector xorigin(0,0,0);
96 xorigin.setX(dbv[0]);
97 xorigin.setY(dbv[1]);
98 xorigin.setZ(dbv[2]);
99 }
100
103
104 nCharged = evtRecEvent->totalCharged();
105 nNeutrk = evtRecEvent->totalNeutral();
106 nTottrk = evtRecEvent->totalTracks();
107
108
109
110
111
112 vector<int> iGood;
113 iGood.clear();
114 for ( Int_t iCharge = 0; iCharge < evtRecEvent->totalCharged(); ++iCharge ) {
116 if(!(*itTrk)->isMdcTrackValid()) continue;
118 double theta = mdcTrk->
theta();
119 HepVector a = mdcTrk->
helix();
120 HepSymMatrix Ea = mdcTrk->
err();
122 HepPoint3D IP(xorigin[0],xorigin[1],xorigin[2]);
124 helixip.pivot(IP);
125 HepVector vecipa = helixip.a();
126 double Rvxy0=fabs(vecipa[0]);
127 double Rvz0=vecipa[3];
128 double Rvphi0=vecipa[1];
129
130
131 if(fabs(Rvxy0) >= 1.0) continue;
132 if(fabs(Rvz0) >= 10.0) continue;
133 if(fabs(
cos(theta))>=0.93)
continue;
134 if(mdcTrk->
charge() > 0) nGoodChargedp++;
135 if(mdcTrk->
charge() < 0) nGoodChargedm++;
136
137 ++nGoodCharged;
138 totCharged +=mdcTrk->
charge();
139 iGood.push_back(iCharge);
140 }
141
142
144
145
146
147
148
149 for(int i = evtRecEvent->totalCharged(); i< evtRecEvent->totalTracks(); i++)
150 {
152
153
154 if(!(*iTrk)->isEmcShowerValid()) continue;
156
157 if (((emcShower->
energy() > 0.025) &&
158 (emcShower->
time() > 0) && (emcShower->
time() < 14) &&
162 ){
163
164 ngamma++;
165 }
166 }
167
168
169
170
171 for(int i=0;i<iGood.size();i++){
174
175
176
177
192
193
194
195
197 if (mdcKalTrack->
charge() > 0) npionp++;
198 if (mdcKalTrack->
charge() < 0) npionm++;
199 }
200
201
203 if (mdcKalTrack->
charge() > 0) nkaonp++;
204 if (mdcKalTrack->
charge() < 0) nkaonm++;
205 }
206
207
209 if (mdcKalTrack->
charge() > 0) nprotonp++;
210 if (mdcKalTrack->
charge() < 0) nprotonm++;
211 }
212
213
215 if (mdcKalTrack->
charge() > 0) nelectronp++;
216 if (mdcKalTrack->
charge() < 0) nelectronm++;
217 }
218
219
221 if (mdcKalTrack->
charge() > 0) nmuonp++;
222 if (mdcKalTrack->
charge() < 0) nmuonm++;
223 }
224 }
225
226
227
228
229
230
231
232
233
234
236 for(EvtRecEtaToGGCol::iterator iEta = evtRecEtaToGGCol->begin();
237 iEta != evtRecEtaToGGCol->end(); iEta++){
238 if ((((*iEta)->chisq() < 2500) &&
239 ((*iEta)->unconMass() > 0.40) &&
240
241 ((*iEta)->unconMass() < 0.70))){
244 if (((loShower->
energy() > 0.025) &&
245 (loShower->
time() > 0) && (loShower->
time() < 14) &&
249
250 ){
253 if (((hiShower->
energy() > 0.025) &&
254 (hiShower->
time() > 0) && (hiShower->
time() < 14) &&
258
259 ){
260 neta++;
261 }
262 }
263 }
264 }
265
266
267
268
270 for(EvtRecPi0Col::iterator iPi0 = evtRecPi0Col->begin();
271 iPi0 != evtRecPi0Col->end(); iPi0++){
272 if ((((*iPi0)->chisq() < 2500) &&
273 ((*iPi0)->unconMass() > 0.107) &&
274
275 ((*iPi0)->unconMass() < 0.163))){
278 if (((loShower->
energy() > 0.025) &&
279 (loShower->
time() > 0) && (loShower->
time() < 14) &&
283
284 ){
287 if (((hiShower->
energy() > 0.025) &&
288 (hiShower->
time() > 0) && (hiShower->
time() < 14) &&
292
293 ){
294 npi0++;
295 }
296 }
297 }
298 }
299
300
301
302
304 for(EvtRecVeeVertexCol::iterator iKs = evtRecVeeVertexCol->begin();
305 iKs != evtRecVeeVertexCol->end(); iKs++){
306 if ((*iKs)->vertexId() == 310){
307 if ((((*iKs)->mass() > 0.471) &&
308 ((*iKs)->mass() < 0.524) &&
309
310 ((*iKs)->chi2() < 100))){
311 nks++;
312 }
313 }
314 }
315
316 for(EvtRecVeeVertexCol::iterator iL = evtRecVeeVertexCol->begin();
317 iL != evtRecVeeVertexCol->end(); iL++){
318 if ((*iL)->vertexId() == 3122){
319 if ((((*iL)->mass() > 1.100) &&
320 ((*iL)->mass() < 1.130) &&
321
322 ((*iL)->chi2() < 100))){
323 nlambda++;
324 }
325 }
326 if ((*iL)->vertexId() == -3122){
327 if ((((*iL)->mass() > 1.100) &&
328 ((*iL)->mass() < 1.130) &&
329
330 ((*iL)->chi2() < 100))){
331 nalambda++;
332 }
333 }
334 }
335
336
337
338 unsigned int tagdata1 =
IntToTag1(nNeutrk, nTottrk, ngamma, npi0);
339 unsigned int tagdata2 =
IntToTag2(npionp, npionm, nkaonp, nkaonm, nprotonp, nprotonm);
340 unsigned int tagdata3 =
IntToTag2(nlambda, nalambda, nelectronp, nelectronm, nmuonp, nmuonm);
341 unsigned int tagdata4 =
IntToTag2(nks, neta, nCharged, nGoodChargedp, nGoodChargedm, totCharged);
342
343
348
349 iEvt++;
350}
double cos(const BesAngle a)
EvtRecTrackCol::iterator EvtRecTrackIterator
const double theta() const
const HepSymMatrix err() const
const HepVector helix() const
......
RecEmcShower * emcShower()
virtual void setTagData1(unsigned int t)=0
virtual void setTagData0(unsigned int t)=0
virtual void setTagData2(unsigned int t)=0
virtual void setTagData4(unsigned int t)=0
virtual void setTagData3(unsigned int t)=0
virtual bool isVertexValid()=0
virtual double * PrimaryVertex()=0
int methodProbability() const
void setRecTrack(EvtRecTrack *trk)
void setMethod(const int method)
void identify(const int pidcase)
double probElectron() const
void usePidSys(const int pidsys)
static ParticleID * instance()
bool IsPidInfoValid() const
double probProton() const
_EXTERN_ std::string EvtRecPi0Col
_EXTERN_ std::string EvtRecEvent
_EXTERN_ std::string EvtRecVeeVertexCol
_EXTERN_ std::string EvtRecEtaToGGCol
_EXTERN_ std::string EvtRecTrackCol