CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
27 GsfTrack::setMode (int chargeMode, const Vector& momentumMode,
28  const CovarianceMatrixMode& covarianceMode)
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 
40 GsfTrack::fill (CovarianceMatrixMode& v) const
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
int i
Definition: DBlmapReader.cc:9
unsigned int index
index type
Definition: TrackBase.h:78
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
GsfTrack()
default constructor
Definition: GsfTrack.cc:4
double charge(const std::vector< uint8_t > &Ampls)
void setMode(int chargeMode, const Vector &momentumMode, const CovarianceMatrixMode &covarianceMode)
set mode parameters
Definition: GsfTrack.cc:27
Vector momentumMode_
momentum vector from mode
Definition: GsfTrack.h:107
float covarianceMode_[covarianceSizeMode]
3x3 momentum part of covariance (in q/p, lambda, phi)
Definition: GsfTrack.h:109
int j
Definition: DBlmapReader.cc:9
math::XYZPoint Point
point in the space
Definition: TrackBase.h:74
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
CovarianceMatrixMode covarianceMode() const
return track covariance matrix from mode
Definition: GsfTrack.h:69
CovarianceMatrix & fill(CovarianceMatrix &v) const
fill SMatrix
Definition: TrackBase.cc:42
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:72