CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
33  TransientVertex(const GlobalPoint& pos,
34  const GlobalError& posError,
35  const std::vector<reco::TransientTrack>& tracks,
36  float chi2);
37  TransientVertex(const GlobalPoint& pos,
38  const double time,
39  const GlobalError& posError,
40  const std::vector<reco::TransientTrack>& tracks,
41  float chi2);
42 
48  TransientVertex(const GlobalPoint& pos,
49  const GlobalError& posError,
50  const std::vector<reco::TransientTrack>& tracks,
51  float chi2,
52  float ndf);
53  TransientVertex(const GlobalPoint& pos,
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
GlobalError positionError() const
double priorTime() const
GlobalError priorError() const
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33
float totalChiSquared() const
std::map< reco::TransientTrack, float > TransientTrackToFloatMap
auto const & tracks
cannot be loose
bool hasRefittedTracks() const
std::map< reco::TransientTrack, TTmap > TTtoTTmap
Definition: TTtoTTmap.h:12
GlobalPoint position() const
Definition: VertexState.h:62
reco::TransientTrack refittedTrack(const reco::TransientTrack &track) const
float normalisedChiSquared() const
VertexState thePriorVertexState
std::vector< reco::TransientTrack > const & originalTracks() const
float degreesOfFreedom() const
TransientTrackToFloatMap theWeightMap
GlobalPoint position() const
bool hasPrior() const
double time() const
Definition: VertexState.h:73
double timeError() const
Definition: VertexState.h:75
double priorTimeError() const
std::vector< reco::TransientTrack > theOriginalTracks
float trackWeight(const reco::TransientTrack &track) const
GlobalError error4D() const
Definition: VertexState.h:67
bool hasTrackWeight() const
reco::TransientTrack originalTrack(const reco::TransientTrack &refTrack) const
dictionary prior
double time() const
double timeError() const
VertexState theVertexState
bool is4D() const
Definition: VertexState.h:95
GlobalError error() const
Definition: VertexState.h:64
GlobalPoint priorPosition() const
std::vector< reco::TransientTrack > const & refittedTracks() const
std::vector< reco::TransientTrack > theRefittedTracks
VertexState const & vertexState() const
AlgebraicMatrix33 tkToTkCovariance(const reco::TransientTrack &t1, const reco::TransientTrack &t2) const
bool isValid() const
TransientTrackToFloatMap weightMap() const
bool tkToTkCovarianceIsAvailable() const