CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TransientVertex.h
Go to the documentation of this file.
1 #ifndef _Vtx_TransientVertex_H_
2 #define _Vtx_TransientVertex_H_
3 
10 
11 #include <vector>
12 #include <map>
13 
17 class TransientVertex {//: public reco::Vertex {
18 
19 public:
20 
21  typedef std::map<reco::TransientTrack, float> TransientTrackToFloatMap;
22 
26 
33  TransientVertex(const GlobalPoint & pos, const GlobalError & posError,
34  const std::vector<reco::TransientTrack> & tracks, float chi2);
35 
41  TransientVertex(const GlobalPoint & pos, const GlobalError & posError,
42  const std::vector<reco::TransientTrack> & tracks, float chi2, float ndf);
43 
50  TransientVertex(const GlobalPoint & priorPos, const GlobalError & priorErr,
51  const GlobalPoint & pos, const GlobalError & posError,
52  const std::vector<reco::TransientTrack> & tracks, float chi2);
53 
59  TransientVertex(const GlobalPoint & priorPos, const GlobalError & priorErr,
60  const GlobalPoint & pos, const GlobalError & posError,
61  const std::vector<reco::TransientTrack> & tracks, float chi2, float ndf);
62 
70  const std::vector<reco::TransientTrack> & tracks, float chi2);
71 
78  const std::vector<reco::TransientTrack> & tracks, float chi2, float ndf);
79 
87  const VertexState & state,
88  const std::vector<reco::TransientTrack> & tracks, float chi2);
89 
96  const VertexState & state,
97  const std::vector<reco::TransientTrack> & tracks, float chi2, float ndf);
98 
99 
100 // /** Constructor defining the RecVertex by its 3D position
101 // * and position uncertainty, its associated tracks, its chi-squared
102 // * and its number of degrees of freedom, and the track weights.
103 // * The ndf can be a float.
104 // */
105 // TransientVertex(const VertexState & state,
106 // const std::vector<reco::TransientTrack> & tracks, float chi2, float ndf,
107 // const reco::TransientTrackToFloatMap & weightMap);
108 
109 
117  bool hasPrior() const { return withPrior; }
118 
119 // /** Implements method of abstract Vertex.
120 // * Returns track pointer container by value
121 // */
122 // Vertex::TrackPtrContainer tracks() const;
123 
124  float totalChiSquared() const { return theChi2; }
125  float normalisedChiSquared() const {
126  return totalChiSquared() / degreesOfFreedom();
127  }
128  float degreesOfFreedom() const { return theNDF; }
129 
133  bool isValid() const {
134  return vertexValid;
135  }
136 
140  std::vector<reco::TransientTrack> originalTracks() const {
141  return theOriginalTracks;
142  }
143 
144 
149  bool hasRefittedTracks() const { return withRefittedTracks; }
150 
151 
155  std::vector<reco::TransientTrack> refittedTracks() const {
156  return theRefittedTracks;
157  }
158 
165 
171 
172 
175  void refittedTracks(const std::vector<reco::TransientTrack> & refittedTracks);
176 
180  bool hasTrackWeight() const { return theWeightMapIsAvailable; }
181 
182 
190  float trackWeight(const reco::TransientTrack & track) const;
191 
193 
194  void weightMap(const TransientTrackToFloatMap & theMap);
195 
200 
207  const reco::TransientTrack& t2) const;
208  void tkToTkCovariance(const TTtoTTmap &covMap);
209 
210  operator reco::Vertex() const;
211 
212 private:
213 
214 
217 
218 // void addTracks(const std::vector<reco::TransientTrack> & tracks);
219 
220  std::vector<reco::TransientTrack> theOriginalTracks;
221  std::vector<reco::TransientTrack> theRefittedTracks;
222 
223 
224  float theChi2;
225  float theNDF;
231 
232 };
233 
234 #endif
GlobalError positionError() const
GlobalError priorError() const
float totalChiSquared() const
std::map< reco::TransientTrack, float > TransientTrackToFloatMap
bool hasRefittedTracks() const
std::map< reco::TransientTrack, TTmap > TTtoTTmap
Definition: TTtoTTmap.h:12
GlobalPoint position() const
Definition: VertexState.h:29
std::vector< reco::TransientTrack > originalTracks() const
reco::TransientTrack refittedTrack(const reco::TransientTrack &track) const
float normalisedChiSquared() const
VertexState thePriorVertexState
auto const T2 &decltype(t1.eta()) t2
Definition: deltaR.h:18
float degreesOfFreedom() const
TransientTrackToFloatMap theWeightMap
GlobalPoint position() const
bool hasPrior() const
VertexState vertexState() const
std::vector< reco::TransientTrack > theOriginalTracks
float trackWeight(const reco::TransientTrack &track) const
std::vector< reco::TransientTrack > refittedTracks() const
bool hasTrackWeight() const
reco::TransientTrack originalTrack(const reco::TransientTrack &refTrack) const
tuple tracks
Definition: testEve_cfg.py:39
char state
Definition: procUtils.cc:75
dictionary prior
VertexState theVertexState
GlobalError error() const
Definition: VertexState.h:34
GlobalPoint priorPosition() const
std::vector< reco::TransientTrack > theRefittedTracks
AlgebraicMatrix33 tkToTkCovariance(const reco::TransientTrack &t1, const reco::TransientTrack &t2) const
bool isValid() const
TransientTrackToFloatMap weightMap() const
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33
bool tkToTkCovarianceIsAvailable() const