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
reco::GsfTrackExtra::Point
math::XYZPoint Point
point in the space
Definition: GsfTrackExtra.h:25
reco::GsfTrackExtra::innerStateWeights
std::vector< double > innerStateWeights() const
weights at innermost state
Definition: GsfTrackExtra.h:48
Measurement1D
Definition: Measurement1D.h:11
GsfTangent.h
Vector.h
reco::GsfTrackExtra::GsfTrackExtra
GsfTrackExtra()
default constructor
Definition: GsfTrackExtra.h:30
reco::GsfTrackExtra::innerStateLocalParameters
std::vector< LocalParameterVector > innerStateLocalParameters() const
local parameters at innermost state
Definition: GsfTrackExtra.h:50
reco::GsfTrackExtra::Vector
math::XYZVector Vector
spatial vector
Definition: GsfTrackExtra.h:27
reco::GsfTrackExtra::weights
std::vector< double > weights(const std::vector< GsfComponent5D > &states) const
extract weights from states
Definition: GsfTrackExtra.cc:15
reco::GsfTrackExtra::LocalParameterVector
math::Vector< dimension >::type LocalParameterVector
local parameter vector
Definition: GsfTrackExtra.h:21
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
reco::GsfTrackExtra::outerStateLocalPzSign
double outerStateLocalPzSign() const
sign of local P_z at outermost state
Definition: GsfTrackExtra.h:38
reco::GsfTrackExtra::tangentMomentum
const Vector & tangentMomentum(unsigned int index) const
global momentum for tangent
Definition: GsfTrackExtra.h:60
reco::GsfTrackExtra::positiveOuterStatePz_
bool positiveOuterStatePz_
positive sign of P_z(local) at outermost State?
Definition: GsfTrackExtra.h:76
Point
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::GsfTrackExtra::outerStateLocalParameters
std::vector< LocalParameterVector > outerStateLocalParameters() const
local parameters at outermost state
Definition: GsfTrackExtra.h:42
reco::GsfTrackExtra::outerStateCovariances
std::vector< LocalCovarianceMatrix > outerStateCovariances() const
local covariance matrices at outermost state
Definition: GsfTrackExtra.h:44
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
math::Vector
fixed size vector
Definition: Vector.h:24
reco::GsfTrackExtra::tangents
const std::vector< GsfTangent > & tangents() const
access to tangent information
Definition: GsfTrackExtra.h:56
reco::GsfTrackExtra::tangents_
std::vector< GsfTangent > tangents_
information for tangents
Definition: GsfTrackExtra.h:82
reco::GsfTrackExtra::parameters
std::vector< LocalParameterVector > parameters(const std::vector< GsfComponent5D > &states) const
extract parameters from states
Definition: GsfTrackExtra.cc:24
reco::GsfTrackExtra::LocalCovarianceMatrix
math::Error< dimension >::type LocalCovarianceMatrix
local covariance matrix
Definition: GsfTrackExtra.h:23
reco::GsfTrackExtra::innerStateCovariances
std::vector< LocalCovarianceMatrix > innerStateCovariances() const
local covariance matrices at innermost state
Definition: GsfTrackExtra.h:52
reco::GsfTrackExtra::tangentDeltaP
Measurement1D tangentDeltaP(unsigned int index) const
deltaP for tangent
Definition: GsfTrackExtra.h:62
reco::GsfTrackExtra::tangentPosition
const Point & tangentPosition(unsigned int index) const
global position for tangent
Definition: GsfTrackExtra.h:58
math::Error::type
ErrorD< N >::type type
Definition: Error.h:32
reco::GsfTrackExtra::dimension
Definition: GsfTrackExtra.h:19
reco::GsfTrackExtra::tangentsSize
unsigned int tangentsSize() const
number of objects with information for tangents to the electron track
Definition: GsfTrackExtra.h:54
Point3D.h
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
reco::GsfTrackExtra
Definition: GsfTrackExtra.h:16
reco::GsfTrackExtra::outerStateWeights
std::vector< double > outerStateWeights() const
weights at outermost state
Definition: GsfTrackExtra.h:40
reco::GsfTrackExtra::innerStates_
std::vector< GsfComponent5D > innerStates_
states at innermost point
Definition: GsfTrackExtra.h:78
reco::GsfTrackExtra::covariances
std::vector< LocalCovarianceMatrix > covariances(const std::vector< GsfComponent5D > &states) const
extract covariance matrices from states
Definition: GsfTrackExtra.cc:34
Vector3D.h
reco::GsfTrackExtra::outerStates_
std::vector< GsfComponent5D > outerStates_
states at outermost point
Definition: GsfTrackExtra.h:74
reco::GsfTrackExtra::positiveInnerStatePz_
bool positiveInnerStatePz_
positive sign of P_z(local) at innermost State?
Definition: GsfTrackExtra.h:80
reco::GsfTrackExtra::innerStateLocalPzSign
double innerStateLocalPzSign() const
sign of local P_z at innermost state
Definition: GsfTrackExtra.h:46
GsfComponent5D.h