CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends
TotemRPLocalTrack Class Reference

A track fit through a single RP. More...

#include <TotemRPLocalTrack.h>

Classes

class  FittedRecHit
 

Public Member Functions

void addHit (unsigned int detId, const FittedRecHit &hit)
 
double chiSquared () const
 
double chiSquaredOverNDF () const
 
TMatrixD covarianceMatrix () const
 
TVector3 directionVector () const
 
const edm::DetSetVector
< FittedRecHit > & 
hits () const
 
bool isValid () const
 
unsigned short numberOfPointsUsedForFit () const
 
TVectorD parameterVector () const
 
void setChiSquared (double &chiSquared)
 
void setCovarianceMatrix (const TMatrixD &par_covariance_matrix)
 
void setParameterVector (const TVectorD &track_params_vector)
 
void setValid (bool valid)
 
void setZ0 (double z0)
 
 TotemRPLocalTrack ()
 
 TotemRPLocalTrack (double z0, const TVectorD &track_params_vector, const TMatrixD &par_covariance_matrix, double chiSquared)
 
TVector3 trackCentrePoint ()
 
TVector2 trackPoint (double z) const
 returns (x, y) vector More...
 
TMatrixD trackPointInterpolationCovariance (double z) const
 
double tx () const
 
double txSigma () const
 
double ty () const
 
double tySigma () const
 
double x0 () const
 
double x0Sigma () const
 
double x0Variance () const
 
double y0 () const
 
double y0Sigma () const
 
double y0Variance () const
 
double z0 () const
 
virtual ~TotemRPLocalTrack ()
 

Static Public Attributes

static const int covarianceSize = dimension * dimension
 
static const int dimension = 4
 < parameter vector size More...
 

Private Member Functions

const double & CovarianceMatrixElement (int i, int j) const
 
double & CovarianceMatrixElement (int i, int j)
 

Private Attributes

double chiSquared_
 fit chi^2 More...
 
double par_covariance_matrix_ [covarianceSize]
 
edm::DetSetVector< FittedRecHittrack_hits_vector_
 
double track_params_vector_ [dimension]
 track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ... More...
 
bool valid_
 fit valid? More...
 
double z0_
 

Friends

bool operator< (const TotemRPLocalTrack &l, const TotemRPLocalTrack &r)
 

Detailed Description

A track fit through a single RP.

x = x0+tx*(z-z0) y = ...

z0 is defined below x any y refer to the global (x, y) system with the beam at (x = 0, y = 0). Only VALID tracks (IsValid()==true) can be later used for physics reconstruction!

Definition at line 31 of file TotemRPLocalTrack.h.

Constructor & Destructor Documentation

TotemRPLocalTrack::TotemRPLocalTrack ( )
inline

Definition at line 66 of file TotemRPLocalTrack.h.

66 : z0_(0), chiSquared_(0), valid_(false) {}
double chiSquared_
fit chi^2
bool valid_
fit valid?
TotemRPLocalTrack::TotemRPLocalTrack ( double  z0,
const TVectorD &  track_params_vector,
const TMatrixD &  par_covariance_matrix,
double  chiSquared 
)

Definition at line 34 of file TotemRPLocalTrack.cc.

References CovarianceMatrixElement(), dimension, mps_fire::i, dqmiolumiharvest::j, and track_params_vector_.

38  : z0_(z0), chiSquared_(chiSquared), valid_(true) {
39  for (int i = 0; i < dimension; ++i) {
40  track_params_vector_[i] = track_params_vector[i];
41  for (int j = 0; j < dimension; ++j) {
42  CovarianceMatrixElement(i, j) = par_covariance_matrix(i, j);
43  }
44  }
45 }
double chiSquared() const
static const int dimension
&lt; parameter vector size
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
double chiSquared_
fit chi^2
const double & CovarianceMatrixElement(int i, int j) const
bool valid_
fit valid?
double z0() const
virtual TotemRPLocalTrack::~TotemRPLocalTrack ( )
inlinevirtual

Definition at line 73 of file TotemRPLocalTrack.h.

73 {}

Member Function Documentation

void TotemRPLocalTrack::addHit ( unsigned int  detId,
const FittedRecHit hit 
)
inline

