51 {
52
53 MsgStream log(
msgSvc(), name());
54 log << MSG::INFO << "in execute()" << endreq;
55
56
57
58 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
59 if (!eventHeader) {
60 log << MSG::FATAL << "Could not find Event Header" << endreq;
61 return( StatusCode::FAILURE);
62 }
63
64 int eventId = eventHeader->eventNumber() ;
65 int runId = eventHeader->runNumber();
66 log << MSG::INFO << "event: " << eventId
67 << " run: " <<runId << endreq;
68
69 StatusCode sc = StatusCode::SUCCESS ;
70 int trackID;
71
72
73 SmartDataPtr<RecMdcTrackCol> recMdcTrackCol(eventSvc(),"/Event/Recon/RecMdcTrackCol");
74 if(!recMdcTrackCol)
75 {
76 log << MSG::INFO << "Could not find RecMdcTrackCol" << endreq;
77 SmartDataPtr<DstMdcTrackCol> dstMdcTrackCol(eventSvc(),"/Event/Dst/DstMdcTrackCol");
78 if (!dstMdcTrackCol) {
79 log << MSG::INFO << "Could not find DstMdcTrackCol" << endreq;
80 }
81 else {
83 DstMdcTrackCol::iterator iter_mdc = dstMdcTrackCol->begin();
84 trackID = 0;
85 for (;iter_mdc != dstMdcTrackCol->end(); iter_mdc++, trackID++) {
87 *recMdcTrack = **iter_mdc;
88 (*recMdcTrackCol).push_back(recMdcTrack);
89 log << MSG::INFO
90 << " Mdc Track ID = " << trackID
91 <<
" Mdc Track Nster = " << (*iter_mdc)->
nster()
92 << endreq;
93 }
95 }
96 }
97
98
99 SmartDataPtr<RecMdcKalTrackCol> recMdcKalTrackCol(eventSvc(),"/Event/Recon/RecMdcKalTrackCol");
100 if (!recMdcKalTrackCol) {
101 log << MSG::INFO << "Could not find RecMdcKalTrackCol" << endreq;
102 SmartDataPtr<DstMdcKalTrackCol> dstMdcKalTrackCol(eventSvc(),"/Event/Dst/DstMdcKalTrackCol");
103 if(!dstMdcKalTrackCol) {
104 log << MSG::INFO << "Could not find DstMdcKalTrackCol" << endreq;
105 }
106 else {
108 DstMdcKalTrackCol::iterator iter_mdc = dstMdcKalTrackCol->begin();
109 trackID = 0;
110 for (;iter_mdc != dstMdcKalTrackCol->end(); iter_mdc++, trackID++) {
112 *recMdcKalTrack = **iter_mdc;
113 (*recMdcKalTrackCol).push_back(recMdcKalTrack);
114 log << MSG::INFO
115 << " MdcKalTrack ID = " << trackID
116 <<
" MdcKalTrack Nster = " << (*iter_mdc)->
nster()
117 << " MdcKalTrack poca = " << (*iter_mdc)->poca()
118 << endreq;
119 }
121 }
122 }
123
124
125 SmartDataPtr<RecMdcDedxCol> recMdcDedxCol(eventSvc(),"/Event/Recon/RecMdcDedxCol");
126 if (!recMdcDedxCol) {
127 log <<MSG::INFO << "Could not find RecMdcDedxCol" << endreq;
128 SmartDataPtr<DstMdcDedxCol> dstMdcDedxCol(eventSvc(),"/Event/Dst/DstMdcDedxCol");
129 if(!dstMdcDedxCol) {
130 log <<MSG::INFO << "Could not find DstMdcDedxCol" << endreq;
131 }
132 else {
134 DstMdcDedxCol::iterator iter_mdc = dstMdcDedxCol->begin();
135 trackID=0;
136 for (;iter_mdc != dstMdcDedxCol->end(); iter_mdc++, trackID++) {
138 *recMdcDedx= **iter_mdc;
139 (*recMdcDedxCol).push_back(recMdcDedx);
140 log << MSG::INFO
141 << " MdcDedx ID = " << trackID
142 << " MdcDedx "
143 << endreq;
144 }
146 }
147 }
148
149
150 SmartDataPtr<RecExtTrackCol> recExtTrackCol(eventSvc(),"/Event/Recon/RecExtTrackCol");
151 if (!recExtTrackCol) {
152 log <<MSG::INFO << "Could not find RecExtTrackCol" << endreq;
153 SmartDataPtr<DstExtTrackCol> dstExtTrackCol(eventSvc(),"/Event/Dst/DstExtTrackCol");
154 if(!dstExtTrackCol) {
155 log <<MSG::INFO << "Could not find DstExtTrackCol" << endreq;
156 }
157 else {
159 DstExtTrackCol::iterator iter_ext = dstExtTrackCol->begin();
160 trackID=0;
161 for (;iter_ext != dstExtTrackCol->end(); iter_ext++, trackID++) {
163 *recExtTrack = **iter_ext;
164 (*recExtTrackCol).push_back(recExtTrack);
165 log << MSG::INFO
166 << " ExtTrack ID = " << trackID
167 << endreq;
168 }
170 }
171 }
172
173
174 SmartDataPtr<RecTofTrackCol> tofTrackCol(eventSvc(),"/Event/Recon/RecTofTrackCol");
175 if ( !tofTrackCol ) {
176 log << MSG::INFO << "Could not find TofTrackCol" << endreq;
177 SmartDataPtr<DstTofTrackCol> dstTofTrackCol(eventSvc(),"/Event/Dst/DstTofTrackCol");
178 if(!dstTofTrackCol) {
179 log << MSG::INFO << "Could not find DstTofTrackCol" << endreq;
180 }
181 else {
183 DstTofTrackCol::iterator iter_tof = dstTofTrackCol->begin();
184 for (;iter_tof != dstTofTrackCol->end(); iter_tof++) {
186 *recTofTrack = **iter_tof;
187 (*recTofTrackCol).push_back(recTofTrack);
188 log << MSG::INFO
189 <<
"Tof Track ID = " << (*iter_tof)->
tofTrackID()
190 << " Track ID = " << (*iter_tof)->trackID()
191 << " Tof Counter ID = "<<(*iter_tof)->tofID()
192 << " Quality = "<< (*iter_tof)->quality()
193 << endreq;
194 }
196 }
197 }
198
199
200
201 SmartDataPtr<RecEmcShowerCol> recEmcShowerCol(eventSvc(),"/Event/Recon/RecEmcShowerCol");
202 if (!recEmcShowerCol) {
203 log << MSG::INFO << "Could not find RecEmcShowerCol" << endreq;
204 SmartDataPtr<DstEmcShowerCol> dstEmcShowerCol(eventSvc(),"/Event/Dst/DstEmcShowerCol");
205 if(!dstEmcShowerCol) {
206 log << MSG::INFO << "Could not find DstEmcShowerCol" << endreq;
207 }
208 else {
210 DstEmcShowerCol::iterator iter_emc = dstEmcShowerCol->begin();
211 trackID=0;
212 for (;iter_emc != dstEmcShowerCol->end(); iter_emc++, trackID++) {
214 *recEmcShower = **iter_emc;
215 (*recEmcShowerCol).push_back(recEmcShower);
216 log << MSG::INFO
217 << " EmcShower ID = " << trackID
218 <<
" EmcShower energy = " << (*iter_emc)->
energy()
219 << endreq;
220 }
222 }
223 }
224
225
226 SmartDataPtr<RecMucTrackCol> recMucTrackCol(eventSvc(),"/Event/Recon/RecMucTrackCol");
227 if (!recMucTrackCol) {
228 log <<MSG::INFO << "Could not find RecMucTrackCol" << endreq;
229 SmartDataPtr<DstMucTrackCol> dstMucTrackCol(eventSvc(),"/Event/Dst/DstMucTrackCol");
230 if(!dstMucTrackCol) {
231 log <<MSG::INFO << "Could not find DstMucTrackCol" << endreq;
232 }
233 else {
235 DstMucTrackCol::iterator iter_muc = dstMucTrackCol->begin();
236 trackID=0;
237 for (;iter_muc != dstMucTrackCol->end(); iter_muc++, trackID++) {
239 *recMucTrack = **iter_muc;
240 (*recMucTrackCol).push_back(recMucTrack);
241 log << MSG::INFO
242 << " MucTrack ID = "<< trackID
243 <<endreq;
244 }
246 }
247 }
248 return sc;
249}
ObjectVector< RecEmcShower > RecEmcShowerCol
ObjectVector< RecExtTrack > RecExtTrackCol
ObjectVector< RecMdcDedx > RecMdcDedxCol
ObjectVector< RecMdcKalTrack > RecMdcKalTrackCol
ObjectVector< RecMdcTrack > RecMdcTrackCol
ObjectVector< RecMucTrack > RecMucTrackCol
ObjectVector< RecTofTrack > RecTofTrackCol
_EXTERN_ std::string RecExtTrackCol
_EXTERN_ std::string RecMdcDedxCol
_EXTERN_ std::string RecTofTrackCol
_EXTERN_ std::string RecMdcTrackCol
_EXTERN_ std::string RecMdcKalTrackCol
_EXTERN_ std::string RecMucTrackCol
_EXTERN_ std::string RecEmcShowerCol