CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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, 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, const CovarianceMatrixMode& covarianceMode);
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 
63  ParameterVectorMode parametersMode() const { return ParameterVectorMode(qoverpMode(), lambdaMode(), phiMode()); }
65  CovarianceMatrixMode covarianceMode() const {
66  CovarianceMatrixMode m;
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:
100  CovarianceMatrixMode& fill CMS_THREAD_SAFE(CovarianceMatrixMode& v) const;
101 
102  private:
111  };
112 
113 } // namespace reco
114 
115 #endif
double phiModeError() const
error on phi from mode
Definition: GsfTrack.h:96
int chargeMode() const
track electric charge from mode
Definition: GsfTrack.h:37
char chargeMode_
electric charge from mode
Definition: GsfTrack.h:106
double pyMode() const
y coordinate of momentum vector from mode
Definition: GsfTrack.h:51
static index covIndex(index i, index j)
covariance matrix index in array
Definition: TrackBase.h:541
const Vector & momentumMode() const
track momentum vector from mode
Definition: GsfTrack.h:60
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:45
double lambdaMode() const
Lambda angle from mode.
Definition: GsfTrack.h:43
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:90
CovarianceMatrixMode & fill(CovarianceMatrixMode &v) const
fill 3x3 SMatrix
Definition: GsfTrack.cc:34
ErrorD< N >::type type
Definition: Error.h:32
GsfTrack()
default constructor
Definition: GsfTrack.cc:4
double qoverpMode() const
q/p from mode
Definition: GsfTrack.h:39
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:24
fixed size vector
Definition: Vector.h:24
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:587
Vector momentumMode_
momentum vector from mode
Definition: GsfTrack.h:108
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:590
T sqrt(T t)
Definition: SSEVec.h:19
float covarianceMode_[covarianceSizeMode]
3x3 momentum part of covariance (in q/p, lambda, phi)
Definition: GsfTrack.h:110
double pzMode() const
z coordinate of momentum vector from mode
Definition: GsfTrack.h:53
#define CMS_THREAD_SAFE
double parameterMode(int i) const
i-th parameter ( i = 0, ... 2 ) from mode
Definition: GsfTrack.h:72
#define M_PI
GsfTrackExtraRef gsfExtra_
reference to GSF &quot;extra&quot; extension
Definition: GsfTrack.h:104
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:31
double thetaMode() const
polar angle from mode
Definition: GsfTrack.h:41
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:49
CovarianceMatrixMode covarianceMode() const
return track covariance matrix from mode
Definition: GsfTrack.h:65
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
double etaMode() const
pseudorapidity of momentum vector from mode
Definition: GsfTrack.h:57
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:55
int charge() const
track electric charge
Definition: TrackBase.h:596
double lambdaModeError() const
error on lambda from mode
Definition: GsfTrack.h:92
double etaModeError() const
error on eta from mode
Definition: GsfTrack.h:94
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77
double ptMode() const
track transverse momentum from mode
Definition: GsfTrack.h:47
ParameterVectorMode parametersMode() const
Track parameters with one-to-one correspondence to the covariance matrix from mode.
Definition: GsfTrack.h:63
math::Vector< dimensionMode >::type ParameterVectorMode
parameter vector (momentum part) from mode
Definition: GsfTrack.h:19