CMS 3D CMS Logo

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, const CovarianceMatrix&);
29  void setGsfExtra(const GsfTrackExtraRef& ref) { gsfExtra_ = ref; }
31  const GsfTrackExtraRef& gsfExtra() const { return gsfExtra_; }
32 
35 
37  int chargeMode() const { return chargeMode_; }
39  double qoverpMode() const { return chargeMode() / pMode(); }
41  double thetaMode() const { return momentumMode_.theta(); }
43  double lambdaMode() const { return M_PI / 2 - momentumMode_.theta(); }
45  double pMode() const { return momentumMode_.R(); }
47  double ptMode() const { return sqrt(momentumMode_.Perp2()); }
49  double pxMode() const { return momentumMode_.x(); }
51  double pyMode() const { return momentumMode_.y(); }
53  double pzMode() const { return momentumMode_.z(); }
55  double phiMode() const { return momentumMode_.Phi(); }
57  double etaMode() const { return momentumMode_.Eta(); }
58 
60  const Vector& momentumMode() const { return momentumMode_; }
61 
67  fill(m);
68  return m;
69  }
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)
83  ? sqrt(ptMode() * ptMode() * pMode() * pMode() / chargeMode() / chargeMode() *
87  : 1.e6;
88  }
90  double thetaModeError() const { return errorMode(i_lambda); }
92  double lambdaModeError() const { return errorMode(i_lambda); }
94  double etaModeError() const { return errorMode(i_lambda) * pMode() / ptMode(); }
96  double phiModeError() const { return errorMode(i_phi); }
97 
98  private:
101 
102  private:
111  };
112 
113 } // namespace reco
114 
115 #endif
double errorMode(int i) const
error on specified element from mode
Definition: GsfTrack.h:76
char chargeMode_
electric charge from mode
Definition: GsfTrack.h:106
static index covIndex(index i, index j)
covariance matrix index in array
Definition: TrackBase.h:541
math::Error< dimensionMode >::type CovarianceMatrixMode
3 parameter covariance matrix (momentum part) from mode
Definition: GsfTrack.h:21
double covarianceMode(int i, int j) const
(i,j)-th element of covarianve matrix ( i, j = 0, ... 2 ) from mode
Definition: GsfTrack.h:74
void setGsfExtra(const GsfTrackExtraRef &ref)
set reference to GSF "extra" object
Definition: GsfTrack.h:29
double phiModeError() const
error on phi from mode
Definition: GsfTrack.h:96
CovarianceMatrixMode covarianceMode() const
return track covariance matrix from mode
Definition: GsfTrack.h:65
double qoverpModeError() const
error on signed transverse curvature from mode
Definition: GsfTrack.h:79
double etaMode() const
pseudorapidity of momentum vector from mode
Definition: GsfTrack.h:57
ErrorD< N >::type type
Definition: Error.h:32
double pyMode() const
y coordinate of momentum vector from mode
Definition: GsfTrack.h:51
double pzMode() const
z coordinate of momentum vector from mode
Definition: GsfTrack.h:53
GsfTrack()
default constructor
Definition: GsfTrack.cc:4
CovarianceMatrixMode & fill(CovarianceMatrixMode &v) const
fill 3x3 SMatrix
Definition: GsfTrack.cc:34
double etaModeError() const
error on eta from mode
Definition: GsfTrack.h:94
double thetaModeError() const
error on theta from mode
Definition: GsfTrack.h:90
double thetaMode() const
polar angle from mode
Definition: GsfTrack.h:41
void setMode(int chargeMode, const Vector &momentumMode, const CovarianceMatrixMode &covarianceMode)
set mode parameters
Definition: GsfTrack.cc:24
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:590
int charge() const
track electric charge
Definition: TrackBase.h:596
double parameterMode(int i) const
i-th parameter ( i = 0, ... 2 ) from mode
Definition: GsfTrack.h:72
fixed size vector
Definition: Vector.h:24
Vector momentumMode_
momentum vector from mode
Definition: GsfTrack.h:108
double pxMode() const
x coordinate of momentum vector from mode
Definition: GsfTrack.h:49
double pMode() const
momentum vector magnitude from mode
Definition: GsfTrack.h:45
T sqrt(T t)
Definition: SSEVec.h:23
double ptMode() const
track transverse momentum from mode
Definition: GsfTrack.h:47
float covarianceMode_[covarianceSizeMode]
3x3 momentum part of covariance (in q/p, lambda, phi)
Definition: GsfTrack.h:110
#define CMS_THREAD_SAFE
double lambdaModeError() const
error on lambda from mode
Definition: GsfTrack.h:92
const Vector & momentumMode() const
track momentum vector from mode
Definition: GsfTrack.h:60
#define M_PI
GsfTrackExtraRef gsfExtra_
reference to GSF "extra" extension
Definition: GsfTrack.h:104
const GsfTrackExtraRef & gsfExtra() const
reference to "extra" object
Definition: GsfTrack.h:31
double phiMode() const
azimuthal angle of momentum vector from mode
Definition: GsfTrack.h:55
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:587
double ptModeError() const
error on Pt (set to 1000 TeV if charge==0 for safety) from mode
Definition: GsfTrack.h:81
fixed size matrix
Structure Point Contains parameters of Gaussian fits to DMRs.
double qoverpMode() const
q/p from mode
Definition: GsfTrack.h:39
ParameterVectorMode parametersMode() const
Track parameters with one-to-one correspondence to the covariance matrix from mode.
Definition: GsfTrack.h:63
double lambdaMode() const
Lambda angle from mode.
Definition: GsfTrack.h:43
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77
int chargeMode() const
track electric charge from mode
Definition: GsfTrack.h:37
math::Vector< dimensionMode >::type ParameterVectorMode
parameter vector (momentum part) from mode
Definition: GsfTrack.h:19