91 std::vector<TransientVertex> primaryVertices;
92 if(pv.
isValid()) { primaryVertices.push_back(pv);
100 for (std::vector<reco::TransientTrack>::const_iterator it=
tracks.begin();
102 if ((*it).impactPointState().globalMomentum().perp() >
theMinTrackPt)
105 if (
debug)
cout <<
"[TTVF] tracks: " << filteredTracks.size() <<endl;
108 std::vector<TransientVertex>
vertices;
109 if (filteredTracks.size()>1) vertices =
theTKVF->
vertices(filteredTracks);
111 if (
debug)
cout <<
"[TTVF] found secondary vertices with TKVF: "<<vertices.size()<<endl;
113 std::vector<TransientVertex> secondaryVertices;
115 for(std::vector<TransientVertex>::const_iterator ivx=vertices.begin();
116 ivx!=vertices.end(); ivx++) {
119 double mass=theVertexMass(vtx);
120 if (
debug)
cout <<
"[TTVF] new svx: mass: "<<mass<<endl;
123 if (
debug)
cout <<
"[TTVF] survived V0SvFilter\n";
125 if (
debug)
cout <<
"[TTVF] survived 2DSvFilter\n";
127 if (!primaryVertices.empty()) {
129 if (thePvSvFilter(vtx)) secondaryVertices.push_back(vtx);
130 else {
if (
debug)
cout <<
"[TTVF] failed PvSvFilter\n";}
132 else secondaryVertices.push_back(vtx);
134 else {
if(
debug)
cout<<
"[TTVF] failed mass cut\n";}
140 if (
debug)
cout<<
"[TTVF] remaining svx: "<<secondaryVertices.size()<<endl;
142 if (primaryVertices.empty() || secondaryVertices.empty())
143 return secondaryVertices;
145 if (
debug)
cout<<
"[TTVF] still here ...\n";
148 vector<TransientTrack> unusedTracks;
149 for( vector<TransientTrack>::const_iterator itT = filteredTracks.begin();
150 itT != filteredTracks.end(); itT++ )
153 unusedTracks.push_back( *itT );
154 if (
debug)
cout <<
"[TTVF] remaining tracks: "<<unusedTracks.size()<<endl;
157 AddTvTrack MyAddTVTrack( &primaryVertices, &secondaryVertices,
159 vector<TransientVertex> newVertices =
160 MyAddTVTrack.getSecondaryVertices(unusedTracks);
173 if (
debug)
cout <<
"[TTVF] vertices found: "<<newVertices.size()<<endl;
V0SvFilter * theV0SvFilter
Flight2DSvFilter * theFlight2DSvFilter
virtual std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const
virtual std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &tracks) const
double theMaxSigOnDistTrackToB
static bool isInVertex(const reco::TransientTrack &aTrack, const TransientVertex &aVertex)
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
ConfigurableTrimmedVertexFinder * theTKVF
AddTvTrack::TrackInfoVector theTrackInfoVector