CMS 3D CMS Logo

TransientVertex.h
Go to the documentation of this file.
1 #ifndef _Vtx_TransientVertex_H_
2 #define _Vtx_TransientVertex_H_
3 
11 
12 #include <vector>
13 #include <map>
14 
18 class TransientVertex { //: public reco::Vertex {
19 
20 public:
21  typedef std::map<reco::TransientTrack, float> TransientTrackToFloatMap;
22 
26 
34  const GlobalError& posError,
35  const std::vector<reco::TransientTrack>& tracks,
36  float chi2);
38  const double time,
39  const GlobalError& posError,
40  const std::vector<reco::TransientTrack>& tracks,
41  float chi2);
42 
49  const GlobalError& posError,
50  const std::vector<reco::TransientTrack>& tracks,
51  float chi2,
52  float ndf);
54  const double time,
55  const GlobalError& posError,
56  const std::vector<reco::TransientTrack>& tracks,
57  float chi2,
58  float ndf);
59 
66  TransientVertex(const GlobalPoint& priorPos,
67  const GlobalError& priorErr,
68  const GlobalPoint& pos,
69  const GlobalError& posError,
70  const std::vector<reco::TransientTrack>& tracks,
71  float chi2);
72  TransientVertex(const GlobalPoint& priorPos,
73  const double priorTime,
74  const GlobalError& priorErr,
75  const GlobalPoint& pos,
76  const double time,
77  const GlobalError& posError,
78  const std::vector<reco::TransientTrack>& tracks,
79  float chi2);
80 
86  TransientVertex(const GlobalPoint& priorPos,
87  const GlobalError& priorErr,
88  const GlobalPoint& pos,
89  const GlobalError& posError,
90  const std::vector<reco::TransientTrack>& tracks,
91  float chi2,
92  float ndf);
93  TransientVertex(const GlobalPoint& priorPos,
94  const double priorTime,
95  const GlobalError& priorErr,
96  const GlobalPoint& pos,
97  const double time,
98  const GlobalError& posError,
99  const std::vector<reco::TransientTrack>& tracks,
100  float chi2,
101  float ndf);
102 
108  TransientVertex(const GlobalPoint& priorPos,
109  const GlobalError& priorErr,
110  const double priorTime,
111  const double priorTimeErr,
112  const GlobalPoint& pos,
113  const GlobalError& posError,
114  const double time,
115  const double timeErr,
116  const std::vector<reco::TransientTrack>& tracks,
117  float chi2,
118  float ndf);
119 
126  TransientVertex(const VertexState& state, const std::vector<reco::TransientTrack>& tracks, float chi2);
127 
133  TransientVertex(const VertexState& state, const std::vector<reco::TransientTrack>& tracks, float chi2, float ndf);
134 
142  const VertexState& state,
143  const std::vector<reco::TransientTrack>& tracks,
144  float chi2);
145 
152  const VertexState& state,
153  const std::vector<reco::TransientTrack>& tracks,
154  float chi2,
155  float ndf);
156 
157  // /** Constructor defining the RecVertex by its 3D position
158  // * and position uncertainty, its associated tracks, its chi-squared
159  // * and its number of degrees of freedom, and the track weights.
160  // * The ndf can be a float.
161  // */
162  // TransientVertex(const VertexState & state,
163  // const std::vector<reco::TransientTrack> & tracks, float chi2, float ndf,
164  // const reco::TransientTrackToFloatMap & weightMap);
165 
168  VertexState const& vertexState() const { return theVertexState; }
172  }
176  }
177  double time() const { return theVertexState.time(); }
178  double timeError() const { return theVertexState.timeError(); }
179  double priorTime() const { return thePriorVertexState.time(); }
180  double priorTimeError() const { return thePriorVertexState.timeError(); }
181  bool hasPrior() const { return withPrior; }
182 
183  // /** Implements method of abstract Vertex.
184  // * Returns track pointer container by value
185  // */
186  // Vertex::TrackPtrContainer tracks() const;
187 
188  float totalChiSquared() const { return theChi2; }
189  float normalisedChiSquared() const { return totalChiSquared() / degreesOfFreedom(); }
190  float degreesOfFreedom() const { return theNDF; }
191 
195  bool isValid() const { return vertexValid; }
196 
200  std::vector<reco::TransientTrack> const& originalTracks() const { return theOriginalTracks; }
201 
206  bool hasRefittedTracks() const { return withRefittedTracks; }
207 
211  std::vector<reco::TransientTrack> const& refittedTracks() const { return theRefittedTracks; }
212 
219 
225 
228  void refittedTracks(const std::vector<reco::TransientTrack>& refittedTracks);
229 
233  bool hasTrackWeight() const { return theWeightMapIsAvailable; }
234 
242  float trackWeight(const reco::TransientTrack& track) const;
243 
245 
246  void weightMap(const TransientTrackToFloatMap& theMap);
247 
252 
259  void tkToTkCovariance(const TTtoTTmap& covMap);
260 
261  operator reco::Vertex() const;
262  operator reco::VertexCompositePtrCandidate() const;
263 
264 private:
267 
268  // void addTracks(const std::vector<reco::TransientTrack> & tracks);
269 
270  std::vector<reco::TransientTrack> theOriginalTracks;
271  std::vector<reco::TransientTrack> theRefittedTracks;
272 
273  float theChi2;
274  float theNDF;
280 };
281 
282 #endif
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
TransientVertex::hasRefittedTracks
bool hasRefittedTracks() const
Definition: TransientVertex.h:206
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
TransientVertex::priorTime
double priorTime() const
Definition: TransientVertex.h:179
TransientVertex::tkToTkCovarianceIsAvailable
bool tkToTkCovarianceIsAvailable() const
Definition: TransientVertex.h:251
TransientVertex::refittedTracks
std::vector< reco::TransientTrack > const & refittedTracks() const
Definition: TransientVertex.h:211
TransientVertex::hasPrior
bool hasPrior() const
Definition: TransientVertex.h:181
TransientVertex::priorError
GlobalError priorError() const
Definition: TransientVertex.h:174
TransientVertex::isValid
bool isValid() const
Definition: TransientVertex.h:195
TransientVertex::refittedTrack
reco::TransientTrack refittedTrack(const reco::TransientTrack &track) const
Definition: TransientVertex.cc:291
pos
Definition: PixelAliasList.h:18
TransientVertex::position
GlobalPoint position() const
Definition: TransientVertex.h:169
AlgebraicMatrix33
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33
Definition: AlgebraicROOTObjects.h:41
TransientVertex::theOriginalTracks
std::vector< reco::TransientTrack > theOriginalTracks
Definition: TransientVertex.h:270
TransientTrack.h
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
reco::VertexCompositePtrCandidate
Definition: VertexCompositePtrCandidate.h:16
TransientVertex::weightMap
TransientTrackToFloatMap weightMap() const
Definition: TransientVertex.h:244
TransientVertex::timeError
double timeError() const
Definition: TransientVertex.h:178
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
TransientVertex::theWeightMapIsAvailable
bool theWeightMapIsAvailable
Definition: TransientVertex.h:276
TransientVertex::theWeightMap
TransientTrackToFloatMap theWeightMap
Definition: TransientVertex.h:279
TransientVertex::theCovMap
TTtoTTmap theCovMap
Definition: TransientVertex.h:278
TransientVertex::vertexState
VertexState const & vertexState() const
Definition: TransientVertex.h:168
TransientVertex::priorPosition
GlobalPoint priorPosition() const
Definition: TransientVertex.h:173
TransientVertex::theRefittedTracks
std::vector< reco::TransientTrack > theRefittedTracks
Definition: TransientVertex.h:271
VertexState::error
GlobalError error() const
Definition: VertexState.h:64
VertexCompositePtrCandidate.h
VertexState.h
Point3DBase< float, GlobalTag >
TransientVertex::priorTimeError
double priorTimeError() const
Definition: TransientVertex.h:180
TransientVertex::hasTrackWeight
bool hasTrackWeight() const
Definition: TransientVertex.h:233
TransientVertex::thePriorVertexState
VertexState thePriorVertexState
Definition: TransientVertex.h:265
Vertex.h
TransientVertex::TransientTrackToFloatMap
std::map< reco::TransientTrack, float > TransientTrackToFloatMap
Definition: TransientVertex.h:21
TransientVertex::TransientVertex
TransientVertex()
Definition: TransientVertex.cc:11
TransientVertex::tkToTkCovariance
AlgebraicMatrix33 tkToTkCovariance(const reco::TransientTrack &t1, const reco::TransientTrack &t2) const
Definition: TransientVertex.cc:254
VertexState::timeError
double timeError() const
Definition: VertexState.h:75
VertexState::is4D
bool is4D() const
Definition: VertexState.h:95
GlobalError.h
TransientVertex::originalTrack
reco::TransientTrack originalTrack(const reco::TransientTrack &refTrack) const
Definition: TransientVertex.cc:281
TTtoTTmap.h
GlobalErrorBase< double, ErrorMatrixTag >
TransientVertex
Definition: TransientVertex.h:18
TransientVertex::withPrior
bool withPrior
Definition: TransientVertex.h:276
TransientVertex::theNDF
float theNDF
Definition: TransientVertex.h:274
HltBtagValidation_cff.Vertex
Vertex
Definition: HltBtagValidation_cff.py:32
reco::TransientTrack
Definition: TransientTrack.h:19
TransientVertex::theCovMapAvailable
bool theCovMapAvailable
Definition: TransientVertex.h:276
TransientVertex::vertexValid
bool vertexValid
Definition: TransientVertex.h:275
TransientVertex::trackWeight
float trackWeight(const reco::TransientTrack &track) const
Definition: TransientVertex.cc:241
VertexState
Definition: VertexState.h:13
TransientVertex::originalTracks
std::vector< reco::TransientTrack > const & originalTracks() const
Definition: TransientVertex.h:200
TransientVertex::time
double time() const
Definition: TransientVertex.h:177
VertexState::position
GlobalPoint position() const
Definition: VertexState.h:62
bookConverter.prior
prior
Definition: bookConverter.py:146
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
TTtoTTmap
std::map< reco::TransientTrack, TTmap > TTtoTTmap
Definition: TTtoTTmap.h:12
TransientVertex::theVertexState
VertexState theVertexState
Definition: TransientVertex.h:266
VertexState::time
double time() const
Definition: VertexState.h:73
ntuplemaker.posError
posError
Definition: ntuplemaker.py:300
TransientVertex::withRefittedTracks
bool withRefittedTracks
Definition: TransientVertex.h:277
GlobalPoint.h
TransientVertex::theChi2
float theChi2
Definition: TransientVertex.h:273
TransientVertex::positionError
GlobalError positionError() const
Definition: TransientVertex.h:170
VertexState::error4D
GlobalError error4D() const
Definition: VertexState.h:67