100 {
101
102 MsgStream log(
msgSvc(), name());
103 log << MSG::INFO << "in execute()" << endreq;
104
105 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
106 int runNo=eventHeader->runNumber();
107 int eventNo=eventHeader->eventNumber();
108
109
110
111
112
113 SmartDataPtr<EvtRecEvent> evtRecEvent(eventSvc(), "/Event/EvtRec/EvtRecEvent");
114 if ( ! evtRecEvent ) {
115 log << MSG::FATAL << "Could not find EvtRecEvent" << endreq;
116 return StatusCode::FAILURE;
117 }
118
119 SmartDataPtr<EvtRecTrackCol> evtRecTrackCol( eventSvc(), "/Event/EvtRec/EvtRecTrackCol");
120 if ( ! evtRecTrackCol ) {
121 log << MSG::FATAL << "Could not find EvtRecTrackCol" << endreq;
122 return StatusCode::FAILURE;
123 }
124
125
126 SmartDataPtr<EvtRecVeeVertexCol> evtRecVeeVertexCol(eventSvc(), "/Event/EvtRec/EvtRecVeeVertexCol");
127 if ( ! evtRecVeeVertexCol ) {
128 log << MSG::FATAL << "Could not find EvtRecVeeVertexCol" << endreq;
129 return StatusCode::FAILURE;
130 }
131
132
133 SmartDataPtr<EvtRecPi0Col> recPi0Col(eventSvc(), "/Event/EvtRec/EvtRecPi0Col");
134 if ( ! recPi0Col ) {
135 log << MSG::FATAL << "Could not find EvtRecPi0Col" << endreq;
136 return StatusCode::FAILURE;
137
138 }
139
140
141 Hep3Vector xorigin(0,0,0);
143 Gaudi::svcLocator()->service("VertexDbSvc", vtxsvc);
145
147 xorigin.setX(vertex[0]);
148 xorigin.setY(vertex[1]);
149 xorigin.setZ(vertex[2]);
150 }
151
152
154
155
157
158 return StatusCode::SUCCESS;
159 }
160
161
162
163
166
167
168 vector<DTagToolIterator> vsditer;
169
170
171
173 vsditer.push_back(dtagTool.
stag());
175 vsditer.push_back(dtagTool.
stag());
177 vsditer.push_back(dtagTool.
stag());
179 vsditer.push_back(dtagTool.
stag());
181 vsditer.push_back(dtagTool.
stag());
183 vsditer.push_back(dtagTool.
stag());
184
185
186 typedef vector<DTagToolIterator>::size_type vec_sz;
187
188
189 for(vec_sz i = 0 ; i < vsditer.size() ; i++){
190
191
192 m_deltaE = (*vsditer[i])->deltaE();
193 m_mode = (*vsditer[i])->decayMode();
194 m_mBC = (*vsditer[i])->mBC();
195
196
198
199
200 SmartRefVector<EvtRecTrack> othertracks = (*sditer)->otherTracks();
201 vector<int> iGood; int tcharge=0;
202
203 for(int i = 0 ; i < othertracks.size() ; i++){
205 iGood.push_back(i);
207 tcharge += mdcKalTrk->
charge();
208 }
209 }
210
211
212 if(iGood.size() != 2 || tcharge != 0)
213 continue;
214
215
216 m_simplePIDSvc->
preparePID(othertracks[iGood[0]]);
217 bool FtrkElectron = m_simplePIDSvc->
iselectron();
218 bool FtrkKaon = m_simplePIDSvc->
iskaon();
219
220 m_simplePIDSvc->
preparePID(othertracks[iGood[1]]);
221 bool StrkElectron = m_simplePIDSvc->
iselectron();
222 bool StrkKaon = m_simplePIDSvc->
iskaon();
223
224
225
226
227
228 if(FtrkElectron && StrkKaon) {
229
232
233 SmartRefVector<EvtRecTrack> tracks = (*sditer)->tracks();
235
236
238 double U_1 = 0;
239 double MM2_1 = 0;
240 double q2_1 = 0;
241
242
243 calU(sditer,strk,ftrk,U_1,MM2_1,q2_1);
244
245 m_U = U_1;
246 m_MM2 = MM2_1;
247 m_q2 = q2_1;
248
249 m_tuple0->write();
250 }
251
252
253 }
254
255
256 if(StrkElectron && FtrkKaon){
257
260
261 SmartRefVector<EvtRecTrack> tracks = (*sditer)->tracks();
262
264
265
267
268 double U_1 = 0;
269 double MM2_1 = 0;
270 double q2_1 = 0;
271
272
273 calU(sditer,strk,ftrk,U_1,MM2_1,q2_1);
274
275 m_U = U_1;
276 m_MM2 = MM2_1;
277 m_q2 = q2_1;
278
279 m_tuple0->write();
280 }
281 }
282
283 }
284
285
287}
bool isGoodTrack(EvtRecTrack *trk, Hep3Vector xorigin)
void calU(DTagToolIterator sditer, RecMdcKalTrack *Etrack, RecMdcKalTrack *Ktrack, double &U, double &MM2, double &q2)
virtual void preparePID(EvtRecTrack *track)=0
virtual bool iselectron(bool eop=false)=0
virtual bool isVertexValid()=0
virtual double * PrimaryVertex()=0