104{
105 SmartDataPtr<EvtRecEvent> evt(eventSvc_, "/Event/EvtRec/EvtRecEvent");
107 if ( !evt || !trks ) {
108 return false;
109 }
110
111 std::vector<EvtRecTrack*> gtrks;
112 for (int i = 0; i < evt->totalCharged(); ++i) {
114 if ( isGoodTrack(trk) ) {
115 gtrks.push_back(trk);
116 }
117 }
118 if ( gtrks.size() != 2 ) return false;
119
120 double time[2] = { -100., -100.};
121 for ( int i = 0; i < 2; ++i ) {
122 if ( gtrks[i]->isTofTrackValid() ){
123 SmartRefVector<RecTofTrack> tofTrks = gtrks[i]->
tofTrack();
124 for ( SmartRefVector<RecTofTrack>::iterator it = tofTrks.begin(); it != tofTrks.end(); ++it ) {
125 if ( ( (*it)->status() & 0x8 ) == 0x8 ) {
126 time[i] = (*it)->tof();
127 break;
128 }
129 }
130 }
131 }
132 if ( time[0] > -99. && time[1] > -99. && fabs(time[0]-time[1]) > 5 ) return true;
133
134 if ( isElectron(gtrks[0]) && isElectron(gtrks[1]) ) return true;
135 if ( isMuon(gtrks[0]) && isMuon(gtrks[1]) ) return true;
136
137 return false;
138}
SmartRefVector< RecTofTrack > tofTrack()
_EXTERN_ std::string EvtRecTrackCol