73 {
74
75 MsgStream log(
msgSvc(), name());
76 log << MSG::INFO << "in execute()" << endreq;
77
78
79
80 int event, run;
81
82
83 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
84 if (!eventHeader) {
85 log << MSG::FATAL << "Could not find Event Header" << endreq;
86 return( StatusCode::FAILURE);
87 }
88 log << MSG::INFO << "RootIoAlg: retrieved event: " << eventHeader->eventNumber() << " run: " << eventHeader->runNumber() << endreq;
89
90
91 int digiId;
92
93
94 SmartDataPtr<MdcDigiCol> mdcDigiCol(eventSvc(),"/Event/Digi/MdcDigiCol");
95 if (!mdcDigiCol) {
96 log << MSG::INFO << "Could not find MDC digi" << endreq;
97
98 }
99 else {
100 MdcDigiCol::iterator iter1 = mdcDigiCol->begin();
101 digiId = 0;
102 for (;iter1 != mdcDigiCol->end(); iter1++, digiId++) {
103 log << MSG::INFO << "MDC digit No: " << digiId << endreq;
104
105 log << MSG::INFO
106 << " time_channel = " << (*iter1)->getTimeChannel()
107 << " charge_channel = " << (*iter1)->getChargeChannel()
108 << endreq;
109 }
110 }
111
112
113
114 SmartDataPtr<TofDigiCol> tofDigiCol(eventSvc(),"/Event/Digi/TofDigiCol");
115 if (!tofDigiCol) {
116 log <<MSG::INFO << "Could not find TOF digi" << endreq;
117
118 }
119 else {
120 TofDigiCol::iterator iter2 = tofDigiCol->begin();
121 digiId = 0;
122 for (;iter2 != tofDigiCol->end(); iter2++, digiId++) {
123 log << MSG::INFO << "TOF digit No: " << digiId << endreq;
124 log << MSG::INFO
125 << " time_channel = " << (*iter2)->getTimeChannel()
126 << " charge_channel = " << (*iter2)->getChargeChannel()
127 << endreq;
128
129
130 }
131 }
132
133 SmartDataPtr<EmcDigiCol> emcDigiCol(eventSvc(),"/Event/Digi/EmcDigiCol");
134 if (!emcDigiCol) {
135 log <<MSG::INFO << "Could not find EMC digi" << endreq;
136
137 }
138 else {
139 EmcDigiCol::iterator iter3 = emcDigiCol->begin();
140 digiId = 0;
141 for (;iter3 != emcDigiCol->end(); iter3++, digiId++) {
142 log << MSG::INFO << "Emc digit No: " << digiId << endreq;
143
144 log << MSG::INFO
145 << " time_channel = " << (*iter3)->getTimeChannel()
146 << " charge_channel = " << (*iter3)->getChargeChannel()
147 << endreq;
148 }
149 }
150
151
152
154 if (!dstTofTrackCol) {
155 log <<MSG::INFO << "Could not find Dst Tof Track" << endreq;
156
157 }
158 else {
159 DstTofTrackCol::iterator iter4 = dstTofTrackCol->begin();
160 digiId = 0;
161 for (;iter4 != dstTofTrackCol->end(); iter4++, digiId++) {
162 log << MSG::INFO << "Dst Tof No: " << digiId << endreq;
163
164 log << MSG::INFO
165 <<" TrackID = " << (*iter4)->trackID()
166 <<" TofID = " <<(*iter4)->tofID()
167 <<" TofTrackID = " <<(*iter4)->tofTrackID()
168 <<" Beta = " << (*iter4)->beta()
169 << endreq;
170 }
171 }
172
173
175 if (!dstEmcShowerCol) {
176 log <<MSG::INFO << "Could not find Dst Emc Track" << endreq;
177
178 }
179 else {
180 DstEmcShowerCol::iterator iter5 = dstEmcShowerCol->begin();
181 digiId = 0;
182 for (;iter5 != dstEmcShowerCol->end(); iter5++, digiId++) {
183 log << MSG::INFO << "Dst Emc No: " << digiId << endreq;
184
185 log << MSG::INFO
186 << " Track ID = " << (*iter5)->trackId()
187 <<" Cell ID = " << (*iter5)->cellId()
188 <<" Total energy observed in Emc = " << (*iter5)->energy()
189 << endreq ;
190 }
191 }
192
193
195 if (!dstMdcTrackCol) {
196 log <<MSG::INFO << "Could not find Dst Mdc Track" << endreq;
197
198 }
199 else {
200 DstMdcTrackCol::iterator iter6 = dstMdcTrackCol->begin();
201 digiId = 0;
202 for (;iter6 != dstMdcTrackCol->end(); iter6++, digiId++) {
203 log << MSG::INFO << "Dst Mdc No: " << digiId << endreq;
204
205 log << MSG::INFO
206 << " Track ID = " << (*iter6)->trackId()
207 <<" number of total hits contained = " << (*iter6)->nster()
208 <<"px = "<<(*iter6)->px()
209 <<"p = "<<(*iter6)->p()
210 <<endreq;
211 }
212 }
213
214
216 if (!dstMdcDedxCol) {
217 log << MSG::INFO << "Could not find Dst Mdc Dedx " << endreq;
218
219 }
220 else {
221 DstMdcDedxCol::iterator iter7 = dstMdcDedxCol->begin();
222 digiId = 0;
223 for (;iter7 != dstMdcDedxCol->end(); iter7++, digiId++) {
224 log << MSG::INFO << "Dst Mdc Dedx No: " << digiId << endreq;
225
226 log << MSG::INFO
227 << " Track ID = " << (*iter7)->trackId()
228 <<"Chi of E = " << (*iter7)->chi(0)
229 <<"Chi of Mu = " << (*iter7)->chi(1)
230 <<"Chi of Pi = " << (*iter7)->chi(2)
231 <<endreq;
232 }
233 }
234
235
237 if (!dstMucTrackCol) {
238 log <<MSG::INFO << "Could not find Muc Track " << endreq;
239
240 }
241 else {
242 DstMucTrackCol::iterator iter8 = dstMucTrackCol->begin();
243 digiId = 0;
244 for (;iter8 != dstMucTrackCol->end(); iter8++, digiId++) {
245 log << MSG::INFO << "Dst Muc Track No: " << digiId << endreq;
246
247 log << MSG::INFO
248 << " Track ID = " << (*iter8)->trackId()
249 <<" Number of hits on track = " << (*iter8)->numHits()
250 <<" maxHitsInLayer " << (*iter8)->maxHitsInLayer()
251 <<" xPos = " << (*iter8)->xPos()
252 <<" yPos = " << (*iter8)->yPos()
253 <<" zPos = " << (*iter8)->zPos()
254 << endreq;
255 }
256 }
257
258
260 if (!dstExtTrackCol) {
261 log <<MSG::INFO << "Could not find DstExt Track " << endreq;
262
263 }
264 else {
265 DstExtTrackCol::iterator iter9 = dstExtTrackCol->begin();
266
267 digiId = 0;
268 for (;iter9 != dstExtTrackCol->end(); iter9++, digiId++) {
269 log << MSG::INFO << "Dst Ext Track No: " << digiId << endreq;
270 log << MSG::INFO
271 << "volume name of Tof1= "<< (*iter9)->tof1VolumeName()
272 << "volume number of Tof1 = "<< (*iter9)->tof1VolumeNumber()
273 << "Tof1 = "<< (*iter9)->tof1()
274 <<endreq;
275 log << MSG::INFO
276 << "volume name of Tof2= "<< (*iter9)->tof2VolumeName()
277 << "volume number of Tof2 = "<< (*iter9)->tof2VolumeNumber()
278 << "Tof2 = "<< (*iter9)->tof2()
279 <<endreq;
280 log << MSG::INFO
281 <<" Ext Tof1 Error Z = " << (*iter9)->tof1PosSigmaAlongZ()
282 <<" Ext Tof2 Error Z = " << (*iter9)->tof2PosSigmaAlongZ()
283 <<" Ext Emc Error theta = " << (*iter9)->emcPosSigmaAlongTheta()
284 <<" Ext Muc Error Z = " << (*iter9)->mucPosSigmaAlongZ()
285 << endreq;
286 }
287 }
288
290 if (!dstMdcKalTrackCol) {
291 log <<MSG::INFO << "Could not find DstMdcKal Track " << endreq;
292 }
293 else {
294 DstMdcKalTrackCol::iterator iter10 = dstMdcKalTrackCol->begin();
295 digiId = 0;
296 for (;iter10 != dstMdcKalTrackCol->end(); iter10++, digiId++) {
297
298
299
300
301
302
303 }
304 }
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
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 return StatusCode::SUCCESS;
427}
_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 DstMucTrackCol