CMS 3D CMS Logo

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

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

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() [1/2]

TotemRPLocalTrack::TotemRPLocalTrack ( )
inline

Definition at line 72 of file TotemRPLocalTrack.h.

73 {}

◆ TotemRPLocalTrack() [2/2]

TotemRPLocalTrack::TotemRPLocalTrack ( double  z0,
const TVectorD &  track_params_vector,
const TMatrixD &  par_covariance_matrix,
double  chiSquared 
)

Definition at line 33 of file TotemRPLocalTrack.cc.

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  }

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

◆ ~TotemRPLocalTrack()

virtual TotemRPLocalTrack::~TotemRPLocalTrack ( )
inlinevirtual

Definition at line 79 of file TotemRPLocalTrack.h.

80 { return track_params_vector_[0]; }

References track_params_vector_.

Member Function Documentation

◆ addHit()

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

Definition at line 82 of file TotemRPLocalTrack.h.

82  { return CovarianceMatrixElement(0, 0); }
83 
84  inline double y0() const { return track_params_vector_[1]; }

References CovarianceMatrixElement().

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

◆ chiSquared()

double TotemRPLocalTrack::chiSquared ( ) const
inline

Definition at line 115 of file TotemRPLocalTrack.h.

117 {

◆ chiSquaredOverNDF()

double TotemRPLocalTrack::chiSquaredOverNDF ( ) const
inline

Definition at line 118 of file TotemRPLocalTrack.h.

123 { return TVector3(track_params_vector_[0], track_params_vector_[1], z0_); }

◆ covarianceMatrix()

TMatrixD TotemRPLocalTrack::covarianceMatrix ( ) const

Definition at line 66 of file TotemRPLocalTrack.cc.

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;

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

◆ CovarianceMatrixElement() [1/2]

double& TotemRPLocalTrack::CovarianceMatrixElement ( int  i,
int  j 
)
inlineprivate

Definition at line 142 of file TotemRPLocalTrack.h.

◆ CovarianceMatrixElement() [2/2]

const double& TotemRPLocalTrack::CovarianceMatrixElement ( int  i,
int  j 
) const
inlineprivate

◆ directionVector()

TVector3 TotemRPLocalTrack::directionVector ( ) const
inline

Definition at line 103 of file TotemRPLocalTrack.h.

109  { return chiSquared_; }

◆ hits()

const edm::DetSetVector<FittedRecHit>& TotemRPLocalTrack::hits ( ) const
inline

Definition at line 81 of file TotemRPLocalTrack.h.

81 { return sqrt(CovarianceMatrixElement(0, 0)); }

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

◆ isValid()

bool TotemRPLocalTrack::isValid ( void  ) const
inline

Definition at line 133 of file TotemRPLocalTrack.h.

133 :
134  inline const double &CovarianceMatrixElement(int i, int j) const { return par_covariance_matrix_[i * dimension + j]; }

References dimension, mps_fire::i, dqmiolumiharvest::j, and par_covariance_matrix_.

Referenced by ntupleDataFormat._Object::_checkIsValid(), and core.AutoHandle.AutoHandle::ReallyLoad().

◆ numberOfPointsUsedForFit()

unsigned short TotemRPLocalTrack::numberOfPointsUsedForFit ( ) const
inline

Definition at line 120 of file TotemRPLocalTrack.h.

123 { return TVector3(track_params_vector_[0], track_params_vector_[1], z0_); }

◆ parameterVector()

TVectorD TotemRPLocalTrack::parameterVector ( ) const

Definition at line 48 of file TotemRPLocalTrack.cc.

49  {
50  TVectorD v(dimension);
51 
52  for (int i = 0; i < dimension; ++i)
54 
55  return v;

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

◆ setChiSquared()

void TotemRPLocalTrack::setChiSquared ( double &  chiSquared)
inline

Definition at line 116 of file TotemRPLocalTrack.h.

117 {

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

◆ setCovarianceMatrix()

void TotemRPLocalTrack::setCovarianceMatrix ( const TMatrixD &  par_covariance_matrix)

Definition at line 78 of file TotemRPLocalTrack.cc.

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);

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

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

◆ setParameterVector()

void TotemRPLocalTrack::setParameterVector ( const TVectorD &  track_params_vector)

Definition at line 59 of file TotemRPLocalTrack.cc.

60  {
61  for (int i = 0; i < dimension; ++i)
62  track_params_vector_[i] = track_params_vector[i];

References dimension, mps_fire::i, and track_params_vector_.

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

◆ setValid()

void TotemRPLocalTrack::setValid ( bool  valid)
inline

◆ setZ0()

void TotemRPLocalTrack::setZ0 ( double  z0)
inline

Definition at line 95 of file TotemRPLocalTrack.h.

95 { return sqrt(CovarianceMatrixElement(3, 3)); }

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

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

◆ trackCentrePoint()

TVector3 TotemRPLocalTrack::trackCentrePoint ( )
inline

Definition at line 129 of file TotemRPLocalTrack.h.

129 { valid_ = valid; }

References validateGeometry_cfg::valid, and valid_.

◆ trackPoint()

TVector2 TotemRPLocalTrack::trackPoint ( double  z) const
inline

returns (x, y) vector

Definition at line 123 of file TotemRPLocalTrack.h.

123  { return TVector3(track_params_vector_[0], track_params_vector_[1], z0_); }
124 
125  TMatrixD trackPointInterpolationCovariance(double z) const;
126 
127  inline bool isValid() const { return valid_; }

References track_params_vector_, and z0_.

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

◆ trackPointInterpolationCovariance()

TMatrixD TotemRPLocalTrack::trackPointInterpolationCovariance ( double  z) const

Definition at line 13 of file TotemRPLocalTrack.cc.

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);

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

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

◆ tx()

double TotemRPLocalTrack::tx ( ) const
inline

Definition at line 97 of file TotemRPLocalTrack.h.

97 {

◆ txSigma()

double TotemRPLocalTrack::txSigma ( ) const
inline

Definition at line 98 of file TotemRPLocalTrack.h.

109 { return chiSquared_; }

◆ ty()

double TotemRPLocalTrack::ty ( ) const
inline

Definition at line 100 of file TotemRPLocalTrack.h.

109 { return chiSquared_; }

◆ tySigma()

double TotemRPLocalTrack::tySigma ( ) const
inline

Definition at line 101 of file TotemRPLocalTrack.h.

109 { return chiSquared_; }

◆ x0()

double TotemRPLocalTrack::x0 ( ) const
inline

Definition at line 86 of file TotemRPLocalTrack.h.

86 { return CovarianceMatrixElement(1, 1); }

References CovarianceMatrixElement().

Referenced by ElasticPlotDQMSource::analyze().

◆ x0Sigma()

double TotemRPLocalTrack::x0Sigma ( ) const
inline

Definition at line 87 of file TotemRPLocalTrack.h.

88 { return z0_; }

◆ x0Variance()

double TotemRPLocalTrack::x0Variance ( ) const
inline

Definition at line 88 of file TotemRPLocalTrack.h.

88 { return z0_; }

References z0_.

◆ y0()

double TotemRPLocalTrack::y0 ( ) const
inline

Definition at line 90 of file TotemRPLocalTrack.h.

91 { return track_params_vector_[2]; }

Referenced by ElasticPlotDQMSource::analyze().

◆ y0Sigma()

double TotemRPLocalTrack::y0Sigma ( ) const
inline

Definition at line 91 of file TotemRPLocalTrack.h.

91 { return track_params_vector_[2]; }

References track_params_vector_.

◆ y0Variance()

double TotemRPLocalTrack::y0Variance ( ) const
inline

Definition at line 92 of file TotemRPLocalTrack.h.

92 { return sqrt(CovarianceMatrixElement(2, 2)); }

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

◆ z0()

double TotemRPLocalTrack::z0 ( ) const
inline

Definition at line 94 of file TotemRPLocalTrack.h.

94 { return track_params_vector_[3]; }

References track_params_vector_.

Friends And Related Function Documentation

◆ operator<

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

Definition at line 86 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) {
94  if (l.track_params_vector_[i] < r.track_params_vector_[i])
95  return true;
96  if (l.track_params_vector_[i] > r.track_params_vector_[i])
97  return true;
98  }
99 
100  return false;

Member Data Documentation

◆ chiSquared_

double TotemRPLocalTrack::chiSquared_
private

fit chi^2

Definition at line 156 of file TotemRPLocalTrack.h.

◆ covarianceSize

const int TotemRPLocalTrack::covarianceSize = dimension * dimension
static

Definition at line 70 of file TotemRPLocalTrack.h.

◆ dimension

const int TotemRPLocalTrack::dimension = 4
static

◆ par_covariance_matrix_

double TotemRPLocalTrack::par_covariance_matrix_[covarianceSize]
private

Definition at line 153 of file TotemRPLocalTrack.h.

Referenced by isValid(), and setValid().

◆ track_hits_vector_

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

Definition at line 144 of file TotemRPLocalTrack.h.

◆ track_params_vector_

double TotemRPLocalTrack::track_params_vector_[dimension]
private

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

Definition at line 147 of file TotemRPLocalTrack.h.

Referenced by parameterVector(), setParameterVector(), TotemRPLocalTrack(), trackPoint(), y0Sigma(), z0(), and ~TotemRPLocalTrack().

◆ valid_

bool TotemRPLocalTrack::valid_
private

fit valid?

Definition at line 159 of file TotemRPLocalTrack.h.

Referenced by trackCentrePoint().

◆ z0_

double TotemRPLocalTrack::z0_
private

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

Definition at line 151 of file TotemRPLocalTrack.h.

Referenced by trackPoint(), trackPointInterpolationCovariance(), and x0Variance().

TotemRPLocalTrack::z0_
double z0_
Definition: TotemRPLocalTrack.h:151
TotemRPLocalTrack::y0
double y0() const
Definition: TotemRPLocalTrack.h:90
mps_fire.i
i
Definition: mps_fire.py:355
TotemRPLocalTrack::par_covariance_matrix_
double par_covariance_matrix_[covarianceSize]
Definition: TotemRPLocalTrack.h:153
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
TotemRPLocalTrack::z0
double z0() const
Definition: TotemRPLocalTrack.h:94
findQualityFiles.v
v
Definition: findQualityFiles.py:179
TotemRPLocalTrack::isValid
bool isValid() const
Definition: TotemRPLocalTrack.h:133
validateGeometry_cfg.valid
valid
Definition: validateGeometry_cfg.py:21
TotemRPLocalTrack::dimension
static const int dimension
< parameter vector size
Definition: TotemRPLocalTrack.h:67
TotemRPLocalTrack::track_params_vector_
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
Definition: TotemRPLocalTrack.h:147
TotemRPLocalTrack::trackPointInterpolationCovariance
TMatrixD trackPointInterpolationCovariance(double z) const
Definition: TotemRPLocalTrack.cc:13
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DDAxes::z
TotemRPLocalTrack::chiSquared
double chiSquared() const
Definition: TotemRPLocalTrack.h:115
h
TotemRPLocalTrack::chiSquared_
double chiSquared_
fit chi^2
Definition: TotemRPLocalTrack.h:156
TotemRPLocalTrack::CovarianceMatrixElement
const double & CovarianceMatrixElement(int i, int j) const
Definition: TotemRPLocalTrack.h:140
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
JetComb::kMult
Definition: TtSemiLepJetComb.h:35
alignCSCRings.r
r
Definition: alignCSCRings.py:93
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TotemRPLocalTrack::valid_
bool valid_
fit valid?
Definition: TotemRPLocalTrack.h:159