Definition at line 76 of file TotemRPLocalTrack.h.

References track_hits_vector_.

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

76  {
77  track_hits_vector_.find_or_insert(detId).push_back(hit);
78  }
edm::DetSetVector< FittedRecHit > track_hits_vector_
double TotemRPLocalTrack::chiSquared ( ) const
inline

Definition at line 109 of file TotemRPLocalTrack.h.

References chiSquared_.

Referenced by setChiSquared().

109 { return chiSquared_; }
double chiSquared_
fit chi^2
double TotemRPLocalTrack::chiSquaredOverNDF ( ) const
inline

Definition at line 112 of file TotemRPLocalTrack.h.

References chiSquared_, and track_hits_vector_.

112 { return chiSquared_ / (track_hits_vector_.size() - 4); }
double chiSquared_
fit chi^2
edm::DetSetVector< FittedRecHit > track_hits_vector_
TMatrixD TotemRPLocalTrack::covarianceMatrix ( ) const

Definition at line 67 of file TotemRPLocalTrack.cc.

References CovarianceMatrixElement(), dimension, mps_fire::i, dqmiolumiharvest::j, and visualization-live-secondInstance_cfg::m.

67  {
68  TMatrixD m(dimension, dimension);
69 
70  for (int i = 0; i < dimension; ++i)
71  for (int j = 0; j < dimension; ++j)
73 
74  return m;
75 }
static const int dimension
&lt; parameter vector size
const double & CovarianceMatrixElement(int i, int j) const
const double& TotemRPLocalTrack::CovarianceMatrixElement ( int  i,
int  j 
) const
inlineprivate
double& TotemRPLocalTrack::CovarianceMatrixElement ( int  i,
int  j 
)
inlineprivate

Definition at line 136 of file TotemRPLocalTrack.h.

References dimension, dqmiolumiharvest::j, and par_covariance_matrix_.

136 { return par_covariance_matrix_[i * dimension + j]; }
double par_covariance_matrix_[covarianceSize]
static const int dimension
&lt; parameter vector size
TVector3 TotemRPLocalTrack::directionVector ( ) const
inline

Definition at line 97 of file TotemRPLocalTrack.h.

References tx(), and ty().

97  {
98  TVector3 vect(tx(), ty(), 1);
99  vect.SetMag(1.0);
100  return vect;
101  }
double tx() const
double ty() const
const edm::DetSetVector<FittedRecHit>& TotemRPLocalTrack::hits ( ) const
inline

Definition at line 75 of file TotemRPLocalTrack.h.

References track_hits_vector_.

Referenced by TotemRPLocalTrackFitter::produce().

75 { return track_hits_vector_; }
edm::DetSetVector< FittedRecHit > track_hits_vector_
bool TotemRPLocalTrack::isValid ( void  ) const
inline
unsigned short TotemRPLocalTrack::numberOfPointsUsedForFit ( ) const
inline

Definition at line 114 of file TotemRPLocalTrack.h.

References track_hits_vector_.

114 { return track_hits_vector_.size(); }
edm::DetSetVector< FittedRecHit > track_hits_vector_
TVectorD TotemRPLocalTrack::parameterVector ( ) const

Definition at line 49 of file TotemRPLocalTrack.cc.

References dimension, mps_fire::i, track_params_vector_, and findQualityFiles::v.

49  {
50  TVectorD v(dimension);
51 
52  for (int i = 0; i < dimension; ++i)
54 
55  return v;
56 }
static const int dimension
&lt; parameter vector size
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
void TotemRPLocalTrack::setChiSquared ( double &  chiSquared)
inline

Definition at line 110 of file TotemRPLocalTrack.h.

References chiSquared(), and chiSquared_.

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

110 { chiSquared_ = chiSquared; }
double chiSquared() const
double chiSquared_
fit chi^2
void TotemRPLocalTrack::setCovarianceMatrix ( const TMatrixD &  par_covariance_matrix)

Definition at line 79 of file TotemRPLocalTrack.cc.

References CovarianceMatrixElement(), dimension, mps_fire::i, and dqmiolumiharvest::j.

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

