CMS 3D CMS Logo

GsfTrackExtra.h
Go to the documentation of this file.
1 #ifndef GsfTrackReco_GsfTrackExtra_h
2 #define GsfTrackReco_GsfTrackExtra_h
3 
9 // #include "DataFormats/Math/interface/Error.h"
12 
13 #include <iostream>
14 
15 namespace reco {
16  class GsfTrackExtra {
17  public:
19  enum { dimension = 5 };
28 
32  GsfTrackExtra(const std::vector<GsfComponent5D>& outerStates,
33  const double& outerLocalPzSign,
34  const std::vector<GsfComponent5D>& innerStates,
35  const double& innerLocalPzSign,
36  const std::vector<GsfTangent>& tangents);
38  double outerStateLocalPzSign() const { return positiveOuterStatePz_ ? 1. : -1.; }
40  std::vector<double> outerStateWeights() const { return weights(outerStates_); }
42  std::vector<LocalParameterVector> outerStateLocalParameters() const { return parameters(outerStates_); }
44  std::vector<LocalCovarianceMatrix> outerStateCovariances() const { return covariances(outerStates_); }
46  double innerStateLocalPzSign() const { return positiveInnerStatePz_ ? 1. : -1.; }
48  std::vector<double> innerStateWeights() const { return weights(innerStates_); }
50  std::vector<LocalParameterVector> innerStateLocalParameters() const { return parameters(innerStates_); }
52  std::vector<LocalCovarianceMatrix> innerStateCovariances() const { return covariances(innerStates_); }
54  inline unsigned int tangentsSize() const { return tangents_.size(); }
56  const std::vector<GsfTangent>& tangents() const { return tangents_; }
58  const Point& tangentPosition(unsigned int index) const { return tangents_[index].position(); }
60  const Vector& tangentMomentum(unsigned int index) const { return tangents_[index].momentum(); }
62  Measurement1D tangentDeltaP(unsigned int index) const { return tangents_[index].deltaP(); }
63 
64  private:
66  std::vector<double> weights(const std::vector<GsfComponent5D>& states) const;
68  std::vector<LocalParameterVector> parameters(const std::vector<GsfComponent5D>& states) const;
70  std::vector<LocalCovarianceMatrix> covariances(const std::vector<GsfComponent5D>& states) const;
71 
72  private:
74  std::vector<GsfComponent5D> outerStates_;
78  std::vector<GsfComponent5D> innerStates_;
82  std::vector<GsfTangent> tangents_;
83  };
84 
85 } // namespace reco
86 
87 #endif
bool positiveInnerStatePz_
positive sign of P_z(local) at innermost State?
Definition: GsfTrackExtra.h:80
const Vector & tangentMomentum(unsigned int index) const
global momentum for tangent
Definition: GsfTrackExtra.h:60
bool positiveOuterStatePz_
positive sign of P_z(local) at outermost State?
Definition: GsfTrackExtra.h:76
const std::vector< GsfTangent > & tangents() const
access to tangent information
Definition: GsfTrackExtra.h:56
std::vector< double > weights(const std::vector< GsfComponent5D > &states) const
extract weights from states
std::vector< GsfComponent5D > innerStates_
states at innermost point
Definition: GsfTrackExtra.h:78
double innerStateLocalPzSign() const
sign of local P_z at innermost state
Definition: GsfTrackExtra.h:46
ErrorD< N >::type type
Definition: Error.h:32
math::Error< dimension >::type LocalCovarianceMatrix
local covariance matrix
Definition: GsfTrackExtra.h:23
Measurement1D tangentDeltaP(unsigned int index) const
deltaP for tangent
Definition: GsfTrackExtra.h:62
std::vector< double > innerStateWeights() const
weights at innermost state
Definition: GsfTrackExtra.h:48
std::vector< LocalParameterVector > parameters(const std::vector< GsfComponent5D > &states) const
extract parameters from states
fixed size vector
Definition: Vector.h:24
const Point & tangentPosition(unsigned int index) const
global position for tangent
Definition: GsfTrackExtra.h:58
math::Vector< dimension >::type LocalParameterVector
local parameter vector
Definition: GsfTrackExtra.h:21
std::vector< GsfComponent5D > outerStates_
states at outermost point
Definition: GsfTrackExtra.h:74
std::vector< LocalCovarianceMatrix > covariances(const std::vector< GsfComponent5D > &states) const
extract covariance matrices from states
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
unsigned int tangentsSize() const
number of objects with information for tangents to the electron track
Definition: GsfTrackExtra.h:54
math::XYZPoint Point
point in the space
Definition: GsfTrackExtra.h:25
std::vector< LocalCovarianceMatrix > outerStateCovariances() const
local covariance matrices at outermost state
Definition: GsfTrackExtra.h:44
std::vector< double > outerStateWeights() const
weights at outermost state
Definition: GsfTrackExtra.h:40
fixed size matrix
Structure Point Contains parameters of Gaussian fits to DMRs.
std::vector< LocalParameterVector > outerStateLocalParameters() const
local parameters at outermost state
Definition: GsfTrackExtra.h:42
std::vector< LocalParameterVector > innerStateLocalParameters() const
local parameters at innermost state
Definition: GsfTrackExtra.h:50
GsfTrackExtra()
default constructor
Definition: GsfTrackExtra.h:30
math::XYZVector Vector
spatial vector
Definition: GsfTrackExtra.h:27
std::vector< GsfTangent > tangents_
information for tangents
Definition: GsfTrackExtra.h:82
double outerStateLocalPzSign() const
sign of local P_z at outermost state
Definition: GsfTrackExtra.h:38
std::vector< LocalCovarianceMatrix > innerStateCovariances() const
local covariance matrices at innermost state
Definition: GsfTrackExtra.h:52