test
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 
10 
12 
15 
17 
22 class MagneticField;
23 
25 
26  public:
27 
29 
31 
32 
34  typedef std::vector<bool> Mask;
35 
36  typedef std::list< reco::TrackBaseRef >::iterator IE;
37  typedef std::list< reco::TrackBaseRef >::const_iterator IEC;
38  typedef reco::PFDisplacedVertexCandidateCollection::const_iterator IBC;
39 
40 
42 
44  void setParameters(double dcaCut, double primaryVertexCut, double dcaPInnerHitCut,
45  const edm::ParameterSet& ps_trk) {
46  dcaCut_ = dcaCut;
47  primaryVertexCut2_ = primaryVertexCut*primaryVertexCut;
48  dcaPInnerHitCut2_ = dcaPInnerHitCut*dcaPInnerHitCut;
49  nChi2_max_ = ps_trk.getParameter<double>("nChi2_max");
50  pt_min_ = ps_trk.getParameter<double>("pt_min");
51  pt_min_prim_ = ps_trk.getParameter<double>("pt_min_prim");
52  dxy_ = ps_trk.getParameter<double>("dxy");
53  }
54 
56  void setDebug( bool debug ) {debug_ = debug;}
57 
60  void setInput(const edm::Handle<reco::TrackCollection>& trackh,
61  const MagneticField* magField );
62 
63 
65  std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > transferVertexCandidates() {return vertexCandidates_;}
66 
67  const std::auto_ptr< reco::PFDisplacedVertexCandidateCollection >& vertexCandidates() const
68  {return vertexCandidates_;}
69 
71 
73 
74 
76  edm::Handle< reco::BeamSpot > beamSpotHandle);
77 
78  private:
79 
81 
83  IE associate(IE next, IE last, reco::PFDisplacedVertexCandidate& tempVertexCandidate);
84 
86  void link( const reco::TrackBaseRef& el1,
87  const reco::TrackBaseRef& el2,
88  double& dist,
89  GlobalPoint& P,
91 
94  void packLinks( reco::PFDisplacedVertexCandidate& vertexCandidate);
95 
96 
98 
103 
104 
106  bool goodPtResolution( const reco::TrackBaseRef& trackref) const;
107 
110  bool isSelected(const reco::TrackBaseRef& trackref)
111  { return goodPtResolution(trackref);}
112 
113  friend std::ostream& operator<<(std::ostream&, const PFDisplacedVertexCandidateFinder&);
114 
115 
116 
118 
119  std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > vertexCandidates_;
120 
121 
123  std::list< reco::TrackBaseRef > eventTracks_;
124 
125 
132  std::vector < GlobalTrajectoryParameters > eventTrackTrajectories_;
133 
135 
138  double dcaCut_;
143 
147  double nChi2_max_;
148  double pt_min_;
149 
150  double pt_min_prim_;
151  double dxy_;
152 
156 
157  // Two track minimum distance algo
159 
161 
163  bool debug_;
164 
165  // Tracker geometry for extrapolation
167 
168 };
169 
170 #endif
171 
172 
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 --—— ///
void setPrimaryVertex(edm::Handle< reco::VertexCollection > mainVertexHandle, edm::Handle< reco::BeamSpot > beamSpotHandle)
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 -— ///
#define debug
Definition: HDRShower.cc:19
reco::PFDisplacedVertexCandidateCollection::const_iterator IBC
const std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > & vertexCandidates() const
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
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.
std::list< reco::TrackBaseRef >::iterator IE
std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > transferVertexCandidates()
bool debug_
if true, debug printouts activated