CMS 3D CMS Logo

PFDisplacedVertexHelper.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFTracking_PFDisplacedVertexHelper_h
2 #define RecoParticleFlow_PFTracking_PFDisplacedVertexHelper_h
3 
10 
12 
18 
19  public:
20 
23 
27  };
28 
32  };
33 
36  edm::Handle< reco::BeamSpot > beamSpotHandle);
37 
38 
40  bool isTrackSelected(const reco::Track& trk,
41  const reco::PFDisplacedVertex::VertexTrackType vertexTrackType) const;
42 
45 
47  math::XYZPoint primaryVertex() const { return pvtx_;}
48 
49  void Dump(std::ostream& out = std::cout) const;
50 
51  private:
52 
53 
55  int lambdaCP(const reco::PFDisplacedVertex& v) const;
56  bool isKaonMass(const reco::PFDisplacedVertex& v) const;
57 
58 
60  struct TracksSelector {
63  nChi2_min_(0), nChi2_max_(100),
64  pt_min_(0), dxy_min_(0),
65  nHits_min_(3), nOuterHits_max_(100),
66  quality_("loose"){}
67 
69  bSelectTracks_ = ps.getParameter<bool>("bSelectTracks");
70  nChi2_min_ = ps.getParameter<double>("nChi2_min");
71  nChi2_max_ = ps.getParameter<double>("nChi2_max");
72  pt_min_ = ps.getParameter<double>("pt_min");
73  dxy_min_ = ps.getParameter<double>("dxy_min");
74  nHits_min_ = ps.getParameter<int>("nHits_min");
75  nOuterHits_max_ = ps.getParameter<int>("nOuterHits_max");
77  }
78 
79  bool selectTracks() const {return bSelectTracks_;}
80  double nChi2_min() const {return nChi2_min_;}
81  double nChi2_max() const {return nChi2_max_;}
82  double pt_min() const {return pt_min_;}
83  double dxy_min() const {return dxy_min_;}
84  int nHits_min() const {return nHits_min_;}
85  int nOuterHits_max() const {return nOuterHits_max_;}
86  std::string quality() const {return quality_;}
87  double dxy(const reco::Track& trk) const {return trk.dxy(pvtx_);}
88 
90  double nChi2_min_;
91  double nChi2_max_;
92  double pt_min_;
93  double dxy_min_;
98 
99  void Dump(std::ostream& out = std::cout) const {
100  if(! out ) return;
101  std::string s = bSelectTracks_ ? "On" : "Off";
102 
103  out << "" << std::endl;
104  out << " ==== The TrackerSelector is " << s.data() << " ==== " << std::endl;
105 
106  out << " nChi2_min_ = " << nChi2_min_
107  << " nChi2_max_ = " << nChi2_max_ << std::endl
108  << " pt_min_ = " << pt_min_
109  << " dxy_min_ = " << dxy_min_ << std::endl
110  << " nHits_min_ = " << nHits_min_
111  << " nOuterHits_max_ = " << nOuterHits_max_ << std::endl
112  << " quality = " << quality_ << std::endl;
113 
114  }
115 
116  };
117 
121  bIdentifyVertices_(false),
122  pt_min_(0.2),
123  pt_kink_min_(1.4),
124  looper_eta_max_(0.1),
125  logPrimSec_min_(0.2){
126 
127  double m[] = {0.050, 0.470, 0.525, 0.470, 0.525, 1.107, 1.125, 0.200};
128  std::vector< double > masses(m, m+8);
129  masses_ = masses;
130 
131  double a[] = {60, 40};
132  std::vector< double > angles(a, a+1);
133  angles_ = angles;
134 
135  };
136 
138  bIdentifyVertices_ = ps.getParameter<bool>("bIdentifyVertices");
139  angles_ = ps.getParameter< std::vector<double> >("angles");
140  masses_ = ps.getParameter< std::vector<double> >("masses");
141  pt_min_ = ps.getParameter<double>("pt_min");
142  pt_kink_min_ = ps.getParameter<double>("pt_kink_min");
143  looper_eta_max_ = ps.getParameter<double>("looper_eta_max");
144  logPrimSec_min_ = ps.getParameter<double>("logPrimSec_min");
145  }
146 
147  bool identifyVertices() const {return bIdentifyVertices_;}
148 
149  double angle_max() const {return angles_[0];}
150  double angle_V0Conv_max() const {return angles_[1];}
151 
152  double pt_min() const {return pt_min_;}
153  double pt_kink_min() const {return pt_kink_min_;}
154 
155  double mConv_max() const {return masses_[0];}
156  double mK0_min() const {return masses_[1];}
157  double mK0_max() const {return masses_[2];}
158  double mK_min() const {return masses_[3];}
159  double mK_max() const {return masses_[4];}
160  double mLambda_min() const {return masses_[5];}
161  double mLambda_max() const {return masses_[6];}
162  double mNucl_min() const {return masses_[7];}
163 
164  double looper_eta_max() const {return looper_eta_max_;}
165  double logPrimSec_min() const {return logPrimSec_min_;}
166 
168  std::vector<double> angles_;
169  std::vector<double> masses_;
170  double pt_min_;
171  double pt_kink_min_;
174 
175  void Dump(std::ostream& out = std::cout) const {
176  if(! out ) return;
177  std::string s = bIdentifyVertices_ ? "On" : "Off";
178  out << "" << std::endl;
179  out << " ==== The Vertex Identifier is " << s.data() << " ==== " << std::endl;
180 
181  out << " pt_min_ = " << pt_min_
182  << " pt_kink_min_ = " << pt_kink_min_ << std::endl
183  << " looper_eta_max_ = " << looper_eta_max_
184  << " log10(P_Prim/P_Sec)_min " << logPrimSec_min_ << std::endl
185  << " Mass_conv > " << mConv_max() << std::endl
186  << " " << mK0_min() << " < Mass_K0 < " << mK0_max() << std::endl
187  << " " << mK_min() << " < Mass_K+- < " << mK_max() << std::endl
188  << " " << mLambda_min() << " < Mass_Lambda < " << mLambda_max() << std::endl
189  << " Mass_Nucl_ee > " << mNucl_min() << std::endl
190  << " angle_max = " << angle_max()
191  << " angle_V0Conv_max = " << angle_V0Conv_max() << std::endl;
192 
193  }
194 
195 
196 
197  };
198 
199 
204 
206  static const double pion_mass2;
207  static const double muon_mass2;
208  static const double proton_mass2;
209 
210 };
211 
212 #endif
213 
214 
T getParameter(std::string const &) const
void setVertexIdentifier(const edm::ParameterSet &ps)
Set Vertex identifier parameters.
void setTracksSelector(const edm::ParameterSet &ps)
Set Tracks selector parameters.
void Dump(std::ostream &out=std::cout) const
static const double proton_mass2
void Dump(std::ostream &out=std::cout) const
void setPrimaryVertex(edm::Handle< reco::VertexCollection > mainVertexHandle, edm::Handle< reco::BeamSpot > beamSpotHandle)
Update the primary vertex information.
bool isKaonMass(const reco::PFDisplacedVertex &v) const
bool isTrackSelected(const reco::Track &trk, const reco::PFDisplacedVertex::VertexTrackType vertexTrackType) const
Select tracks tool.
reco::PFDisplacedVertex::VertexType identifyVertex(const reco::PFDisplacedVertex &v) const
Vertex identification tool.
Displaced Vertex Finder Algorithm.
static const double pion_mass2
Masses2 taken from PDG.
int lambdaCP(const reco::PFDisplacedVertex &v) const
Tools used to calculate quantities for vertex identification.
Block of elements.
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
void Dump(std::ostream &out=std::cout) const
math::XYZPoint primaryVertex() const
Set Vertex direction using the primary vertex.
double a
Definition: hdecay.h:121
double dxy(const reco::Track &trk) const
math::XYZPoint pvtx_
Primary vertex information updated for each event.
Tool which store the information for the tracks selection.
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:591
Tool which store the information for the vertex identification.
struct @601 masses_