67 {
68
69 int nGoodCharged = 0;
70 int nGoodChargedp = 0;
71 int nGoodChargedm = 0;
72 int nCharged = 0;
73 int nNeutrk = 0;
74
75 int nTottrk = 0;
76 int totCharged = 0;
77 int npionp = 0;
78 int npionm = 0;
79 int nprotonp = 0;
80 int nprotonm = 0;
81 int nkaonp = 0;
82 int nkaonm = 0;
83 int nlambda = 0;
84 int nalambda= 0;
85 int nks = 0;
86 int ngamma = 0;
87 int neta = 0;
88 int npi0 = 0;
89 int nmuonp = 0;
90 int nmuonm = 0;
91 int nelectronp = 0;
92 int nelectronm = 0;
93
94
95 Hep3Vector xorigin(0,0,0);
98 xorigin.setX(dbv[0]);
99 xorigin.setY(dbv[1]);
100 xorigin.setZ(dbv[2]);
101 }
102
105
106 nCharged = evtRecEvent->totalCharged();
107 nNeutrk = evtRecEvent->totalNeutral();
108 nTottrk = evtRecEvent->totalTracks();
109
110
111
112
113
114 vector<int> iGood;
115 iGood.clear();
116 for ( Int_t iCharge = 0; iCharge < evtRecEvent->totalCharged(); ++iCharge ) {
118 if(!(*itTrk)->isMdcTrackValid()) continue;
120 double theta = mdcTrk->
theta();
121 HepVector a = mdcTrk->
helix();
122 HepSymMatrix Ea = mdcTrk->
err();
124 HepPoint3D IP(xorigin[0],xorigin[1],xorigin[2]);
126 helixip.pivot(IP);
127 HepVector vecipa = helixip.a();
128 double Rvxy0=fabs(vecipa[0]);
129 double Rvz0=vecipa[3];
130 double Rvphi0=vecipa[1];
131
132
133 if(fabs(Rvxy0) >= 1.0) continue;
134 if(fabs(Rvz0) >= 10.0) continue;
135 if(fabs(
cos(theta))>=0.93)
continue;
136 if(mdcTrk->
charge() > 0) nGoodChargedp++;
137 if(mdcTrk->
charge() < 0) nGoodChargedm++;
138
139 ++nGoodCharged;
140 totCharged +=mdcTrk->
charge();
141 iGood.push_back(iCharge);
142 }
143
144
146
147
148
149
150
151 for(int i = evtRecEvent->totalCharged(); i< evtRecEvent->totalTracks(); i++)
152 {
154
155
156 if(!(*iTrk)->isEmcShowerValid()) continue;
158
159 if (((emcShower->
energy() > 0.025) &&
160 (emcShower->
time() > 0) && (emcShower->
time() < 14) &&
161 (((abs(
cos(emcShower->
theta())) < 0.80) && (emcShower->
energy() > 0.025)) ||
162 ((abs(
cos(emcShower->
theta())) < 0.92) &&
163 (abs(
cos(emcShower->
theta())) > 0.86) && (emcShower->
energy() > 0.050))))
164 ){
165
166 ngamma++;
167 }
168 }
169
170
171
172
173 for(int i=0;i<iGood.size();i++){
176
177
178
179
193
194
195
196
198 if (mdcKalTrack->
charge() > 0) npionp++;
199 if (mdcKalTrack->
charge() < 0) npionm++;
200 }
201
202
204 if (mdcKalTrack->
charge() > 0) nkaonp++;
205 if (mdcKalTrack->
charge() < 0) nkaonm++;
206 }
207
208
210 if (mdcKalTrack->
charge() > 0) nprotonp++;
211 if (mdcKalTrack->
charge() < 0) nprotonm++;
212 }
213
214
216 if (mdcKalTrack->
charge() > 0) nelectronp++;
217 if (mdcKalTrack->
charge() < 0) nelectronm++;
218 }
219
220
222 if (mdcKalTrack->
charge() > 0) nmuonp++;
223 if (mdcKalTrack->
charge() < 0) nmuonm++;
224 }
225 }
226
227
228
229
230
231
232
233
234
235
237 for(EvtRecEtaToGGCol::iterator iEta = evtRecEtaToGGCol->begin();
238 iEta != evtRecEtaToGGCol->end(); iEta++){
239 if ((((*iEta)->chisq() < 2500) &&
240 ((*iEta)->unconMass() > 0.40) &&
241
242 ((*iEta)->unconMass() < 0.70))){
245 if (((loShower->
energy() > 0.025) &&
246 (loShower->
time() > 0) && (loShower->
time() < 14) &&
247 (((abs(
cos(loShower->
theta())) < 0.80) && (loShower->
energy() > 0.025)) ||
248 ((abs(
cos(loShower->
theta())) < 0.92) &&
249 (abs(
cos(loShower->
theta())) > 0.86) && (loShower->
energy() > 0.050))))
250
251 ){
254 if (((hiShower->
energy() > 0.025) &&
255 (hiShower->
time() > 0) && (hiShower->
time() < 14) &&
256 (((abs(
cos(hiShower->
theta())) < 0.80) && (hiShower->
energy() > 0.025)) ||
257 ((abs(
cos(hiShower->
theta())) < 0.92) &&
258 (abs(
cos(hiShower->
theta())) > 0.86) && (hiShower->
energy() > 0.050))))
259
260 ){
261 neta++;
262 }
263 }
264 }
265 }
266
267
268
269
271 for(EvtRecPi0Col::iterator iPi0 = evtRecPi0Col->begin();
272 iPi0 != evtRecPi0Col->end(); iPi0++){
273 if ((((*iPi0)->chisq() < 2500) &&
274 ((*iPi0)->unconMass() > 0.107) &&
275
276 ((*iPi0)->unconMass() < 0.163))){
279 if (((loShower->
energy() > 0.025) &&
280 (loShower->
time() > 0) && (loShower->
time() < 14) &&
281 (((abs(
cos(loShower->
theta())) < 0.80) && (loShower->
energy() > 0.025)) ||
282 ((abs(
cos(loShower->
theta())) < 0.92) &&
283 (abs(
cos(loShower->
theta())) > 0.86) && (loShower->
energy() > 0.050))))
284
285 ){
288 if (((hiShower->
energy() > 0.025) &&
289 (hiShower->
time() > 0) && (hiShower->
time() < 14) &&
290 (((abs(
cos(hiShower->
theta())) < 0.80) && (hiShower->
energy() > 0.025)) ||
291 ((abs(
cos(hiShower->
theta())) < 0.92) &&
292 (abs(
cos(hiShower->
theta())) > 0.86) && (hiShower->
energy() > 0.050))))
293
294 ){
295 npi0++;
296 }
297 }
298 }
299 }
300
301
302
303
305 for(EvtRecVeeVertexCol::iterator iKs = evtRecVeeVertexCol->begin();
306 iKs != evtRecVeeVertexCol->end(); iKs++){
307 if ((*iKs)->vertexId() == 310){
308 if ((((*iKs)->mass() > 0.471) &&
309 ((*iKs)->mass() < 0.524) &&
310
311 ((*iKs)->chi2() < 100))){
312 nks++;
313 }
314 }
315 }
316
317 for(EvtRecVeeVertexCol::iterator iL = evtRecVeeVertexCol->begin();
318 iL != evtRecVeeVertexCol->end(); iL++){
319 if ((*iL)->vertexId() == 3122){
320 if ((((*iL)->mass() > 1.100) &&
321 ((*iL)->mass() < 1.130) &&
322
323 ((*iL)->chi2() < 100))){
324 nlambda++;
325 }
326 }
327 if ((*iL)->vertexId() == -3122){
328 if ((((*iL)->mass() > 1.100) &&
329 ((*iL)->mass() < 1.130) &&
330
331 ((*iL)->chi2() < 100))){
332 nalambda++;
333 }
334 }
335 }
336
337
338
339 unsigned int tagdata1 =
IntToTag1(nNeutrk, nTottrk, ngamma, npi0);
340 unsigned int tagdata2 =
IntToTag2(npionp, npionm, nkaonp, nkaonm, nprotonp, nprotonm);
341 unsigned int tagdata3 =
IntToTag2(nlambda, nalambda, nelectronp, nelectronm, nmuonp, nmuonm);
342 unsigned int tagdata4 =
IntToTag2(nks, neta, nCharged, nGoodChargedp, nGoodChargedm, totCharged);
343
344
349
350 iEvt++;
351}
double cos(const BesAngle a)
EvtRecTrackCol::iterator EvtRecTrackIterator
const double theta() const
const HepSymMatrix err() const
const HepVector helix() const
......
RecEmcShower * emcShower()
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
void setTagData0(unsigned int t)
void setTagData3(unsigned int t)
void setTagData4(unsigned int t)
void setTagData1(unsigned int t)
void setTagData2(unsigned int t)
_EXTERN_ std::string EvtRecPi0Col
_EXTERN_ std::string EvtRecEvent
_EXTERN_ std::string EvtRecVeeVertexCol
_EXTERN_ std::string EvtRecEtaToGGCol
_EXTERN_ std::string EvtRecTrackCol