CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
21 
23 
28 class TrackingGeometry;
29 class TrackerGeometry;
30 class MagneticField;
31 
33 
34  public:
35 
37 
39 
41 
42  typedef std::set< reco::TrackBaseRef >::iterator IEset;
43  typedef reco::PFDisplacedVertexCandidateCollection::iterator IDVC;
44  typedef reco::PFDisplacedVertexSeedCollection::iterator IDVS;
45  typedef reco::PFDisplacedVertexCollection::iterator IDV;
46 
47  typedef std::pair <unsigned int, unsigned int> PFTrackHitInfo;
48  typedef std::pair <PFTrackHitInfo, PFTrackHitInfo> PFTrackHitFullInfo;
49 
51  enum FitterType {
56  };
57 
58 
60 
62  void setParameters(double transvSize, double longSize,
63  double primaryVertexCut, double tobCut,
64  double tecCut, double minAdaptWeight, bool switchOff2TrackVertex) {
65  transvSize_ = transvSize;
66  longSize_ = longSize;
67  primaryVertexCut_ = primaryVertexCut;
68  tobCut_ = tobCut;
69  tecCut_ = tecCut;
70  minAdaptWeight_ = minAdaptWeight;
71  switchOff2TrackVertex_ = switchOff2TrackVertex;
72  }
73 
75  void setDebug( bool debug ) {debug_ = debug;}
76 
78  void setEdmParameters( const MagneticField* magField,
80  edm::ESHandle<TrackerGeometry> tkerGeomHandle){
81  magField_ = magField;
82  globTkGeomHandle_ = globTkGeomHandle;
83  tkerGeomHandle_ = tkerGeomHandle;
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::auto_ptr< reco::PFDisplacedVertexCollection > transferDisplacedVertices() {return displacedVertices_;}
111 
112  const std::auto_ptr< reco::PFDisplacedVertexCollection >& displacedVertices() const {return 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  double getTransvDiff(const GlobalPoint&, const GlobalPoint&) const;
144  double getLongDiff(const GlobalPoint&, const GlobalPoint&) const;
145  double getLongProj(const GlobalPoint&, const GlobalVector&) const;
146 
148 
149  unsigned commonTracks(const reco::PFDisplacedVertex&, const reco::PFDisplacedVertex&) const;
150 
151  friend std::ostream& operator<<(std::ostream&, const PFDisplacedVertexFinder&);
152 
153 
155 
156  std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > displacedVertexCandidates_;
157  std::auto_ptr< reco::PFDisplacedVertexCollection > displacedVertices_;
158 
160 
162 
163  double transvSize_;
164  double longSize_;
166  double tobCut_;
167  double tecCut_;
169 
171 
173 
174  double sigmacut_; //= 6;
175  double t_ini_; //= 256.;
176  double ratio_; //= 0.25;
177 
178 
180  bool debug_;
181 
184 
187 
190 
191 
193 
195 
196 };
197 
198 #endif
199 
200 
double getTransvDiff(const GlobalPoint &, const GlobalPoint &) const
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 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
void setEdmParameters(const MagneticField *magField, edm::ESHandle< GlobalTrackingGeometry > globTkGeomHandle, edm::ESHandle< TrackerGeometry > tkerGeomHandle)
Sets parameters for track extrapolation and hits study.
std::auto_ptr< reco::PFDisplacedVertexCollection > displacedVertices_
edm::ESHandle< GlobalTrackingGeometry > globTkGeomHandle_
Tracker geometry for discerning hit positions.
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
bool fitVertexFromSeed(reco::PFDisplacedVertexSeed &, reco::PFDisplacedVertex &)
Fit one by one the vertex points with associated tracks to get displaced vertices.
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.
std::set< reco::TrackBaseRef >::iterator IEset
-----— Useful Types -----— ///
edm::ESHandle< TrackerGeometry > tkerGeomHandle_
doc?
std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > displacedVertexCandidates_
-----— Members -----— ///
std::vector< PFDisplacedVertexSeed > PFDisplacedVertexSeedCollection
collection of PFDisplacedVertexSeed objects
void setDebug(bool debug)
Sets debug printout flag.
Displaced Vertex Finder Algorithm.
void selectAndLabelVertices(reco::PFDisplacedVertexCollection &, std::vector< bool > &)
Remove potentially fakes displaced vertices.
void setVertexIdentifier(edm::ParameterSet ps)
std::auto_ptr< reco::PFDisplacedVertexCollection > transferDisplacedVertices()
void setAVFParameters(edm::ParameterSet ps)
const MagneticField * magField_
to be able to extrapolate tracks f
void setTracksSelector(edm::ParameterSet ps)
friend std::ostream & operator<<(std::ostream &, const PFDisplacedVertexFinder &)
double getLongProj(const GlobalPoint &, const GlobalVector &) const
reco::PFDisplacedVertexCandidateCollection::iterator IDVC
void setInput(const edm::Handle< reco::PFDisplacedVertexCandidateCollection > &)
Set input collections of tracks.
const std::auto_ptr< reco::PFDisplacedVertexCollection > & displacedVertices() const
void findSeedsFromCandidate(reco::PFDisplacedVertexCandidate &, reco::PFDisplacedVertexSeedCollection &)
--—— Different steps of the finder algorithm --—— ///
double transvSize_
--—— Parameters --—— ///
Block of elements.
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 --—— ///
double getLongDiff(const GlobalPoint &, const GlobalPoint &) const
bool isCloseTo(const reco::PFDisplacedVertexSeed &, const reco::PFDisplacedVertexSeed &) const
-----— Tools -----— ///
#define debug
Definition: MEtoEDMFormat.h:34
reco::PFDisplacedVertex::VertexTrackType getVertexTrackType(PFTrackHitFullInfo &) const
PFDisplacedVertexHelper helper_
PFCheckHitPatter.