77 MsgStream log(
msgSvc(), name());
78 log << MSG::INFO <<
"in execute()" << endreq;
85 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),
"/Event/EventHeader");
88 log << MSG::DEBUG <<
"run and event = " << eventHeader->runNumber()
89 <<
" " << eventHeader->eventNumber() << endreq;
90 log << MSG::DEBUG <<
"ncharg, nneu, tottks = "
91 << recEvent->totalCharged() <<
" , "
92 << recEvent->totalNeutral() <<
" , "
93 << recEvent->totalTracks() <<endreq;
94 int evtNo = eventHeader->eventNumber();
99 SmartDataPtr<EvtRecVeeVertexCol> veeVertexCol(eventSvc(),
103 sc = registerEvtRecVeeVertexCol(veeVertexCol, log);
104 if (sc != StatusCode::SUCCESS) {
112 Vint ipip, ipim, iGood;
113 for (
unsigned int i = 0; i < recEvent->totalCharged(); i++) {
116 if(!(*itTrk)->isMdcTrackValid())
continue;
117 if(!(*itTrk)->isMdcKalTrackValid())
continue;
119 if (fabs(
cos(mdcTrk->
theta())) >= m_cosThetaCut)
continue;
120 if (fabs(mdcTrk->
z()) >= m_vzCut)
continue;
122 if (mdcTrk->
charge() > 0) ipip.push_back(i);
123 if (mdcTrk->
charge() < 0) ipim.push_back(i);
127 if (ipip.size() < 1 || ipim.size() < 1)
return StatusCode::SUCCESS;
133 HepSymMatrix Evx(3, 0);
146 for(
unsigned int i1 = 0; i1 < ipip.size(); i1++) {
148 RecMdcKalTrack *pipKalTrk = (*(recTrackCol->begin()+ip1))->mdcKalTrack();
152 for(
unsigned int i2 = 0; i2 < ipim.size(); i2++) {
154 RecMdcKalTrack *pimKalTrk = (*(recTrackCol->begin()+ip2))->mdcKalTrack();
162 if(!(vtxfit0->
Fit(0)))
continue;
164 if(vtxfit0->
chisq(0) > m_chisqCut)
continue;
166 std::pair<int, int> pair;
170 EvtRecTrack* track0 = *(recTrackCol->begin() + ip1);
171 EvtRecTrack* track1 = *(recTrackCol->begin() + ip2);
179 KsVertex->
setW(wKshort.
w());
186 veeVertexCol->push_back(KsVertex);
199 return StatusCode::SUCCESS;