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 30 of file TotemRPLocalTrack.h.

Constructor & Destructor Documentation

◆ TotemRPLocalTrack() [1/2]

TotemRPLocalTrack::TotemRPLocalTrack ( )
inline

Definition at line 71 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 78 of file TotemRPLocalTrack.h.

80 { return track_params_vector_[0]; }

Member Function Documentation

◆ addHit()

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

Definition at line 81 of file TotemRPLocalTrack.h.

81  { return sqrt(CovarianceMatrixElement(0, 0)); }
82  inline double x0Variance() const { return CovarianceMatrixElement(0, 0); }
83 

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

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

◆ chiSquared()

double TotemRPLocalTrack::chiSquared ( ) const
inline

Definition at line 114 of file TotemRPLocalTrack.h.

114 { return track_hits_vector_.size(); }

References track_hits_vector_.

◆ chiSquaredOverNDF()

double TotemRPLocalTrack::chiSquaredOverNDF ( ) const
inline

Definition at line 117 of file TotemRPLocalTrack.h.

117 {

References z, and 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 141 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 102 of file TotemRPLocalTrack.h.

109  { return chiSquared_; }

◆ hits()

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

Definition at line 80 of file TotemRPLocalTrack.h.

80 { return track_params_vector_[0]; }

References track_params_vector_.

◆ isValid()

bool TotemRPLocalTrack::isValid ( void  ) const
inline

Definition at line 132 of file TotemRPLocalTrack.h.

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

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

◆ numberOfPointsUsedForFit()

unsigned short TotemRPLocalTrack::numberOfPointsUsedForFit ( ) const
inline

Definition at line 119 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 115 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 94 of file TotemRPLocalTrack.h.

94 { return track_params_vector_[3]; }

References track_params_vector_.

Referenced by TotemRPLocalTrackFitterAlgorithm::fitTrack().

◆ trackCentrePoint()

TVector3 TotemRPLocalTrack::trackCentrePoint ( )
inline

Definition at line 128 of file TotemRPLocalTrack.h.

129 { valid_ = valid; }

References RunInfoPI::valid, and valid_.

◆ trackPoint()

TVector2 TotemRPLocalTrack::trackPoint ( double  z) const
inline

returns (x, y) vector

Definition at line 122 of file TotemRPLocalTrack.h.

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

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 96 of file TotemRPLocalTrack.h.

97 {

Referenced by txSigma().

◆ txSigma()

double TotemRPLocalTrack::txSigma ( ) const
inline

Definition at line 97 of file TotemRPLocalTrack.h.

97 {

References tx(), and ty().

◆ ty()

double TotemRPLocalTrack::ty ( ) const
inline

Definition at line 99 of file TotemRPLocalTrack.h.

109 { return chiSquared_; }

Referenced by txSigma().

◆ tySigma()

double TotemRPLocalTrack::tySigma ( ) const
inline

Definition at line 100 of file TotemRPLocalTrack.h.

109 { return chiSquared_; }

◆ x0()

double TotemRPLocalTrack::x0 ( ) const
inline

Definition at line 85 of file TotemRPLocalTrack.h.

85 { return sqrt(CovarianceMatrixElement(1, 1)); }

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

Referenced by ElasticPlotDQMSource::analyze().

◆ x0Sigma()

double TotemRPLocalTrack::x0Sigma ( ) const
inline

Definition at line 86 of file TotemRPLocalTrack.h.

86 { return CovarianceMatrixElement(1, 1); }

References CovarianceMatrixElement().

◆ x0Variance()

double TotemRPLocalTrack::x0Variance ( ) const
inline

Definition at line 87 of file TotemRPLocalTrack.h.

88 { return z0_; }

References z0_.

◆ y0()

double TotemRPLocalTrack::y0 ( ) const
inline

Definition at line 89 of file TotemRPLocalTrack.h.

89 { z0_ = z0; }

References z0(), and z0_.

Referenced by ElasticPlotDQMSource::analyze().

◆ y0Sigma()

double TotemRPLocalTrack::y0Sigma ( ) const
inline

Definition at line 90 of file TotemRPLocalTrack.h.

91 { return track_params_vector_[2]; }

◆ y0Variance()

double TotemRPLocalTrack::y0Variance ( ) const
inline

Definition at line 91 of file TotemRPLocalTrack.h.

91 { return track_params_vector_[2]; }

References track_params_vector_.

◆ z0()

double TotemRPLocalTrack::z0 ( ) const
inline

Definition at line 93 of file TotemRPLocalTrack.h.

94 { return track_params_vector_[3]; }

Referenced by y0().

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 155 of file TotemRPLocalTrack.h.

◆ covarianceSize

const int TotemRPLocalTrack::covarianceSize = dimension * dimension
static

Definition at line 69 of file TotemRPLocalTrack.h.

◆ dimension

const int TotemRPLocalTrack::dimension = 4
static

◆ par_covariance_matrix_

double TotemRPLocalTrack::par_covariance_matrix_[covarianceSize]
private

Definition at line 152 of file TotemRPLocalTrack.h.

Referenced by setValid().

◆ track_hits_vector_

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

Definition at line 143 of file TotemRPLocalTrack.h.

Referenced by chiSquared().

◆ track_params_vector_

double TotemRPLocalTrack::track_params_vector_[dimension]
private

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

Definition at line 146 of file TotemRPLocalTrack.h.

Referenced by hits(), parameterVector(), setParameterVector(), setZ0(), TotemRPLocalTrack(), trackPoint(), and y0Variance().

◆ valid_

bool TotemRPLocalTrack::valid_
private

fit valid?

Definition at line 158 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 150 of file TotemRPLocalTrack.h.

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

TotemRPLocalTrack::z0_
double z0_
Definition: TotemRPLocalTrack.h:150
mps_fire.i
i
Definition: mps_fire.py:428
TotemRPLocalTrack::par_covariance_matrix_
double par_covariance_matrix_[covarianceSize]
Definition: TotemRPLocalTrack.h:152
TotemRPLocalTrack::z0
double z0() const
Definition: TotemRPLocalTrack.h:93
findQualityFiles.v
v
Definition: findQualityFiles.py:179
h
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
TotemRPLocalTrack::dimension
static const int dimension
< parameter vector size
Definition: TotemRPLocalTrack.h:66
TotemRPLocalTrack::track_params_vector_
double track_params_vector_[dimension]
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
Definition: TotemRPLocalTrack.h:146
TotemRPLocalTrack::trackPointInterpolationCovariance
TMatrixD trackPointInterpolationCovariance(double z) const
Definition: TotemRPLocalTrack.cc:13
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DDAxes::z
TotemRPLocalTrack::chiSquared
double chiSquared() const
Definition: TotemRPLocalTrack.h:114
h
TotemRPLocalTrack::chiSquared_
double chiSquared_
fit chi^2
Definition: TotemRPLocalTrack.h:155
TotemRPLocalTrack::CovarianceMatrixElement
const double & CovarianceMatrixElement(int i, int j) const
Definition: TotemRPLocalTrack.h:139
TotemRPLocalTrack::track_hits_vector_
edm::DetSetVector< FittedRecHit > track_hits_vector_
Definition: TotemRPLocalTrack.h:143
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
JetComb::kMult
Definition: TtSemiLepJetComb.h:35
alignCSCRings.r
r
Definition: alignCSCRings.py:93
TotemRPLocalTrack::x0Variance
double x0Variance() const
Definition: TotemRPLocalTrack.h:87
RunInfoPI::valid
Definition: RunInfoPayloadInspectoHelper.h:16
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TotemRPLocalTrack::valid_
bool valid_
fit valid?
Definition: TotemRPLocalTrack.h:158