82 MsgStream log(
msgSvc(), name());
83 log << MSG::INFO <<
"in execute()" << endreq;
90 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),
"/Event/EventHeader");
93 log << MSG::DEBUG <<
"run and event = " << eventHeader->runNumber()
94 <<
" " << eventHeader->eventNumber() << endreq;
95 log << MSG::DEBUG <<
"ncharg, nneu, tottks = "
96 << recEvent->totalCharged() <<
" , "
97 << recEvent->totalNeutral() <<
" , "
98 << recEvent->totalTracks() <<endreq;
99 int evtNo = eventHeader->eventNumber();
104 SmartDataPtr<EvtRecVeeVertexCol> veeVertexCol(eventSvc(),
108 sc = registerEvtRecVeeVertexCol(veeVertexCol, log);
109 if (sc != StatusCode::SUCCESS) {
117 Vint icp, icm, iGood;
118 for (
unsigned int i = 0; i < recEvent->totalCharged(); i++) {
120 if(!(*itTrk)->isMdcTrackValid())
continue;
121 if(!(*itTrk)->isMdcKalTrackValid())
continue;
123 if (fabs(
cos(mdcTrk->
theta())) >= m_cosThetaCut)
continue;
124 if (fabs(mdcTrk->
z()) >= m_vzCut)
continue;
126 if (mdcTrk->
charge() > 0) icp.push_back(i);
127 if (mdcTrk->
charge() < 0) icm.push_back(i);
131 if (icp.size() < 1 || icm.size() < 1)
return StatusCode::SUCCESS;
137 HepSymMatrix Evx(3, 0);
148 for(
unsigned int i1 = 0; i1 < icp.size(); i1++) {
150 RecMdcKalTrack *ppKalTrk = (*(recTrackCol->begin()+ip1))->mdcKalTrack();
154 for(
unsigned int i2 = 0; i2 < icm.size(); i2++) {
156 RecMdcKalTrack *pimKalTrk = (*(recTrackCol->begin()+ip2))->mdcKalTrack();
173 bool fitok = vtxfit0->
Fit();
178 if(vtxfit0->
chisq(0) > m_chisqCut)
continue;
180 std::pair<int, int> pair;
184 EvtRecTrack* track0 = *(recTrackCol->begin() + ip1);
185 EvtRecTrack* track1 = *(recTrackCol->begin() + ip2);
192 LambdaVertex->
setMass(wLamb.
p().m());
193 LambdaVertex->
setW(wLamb.
w());
194 LambdaVertex->
setEw(wLamb.
Ew());
200 veeVertexCol->push_back(LambdaVertex);
222 if(!(vtxfit0->
Fit(0)))
continue;
224 if(vtxfit0->
chisq(0) > m_chisqCut)
continue;
226 std::pair<int, int> pair;
230 EvtRecTrack* track0 = *(recTrackCol->begin() + ip1);
231 EvtRecTrack* track1 = *(recTrackCol->begin() + ip2);
238 LambdaVertex->
setMass(wLamb.
p().m());
239 LambdaVertex->
setW(wLamb.
w());
240 LambdaVertex->
setEw(wLamb.
Ew());
246 veeVertexCol->push_back(LambdaVertex);
264 for(
unsigned int i1 = 0; i1 < icp.size(); i1++) {
266 RecMdcKalTrack *pipKalTrk = (*(recTrackCol->begin()+ip1))->mdcKalTrack();
270 for(
unsigned int i2 = 0; i2 < icm.size(); i2++) {
272 RecMdcKalTrack *pmKalTrk = (*(recTrackCol->begin()+ip2))->mdcKalTrack();
289 bool fitok = vtxfit0->
Fit();
294 if(vtxfit0->
chisq(0) > m_chisqCut)
continue;
296 std::pair<int, int> pair;
300 EvtRecTrack* track0 = *(recTrackCol->begin() + ip1);
301 EvtRecTrack* track1 = *(recTrackCol->begin() + ip2);
308 ALambdaVertex->
setMass(wALamb.
p().m());
309 ALambdaVertex->
setW(wALamb.
w());
310 ALambdaVertex->
setEw(wALamb.
Ew());
316 veeVertexCol->push_back(ALambdaVertex);
338 if(!(vtxfit0->
Fit(0)))
continue;
340 if(vtxfit0->
chisq(0) > m_chisqCut)
continue;
342 std::pair<int, int> pair;
346 EvtRecTrack* track0 = *(recTrackCol->begin() + ip1);
347 EvtRecTrack* track1 = *(recTrackCol->begin() + ip2);
354 ALambdaVertex->
setMass(wALamb.
p().m());
355 ALambdaVertex->
setW(wALamb.
w());
356 ALambdaVertex->
setEw(wALamb.
Ew());
362 veeVertexCol->push_back(ALambdaVertex);
381 return StatusCode::SUCCESS;