CMS 3D CMS Logo

PFDisplacedVertexFinder.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFTracking_PFDisplacedVertexFinder_h
2 #define RecoParticleFlow_PFTracking_PFDisplacedVertexFinder_h
3 
6 
13 
16 
18 
20 
21 
23 
28 class TrackingGeometry;
29 class TrackerGeometry;
30 class MagneticField;
31 
33 
34  public:
35 
37 
39 
41 
42  typedef reco::PFDisplacedVertexSeedCollection::iterator IDVS;
43  typedef reco::PFDisplacedVertexCollection::iterator IDV;
44 
45  typedef std::pair <unsigned int, unsigned int> PFTrackHitInfo;
46  typedef std::pair <PFTrackHitInfo, PFTrackHitInfo> PFTrackHitFullInfo;
47 
49  enum FitterType {
54  };
55 
56 
58 
60  void setParameters(double transvSize, double longSize,
61  double primaryVertexCut, double tobCut,
62  double tecCut, double minAdaptWeight, bool switchOff2TrackVertex) {
66  tobCut_ = tobCut;
67  tecCut_ = tecCut;
70  }
71 
73  void setDebug( bool debug ) {debug_ = debug;}
74 
76  void setEdmParameters( const MagneticField* magField,
78  const TrackerTopology* tkerTopo,
79  const TrackerGeometry* tkerGeom){
80  magField_ = magField;
81  globTkGeomHandle_ = globTkGeomHandle;
82  tkerTopo_ = tkerTopo;
83  tkerGeom_ = tkerGeom;
84  }
85 
88  }
89 
92  }
93 
95  edm::Handle< reco::BeamSpot > beamSpotHandle){
96  helper_.setPrimaryVertex(mainVertexHandle, beamSpotHandle);
97  }
98 
100  sigmacut_ = ps.getParameter<double>("sigmacut");
101  t_ini_ = ps.getParameter<double>("Tini");
102  ratio_ = ps.getParameter<double>("ratio");
103  }
104 
107 
108 
110  std::unique_ptr< reco::PFDisplacedVertexCollection > transferDisplacedVertices() {return std::move(displacedVertices_);}
111 
112  const std::unique_ptr< reco::PFDisplacedVertexCollection >& displacedVertices() const {return std::move(displacedVertices_);}
113 
114 
115 
117 
118  void findDisplacedVertices();
119 
120 
121  private:
122 
124 
127 
129  void mergeSeeds(reco::PFDisplacedVertexSeedCollection&, std::vector<bool>& bLocked);
130 
133 
135  void selectAndLabelVertices(reco::PFDisplacedVertexCollection&, std::vector <bool>&);
136 
138 
140 
142 
143  std::pair<float,float> getTransvLongDiff(const GlobalPoint&, const GlobalPoint&) const;
144 
146 
147  unsigned commonTracks(const reco::PFDisplacedVertex&, const reco::PFDisplacedVertex&) const;
148 
149  friend std::ostream& operator<<(std::ostream&, const PFDisplacedVertexFinder&);
150 
151 
153 
155  std::unique_ptr< reco::PFDisplacedVertexCollection > displacedVertices_;
156 
158 
160 
161  float transvSize_;
162  float longSize_;
164  double tobCut_;
165  double tecCut_;
167 
169 
171 
172  double sigmacut_; //= 6;
173  double t_ini_; //= 256.;
174  double ratio_; //= 0.25;
175 
176 
178  bool debug_;
179 
182 
186 
189 
190 
192 
194 
195 };
196 
197 #endif
198 
199 
T getParameter(std::string const &) const
void setVertexIdentifier(const edm::ParameterSet &ps)
Set Vertex identifier parameters.
std::vector< PFDisplacedVertex > PFDisplacedVertexCollection
collection of PFDisplacedVertex objects
void setEdmParameters(const MagneticField *magField, edm::ESHandle< GlobalTrackingGeometry > globTkGeomHandle, const TrackerTopology *tkerTopo, const TrackerGeometry *tkerGeom)
Sets parameters for track extrapolation and hits study.
std::vector< PFDisplacedVertexCandidate > PFDisplacedVertexCandidateCollection
collection of PFDisplacedVertexCandidate objects
void setTracksSelector(const edm::ParameterSet &ps)
Set Tracks selector parameters.
std::pair< unsigned int, unsigned int > PFTrackHitInfo
A block of tracks linked together.
reco::PFDisplacedVertexSeedCollection::iterator IDVS
-----— Useful Types -----— ///
edm::ESHandle< GlobalTrackingGeometry > globTkGeomHandle_
Tracker geometry for discerning hit positions.
const TrackerTopology * tkerTopo_
doc?
bool fitVertexFromSeed(const reco::PFDisplacedVertexSeed &, reco::PFDisplacedVertex &)
Fit one by one the vertex points with associated tracks to get displaced vertices.
bool rejectAndLabelVertex(reco::PFDisplacedVertex &dv)
void setPrimaryVertex(edm::Handle< reco::VertexCollection > mainVertexHandle, edm::Handle< reco::BeamSpot > beamSpotHandle)
Update the primary vertex information.
void findDisplacedVertices()
-----— Main function which find vertices -----— ///
bool debug_
If true, debug printouts activated.
std::pair< PFTrackHitInfo, PFTrackHitInfo > PFTrackHitFullInfo
unsigned commonTracks(const reco::PFDisplacedVertex &, const reco::PFDisplacedVertex &) const
void mergeSeeds(reco::PFDisplacedVertexSeedCollection &, std::vector< bool > &bLocked)
Sometimes two vertex candidates can be quite close and coming from the same vertex.
void setTracksSelector(const edm::ParameterSet &ps)
std::vector< PFDisplacedVertexSeed > PFDisplacedVertexSeedCollection
collection of PFDisplacedVertexSeed objects
reco::PFDisplacedVertexCandidateCollection const * displacedVertexCandidates_
-----— Members -----— ///
void setDebug(bool debug)
Sets debug printout flag.
void findSeedsFromCandidate(const reco::PFDisplacedVertexCandidate &, reco::PFDisplacedVertexSeedCollection &)
--—— Different steps of the finder algorithm --—— ///
Displaced Vertex Finder Algorithm.
void selectAndLabelVertices(reco::PFDisplacedVertexCollection &, std::vector< bool > &)
Remove potentially fakes displaced vertices.
const MagneticField * magField_
to be able to extrapolate tracks f
friend std::ostream & operator<<(std::ostream &, const PFDisplacedVertexFinder &)
std::unique_ptr< reco::PFDisplacedVertexCollection > displacedVertices_
void setAVFParameters(const edm::ParameterSet &ps)
void setInput(const edm::Handle< reco::PFDisplacedVertexCandidateCollection > &)
Set input collections of tracks.
std::unique_ptr< reco::PFDisplacedVertexCollection > transferDisplacedVertices()
std::pair< float, float > getTransvLongDiff(const GlobalPoint &, const GlobalPoint &) const
Block of elements.
#define debug
Definition: HDRShower.cc:19
void setPrimaryVertex(edm::Handle< reco::VertexCollection > mainVertexHandle, edm::Handle< reco::BeamSpot > beamSpotHandle)
double sigmacut_
Adaptive Vertex Fitter parameters.
reco::PFDisplacedVertexCollection::iterator IDV
void setParameters(double transvSize, double longSize, double primaryVertexCut, double tobCut, double tecCut, double minAdaptWeight, bool switchOff2TrackVertex)
--—— Set different algo parameters --—— ///
const std::unique_ptr< reco::PFDisplacedVertexCollection > & displacedVertices() const
float transvSize_
--—— Parameters --—— ///
const TrackerGeometry * tkerGeom_
void setVertexIdentifier(const edm::ParameterSet &ps)
bool isCloseTo(const reco::PFDisplacedVertexSeed &, const reco::PFDisplacedVertexSeed &) const
-----— Tools -----— ///
def move(src, dest)
Definition: eostools.py:511
reco::PFDisplacedVertex::VertexTrackType getVertexTrackType(PFTrackHitFullInfo &) const
PFDisplacedVertexHelper helper_
PFCheckHitPatter.