73 {
74
75 MsgStream log(
msgSvc(), name());
76 log << MSG::INFO << "in execute()" << endreq;
77
78
79
80 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
81 if (!eventHeader) {
82 log << MSG::FATAL << "Could not find Event Header" << endreq;
83 return( StatusCode::FAILURE);
84 }
85
86
87 int eventId = eventHeader->eventNumber() ;
88 int runId = eventHeader->runNumber();
89 log << MSG::INFO << "DstEventMaker: retrieved event: " <<" Event Number "<< eventId << " run: " <<runId << endreq;
90
91 StatusCode sc = StatusCode::SUCCESS ;
92 int trackID;
93
94
96
97
99
100
101
102 SmartDataPtr<RecMdcTrackCol> recMdcTrackCol(eventSvc(),"/Event/Recon/RecMdcTrackCol");
103 if (!recMdcTrackCol) {
104 log << MSG::INFO << "Could not find RecMdcTrackCol" << endreq;
105 } else {
107 RecMdcTrackCol::iterator iter_mdc = recMdcTrackCol->begin();
108 trackID = 0;
109 for (;iter_mdc != recMdcTrackCol->end(); iter_mdc++, trackID++) {
111 *dstMdcTrack = **iter_mdc;
112 (*dstMdcTrackCol).push_back(dstMdcTrack);
113
114 log << MSG::INFO
115 << " Mdc Track ID = " << trackID
116 <<
" Mdc Track Nster = " << (*iter_mdc)->
nster()
117 << endreq;
118 }
120 }
121
122
123 SmartDataPtr<RecTofTrackCol> tofTrackCol(eventSvc(),"/Event/Recon/RecTofTrackCol");
124 if ( !tofTrackCol ) {
125 log << MSG::INFO << "Could not find TofTrackCol" << endreq;
126 }
127 else {
129 RecTofTrackCol::iterator iter_tof = tofTrackCol->begin();
130 for( ; iter_tof != tofTrackCol->end(); iter_tof++ ) {
132 *dstTofTrack = **iter_tof;
133 (*dstTofTrackCol).push_back(dstTofTrack);
134
135 log << MSG::INFO
136 <<
"Tof Track ID = " << (*iter_tof)->
tofTrackID()
137 << " Track ID = " << (*iter_tof)->trackID()
138 << " Tof Counter ID = "<<(*iter_tof)->tofID()
139 << " Quality = "<< (*iter_tof)->quality()
140 << endreq;
141 }
143 }
144
145
146
147 SmartDataPtr<RecMucTrackCol> mucTrackCol(eventSvc(),"/Event/Recon/RecMucTrackCol");
148 if (!mucTrackCol) {
149 log <<MSG::INFO << "Could not find RecMucTrackCol" << endreq;
150 } else {
152 RecMucTrackCol::iterator iter_muc = mucTrackCol->begin();
153 trackID = 0;
154 for (;iter_muc != mucTrackCol->end(); iter_muc++, trackID++) {
156 *dstMucTrack = **iter_muc;
157 (*dstMucTrackCol).push_back(dstMucTrack);
158 log<< MSG::INFO
159 << "Muc Track ID = " << trackID
160 << " Muc NumHits = " << (*iter_muc)->GetTotalHits()
161 << " Muc Pos x = " << (*iter_muc)->getMucPos().x()
162 << " Muc Pos y = " << (*iter_muc)->getMucPos().y()
163 << " Muc Pos z = " << (*iter_muc)->getMucPos().z()
164 << endreq;
165 }
167 }
168
169
170
171
172 SmartDataPtr<RecMdcDedxCol> mdcDedxCol(eventSvc(),"/Event/Recon/RecMdcDedxCol");
173 if (!mdcDedxCol) {
174 log <<MSG::INFO << "Could not find RecMdcDedxCol" << endreq;
175 } else {
176 trackID = 0;
178 RecMdcDedxCol::iterator iter_dedx = mdcDedxCol->begin();
179 for (;iter_dedx != mdcDedxCol->end(); iter_dedx++, trackID++) {
181 *dstMdcDedx = **iter_dedx;
182 (*dstMdcDedxCol).push_back(dstMdcDedx);
183 log << MSG::INFO
184 << " Dedx TrackID = "<< trackID
185
186
187 << endreq;
188 }
190 }
191
192
193
194
195
196 SmartDataPtr<RecEmcShowerCol> emcRecShowerCol(eventSvc(),"/Event/Recon/RecEmcShowerCol");
197 if (!emcRecShowerCol) {
198 log <<MSG::INFO << "Could not find RecEmcShowerCol" << endreq;
199
200 }
201 else {
202 trackID = 0;
204 RecEmcShowerCol::iterator iter_emc = emcRecShowerCol->begin();
205 for (;iter_emc != emcRecShowerCol->end(); iter_emc++, trackID++) {
207 (*dstEmcTrackCol).push_back(dstEmcTrack);
208 log << MSG::INFO
209 << " Emc Track Id = " << trackID
210
211 << endreq;
212 }
214 }
215
216
217
218 SmartDataPtr<RecExtTrackCol> extTrackCol(eventSvc(),"/Event/Recon/RecExtTrackCol");
219 if (!extTrackCol) {
220 log <<MSG::INFO << "Could not find RecExtTrackCol" << endreq;
221
222 }
223 else {
224 trackID = 0;
226 RecExtTrackCol::iterator iter_ext = extTrackCol->begin();
227 for (;iter_ext != extTrackCol->end(); iter_ext++, trackID++) {
229 *dstExtTrack = **iter_ext;
230 (*dstExtTrackCol).push_back(dstExtTrack);
231 log << MSG::INFO
232 << " Ext Track Id = " << trackID
234 <<" Ext Tof1 Error Z = " << (*iter_ext)->tof1PosSigmaAlongZ()
235 <<" Ext Tof2 Error Z = " << (*iter_ext)->tof2PosSigmaAlongZ()
236 <<" Ext Emc Error theta = " << (*iter_ext)->emcPosSigmaAlongTheta()
237 <<" Ext Muc Error Z = " << (*iter_ext)->mucPosSigmaAlongZ()
238 << endreq;
239 }
240
242 }
243
244
245 SmartDataPtr<RecMdcKalTrackCol> mdcKalTrackCol(eventSvc(),"/Event/Recon/RecMdcKalTrackCol");
246 if (!mdcKalTrackCol) {
247 log << MSG::INFO<< "Could not find MdcKalTrackCol" << endreq;
248
249 }
250 else {
251 trackID = 0;
252 int nhits[5];
253 int stat[2][5];
254 float chisq[2][5];
255 int ndf[2][5];
256 int nster[2][5];
257 int fL[2][5];
258 int lL[2][5];
259
261 RecMdcKalTrackCol::iterator iter_kal = mdcKalTrackCol->begin();
262 for (;iter_kal != mdcKalTrackCol->end(); iter_kal++, trackID++) {
264 *dstMdcKalTrack = **iter_kal;
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294 (*dstMdcKalTrackCol).push_back(dstMdcKalTrack);
295
296 log<<MSG::INFO<<" * * * * * * * * * * * * * * * * * * * * * * * * * * *"<<endreq;
297 for(int i =0 ; i < 5; i++){
298 log << MSG::INFO<<
"dstMdcKalTrack ZHelix["<<i<<
"] = " <<dstMdcKalTrack->
getZHelix(i) <<endreq;
299 log << MSG::INFO << "number of total hits contained ["<<i<<"]"<<nhits[i]<<endreq;
300 log << MSG::INFO<< "status flag ["<<i<<"]"<<stat[i]<<endreq;
301 log << MSG::INFO<<
"dstMdcKalTrack ZError ["<<i<<
"]"<<dstMdcKalTrack->
getZError(i)<<endreq;
302 log << MSG::INFO<<
"dstMdcKalTrack Poca ["<<i<<
"]"<<dstMdcKalTrack->
getPoca(i)<<endreq;
303 }
304 }
306 }
307
308 return sc;
309}
ObjectVector< DstEmcShower > DstEmcShowerCol
ObjectVector< DstExtTrack > DstExtTrackCol
ObjectVector< DstMdcDedx > DstMdcDedxCol
ObjectVector< DstMdcKalTrack > DstMdcKalTrackCol
ObjectVector< DstMdcTrack > DstMdcTrackCol
ObjectVector< DstMucTrack > DstMucTrackCol
ObjectVector< DstTofTrack > DstTofTrackCol
const string tof1VolumeName() const
const HepVector & getZHelix(const int pid) const
const HepSymMatrix & getZError(const int pid) const
const HepPoint3D & getPoca(const int pid) const
_EXTERN_ std::string Event
_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