#include <ConfigurableTertiaryTracksVertexFinder.h>
Definition at line 21 of file ConfigurableTertiaryTracksVertexFinder.h.
ConfigurableTertiaryTracksVertexFinder::ConfigurableTertiaryTracksVertexFinder | ( | const VertexFitter< 5 > * | vf, |
const VertexUpdator< 5 > * | vu, | ||
const VertexTrackCompatibilityEstimator< 5 > * | ve | ||
) |
Definition at line 16 of file ConfigurableTertiaryTracksVertexFinder.cc.
Referenced by clone().
{ theTKVF = new ConfigurableTrimmedVertexFinder(vf,vu,ve); theMinTrackPt = 1.0; theMaxVtxMass = 6.5; theMaxSigOnDistTrackToB = 3.0; // this is being overwritten to 10 in AddTvTtrack (why?) theMaxInPvFrac = 0.65; // set up V0SvFilter theK0sMassWindow = 0.05; // mass window around K0s theV0SvFilter = new V0SvFilter(theK0sMassWindow); // set up Flight2DSvFilter theMaxDist2D = 2.5; // max transv. dist to beam line theMinDist2D = 0.01; // min transv. dist to beam line theMinSign2D = 3.0; // min transverse distance significance theMinTracks = 2; // min number of tracks theFlight2DSvFilter= new Flight2DSvFilter(theMaxDist2D,theMinDist2D, theMinSign2D,theMinTracks); // thePrimaryVertex = new TransientVertex; // FIXME this is incomplete!? -> get real primary vertex! //theNewTrackInfoVector = new NewTrackInfoVector; }
ConfigurableTertiaryTracksVertexFinder::~ConfigurableTertiaryTracksVertexFinder | ( | ) | [virtual] |
Definition at line 50 of file ConfigurableTertiaryTracksVertexFinder.cc.
{ delete theTKVF; delete theV0SvFilter; delete theFlight2DSvFilter; }
virtual ConfigurableTertiaryTracksVertexFinder* ConfigurableTertiaryTracksVertexFinder::clone | ( | void | ) | const [inline, virtual] |
Implements VertexReconstructor.
Definition at line 36 of file ConfigurableTertiaryTracksVertexFinder.h.
References ConfigurableTertiaryTracksVertexFinder().
{ return new ConfigurableTertiaryTracksVertexFinder(*this); }
AddTvTrack::TrackInfoVector ConfigurableTertiaryTracksVertexFinder::getTrackInfo | ( | ) | [inline] |
Definition at line 53 of file ConfigurableTertiaryTracksVertexFinder.h.
References theTrackInfoVector.
Referenced by TertiaryTracksVertexFinder::getTrackInfo().
{ return theTrackInfoVector; }
std::vector< TransientVertex > ConfigurableTertiaryTracksVertexFinder::reconstruct | ( | const std::vector< reco::TransientTrack > & | tracks, |
const TransientVertex & | pv | ||
) | const [private] |
Definition at line 87 of file ConfigurableTertiaryTracksVertexFinder.cc.
References gather_cfg::cout, debug, TauTagTools::filteredTracks(), AddTvTrack::getSecondaryVertices(), AddTvTrack::getTrackInfo(), TransientTrackInVertices::isInVertex(), TransientVertex::isValid(), edm::RefVector< C, T, F >::push_back(), and ExpressReco_HICollisions_FallBack::vertices.
{ // get primary vertices; std::vector<TransientVertex> primaryVertices; if(pv.isValid()) { primaryVertices.push_back(pv); if (debug) cout <<"[TTVF] add PV ...\n"; } VertexMass theVertexMass; //filter tracks in pt std::vector<reco::TransientTrack> filteredTracks; for (std::vector<reco::TransientTrack>::const_iterator it=tracks.begin(); it!=tracks.end();it++) if ((*it).impactPointState().globalMomentum().perp() > theMinTrackPt) filteredTracks.push_back(*it); if (debug) cout <<"[TTVF] tracks: " << filteredTracks.size() <<endl; // get vertices std::vector<TransientVertex> vertices; if (filteredTracks.size()>1) vertices = theTKVF->vertices(filteredTracks); if (debug) cout <<"[TTVF] found secondary vertices with TKVF: "<<vertices.size()<<endl; std::vector<TransientVertex> secondaryVertices; for(std::vector<TransientVertex>::const_iterator ivx=vertices.begin(); ivx!=vertices.end(); ivx++) { TransientVertex vtx=*ivx; double mass=theVertexMass(vtx); if (debug) cout <<"[TTVF] new svx: mass: "<<mass<<endl; if ((*theV0SvFilter)(vtx)) { if (debug) cout <<"[TTVF] survived V0SvFilter\n"; if((*theFlight2DSvFilter)(vtx)) { if (debug) cout <<"[TTVF] survived 2DSvFilter\n"; if (mass<theMaxVtxMass) { if (!primaryVertices.empty()) { PvSvFilter thePvSvFilter(theMaxInPvFrac,primaryVertices[0]); if (thePvSvFilter(vtx)) secondaryVertices.push_back(vtx); else { if (debug) cout <<"[TTVF] failed PvSvFilter\n";} } else secondaryVertices.push_back(vtx); } else {if(debug)cout<<"[TTVF] failed mass cut\n";} } } } if (debug) cout<<"[TTVF] remaining svx: "<<secondaryVertices.size()<<endl; if (primaryVertices.empty() || secondaryVertices.empty()) return secondaryVertices; // unable to reconstruct b-flight-trajectory if (debug) cout<<"[TTVF] still here ...\n"; // find tracks not used in primaryVertex or in vertices vector<TransientTrack> unusedTracks; for( vector<TransientTrack>::const_iterator itT = filteredTracks.begin(); itT != filteredTracks.end(); itT++ ) if( (!TransientTrackInVertices::isInVertex((*itT),primaryVertices)) && (!TransientTrackInVertices::isInVertex((*itT),vertices)) ) unusedTracks.push_back( *itT ); if (debug) cout <<"[TTVF] remaining tracks: "<<unusedTracks.size()<<endl; // now add tracks to the SV candidate AddTvTrack MyAddTVTrack( &primaryVertices, &secondaryVertices, theMaxSigOnDistTrackToB); vector<TransientVertex> newVertices = MyAddTVTrack.getSecondaryVertices(unusedTracks); // for tdr studies theTrackInfoVector = MyAddTVTrack.getTrackInfo(); //std::vector<pair<reco::TransientTrack,double> > theTrackInfo; //std::vector<pair<reco::TransientTrack,double* > > theTrackInfo2; //theTrackInfo = MyAddTVTrack.getTrackInfo(); //theTrackInfo2= MyAddTVTrack.getTrackInfo2(); //TrackInfo = theTrackInfo; //TrackInfo2= theTrackInfo2; if (debug) cout <<"[TTVF] vertices found: "<<newVertices.size()<<endl; return newVertices; }
virtual std::vector<TransientVertex> ConfigurableTertiaryTracksVertexFinder::vertices | ( | const std::vector< reco::TransientTrack > & | ) | const [virtual] |
Reconstruct vertices
Implements VertexReconstructor.
Referenced by TertiaryTracksVertexFinder::vertices().
virtual std::vector<TransientVertex> ConfigurableTertiaryTracksVertexFinder::vertices | ( | const std::vector< reco::TransientTrack > & | , |
const TransientVertex & | pv | ||
) | const [virtual] |
const bool ConfigurableTertiaryTracksVertexFinder::debug = false [static, private] |
Definition at line 61 of file ConfigurableTertiaryTracksVertexFinder.h.
Definition at line 65 of file ConfigurableTertiaryTracksVertexFinder.h.
double ConfigurableTertiaryTracksVertexFinder::theK0sMassWindow [private] |
Definition at line 68 of file ConfigurableTertiaryTracksVertexFinder.h.
double ConfigurableTertiaryTracksVertexFinder::theMaxDist2D [private] |
Definition at line 73 of file ConfigurableTertiaryTracksVertexFinder.h.
double ConfigurableTertiaryTracksVertexFinder::theMaxInPvFrac [private] |
Definition at line 70 of file ConfigurableTertiaryTracksVertexFinder.h.
double ConfigurableTertiaryTracksVertexFinder::theMaxSigOnDistTrackToB [private] |
Definition at line 69 of file ConfigurableTertiaryTracksVertexFinder.h.
double ConfigurableTertiaryTracksVertexFinder::theMaxVtxMass [private] |
Definition at line 67 of file ConfigurableTertiaryTracksVertexFinder.h.
double ConfigurableTertiaryTracksVertexFinder::theMinDist2D [private] |
Definition at line 73 of file ConfigurableTertiaryTracksVertexFinder.h.
double ConfigurableTertiaryTracksVertexFinder::theMinSign2D [private] |
Definition at line 73 of file ConfigurableTertiaryTracksVertexFinder.h.
double ConfigurableTertiaryTracksVertexFinder::theMinTrackPt [private] |
Definition at line 67 of file ConfigurableTertiaryTracksVertexFinder.h.
int ConfigurableTertiaryTracksVertexFinder::theMinTracks [private] |
Definition at line 74 of file ConfigurableTertiaryTracksVertexFinder.h.
Definition at line 63 of file ConfigurableTertiaryTracksVertexFinder.h.
AddTvTrack::TrackInfoVector ConfigurableTertiaryTracksVertexFinder::theTrackInfoVector [mutable, private] |
Definition at line 83 of file ConfigurableTertiaryTracksVertexFinder.h.
Referenced by getTrackInfo().
Definition at line 64 of file ConfigurableTertiaryTracksVertexFinder.h.