test
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 
11 
12 #include <vector>
13 #include <map>
14 
18 class TransientVertex {//: public reco::Vertex {
19 
20 public:
21 
22  typedef std::map<reco::TransientTrack, float> TransientTrackToFloatMap;
23 
27 
34  TransientVertex(const GlobalPoint & pos, const GlobalError & posError,
35  const std::vector<reco::TransientTrack> & tracks, float chi2);
36 
42  TransientVertex(const GlobalPoint & pos, const GlobalError & posError,
43  const std::vector<reco::TransientTrack> & tracks, float chi2, float ndf);
44 
51  TransientVertex(const GlobalPoint & priorPos, const GlobalError & priorErr,
52  const GlobalPoint & pos, const GlobalError & posError,
53  const std::vector<reco::TransientTrack> & tracks, float chi2);
54 
60  TransientVertex(const GlobalPoint & priorPos, const GlobalError & priorErr,
61  const GlobalPoint & pos, const GlobalError & posError,
62  const std::vector<reco::TransientTrack> & tracks, float chi2, float ndf);
63 
70  TransientVertex(const VertexState & state,
71  const std::vector<reco::TransientTrack> & tracks, float chi2);
72 
78  TransientVertex(const VertexState & state,
79  const std::vector<reco::TransientTrack> & tracks, float chi2, float ndf);
80 
88  const VertexState & state,
89  const std::vector<reco::TransientTrack> & tracks, float chi2);
90 
97  const VertexState & state,
98  const std::vector<reco::TransientTrack> & tracks, float chi2, float ndf);
99 
100 
101 // /** Constructor defining the RecVertex by its 3D position
102 // * and position uncertainty, its associated tracks, its chi-squared
103 // * and its number of degrees of freedom, and the track weights.
104 // * The ndf can be a float.
105 // */
106 // TransientVertex(const VertexState & state,
107 // const std::vector<reco::TransientTrack> & tracks, float chi2, float ndf,
108 // const reco::TransientTrackToFloatMap & weightMap);
109 
110 
113  VertexState const & vertexState() const { return theVertexState; }
118  bool hasPrior() const { return withPrior; }
119 
120 // /** Implements method of abstract Vertex.
121 // * Returns track pointer container by value
122 // */
123 // Vertex::TrackPtrContainer tracks() const;
124 
125  float totalChiSquared() const { return theChi2; }
126  float normalisedChiSquared() const {
127  return totalChiSquared() / degreesOfFreedom();
128  }
129  float degreesOfFreedom() const { return theNDF; }
130 
134  bool isValid() const {
135  return vertexValid;
136  }
137 
141  std::vector<reco::TransientTrack> const & originalTracks() const {
142  return theOriginalTracks;
143  }
144 
145 
150  bool hasRefittedTracks() const { return withRefittedTracks; }
151 
152 
156  std::vector<reco::TransientTrack> const & refittedTracks() const {
157  return theRefittedTracks;
158  }
159 
166 
172 
173 
176  void refittedTracks(const std::vector<reco::TransientTrack> & refittedTracks);
177 
181  bool hasTrackWeight() const { return theWeightMapIsAvailable; }
182 
183 
191  float trackWeight(const reco::TransientTrack & track) const;
192 
194 
195  void weightMap(const TransientTrackToFloatMap & theMap);
196 
201 
208  const reco::TransientTrack& t2) const;
209  void tkToTkCovariance(const TTtoTTmap &covMap);
210 
211  operator reco::Vertex() const;
212  operator reco::VertexCompositePtrCandidate() const;
213 
214 private:
215 
216 
219 
220 // void addTracks(const std::vector<reco::TransientTrack> & tracks);
221 
222  std::vector<reco::TransientTrack> theOriginalTracks;
223  std::vector<reco::TransientTrack> theRefittedTracks;
224 
225 
226  float theChi2;
227  float theNDF;
233 
234 };
235 
236 #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:50
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
std::vector< reco::TransientTrack > theOriginalTracks
float trackWeight(const reco::TransientTrack &track) const
bool hasTrackWeight() const
reco::TransientTrack originalTrack(const reco::TransientTrack &refTrack) const
tuple tracks
Definition: testEve_cfg.py:39
dictionary prior
VertexState theVertexState
GlobalError error() const
Definition: VertexState.h:55
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
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33
bool tkToTkCovarianceIsAvailable() const