79 MsgStream log(
msgSvc(), name());
80 log << MSG::INFO <<
"in execute()" << endreq;
87 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),
"/Event/EventHeader");
90 log << MSG::DEBUG <<
"run and event = " << eventHeader->runNumber()
91 <<
" " << eventHeader->eventNumber() << endreq;
92 log << MSG::DEBUG <<
"ncharg, nneu, tottks = "
93 << recEvent->totalCharged() <<
" , "
94 << recEvent->totalNeutral() <<
" , "
95 << recEvent->totalTracks() <<endreq;
96 int evtNo = eventHeader->eventNumber();
101 SmartDataPtr<EvtRecVeeVertexCol> veeVertexCol(eventSvc(),
105 sc = registerEvtRecVeeVertexCol(veeVertexCol, log);
106 if (sc != StatusCode::SUCCESS) {
114 Vint icp, icm, iGood;
115 for (
unsigned int i = 0; i < recEvent->totalCharged(); i++) {
117 if(!(*itTrk)->isMdcTrackValid())
continue;
118 if(!(*itTrk)->isMdcKalTrackValid())
continue;
120 if (fabs(
cos(mdcTrk->
theta())) >= m_cosThetaCut)
continue;
121 if (fabs(mdcTrk->
z()) >= m_vzCut)
continue;
123 if (mdcTrk->
charge() > 0) icp.push_back(i);
124 if (mdcTrk->
charge() < 0) icm.push_back(i);
128 if (icp.size() < 1 || icm.size() < 1)
return StatusCode::SUCCESS;
134 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();
164 if(!(vtxfit0->
Fit(0)))
continue;
166 if(vtxfit0->
chisq(0) > m_chisqCut)
continue;
168 std::pair<int, int> pair;
172 EvtRecTrack* track0 = *(recTrackCol->begin() + ip1);
173 EvtRecTrack* track1 = *(recTrackCol->begin() + ip2);
180 LambdaVertex->
setMass(wLamb.
p().m());
181 LambdaVertex->
setW(wLamb.
w());
182 LambdaVertex->
setEw(wLamb.
Ew());
188 veeVertexCol->push_back(LambdaVertex);
202 for(
unsigned int i1 = 0; i1 < icp.size(); i1++) {
204 RecMdcKalTrack *pipKalTrk = (*(recTrackCol->begin()+ip1))->mdcKalTrack();
208 for(
unsigned int i2 = 0; i2 < icm.size(); i2++) {
210 RecMdcKalTrack *pmKalTrk = (*(recTrackCol->begin()+ip2))->mdcKalTrack();
218 if(!(vtxfit0->
Fit(0)))
continue;
220 if(vtxfit0->
chisq(0) > m_chisqCut)
continue;
222 std::pair<int, int> pair;
226 EvtRecTrack* track0 = *(recTrackCol->begin() + ip1);
227 EvtRecTrack* track1 = *(recTrackCol->begin() + ip2);
234 ALambdaVertex->
setMass(wALamb.
p().m());
235 ALambdaVertex->
setW(wALamb.
w());
236 ALambdaVertex->
setEw(wALamb.
Ew());
242 veeVertexCol->push_back(ALambdaVertex);
257 return StatusCode::SUCCESS;