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  }
51 
53  void setDebug(bool debug) { debug_ = debug; }
54 
57  void setInput(const edm::Handle<reco::TrackCollection>& trackh, const MagneticField* magField);
58 
60  std::unique_ptr<reco::PFDisplacedVertexCandidateCollection> transferVertexCandidates() {
62  }
63 
64  const std::unique_ptr<reco::PFDisplacedVertexCandidateCollection>& vertexCandidates() const {
66  }
67 
69 
71 
73  edm::Handle<reco::BeamSpot> beamSpotHandle);
74 
75 private:
77 
79  IE associate(IE next, IE last, reco::PFDisplacedVertexCandidate& tempVertexCandidate);
80 
82  void link(const reco::TrackBaseRef& el1,
83  const reco::TrackBaseRef& el2,
84  double& dist,
85  GlobalPoint& crossing_point,
87 
90  void packLinks(reco::PFDisplacedVertexCandidate& vertexCandidate);
91 
93 
97 
99  bool goodPtResolution(const reco::TrackBaseRef& trackref) const;
100 
103  bool isSelected(const reco::TrackBaseRef& trackref) { return goodPtResolution(trackref); }
104 
105  friend std::ostream& operator<<(std::ostream&, const PFDisplacedVertexCandidateFinder&);
106 
108 
109  std::unique_ptr<reco::PFDisplacedVertexCandidateCollection> vertexCandidates_;
110 
112  std::list<reco::TrackBaseRef> eventTracks_;
113 
120  std::vector<GlobalTrajectoryParameters> eventTrackTrajectories_;
121 
123 
126  double dcaCut_;
131 
135  double nChi2_max_;
136  double pt_min_;
137 
138  double pt_min_prim_;
139  double dxy_;
140 
144 
145  // Two track minimum distance algo
147 
149 
151  bool debug_;
152 
153  // Tracker geometry for extrapolation
155 
157 };
158 
159 #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