76 {
77
78 MsgStream log(
msgSvc(), name());
79 log << MSG::INFO << "in execute()" << endreq;
80
81
82
83 int event, run;
84
85
86 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
87 if (!eventHeader) {
88 log << MSG::FATAL << "Could not find Event Header" << endreq;
89 return( StatusCode::FAILURE);
90 }
91 log << MSG::INFO << "RootIoAlg: retrieved event: " << eventHeader->eventNumber() << " run: " << eventHeader->runNumber() << endreq;
92
93
94 int digiId;
95
96
97 SmartDataPtr<MdcDigiCol> mdcDigiCol(eventSvc(),"/Event/Digi/MdcDigiCol");
98 if (!mdcDigiCol) {
99 log << MSG::INFO << "Could not find MDC digi" << endreq;
100
101 }
102 else {
103 MdcDigiCol::iterator iter1 = mdcDigiCol->begin();
104 digiId = 0;
105 for (;iter1 != mdcDigiCol->end(); iter1++, digiId++) {
106 log << MSG::INFO << "MDC digit No: " << digiId << endreq;
107
108 log << MSG::INFO
109 << " time_channel = " << (*iter1)->getTimeChannel()
110 << " charge_channel = " << (*iter1)->getChargeChannel()
111 << endreq;
112 }
113 }
114
115
116
117 SmartDataPtr<TofDigiCol> tofDigiCol(eventSvc(),"/Event/Digi/TofDigiCol");
118 if (!tofDigiCol) {
119 log <<MSG::INFO << "Could not find TOF digi" << endreq;
120
121 }
122 else {
123 TofDigiCol::iterator iter2 = tofDigiCol->begin();
124 digiId = 0;
125 for (;iter2 != tofDigiCol->end(); iter2++, digiId++) {
126 log << MSG::INFO << "TOF digit No: " << digiId << endreq;
127 log << MSG::INFO
128 << " time_channel = " << (*iter2)->getTimeChannel()
129 << " charge_channel = " << (*iter2)->getChargeChannel()
130 << endreq;
131
132
133 }
134 }
135
136 SmartDataPtr<EmcDigiCol> emcDigiCol(eventSvc(),"/Event/Digi/EmcDigiCol");
137 if (!emcDigiCol) {
138 log <<MSG::INFO << "Could not find EMC digi" << endreq;
139
140 }
141 else {
142 EmcDigiCol::iterator iter3 = emcDigiCol->begin();
143 digiId = 0;
144 for (;iter3 != emcDigiCol->end(); iter3++, digiId++) {
145 log << MSG::INFO << "Emc digit No: " << digiId << endreq;
146
147 log << MSG::INFO
148 << " time_channel = " << (*iter3)->getTimeChannel()
149 << " charge_channel = " << (*iter3)->getChargeChannel()
150 << endreq;
151 }
152 }
153
154
155
157 if (!dstTofTrackCol) {
158 log <<MSG::INFO << "Could not find Dst Tof Track" << endreq;
159
160 }
161 else {
162 DstTofTrackCol::iterator iter4 = dstTofTrackCol->begin();
163 digiId = 0;
164 for (;iter4 != dstTofTrackCol->end(); iter4++, digiId++) {
165 log << MSG::INFO << "Dst Tof No: " << digiId << endreq;
166
167 log << MSG::INFO
168 <<" TrackID = " << (*iter4)->trackID()
169 <<" TofID = " <<(*iter4)->tofID()
170 <<" TofTrackID = " <<(*iter4)->tofTrackID()
171 <<" Beta = " << (*iter4)->beta()
172 << endreq;
173 }
174 }
175
176
178 if (!dstEmcShowerCol) {
179 log <<MSG::INFO << "Could not find Dst Emc Track" << endreq;
180
181 }
182 else {
183 DstEmcShowerCol::iterator iter5 = dstEmcShowerCol->begin();
184 digiId = 0;
185 for (;iter5 != dstEmcShowerCol->end(); iter5++, digiId++) {
186 log << MSG::INFO << "Dst Emc No: " << digiId << endreq;
187
188 log << MSG::INFO
189 << " Track ID = " << (*iter5)->trackId()
190 <<" Cell ID = " << (*iter5)->cellId()
191 <<" Total energy observed in Emc = " << (*iter5)->energy()
192 << endreq ;
193 }
194 }
195
196
198 if (!dstMdcTrackCol) {
199 log <<MSG::INFO << "Could not find Dst Mdc Track" << endreq;
200
201 }
202 else {
203 DstMdcTrackCol::iterator iter6 = dstMdcTrackCol->begin();
204 digiId = 0;
205 for (;iter6 != dstMdcTrackCol->end(); iter6++, digiId++) {
206 log << MSG::INFO << "Dst Mdc No: " << digiId << endreq;
207
208 log << MSG::INFO
209 << " Track ID = " << (*iter6)->trackId()
210 <<" number of total hits contained = " << (*iter6)->nster()
211 <<"px = "<<(*iter6)->px()
212 <<"p = "<<(*iter6)->p()
213 <<endreq;
214 }
215 }
216
217
219 if (!dstMdcDedxCol) {
220 log << MSG::INFO << "Could not find Dst Mdc Dedx " << endreq;
221
222 }
223 else {
224 DstMdcDedxCol::iterator iter7 = dstMdcDedxCol->begin();
225 digiId = 0;
226 for (;iter7 != dstMdcDedxCol->end(); iter7++, digiId++) {
227 log << MSG::INFO << "Dst Mdc Dedx No: " << digiId << endreq;
228
229 log << MSG::INFO
230 << " Track ID = " << (*iter7)->trackId()
231 <<"Chi of E = " << (*iter7)->chi(0)
232 <<"Chi of Mu = " << (*iter7)->chi(1)
233 <<"Chi of Pi = " << (*iter7)->chi(2)
234 <<endreq;
235 }
236 }
237
238
240 if (!dstMucTrackCol) {
241 log <<MSG::INFO << "Could not find Muc Track " << endreq;
242
243 }
244 else {
245 DstMucTrackCol::iterator iter8 = dstMucTrackCol->begin();
246 digiId = 0;
247 for (;iter8 != dstMucTrackCol->end(); iter8++, digiId++) {
248 log << MSG::INFO << "Dst Muc Track No: " << digiId << endreq;
249
250 log << MSG::INFO
251 << " Track ID = " << (*iter8)->trackId()
252 <<" Number of hits on track = " << (*iter8)->numHits()
253 <<" maxHitsInLayer " << (*iter8)->maxHitsInLayer()
254 <<" xPos = " << (*iter8)->xPos()
255 <<" yPos = " << (*iter8)->yPos()
256 <<" zPos = " << (*iter8)->zPos()
257 << endreq;
258 }
259 }
260
261
263 if (!dstExtTrackCol) {
264 log <<MSG::INFO << "Could not find DstExt Track " << endreq;
265
266 }
267 else {
268 DstExtTrackCol::iterator iter9 = dstExtTrackCol->begin();
269
270 digiId = 0;
271 for (;iter9 != dstExtTrackCol->end(); iter9++, digiId++) {
272 log << MSG::INFO << "Dst Ext Track No: " << digiId << endreq;
273 log << MSG::INFO
274 << "volume name of Tof1= "<< (*iter9)->tof1VolumeName()
275 << "volume number of Tof1 = "<< (*iter9)->tof1VolumeNumber()
276 << "Tof1 = "<< (*iter9)->tof1()
277 <<endreq;
278 log << MSG::INFO
279 << "volume name of Tof2= "<< (*iter9)->tof2VolumeName()
280 << "volume number of Tof2 = "<< (*iter9)->tof2VolumeNumber()
281 << "Tof2 = "<< (*iter9)->tof2()
282 <<endreq;
283 log << MSG::INFO
284 <<" Ext Tof1 Error Z = " << (*iter9)->tof1PosSigmaAlongZ()
285 <<" Ext Tof2 Error Z = " << (*iter9)->tof2PosSigmaAlongZ()
286 <<" Ext Emc Error theta = " << (*iter9)->emcPosSigmaAlongTheta()
287 <<" Ext Muc Error Z = " << (*iter9)->mucPosSigmaAlongZ()
288 << endreq;
289 }
290 }
291
293 if (!dstMdcKalTrackCol) {
294 log <<MSG::INFO << "Could not find DstMdcKal Track " << endreq;
295 }
296 else {
297 DstMdcKalTrackCol::iterator iter10 = dstMdcKalTrackCol->begin();
298 digiId = 0;
299 for (;iter10 != dstMdcKalTrackCol->end(); iter10++, digiId++) {
300
301
302
303
304
305
306 }
307 }
308
309
310 SmartDataPtr<CgemDigiCol> cgemDigiCol(eventSvc(),"/Event/Digi/CgemDigiCol");
311 if (!cgemDigiCol) {
312 log << MSG::INFO << "Could not find CGEM digi" << endreq;
313
314 }
315 else {
316 CgemDigiCol::iterator iter11 = cgemDigiCol->begin();
317 digiId = 0;
318 for (;iter11 != cgemDigiCol->end(); iter11++, digiId++) {
319 log << MSG::INFO << "CGEM digit No: " << digiId << endreq;
320
321 log << MSG::INFO
322 << " time_channel = " << (*iter11)->getTimeChannel()
323 << " charge_channel = " << (*iter11)->getChargeChannel()
324 << endreq;
325 }
326 }
327
328
329
331 if (!dstCgemTrackCol) {
332 log <<MSG::INFO << "Could not find Dst Cgem Track" << endreq;
333
334 }
335 else {
336 DstCgemTrackCol::iterator iter12 = dstCgemTrackCol->begin();
337 digiId = 0;
338 for (;iter12 != dstCgemTrackCol->end(); iter12++, digiId++) {
339 log << MSG::INFO << "Dst Cgem No: " << digiId << endreq;
340
341 log << MSG::INFO
342 << " Track ID = " << (*iter12)->trackId()
343 <<"px = "<<(*iter12)->px()
344 <<"p = "<<(*iter12)->p()
345 <<endreq;
346 }
347 }
348
349
351 if (!dstCgemKalTrackCol) {
352 log <<MSG::INFO << "Could not find DstCgemKal Track " << endreq;
353 }
354 else {
355 DstCgemKalTrackCol::iterator iter13 = dstCgemKalTrackCol->begin();
356 digiId = 0;
357 for (;iter13 != dstCgemKalTrackCol->end(); iter13++, digiId++) {
358
359
360
361
362
363
364 }
365 }
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487 return StatusCode::SUCCESS;
488}
_EXTERN_ std::string DstEmcShowerCol
_EXTERN_ std::string DstMdcKalTrackCol
_EXTERN_ std::string DstExtTrackCol
_EXTERN_ std::string DstMdcDedxCol
_EXTERN_ std::string DstTofTrackCol
_EXTERN_ std::string DstMdcTrackCol
_EXTERN_ std::string DstCgemTrackCol
_EXTERN_ std::string DstMucTrackCol
_EXTERN_ std::string DstCgemKalTrackCol