CMS 3D CMS Logo

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 
22 
27 class TrackingGeometry;
28 class TrackerGeometry;
29 class MagneticField;
30 
32 public:
34 
36 
38 
39  typedef reco::PFDisplacedVertexSeedCollection::iterator IDVS;
40  typedef reco::PFDisplacedVertexCollection::iterator IDV;
41 
42  typedef std::pair<unsigned int, unsigned int> PFTrackHitInfo;
43  typedef std::pair<PFTrackHitInfo, PFTrackHitInfo> PFTrackHitFullInfo;
44 
47 
49 
52  double longSize,
53  double primaryVertexCut,
54  double tobCut,
55  double tecCut,
56  double minAdaptWeight,
57  bool switchOff2TrackVertex) {
61  tobCut_ = tobCut;
62  tecCut_ = tecCut;
65  }
66 
68  void setDebug(bool debug) { debug_ = debug; }
69 
71  void setEdmParameters(const MagneticField* magField,
73  const TrackerTopology* tkerTopo,
74  const TrackerGeometry* tkerGeom) {
75  magField_ = magField;
76  globTkGeomHandle_ = globTkGeomHandle;
77  tkerTopo_ = tkerTopo;
78  tkerGeom_ = tkerGeom;
79  }
80 
82 
84 
86  edm::Handle<reco::BeamSpot> beamSpotHandle) {
87  helper_.setPrimaryVertex(mainVertexHandle, beamSpotHandle);
88  }
89 
91  sigmacut_ = ps.getParameter<double>("sigmacut");
92  t_ini_ = ps.getParameter<double>("Tini");
93  ratio_ = ps.getParameter<double>("ratio");
94  }
95 
98 
100  std::unique_ptr<reco::PFDisplacedVertexCollection> transferDisplacedVertices() {
102  }
103 
104  const std::unique_ptr<reco::PFDisplacedVertexCollection>& displacedVertices() const {
106  }
107 
109 
110  void findDisplacedVertices();
111 
112 private:
114 
117 
119  void mergeSeeds(reco::PFDisplacedVertexSeedCollection&, std::vector<bool>& bLocked);
120 
123 
126 
128 
130 
132 
133  std::pair<float, float> getTransvLongDiff(const GlobalPoint&, const GlobalPoint&) const;
134 
136 
137  unsigned commonTracks(const reco::PFDisplacedVertex&, const reco::PFDisplacedVertex&) const;
138 
139  friend std::ostream& operator<<(std::ostream&, const PFDisplacedVertexFinder&);
140 
142 
144  std::unique_ptr<reco::PFDisplacedVertexCollection> displacedVertices_;
145 
147 
149 
150  float transvSize_;
151  float longSize_;
153  double tobCut_;
154  double tecCut_;
156 
158 
160 
161  double sigmacut_; //= 6;
162  double t_ini_; //= 256.;
163  double ratio_; //= 0.25;
164 
166  bool debug_;
167 
170 
174 
177 
179 
181 };
182 
183 #endif
PFDisplacedVertexFinder::globTkGeomHandle_
edm::ESHandle< GlobalTrackingGeometry > globTkGeomHandle_
Tracker geometry for discerning hit positions.
Definition: PFDisplacedVertexFinder.h:169
PFDisplacedVertexFinder::FitterType
FitterType
Fitter Type.
Definition: PFDisplacedVertexFinder.h:46
PFDisplacedVertexFwd.h
PFDisplacedVertexFinder::getTransvLongDiff
std::pair< float, float > getTransvLongDiff(const GlobalPoint &, const GlobalPoint &) const
Definition: PFDisplacedVertexFinder.cc:628
PFDisplacedVertexFinder::longSize_
float longSize_
Definition: PFDisplacedVertexFinder.h:151
PFDisplacedVertexHelper.h
PFDisplacedVertexCandidateFwd.h
TrackingGeometry
Definition: TrackingGeometry.h:26
particleFlowDisplacedVertex_cfi.minAdaptWeight
minAdaptWeight
Definition: particleFlowDisplacedVertex_cfi.py:34
PFDisplacedVertexFinder::setEdmParameters
void setEdmParameters(const MagneticField *magField, edm::ESHandle< GlobalTrackingGeometry > globTkGeomHandle, const TrackerTopology *tkerTopo, const TrackerGeometry *tkerGeom)
Sets parameters for track extrapolation and hits study.
Definition: PFDisplacedVertexFinder.h:71
ESHandle.h
PFDisplacedVertexFinder::getVertexTrackType
reco::PFDisplacedVertex::VertexTrackType getVertexTrackType(PFTrackHitFullInfo &) const
Definition: PFDisplacedVertexFinder.cc:639
PFDisplacedVertexFinder::transferDisplacedVertices
std::unique_ptr< reco::PFDisplacedVertexCollection > transferDisplacedVertices()
Definition: PFDisplacedVertexFinder.h:100
TrackerTopology
Definition: TrackerTopology.h:16
PFDisplacedVertexFinder::helper_
PFDisplacedVertexHelper helper_
Definition: PFDisplacedVertexFinder.h:180
reco::PFDisplacedVertexSeed
Block of elements.
Definition: PFDisplacedVertexSeed.h:25
PFDisplacedVertexFinder::IDVS
reco::PFDisplacedVertexSeedCollection::iterator IDVS
-----— Useful Types -----— ///
Definition: PFDisplacedVertexFinder.h:39
PFDisplacedVertexFinder::displacedVertices
const std::unique_ptr< reco::PFDisplacedVertexCollection > & displacedVertices() const
Definition: PFDisplacedVertexFinder.h:104
PFDisplacedVertexHelper
Displaced Vertex Finder Algorithm.
Definition: PFDisplacedVertexHelper.h:17
PFDisplacedVertexHelper::setVertexIdentifier
void setVertexIdentifier(const edm::ParameterSet &ps)
Set Vertex identifier parameters.
Definition: PFDisplacedVertexHelper.h:26
particleFlowDisplacedVertex_cfi.transvSize
transvSize
Definition: particleFlowDisplacedVertex_cfi.py:14
particleFlowDisplacedVertex_cfi.tecCut
tecCut
Definition: particleFlowDisplacedVertex_cfi.py:29
PFDisplacedVertexHelper::setTracksSelector
void setTracksSelector(const edm::ParameterSet &ps)
Set Tracks selector parameters.
Definition: PFDisplacedVertexHelper.h:23
PFDisplacedVertexHelper::setPrimaryVertex
void setPrimaryVertex(edm::Handle< reco::VertexCollection > mainVertexHandle, edm::Handle< reco::BeamSpot > beamSpotHandle)
Update the primary vertex information.
Definition: PFDisplacedVertexHelper.cc:23
PFDisplacedVertexFinder::tkerTopo_
const TrackerTopology * tkerTopo_
doc?
Definition: PFDisplacedVertexFinder.h:172
PFDisplacedVertexFinder::debug_
bool debug_
If true, debug printouts activated.
Definition: PFDisplacedVertexFinder.h:166
PFDisplacedVertexFinder::isCloseTo
bool isCloseTo(const reco::PFDisplacedVertexSeed &, const reco::PFDisplacedVertexSeed &) const
-----— Tools -----— ///
Definition: PFDisplacedVertexFinder.cc:614
PFDisplacedVertexFinder::fitVertexFromSeed
bool fitVertexFromSeed(const reco::PFDisplacedVertexSeed &, reco::PFDisplacedVertex &)
Fit one by one the vertex points with associated tracks to get displaced vertices.
Definition: PFDisplacedVertexFinder.cc:207
PFDisplacedVertexFinder::findDisplacedVertices
void findDisplacedVertices()
-----— Main function which find vertices -----— ///
Definition: PFDisplacedVertexFinder.cc:52
PFDisplacedVertexFinder::rejectAndLabelVertex
bool rejectAndLabelVertex(reco::PFDisplacedVertex &dv)
Definition: PFDisplacedVertexFinder.cc:605
PFDisplacedVertexFinder::F_KALMAN
Definition: PFDisplacedVertexFinder.h:46
PFDisplacedVertexFinder::displacedVertices_
std::unique_ptr< reco::PFDisplacedVertexCollection > displacedVertices_
Definition: PFDisplacedVertexFinder.h:144
edm::Handle< reco::VertexCollection >
reco::PFDisplacedVertexCollection
std::vector< PFDisplacedVertex > PFDisplacedVertexCollection
collection of PFDisplacedVertex objects
Definition: PFDisplacedVertexFwd.h:10
PFDisplacedVertexFinder::primaryVertexCut_
double primaryVertexCut_
Definition: PFDisplacedVertexFinder.h:152
PFDisplacedVertexFinder::displacedVertexCandidates_
reco::PFDisplacedVertexCandidateCollection const * displacedVertexCandidates_
-----— Members -----— ///
Definition: PFDisplacedVertexFinder.h:143
particleFlowDisplacedVertex_cfi.tobCut
tobCut
Definition: particleFlowDisplacedVertex_cfi.py:25
PFDisplacedVertexFinder::~PFDisplacedVertexFinder
~PFDisplacedVertexFinder()
Definition: PFDisplacedVertexFinder.cc:39
PFDisplacedVertexFinder::F_ADAPTIVE
Definition: PFDisplacedVertexFinder.h:46
PFDisplacedVertexFinder::switchOff2TrackVertex_
bool switchOff2TrackVertex_
Definition: PFDisplacedVertexFinder.h:157
PFDisplacedVertexFinder::F_NOTDEFINED
Definition: PFDisplacedVertexFinder.h:46
debug
#define debug
Definition: HDRShower.cc:19
PFDisplacedVertexFinder::tobCut_
double tobCut_
Definition: PFDisplacedVertexFinder.h:153
TrackFwd.h
PFDisplacedVertexFinder::operator<<
friend std::ostream & operator<<(std::ostream &, const PFDisplacedVertexFinder &)
Definition: PFDisplacedVertexFinder.cc:678
PFDisplacedVertexFinder::PFTrackHitFullInfo
std::pair< PFTrackHitInfo, PFTrackHitInfo > PFTrackHitFullInfo
Definition: PFDisplacedVertexFinder.h:43
reco::PFDisplacedVertexSeedCollection
std::vector< PFDisplacedVertexSeed > PFDisplacedVertexSeedCollection
collection of PFDisplacedVertexSeed objects
Definition: PFDisplacedVertexSeedFwd.h:10
PFDisplacedVertexFinder::findSeedsFromCandidate
void findSeedsFromCandidate(const reco::PFDisplacedVertexCandidate &, reco::PFDisplacedVertexSeedCollection &)
-----— Different steps of the finder algorithm -----— ///
Definition: PFDisplacedVertexFinder.cc:139
edm::ESHandle< GlobalTrackingGeometry >
PFDisplacedVertexFinder::magField_
const MagneticField * magField_
to be able to extrapolate tracks f
Definition: PFDisplacedVertexFinder.h:176
Point3DBase< float, GlobalTag >
PFDisplacedVertexFinder::PFDisplacedVertexFinder
PFDisplacedVertexFinder()
Definition: PFDisplacedVertexFinder.cc:28
PFCheckHitPattern
PFCheckHitPatter.
Definition: PFCheckHitPattern.h:34
PFDisplacedVertexFinder::t_ini_
double t_ini_
Definition: PFDisplacedVertexFinder.h:162
PFDisplacedVertexFinder::mergeSeeds
void mergeSeeds(reco::PFDisplacedVertexSeedCollection &, std::vector< bool > &bLocked)
Sometimes two vertex candidates can be quite close and coming from the same vertex.
Definition: PFDisplacedVertexFinder.cc:187
PFDisplacedVertexFinder::setDebug
void setDebug(bool debug)
Sets debug printout flag.
Definition: PFDisplacedVertexFinder.h:68
PFDisplacedVertexFinder
Definition: PFDisplacedVertexFinder.h:31
edm::ParameterSet
Definition: ParameterSet.h:36
reco::PFDisplacedVertex
Block of elements.
Definition: PFDisplacedVertex.h:23
PFDisplacedVertexFinder::IDV
reco::PFDisplacedVertexCollection::iterator IDV
Definition: PFDisplacedVertexFinder.h:40
PFDisplacedVertexFinder::ratio_
double ratio_
Definition: PFDisplacedVertexFinder.h:163
PFDisplacedVertexCandidate.h
PFDisplacedVertexSeed.h
PFDisplacedVertex.h
PFDisplacedVertexFinder::setTracksSelector
void setTracksSelector(const edm::ParameterSet &ps)
Definition: PFDisplacedVertexFinder.h:81
PFDisplacedVertexFinder::setAVFParameters
void setAVFParameters(const edm::ParameterSet &ps)
Definition: PFDisplacedVertexFinder.h:90
particleFlowDisplacedVertex_cfi.longSize
longSize
Definition: particleFlowDisplacedVertex_cfi.py:17
PFDisplacedVertexFinder::commonTracks
unsigned commonTracks(const reco::PFDisplacedVertex &, const reco::PFDisplacedVertex &) const
Definition: PFDisplacedVertexFinder.cc:659
PFDisplacedVertexFinder::selectAndLabelVertices
void selectAndLabelVertices(reco::PFDisplacedVertexCollection &, std::vector< bool > &)
Remove potentially fakes displaced vertices.
Definition: PFDisplacedVertexFinder.cc:521
PFDisplacedVertexFinder::F_DONOTREFIT
Definition: PFDisplacedVertexFinder.h:46
reco::PFDisplacedVertex::VertexTrackType
VertexTrackType
Definition: PFDisplacedVertex.h:36
PFDisplacedVertexFinder::tkerGeom_
const TrackerGeometry * tkerGeom_
Definition: PFDisplacedVertexFinder.h:173
particleFlowDisplacedVertex_cfi.primaryVertexCut
primaryVertexCut
Definition: particleFlowDisplacedVertex_cfi.py:21
PFDisplacedVertexFinder::setPrimaryVertex
void setPrimaryVertex(edm::Handle< reco::VertexCollection > mainVertexHandle, edm::Handle< reco::BeamSpot > beamSpotHandle)
Definition: PFDisplacedVertexFinder.h:85
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
PFDisplacedVertexFinder::setInput
void setInput(const edm::Handle< reco::PFDisplacedVertexCandidateCollection > &)
Set input collections of tracks.
Definition: PFDisplacedVertexFinder.cc:41
eostools.move
def move(src, dest)
Definition: eostools.py:511
PFDisplacedVertexFinder::transvSize_
float transvSize_
-----— Parameters -----— ///
Definition: PFDisplacedVertexFinder.h:150
GlobalVector.h
PFDisplacedVertexFinder::setVertexIdentifier
void setVertexIdentifier(const edm::ParameterSet &ps)
Definition: PFDisplacedVertexFinder.h:83
PFDisplacedVertexFinder::tecCut_
double tecCut_
Definition: PFDisplacedVertexFinder.h:154
PFDisplacedVertexFinder::sigmacut_
double sigmacut_
Adaptive Vertex Fitter parameters.
Definition: PFDisplacedVertexFinder.h:161
PFDisplacedVertexFinder::setParameters
void setParameters(double transvSize, double longSize, double primaryVertexCut, double tobCut, double tecCut, double minAdaptWeight, bool switchOff2TrackVertex)
-----— Set different algo parameters -----— ///
Definition: PFDisplacedVertexFinder.h:51
PFDisplacedVertexFinder::minAdaptWeight_
double minAdaptWeight_
Definition: PFDisplacedVertexFinder.h:155
reco::PFDisplacedVertexCandidate
A block of tracks linked together.
Definition: PFDisplacedVertexCandidate.h:28
PFCheckHitPattern.h
MagneticField
Definition: MagneticField.h:19
GlobalPoint.h
PFDisplacedVertexFinder::PFTrackHitInfo
std::pair< unsigned int, unsigned int > PFTrackHitInfo
Definition: PFDisplacedVertexFinder.h:42
PFDisplacedVertexFinder::hitPattern_
PFCheckHitPattern hitPattern_
Definition: PFDisplacedVertexFinder.h:178
particleFlowDisplacedVertex_cfi.switchOff2TrackVertex
switchOff2TrackVertex
Definition: particleFlowDisplacedVertex_cfi.py:38
PFDisplacedVertexSeedFwd.h
TrackerGeometry
Definition: TrackerGeometry.h:14
reco::PFDisplacedVertexCandidateCollection
std::vector< PFDisplacedVertexCandidate > PFDisplacedVertexCandidateCollection
collection of PFDisplacedVertexCandidate objects
Definition: PFDisplacedVertexCandidateFwd.h:10