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 
9 
10 namespace reco {
11 
12  class GsfTrack : public Track {
13  public:
15  enum { dimensionMode = 3 };
23  GsfTrack();
27  GsfTrack( double chi2, double ndof, const Point &, const Vector &, int charge,
28  const CovarianceMatrix & );
30  void setGsfExtra( const GsfTrackExtraRef & ref ) { gsfExtra_ = ref; }
32  const GsfTrackExtraRef & gsfExtra() const { return gsfExtra_; }
33 
35  void setMode (int chargeMode, const Vector& momentumMode,
36  const CovarianceMatrixMode& covarianceMode);
37 
39  int chargeMode() const { return chargeMode_; }
41  double qoverpMode() const { return chargeMode() / pMode(); }
43  double thetaMode() const { return momentumMode_.theta(); }
45  double lambdaMode() const { return M_PI/2 - momentumMode_.theta(); }
47  double pMode() const { return momentumMode_.R(); }
49  double ptMode() const { return sqrt( momentumMode_.Perp2() ); }
51  double pxMode() const { return momentumMode_.x(); }
53  double pyMode() const { return momentumMode_.y(); }
55  double pzMode() const { return momentumMode_.z(); }
57  double phiMode() const { return momentumMode_.Phi(); }
59  double etaMode() const { return momentumMode_.Eta(); }
60 
62  const Vector & momentumMode() const { return momentumMode_; }
63 
65  ParameterVectorMode parametersMode() const {
67  }
69  CovarianceMatrixMode covarianceMode() const { CovarianceMatrixMode m; fill( m ); return m; }
70 
72  double parameterMode(int i) const { return parametersMode()[i]; }
74  double covarianceMode( int i, int j ) const { return covarianceMode_[ covIndex( i, j ) ]; }
76  double errorMode( int i ) const { return sqrt( covarianceMode_[ covIndex( i, i ) ] ); }
77 
79  double qoverpModeError() const { return errorMode( i_qoverp ); }
81  double ptModeError() const {
82  return (chargeMode()!=0) ? sqrt(
85  + pzMode()*pzMode() * covarianceMode(i_lambda,i_lambda) ) : 1.e6;
86  }
88  double thetaModeError() const { return errorMode( i_lambda ); }
90  double lambdaModeError() const { return errorMode( i_lambda ); }
92  double etaModeError() const { return errorMode( i_lambda ) * pMode()/ptMode(); }
94  double phiModeError() const { return errorMode( i_phi ); }
95 
96  private:
98  CovarianceMatrixMode & fill CMS_THREAD_SAFE ( CovarianceMatrixMode & v ) const;
99 
100 
101  private:
110 
111  };
112 
113 }
114 
115 #endif
double phiModeError() const
error on phi from mode
Definition: GsfTrack.h:94
int chargeMode() const
track electric charge from mode
Definition: GsfTrack.h:39
char chargeMode_
electric charge from mode
Definition: GsfTrack.h:105
int i
Definition: DBlmapReader.cc:9
double pyMode() const
y coordinate of momentum vector from mode
Definition: GsfTrack.h:53
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:62
math::Error< dimensionMode >::type CovarianceMatrixMode
3 parameter covariance matrix (momentum part) from mode
Definition: GsfTrack.h:21
double pMode() const
momentum vector magnitude from mode
Definition: GsfTrack.h:47
double lambdaMode() const
Lambda angle from mode.
Definition: GsfTrack.h:45
void setGsfExtra(const GsfTrackExtraRef &ref)
set reference to GSF &quot;extra&quot; object
Definition: GsfTrack.h:30
double thetaModeError() const
error on theta from mode
Definition: GsfTrack.h:88
CovarianceMatrixMode & fill(CovarianceMatrixMode &v) const
fill 3x3 SMatrix
Definition: GsfTrack.cc:40
ErrorD< N >::type type
Definition: Error.h:39
GsfTrack()
default constructor
Definition: GsfTrack.cc:4
double qoverpMode() const
q/p from mode
Definition: GsfTrack.h:41
double ptModeError() const
error on Pt (set to 1000 TeV if charge==0 for safety) from mode
Definition: GsfTrack.h:81
void setMode(int chargeMode, const Vector &momentumMode, const CovarianceMatrixMode &covarianceMode)
set mode parameters
Definition: GsfTrack.cc:27
fixed size vector
Definition: Vector.h:31
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:105
Vector momentumMode_
momentum vector from mode
Definition: GsfTrack.h:107
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:109
double pzMode() const
z coordinate of momentum vector from mode
Definition: GsfTrack.h:55
int j
Definition: DBlmapReader.cc:9
double parameterMode(int i) const
i-th parameter ( i = 0, ... 2 ) from mode
Definition: GsfTrack.h:72
math::XYZPoint Point
point in the space
Definition: TrackBase.h:74
#define M_PI
GsfTrackExtraRef gsfExtra_
reference to GSF &quot;extra&quot; extension
Definition: GsfTrack.h:103
double errorMode(int i) const
error on specified element from mode
Definition: GsfTrack.h:76
const GsfTrackExtraRef & gsfExtra() const
reference to &quot;extra&quot; object
Definition: GsfTrack.h:32
double thetaMode() const
polar angle from mode
Definition: GsfTrack.h:43
double qoverpModeError() const
error on signed transverse curvature from mode
Definition: GsfTrack.h:79
double pxMode() const
x coordinate of momentum vector from mode
Definition: GsfTrack.h:51
CovarianceMatrixMode covarianceMode() const
return track covariance matrix from mode
Definition: GsfTrack.h:69
double etaMode() const
pseudorapidity of momentum vector from mode
Definition: GsfTrack.h:59
double covarianceMode(int i, int j) const
(i,j)-th element of covarianve matrix ( i, j = 0, ... 2 ) from mode
Definition: GsfTrack.h:74
double phiMode() const
azimuthal angle of momentum vector from mode
Definition: GsfTrack.h:57
int charge() const
track electric charge
Definition: TrackBase.h:111
double lambdaModeError() const
error on lambda from mode
Definition: GsfTrack.h:90
double etaModeError() const
error on eta from mode
Definition: GsfTrack.h:92
#define CMS_THREAD_SAFE
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:72
double ptMode() const
track transverse momentum from mode
Definition: GsfTrack.h:49
ParameterVectorMode parametersMode() const
Track parameters with one-to-one correspondence to the covariance matrix from mode.
Definition: GsfTrack.h:65
math::Vector< dimensionMode >::type ParameterVectorMode
parameter vector (momentum part) from mode
Definition: GsfTrack.h:19