CMS 3D CMS Logo

PFDisplacedVertexCandidateFinder.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFTracking_PFDisplacedVertexCandidateFinder_h
2 #define RecoParticleFlow_PFTracking_PFDisplacedVertexCandidateFinder_h
3 
12 
14 
17 
19 
24 class MagneticField;
25 
27 public:
29 
31 
33  typedef std::vector<bool> Mask;
34 
35  typedef std::list<reco::TrackBaseRef>::iterator IE;
36  typedef std::list<reco::TrackBaseRef>::const_iterator IEC;
37  typedef reco::PFDisplacedVertexCandidateCollection::const_iterator IBC;
38 
40 
42  void setParameters(double dcaCut, double primaryVertexCut, double dcaPInnerHitCut, const edm::ParameterSet& ps_trk) {
43  dcaCut_ = dcaCut;
44  primaryVertexCut2_ = primaryVertexCut * primaryVertexCut;
45  dcaPInnerHitCut2_ = dcaPInnerHitCut * dcaPInnerHitCut;
46  nChi2_max_ = ps_trk.getParameter<double>("nChi2_max");
47  pt_min_ = ps_trk.getParameter<double>("pt_min");
48  pt_min_prim_ = ps_trk.getParameter<double>("pt_min_prim");
49  dxy_ = ps_trk.getParameter<double>("dxy");
50  qoverpError_max_ = ps_trk.getParameter<double>("qoverpError_max");
51  }
52 
54  void setDebug(bool debug) { debug_ = debug; }
55 
58  void setInput(const edm::Handle<reco::TrackCollection>& trackh, const MagneticField* magField);
59 
61  std::unique_ptr<reco::PFDisplacedVertexCandidateCollection> transferVertexCandidates() {
63  }
64 
65  const std::unique_ptr<reco::PFDisplacedVertexCandidateCollection>& vertexCandidates() const {
67  }
68 
70 
72 
74  edm::Handle<reco::BeamSpot> beamSpotHandle);
75 
76 private:
78 
80  IE associate(IE next, IE last, reco::PFDisplacedVertexCandidate& tempVertexCandidate);
81 
83  void link(const reco::TrackBaseRef& el1,
84  const reco::TrackBaseRef& el2,
85  double& dist,
86  GlobalPoint& crossing_point,
88 
91  void packLinks(reco::PFDisplacedVertexCandidate& vertexCandidate);
92 
94 
98 
100  bool goodPtResolution(const reco::TrackBaseRef& trackref) const;
101 
104  bool isSelected(const reco::TrackBaseRef& trackref) { return goodPtResolution(trackref); }
105 
106  friend std::ostream& operator<<(std::ostream&, const PFDisplacedVertexCandidateFinder&);
107 
109 
110  std::unique_ptr<reco::PFDisplacedVertexCandidateCollection> vertexCandidates_;
111 
113  std::list<reco::TrackBaseRef> eventTracks_;
114 
121  std::vector<GlobalTrajectoryParameters> eventTrackTrajectories_;
122 
124 
127  double dcaCut_;
132 
136  double nChi2_max_;
137  double pt_min_;
138 
139  double pt_min_prim_;
140  double dxy_;
145 
146  // Two track minimum distance algo
148 
150 
152  bool debug_;
153 
154  // Tracker geometry for extrapolation
156 
158 };
159 
160 #endif
void setInput(const edm::Handle< reco::TrackCollection > &trackh, const MagneticField *magField)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
GlobalTrajectoryParameters getGlobalTrajectoryParameters(const reco::Track *) const
--—— TOOLS --—— //
A block of tracks linked together.
const std::unique_ptr< reco::PFDisplacedVertexCandidateCollection > & vertexCandidates() const
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)
friend std::ostream & operator<<(std::ostream &, const PFDisplacedVertexCandidateFinder &)
std::list< reco::TrackBaseRef > eventTracks_
The track refs.
void link(const reco::TrackBaseRef &el1, const reco::TrackBaseRef &el2, double &dist, GlobalPoint &crossing_point, reco::PFDisplacedVertexCandidate::VertexLinkTest &linktest)
Check whether 2 elements are linked and fill the link parameters.
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 —— ///
std::list< reco::TrackBaseRef >::iterator IE
edm::soa::AddColumns_t< EtaPhiTable, std::tuple< col::Pt > > PtEtaPhiTable
double dcaCut_
–— Algo parameters for the vertex finder -— ///
std::unique_ptr< reco::PFDisplacedVertexCandidateCollection > vertexCandidates_
-----— Members -----— ///
std::vector< GlobalTrajectoryParameters > eventTrackTrajectories_
#define debug
Definition: HDRShower.cc:19
reco::PFDisplacedVertexCandidateCollection::const_iterator IBC
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
bool isSelected(const reco::TrackBaseRef &trackref)
std::list< reco::TrackBaseRef >::const_iterator IEC
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.
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::unique_ptr< reco::PFDisplacedVertexCandidateCollection > transferVertexCandidates()
bool goodPtResolution(const reco::TrackBaseRef &trackref) const
Quality Criterion on the Pt resolution to select a Track.
bool debug_
if true, debug printouts activated
def move(src, dest)
Definition: eostools.py:511