CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
22 
27 class TrackingGeometry;
28 class TrackerGeometry;
29 class MagneticField;
30 
32 public:
34 
36 
38 
39  typedef reco::PFDisplacedVertexSeedCollection::iterator IDVS;
40  typedef reco::PFDisplacedVertexCollection::iterator IDV;
41 
42  typedef std::pair<unsigned int, unsigned int> PFTrackHitInfo;
43  typedef std::pair<PFTrackHitInfo, PFTrackHitInfo> PFTrackHitFullInfo;
44 
47 
49 
51  void setParameters(double transvSize,
52  double longSize,
53  double primaryVertexCut,
54  double tobCut,
55  double tecCut,
56  double minAdaptWeight,
57  bool switchOff2TrackVertex) {
58  transvSize_ = transvSize;
59  longSize_ = longSize;
60  primaryVertexCut_ = primaryVertexCut;
61  tobCut_ = tobCut;
62  tecCut_ = tecCut;
63  minAdaptWeight_ = minAdaptWeight;
64  switchOff2TrackVertex_ = switchOff2TrackVertex;
65  }
66 
68  void setDebug(bool debug) { debug_ = debug; }
69 
73  const TrackerTopology* tkerTopo,
74  const TrackerGeometry* tkerGeom) {
76  globTkGeomHandle_ = globTkGeomHandle;
77  tkerTopo_ = tkerTopo;
78  tkerGeom_ = tkerGeom;
79  }
80 
82 
84 
86  edm::Handle<reco::BeamSpot> beamSpotHandle) {
87  helper_.setPrimaryVertex(mainVertexHandle, beamSpotHandle);
88  }
89 
91  sigmacut_ = ps.getParameter<double>("sigmacut");
92  t_ini_ = ps.getParameter<double>("Tini");
93  ratio_ = ps.getParameter<double>("ratio");
94  }
95 
98 
100  std::unique_ptr<reco::PFDisplacedVertexCollection> transferDisplacedVertices() {
102  }
103 
104  const std::unique_ptr<reco::PFDisplacedVertexCollection>& displacedVertices() const {
106  }
107 
109 
110  void findDisplacedVertices();
111 
112 private:
114 
117 
119  void mergeSeeds(reco::PFDisplacedVertexSeedCollection&, std::vector<bool>& bLocked);
120 
123 
126 
128 
130 
132 
133  std::pair<float, float> getTransvLongDiff(const GlobalPoint&, const GlobalPoint&) const;
134 
136 
137  unsigned commonTracks(const reco::PFDisplacedVertex&, const reco::PFDisplacedVertex&) const;
138 
139  friend std::ostream& operator<<(std::ostream&, const PFDisplacedVertexFinder&);
140 
142 
144  std::unique_ptr<reco::PFDisplacedVertexCollection> displacedVertices_;
145 
147 
149 
150  float transvSize_;
151  float longSize_;
153  double tobCut_;
154  double tecCut_;
156 
158 
160 
161  double sigmacut_; //= 6;
162  double t_ini_; //= 256.;
163  double ratio_; //= 0.25;
164 
166  bool debug_;
167 
170 
174 
177 
179 
181 };
182 
183 #endif
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.
const std::unique_ptr< reco::PFDisplacedVertexCollection > & displacedVertices() const
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 auto & magField
const TrackerTopology * tkerTopo_
doc?
std::unique_ptr< reco::PFDisplacedVertexCollection > transferDisplacedVertices()
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::unique_ptr< reco::PFDisplacedVertexCollection > displacedVertices_
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.
def move
Definition: eostools.py:511
const MagneticField * magField_
to be able to extrapolate tracks f
friend std::ostream & operator<<(std::ostream &, const PFDisplacedVertexFinder &)
void setAVFParameters(const edm::ParameterSet &ps)
void setInput(const edm::Handle< reco::PFDisplacedVertexCandidateCollection > &)
Set input collections of tracks.
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
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void setParameters(double transvSize, double longSize, double primaryVertexCut, double tobCut, double tecCut, double minAdaptWeight, bool switchOff2TrackVertex)
--—— Set different algo parameters --—— ///
float transvSize_
--—— Parameters --—— ///
const TrackerGeometry * tkerGeom_
void setVertexIdentifier(const edm::ParameterSet &ps)
bool isCloseTo(const reco::PFDisplacedVertexSeed &, const reco::PFDisplacedVertexSeed &) const
-----— Tools -----— ///
reco::PFDisplacedVertex::VertexTrackType getVertexTrackType(PFTrackHitFullInfo &) const
PFDisplacedVertexHelper helper_
PFCheckHitPatter.