79  {
80  for (int i = 0; i < dimension; ++i)
81  for (int j = 0; j < dimension; ++j)
82  CovarianceMatrixElement(i, j) = par_covariance_matrix(i, j);
83 }
static const int dimension
&lt; parameter vector size
const double & CovarianceMatrixElement(int i, int j) const
void TotemRPLocalTrack::setParameterVector ( const TVectorD &  track_params_vector)

Definition at line 60 of file TotemRPLocalTrack.cc.

References dimension, mps_fire::i, and track_params_vector_.

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

60  {
61  for (int i = 0; i < dimension; ++i)
62  track_params_vector_[i] = track_params_vector[i];
63 }
static const int dimension
&lt; parameter vector size
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
void TotemRPLocalTrack::setValid ( bool  valid)
inline

Definition at line 129 of file TotemRPLocalTrack.h.

References valid_.

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

129 { valid_ = valid; }
bool valid_
fit valid?
void TotemRPLocalTrack::setZ0 ( double  z0)
inline

Definition at line 89 of file TotemRPLocalTrack.h.

References z0(), and z0_.

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

89 { z0_ = z0; }
double z0() const
TVector3 TotemRPLocalTrack::trackCentrePoint ( )
inline

Definition at line 123 of file TotemRPLocalTrack.h.

References track_params_vector_, and z0_.

123 { return TVector3(track_params_vector_[0], track_params_vector_[1], z0_); }
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
TVector2 TotemRPLocalTrack::trackPoint ( double  z) const
inline

returns (x, y) vector

Definition at line 117 of file TotemRPLocalTrack.h.

References track_params_vector_, and z0_.

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

117  {
118  double delta_z = z - z0_;
119  return TVector2(track_params_vector_[0] + track_params_vector_[2] * delta_z,
120  track_params_vector_[1] + track_params_vector_[3] * delta_z);
121  }
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
TMatrixD TotemRPLocalTrack::trackPointInterpolationCovariance ( double  z) const

Definition at line 14 of file TotemRPLocalTrack.cc.

References CovarianceMatrixElement(), dimension, h, mps_fire::i, dqmiolumiharvest::j, JetComb::kMult, and z0_.

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

14  {
15  TMatrixD h(2, 4);
16  h(0, 0) = 1;
17  h(1, 1) = 1;
18  h(0, 2) = z - z0_;
19  h(1, 3) = z - z0_;
20 
21  TMatrixD cov_matr(dimension, dimension);
22  for (int i = 0; i < dimension; ++i)
23  for (int j = 0; j < dimension; ++j)
24  cov_matr(i, j) = CovarianceMatrixElement(i, j);
25 
26  TMatrixD V_hT(cov_matr, TMatrixD::kMultTranspose, h);
27  //h*=V_hT;
28  //return h;
29  return TMatrixD(h, TMatrixD::kMult, V_hT);
30 }
static const int dimension
&lt; parameter vector size
const double & CovarianceMatrixElement(int i, int j) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
double TotemRPLocalTrack::tx ( ) const
inline

Definition at line 91 of file TotemRPLocalTrack.h.

References track_params_vector_.

Referenced by directionVector().

91 { return track_params_vector_[2]; }
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
double TotemRPLocalTrack::txSigma ( ) const
inline

Definition at line 92 of file TotemRPLocalTrack.h.

References CovarianceMatrixElement(), and mathSSE::sqrt().

92 { return sqrt(CovarianceMatrixElement(2, 2)); }
T sqrt(T t)
Definition: SSEVec.h:19
const double & CovarianceMatrixElement(int i, int j) const
double TotemRPLocalTrack::ty ( ) const
inline

Definition at line 94 of file TotemRPLocalTrack.h.

References track_params_vector_.

Referenced by directionVector().

94 { return track_params_vector_[3]; }
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
double TotemRPLocalTrack::tySigma ( ) const
inline

Definition at line 95 of file TotemRPLocalTrack.h.

References CovarianceMatrixElement(), and mathSSE::sqrt().

95 { return sqrt(CovarianceMatrixElement(3, 3)); }
T sqrt(T t)
Definition: SSEVec.h:19
const double & CovarianceMatrixElement(int i, int j) const
double TotemRPLocalTrack::x0 ( ) const
inline

Definition at line 80 of file TotemRPLocalTrack.h.

References track_params_vector_.

