CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFDisplacedVertexCandidateFinder.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFTracking_PFDisplacedVertexCandidateFinder_h
2 #define RecoParticleFlow_PFTracking_PFDisplacedVertexCandidateFinder_h
3 
8 
10 
13 
15 
20 class MagneticField;
21 
23 
24  public:
25 
27 
29 
30 
32  typedef std::vector<bool> Mask;
33 
34  typedef std::list< reco::TrackBaseRef >::iterator IE;
35  typedef std::list< reco::TrackBaseRef >::const_iterator IEC;
36  typedef reco::PFDisplacedVertexCandidateCollection::const_iterator IBC;
37 
38 
40 
43  const edm::ParameterSet& ps_trk) {
44  dcaCut_ = dcaCut;
45  primaryVertexCut2_ = primaryVertexCut*primaryVertexCut;
46  dcaPInnerHitCut2_ = dcaPInnerHitCut*dcaPInnerHitCut;
47  nChi2_max_ = ps_trk.getParameter<double>("nChi2_max");
48  pt_min_ = ps_trk.getParameter<double>("pt_min");
49  }
50 
52  void setDebug( bool debug ) {debug_ = debug;}
53 
56  void setInput(const edm::Handle<reco::TrackCollection>& trackh,
57  const MagneticField* magField );
58 
59 
61  std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > transferVertexCandidates() {return vertexCandidates_;}
62 
63  const std::auto_ptr< reco::PFDisplacedVertexCandidateCollection >& vertexCandidates() const
64  {return vertexCandidates_;}
65 
67 
69 
70 
71  private:
72 
74 
76  IE associate(IE next, IE last, reco::PFDisplacedVertexCandidate& tempVertexCandidate);
77 
79  void link( const reco::TrackBaseRef& el1,
80  const reco::TrackBaseRef& el2,
81  double& dist,
82  GlobalPoint& P,
84 
87  void packLinks( reco::PFDisplacedVertexCandidate& vertexCandidate);
88 
89 
91 
96 
97 
99  bool goodPtResolution( const reco::TrackBaseRef& trackref) const;
100 
103  bool isSelected(const reco::TrackBaseRef& trackref)
104  { return goodPtResolution(trackref);}
105 
106  friend std::ostream& operator<<(std::ostream&, const PFDisplacedVertexCandidateFinder&);
107 
108 
109 
111 
112  std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > vertexCandidates_;
113 
114 
116  std::list< reco::TrackBaseRef > eventTracks_;
117 
118 
125  std::vector < GlobalTrajectoryParameters > eventTrackTrajectories_;
126 
128 
131  double dcaCut_;
136 
140  double nChi2_max_;
141  double pt_min_;
142 
146 
147  // Two track minimum distance algo
149 
150 
151 
153  bool debug_;
154 
155  // Tracker geometry for extrapolation
157 
158 };
159 
160 #endif
161 
162 
void setInput(const edm::Handle< reco::TrackCollection > &trackh, const MagneticField *magField)
void link(const reco::TrackBaseRef &el1, const reco::TrackBaseRef &el2, double &dist, GlobalPoint &P, reco::PFDisplacedVertexCandidate::VertexLinkTest &linktest)
Check whether 2 elements are linked and fill the link parameters.
T getParameter(std::string const &) const
A block of tracks linked together.
GlobalTrajectoryParameters getGlobalTrajectoryParameters(const reco::Track *) const
--—— TOOLS --—— //
IE associate(IE next, IE last, reco::PFDisplacedVertexCandidate &tempVertexCandidate)
--—— Different steps of the finder algorithm --—— ///
std::vector< GlobalTrajectoryParameters > eventTrackTrajectories_
#define P
friend std::ostream & operator<<(std::ostream &, const PFDisplacedVertexCandidateFinder &)
std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > vertexCandidates_
-----— Members -----— ///
std::list< reco::TrackBaseRef >::const_iterator IEC
void setDebug(bool debug)
sets debug printout flag
void setParameters(double dcaCut, double primaryVertexCut, double dcaPInnerHitCut, const edm::ParameterSet &ps_trk)
---—— Set different algo parameters —— ///
double dcaCut_
–— Algo parameters for the vertex finder -— ///
reco::PFDisplacedVertexCandidateCollection::const_iterator IBC
const std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > & vertexCandidates() const
bool goodPtResolution(const reco::TrackBaseRef &trackref) const
Quality Criterion on the Pt resolution to select a Track.
bool isSelected(const reco::TrackBaseRef &trackref)
void packLinks(reco::PFDisplacedVertexCandidate &vertexCandidate)
void findDisplacedVertexCandidates()
-----— Main function which find vertices -----— ///
double primaryVertexCut2_
Do not reconstruct vertices wich are too close to the beam pipe.
std::list< reco::TrackBaseRef > eventTracks_
The track refs.
double dcaPInnerHitCut2_
Maximum distance between the DCA Point and the inner hit of the track.
std::vector< bool > Mask
Mask used to spot if a track is free or not.
#define debug
Definition: MEtoEDMFormat.h:34
std::list< reco::TrackBaseRef >::iterator IE
std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > transferVertexCandidates()
bool debug_
if true, debug printouts activated