76 {
77 MsgStream log(
msgSvc(), name());
78 log << MSG::INFO << "in execute()" << endreq;
79
80 StatusCode sc;
81
82
83
84
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();
95
96
97
98
99 SmartDataPtr<EvtRecVeeVertexCol> veeVertexCol(eventSvc(),
101 if (!veeVertexCol) {
103 sc = registerEvtRecVeeVertexCol(veeVertexCol, log);
104 if (sc != StatusCode::SUCCESS) {
105 return sc;
106 }
107 }
108
109
110
111
112 Vint ipip, ipim, iGood;
113 for (unsigned int i = 0; i < recEvent->totalCharged(); i++) {
115
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;
121 iGood.push_back(i);
122 if (mdcTrk->
charge() > 0) ipip.push_back(i);
123 if (mdcTrk->
charge() < 0) ipim.push_back(i);
124 }
125
126
127 if (ipip.size() < 1 || ipim.size() < 1) return StatusCode::SUCCESS;
128
129
130
131
133 HepSymMatrix Evx(3, 0);
134 double bx = 1E+6;
135 double by = 1E+6;
136 double bz = 1E+6;
137 Evx[0][0] = bx*bx;
138 Evx[1][1] = by*by;
139 Evx[2][2] = bz*bz;
143
145
146 for(unsigned int i1 = 0; i1 < ipip.size(); i1++) {
147 int ip1 = ipip[i1];
148 RecMdcKalTrack *pipKalTrk = (*(recTrackCol->begin()+ip1))->mdcKalTrack();
151
152 for(unsigned int i2 = 0; i2 < ipim.size(); i2++) {
153 int ip2 = ipim[i2];
154 RecMdcKalTrack *pimKalTrk = (*(recTrackCol->begin()+ip2))->mdcKalTrack();
157
162 if(!(vtxfit0->
Fit(0)))
continue;
164 if(vtxfit0->
chisq(0) > m_chisqCut)
continue;
166 std::pair<int, int> pair;
167 pair.first = 3;
168 pair.second = 3;
169
170 EvtRecTrack* track0 = *(recTrackCol->begin() + ip1);
171 EvtRecTrack* track1 = *(recTrackCol->begin() + ip2);
172
179 KsVertex->
setW(wKshort.
w());
186 veeVertexCol->push_back(KsVertex);
187
188
189
190
191
192
193
194
195
196 }
197 }
198
199 return StatusCode::SUCCESS;
200}
double cos(const BesAngle a)
EvtRecTrackCol::iterator EvtRecTrackIterator
ObjectVector< EvtRecVeeVertex > EvtRecVeeVertexCol
const HepVector & helix() const
static void setPidType(PidType pidType)
const HepSymMatrix & err() const
const double theta() const
void setVertexType(int vtxType)
void setChi2(double chi2)
void addDaughter(const SmartRef< EvtRecTrack > &track, int i)
void setEw(const HepSymMatrix &Ew)
void setMass(double mass)
void setNTracks(int nTracks)
void setVertexId(int vtxId)
void setPair(const std::pair< int, int > &pair)
void setW(const HepVector &w)
void setNCharge(int nCharge)
void AddTrack(const int number, const double mass, const RecMdcTrack *trk)
WTrackParameter wVirtualTrack(int n) const
void AddVertex(int number, VertexParameter vpar, std::vector< int > lis)
static VertexFit * instance()
void BuildVirtualParticle(int number)
void setEvx(const HepSymMatrix &eVx)
void setVx(const HepPoint3D &vx)
HepLorentzVector p() const
_EXTERN_ std::string EvtRecEvent
_EXTERN_ std::string EvtRecVeeVertexCol
_EXTERN_ std::string EvtRecTrackCol