Referenced by ElasticPlotDQMSource::analyze().

80 { return track_params_vector_[0]; }
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
double TotemRPLocalTrack::x0Sigma ( ) const
inline

Definition at line 81 of file TotemRPLocalTrack.h.

References CovarianceMatrixElement(), and mathSSE::sqrt().

81 { return sqrt(CovarianceMatrixElement(0, 0)); }
T sqrt(T t)
Definition: SSEVec.h:19
const double & CovarianceMatrixElement(int i, int j) const
double TotemRPLocalTrack::x0Variance ( ) const
inline

Definition at line 82 of file TotemRPLocalTrack.h.

References CovarianceMatrixElement().

82 { return CovarianceMatrixElement(0, 0); }
const double & CovarianceMatrixElement(int i, int j) const
double TotemRPLocalTrack::y0 ( ) const
inline

Definition at line 84 of file TotemRPLocalTrack.h.

References track_params_vector_.

Referenced by ElasticPlotDQMSource::analyze().

84 { return track_params_vector_[1]; }
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
double TotemRPLocalTrack::y0Sigma ( ) const
inline

Definition at line 85 of file TotemRPLocalTrack.h.

References CovarianceMatrixElement(), and mathSSE::sqrt().

85 { return sqrt(CovarianceMatrixElement(1, 1)); }
T sqrt(T t)
Definition: SSEVec.h:19
const double & CovarianceMatrixElement(int i, int j) const
double TotemRPLocalTrack::y0Variance ( ) const
inline

Definition at line 86 of file TotemRPLocalTrack.h.

References CovarianceMatrixElement().

86 { return CovarianceMatrixElement(1, 1); }
const double & CovarianceMatrixElement(int i, int j) const
double TotemRPLocalTrack::z0 ( ) const
inline

Definition at line 88 of file TotemRPLocalTrack.h.

References z0_.

Referenced by setZ0().

88 { return z0_; }

Friends And Related Function Documentation

bool operator< ( const TotemRPLocalTrack l,
const TotemRPLocalTrack r 
)
friend

Definition at line 87 of file TotemRPLocalTrack.cc.

87  {
88  if (l.z0_ < r.z0_)
89  return true;
90  if (l.z0_ > r.z0_)
91  return true;
92 
93  for (int i = 0; i < TotemRPLocalTrack::dimension; ++i) {
95  return true;
97  return true;
98  }
99 
100  return false;
101 }
static const int dimension
&lt; parameter vector size
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...

Member Data Documentation

double TotemRPLocalTrack::chiSquared_
private

fit chi^2

Definition at line 150 of file TotemRPLocalTrack.h.

Referenced by chiSquared(), chiSquaredOverNDF(), and setChiSquared().

const int TotemRPLocalTrack::covarianceSize = dimension * dimension
static

Definition at line 64 of file TotemRPLocalTrack.h.

const int TotemRPLocalTrack::dimension = 4
static
double TotemRPLocalTrack::par_covariance_matrix_[covarianceSize]
private

Definition at line 147 of file TotemRPLocalTrack.h.

Referenced by CovarianceMatrixElement().

edm::DetSetVector<FittedRecHit> TotemRPLocalTrack::track_hits_vector_
private

Definition at line 138 of file TotemRPLocalTrack.h.

Referenced by addHit(), chiSquaredOverNDF(), hits(), and numberOfPointsUsedForFit().

double TotemRPLocalTrack::track_params_vector_[dimension]
private

track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...

Definition at line 141 of file TotemRPLocalTrack.h.

Referenced by operator<(), parameterVector(), setParameterVector(), TotemRPLocalTrack(), trackCentrePoint(), trackPoint(), tx(), ty(), x0(), and y0().

bool TotemRPLocalTrack::valid_
private

fit valid?

Definition at line 153 of file TotemRPLocalTrack.h.

Referenced by isValid(), and setValid().

double TotemRPLocalTrack::z0_
private

z where x0 and y0 are evaluated. filled from CTPPSGeometry::getRPTranslation

Definition at line 145 of file TotemRPLocalTrack.h.

Referenced by operator<(), setZ0(), trackCentrePoint(), trackPoint(), trackPointInterpolationCovariance(), and z0().