24 theMaxSigOnDistTrackToB = 3.0;
26 theMaxInPvFrac = 0.65;
29 theK0sMassWindow = 0.05;
30 theV0SvFilter =
new V0SvFilter(theK0sMassWindow);
38 theMinSign2D,theMinTracks);
54 delete theFlight2DSvFilter;
64 theFlight2DSvFilter->setPrimaryVertex( pv);
65 if (
debug)
cout <<
"[TTVF] calling with a real PV ...\n";
66 return this->reconstruct(tracks,pv);
68 else return this->vertices(tracks);
75 const std::vector<reco::TransientTrack> &
tracks)
const
78 theFlight2DSvFilter->useNotPV();
80 if (
debug)
cout <<
"[TTVF] calling with a dummy PV ...\n";
81 return this->reconstruct(tracks,dummyVertex);
91 std::vector<TransientVertex> primaryVertices;
92 if(pv.
isValid()) { primaryVertices.push_back(pv);
100 for (std::vector<reco::TransientTrack>::const_iterator it=tracks.begin();
101 it!=tracks.end();it++)
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;
122 if ((*theV0SvFilter)(vtx)) {
123 if (
debug)
cout <<
"[TTVF] survived V0SvFilter\n";
124 if((*theFlight2DSvFilter)(vtx)) {
125 if (
debug)
cout <<
"[TTVF] survived 2DSvFilter\n";
126 if (mass<theMaxVtxMass) {
127 if (!primaryVertices.empty()) {
128 PvSvFilter thePvSvFilter(theMaxInPvFrac,primaryVertices[0]);
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,
158 theMaxSigOnDistTrackToB);
159 vector<TransientVertex> newVertices =
173 if (
debug)
cout <<
"[TTVF] vertices found: "<<newVertices.size()<<endl;
ConfigurableTertiaryTracksVertexFinder(const VertexFitter< 5 > *vf, const VertexUpdator< 5 > *vu, const VertexTrackCompatibilityEstimator< 5 > *ve)
std::vector< TransientVertex > reconstruct(const std::vector< reco::TransientTrack > &tracks, const TransientVertex &pv) const
std::vector< TransientVertex > getSecondaryVertices(const std::vector< reco::TransientTrack > &)
TrackInfoVector getTrackInfo()
virtual std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const
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.
virtual ~ConfigurableTertiaryTracksVertexFinder()