CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfTrack.h
Go to the documentation of this file.
1 #ifndef GsfTrackReco_GsfTrack_h
2 #define GsfTrackReco_GsfTrack_h
3 
8 
9 namespace reco {
10 
11  class GsfTrack : public Track {
12  public:
14  enum { dimensionMode = 3 };
22  GsfTrack();
26  GsfTrack( double chi2, double ndof, const Point &, const Vector &, int charge,
27  const CovarianceMatrix & );
29  void setGsfExtra( const GsfTrackExtraRef & ref ) { gsfExtra_ = ref; }
31  const GsfTrackExtraRef & gsfExtra() const { return gsfExtra_; }
32 
34  void setMode (int chargeMode, const Vector& momentumMode,
35  const CovarianceMatrixMode& covarianceMode);
36 
38  int chargeMode() const { return chargeMode_; }
40  double qoverpMode() const { return chargeMode() / pMode(); }
42  double thetaMode() const { return momentumMode_.theta(); }
44  double lambdaMode() const { return M_PI/2 - momentumMode_.theta(); }
46  double pMode() const { return momentumMode_.R(); }
48  double ptMode() const { return sqrt( momentumMode_.Perp2() ); }
50  double pxMode() const { return momentumMode_.x(); }
52  double pyMode() const { return momentumMode_.y(); }
54  double pzMode() const { return momentumMode_.z(); }
56  double phiMode() const { return momentumMode_.Phi(); }
58  double etaMode() const { return momentumMode_.Eta(); }
59 
61  const Vector & momentumMode() const { return momentumMode_; }
62 
64  ParameterVectorMode parametersMode() const {
66  }
68  CovarianceMatrixMode covarianceMode() const { CovarianceMatrixMode m; fill( m ); return m; }
69 
71  double parameterMode(int i) const { return parametersMode()[i]; }
73  double covarianceMode( int i, int j ) const { return covarianceMode_[ covIndex( i, j ) ]; }
75  double errorMode( int i ) const { return sqrt( covarianceMode_[ covIndex( i, i ) ] ); }
76 
78  double qoverpModeError() const { return errorMode( i_qoverp ); }
80  double ptModeError() const {
81  return (chargeMode()!=0) ? sqrt(
84  + pzMode()*pzMode() * covarianceMode(i_lambda,i_lambda) ) : 1.e6;
85  }
87  double thetaModeError() const { return errorMode( i_lambda ); }
89  double lambdaModeError() const { return errorMode( i_lambda ); }
91  double etaModeError() const { return errorMode( i_lambda ) * pMode()/ptMode(); }
93  double phiModeError() const { return errorMode( i_phi ); }
94 
95  private:
97  CovarianceMatrixMode & fill( CovarianceMatrixMode & v ) const;
98 
99 
100  private:
109 
110  };
111 
112 }
113 
114 #endif
double phiModeError() const
error on phi from mode
Definition: GsfTrack.h:93
int chargeMode() const
track electric charge from mode
Definition: GsfTrack.h:38
char chargeMode_
electric charge from mode
Definition: GsfTrack.h:104
int i
Definition: DBlmapReader.cc:9
double pyMode() const
y coordinate of momentum vector from mode
Definition: GsfTrack.h:52
static index covIndex(index i, index j)
covariance matrix index in array
Definition: TrackBase.h:325
const Vector & momentumMode() const
track momentum vector from mode
Definition: GsfTrack.h:61
math::Error< dimensionMode >::type CovarianceMatrixMode
3 parameter covariance matrix (momentum part) from mode
Definition: GsfTrack.h:20
double pMode() const
momentum vector magnitude from mode
Definition: GsfTrack.h:46
double lambdaMode() const
Lambda angle from mode.
Definition: GsfTrack.h:44
void setGsfExtra(const GsfTrackExtraRef &ref)
set reference to GSF &quot;extra&quot; object
Definition: GsfTrack.h:29
double thetaModeError() const
error on theta from mode
Definition: GsfTrack.h:87
CovarianceMatrixMode & fill(CovarianceMatrixMode &v) const
fill 3x3 SMatrix
Definition: GsfTrack.cc:40
ErrorD< N >::type type
Definition: Error.h:29
GsfTrack()
default constructor
Definition: GsfTrack.cc:4
double qoverpMode() const
q/p from mode
Definition: GsfTrack.h:40
double ptModeError() const
error on Pt (set to 1000 TeV if charge==0 for safety) from mode
Definition: GsfTrack.h:80
void setMode(int chargeMode, const Vector &momentumMode, const CovarianceMatrixMode &covarianceMode)
set mode parameters
Definition: GsfTrack.cc:27
fixed size vector
Definition: Vector.h:22
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:105
Vector momentumMode_
momentum vector from mode
Definition: GsfTrack.h:106
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:107
T sqrt(T t)
Definition: SSEVec.h:48
float covarianceMode_[covarianceSizeMode]
3x3 momentum part of covariance (in q/p, lambda, phi)
Definition: GsfTrack.h:108
double pzMode() const
z coordinate of momentum vector from mode
Definition: GsfTrack.h:54
int j
Definition: DBlmapReader.cc:9
double parameterMode(int i) const
i-th parameter ( i = 0, ... 2 ) from mode
Definition: GsfTrack.h:71
math::XYZPoint Point
point in the space
Definition: TrackBase.h:74
GsfTrackExtraRef gsfExtra_
reference to GSF &quot;extra&quot; extension
Definition: GsfTrack.h:102
double errorMode(int i) const
error on specified element from mode
Definition: GsfTrack.h:75
#define M_PI
Definition: BFit3D.cc:3
const GsfTrackExtraRef & gsfExtra() const
reference to &quot;extra&quot; object
Definition: GsfTrack.h:31
double thetaMode() const
polar angle from mode
Definition: GsfTrack.h:42
double qoverpModeError() const
error on signed transverse curvature from mode
Definition: GsfTrack.h:78
double pxMode() const
x coordinate of momentum vector from mode
Definition: GsfTrack.h:50
CovarianceMatrixMode covarianceMode() const
return track covariance matrix from mode
Definition: GsfTrack.h:68
double etaMode() const
pseudorapidity of momentum vector from mode
Definition: GsfTrack.h:58
double covarianceMode(int i, int j) const
(i,j)-th element of covarianve matrix ( i, j = 0, ... 2 ) from mode
Definition: GsfTrack.h:73
double phiMode() const
azimuthal angle of momentum vector from mode
Definition: GsfTrack.h:56
int charge() const
track electric charge
Definition: TrackBase.h:111
double lambdaModeError() const
error on lambda from mode
Definition: GsfTrack.h:89
double etaModeError() const
error on eta from mode
Definition: GsfTrack.h:91
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:72
double ptMode() const
track transverse momentum from mode
Definition: GsfTrack.h:48
ParameterVectorMode parametersMode() const
Track parameters with one-to-one correspondence to the covariance matrix from mode.
Definition: GsfTrack.h:64
math::Vector< dimensionMode >::type ParameterVectorMode
parameter vector (momentum part) from mode
Definition: GsfTrack.h:18