CMS 3D CMS Logo

GsfTrack.cc
Go to the documentation of this file.
2 using namespace reco;
3 
5 {
6  chargeMode_ = 0;
7  momentumMode_ = Vector(0.,0.,0.);
8  typedef unsigned int index;
9  index idx = 0;
10  for( index i = 0; i < dimensionMode; ++ i )
11  for( index j = 0; j <= i; ++ j )
12  covarianceMode_[ idx ++ ] = 0.;
13 }
14 
15 GsfTrack::GsfTrack( double chi2, double ndof, const Point & vertex, const Vector & momentum, int charge,
16  const CovarianceMatrix & cov ) :
17  Track( chi2, ndof, vertex, momentum, charge, cov ),
18  chargeMode_(charge), momentumMode_(momentum) {
19  typedef unsigned int index;
20  index idx = 0;
21  for( index i = 0; i < dimensionMode; ++ i )
22  for( index j = 0; j <= i; ++ j )
23  covarianceMode_[ idx ++ ] = cov(i,j);
24 }
25 
26 void
29 {
32  typedef unsigned int index;
33  index idx = 0;
34  for( index i = 0; i < dimensionMode; ++ i )
35  for( index j = 0; j <= i; ++ j )
36  covarianceMode_[ idx ++ ] = covarianceMode(i,j);
37 }
38 
41 {
42  typedef unsigned int index;
43  index idx = 0;
44  for( index i = 0; i < dimensionMode; ++ i )
45  for( index j = 0; j <= i; ++ j )
46  v( i, j ) = covarianceMode_[ idx ++ ];
47  return v;
48 }
49 
int chargeMode() const
track electric charge from mode
Definition: GsfTrack.h:39
char chargeMode_
electric charge from mode
Definition: GsfTrack.h:105
unsigned int index
index type
Definition: TrackBase.h:95
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
CovarianceMatrixMode & fill(CovarianceMatrixMode &v) const
fill 3x3 SMatrix
Definition: GsfTrack.cc:40
GsfTrack()
default constructor
Definition: GsfTrack.cc:4
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:708
void setMode(int chargeMode, const Vector &momentumMode, const CovarianceMatrixMode &covarianceMode)
set mode parameters
Definition: GsfTrack.cc:27
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
Definition: TrackBase.h:732
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:582
Vector momentumMode_
momentum vector from mode
Definition: GsfTrack.h:107
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:588
float covarianceMode_[covarianceSizeMode]
3x3 momentum part of covariance (in q/p, lambda, phi)
Definition: GsfTrack.h:109
fixed size matrix
CovarianceMatrixMode covarianceMode() const
return track covariance matrix from mode
Definition: GsfTrack.h:69
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:55
int charge() const
track electric charge
Definition: TrackBase.h:600
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:80