CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
CTPPSPixelLocalTrack Class Reference

#include <CTPPSPixelLocalTrack.h>

Public Types

typedef math::Error< dimension >::type CovarianceMatrix
 
typedef math::Vector< dimension >::type ParameterVector
 covariance matrix size More...
 
enum  TrackPar { TrackPar::x0 = 0, TrackPar::y0 = 1, TrackPar::tx = 2, TrackPar::ty = 3 }
 

Public Member Functions

void addHit (unsigned int detId, const CTPPSPixelFittedRecHit &hit)
 
float chiSquared () const
 
float chiSquaredOverNDF () const
 
const CovarianceMatrixcovarianceMatrix () const
 
 CTPPSPixelLocalTrack ()
 
 CTPPSPixelLocalTrack (float z0, const ParameterVector &track_params_vector, const CovarianceMatrix &par_covariance_matrix, float chiSquared)
 
GlobalVector directionVector () const
 
const edm::DetSetVector< CTPPSPixelFittedRecHit > & hits () const
 
bool isValid () const
 
int ndf () const
 
unsigned short numberOfPointsUsedForFit () const
 
bool operator< (const CTPPSPixelLocalTrack &r)
 
const ParameterVectorparameterVector () const
 
CTPPSpixelLocalTrackReconstructionInfo recoInfo () const
 
void setRecoInfo (CTPPSpixelLocalTrackReconstructionInfo recoInfo)
 
void setValid (bool valid)
 
void setZ0 (float z0)
 
GlobalPoint trackCentrePoint ()
 
GlobalPoint trackPoint (float z) const
 returns the point from which the track is passing by at the selected z More...
 
AlgebraicSymMatrix22 trackPointInterpolationCovariance (float z) const
 
float tx () const
 
float txSigma () const
 
float ty () const
 
float tySigma () const
 
float x0 () const
 
float x0Sigma () const
 
float x0Variance () const
 
float y0 () const
 
float y0Sigma () const
 
float y0Variance () const
 
float z0 () const
 
 ~CTPPSPixelLocalTrack ()
 

Static Public Attributes

static constexpr int covarianceSize = dimension * dimension
 
static constexpr int dimension = 4
 

Private Attributes

float chiSquared_
 fit chi^2 More...
 
int numberOfPointsUsedForFit_
 number of points used for the track fit More...
 
CovarianceMatrix par_covariance_matrix_
 
CTPPSpixelLocalTrackReconstructionInfo recoInfo_
 
edm::DetSetVector< CTPPSPixelFittedRecHittrack_hits_vector_
 
ParameterVector track_params_vector_
 track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ... More...
 
bool valid_
 fit valid? More...
 
float z0_
 

Detailed Description

Definition at line 84 of file CTPPSPixelLocalTrack.h.

Member Typedef Documentation

◆ CovarianceMatrix

Definition at line 90 of file CTPPSPixelLocalTrack.h.

◆ ParameterVector

covariance matrix size

Definition at line 91 of file CTPPSPixelLocalTrack.h.

Member Enumeration Documentation

◆ TrackPar

Enumerator
x0 
y0 
tx 
ty 

Definition at line 86 of file CTPPSPixelLocalTrack.h.

86 { x0 = 0, y0 = 1, tx = 2, ty = 3 };

Constructor & Destructor Documentation

◆ CTPPSPixelLocalTrack() [1/2]

CTPPSPixelLocalTrack::CTPPSPixelLocalTrack ( )
inline

Definition at line 96 of file CTPPSPixelLocalTrack.h.

97  : z0_(0),
98  chiSquared_(0),
99  valid_(false),
int numberOfPointsUsedForFit_
number of points used for the track fit
CTPPSpixelLocalTrackReconstructionInfo recoInfo_

◆ CTPPSPixelLocalTrack() [2/2]

CTPPSPixelLocalTrack::CTPPSPixelLocalTrack ( float  z0,
const ParameterVector track_params_vector,
const CovarianceMatrix par_covariance_matrix,
float  chiSquared 
)

Definition at line 27 of file CTPPSPixelLocalTrack.cc.

31  : track_params_vector_(track_params_vector),
32  z0_(z0),
33  par_covariance_matrix_(par_covariance_matrix),
35  valid_(true),
int numberOfPointsUsedForFit_
number of points used for the track fit
ParameterVector track_params_vector_
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...
CTPPSpixelLocalTrackReconstructionInfo recoInfo_
CovarianceMatrix par_covariance_matrix_

◆ ~CTPPSPixelLocalTrack()

CTPPSPixelLocalTrack::~CTPPSPixelLocalTrack ( )
inline

Definition at line 108 of file CTPPSPixelLocalTrack.h.

108 {}

Member Function Documentation

◆ addHit()

void CTPPSPixelLocalTrack::addHit ( unsigned int  detId,
const CTPPSPixelFittedRecHit hit 
)
inline

Definition at line 111 of file CTPPSPixelLocalTrack.h.

References hcalRecHitTable_cff::detId, edm::DetSetVector< T >::find_or_insert(), numberOfPointsUsedForFit_, edm::DetSet< T >::push_back(), and track_hits_vector_.

Referenced by RPixPlaneCombinatoryTracking::findTracks().

111  {
113  if (hit.isUsedForFit())
115  }
void push_back(const T &t)
Definition: DetSet.h:66
int numberOfPointsUsedForFit_
number of points used for the track fit
reference find_or_insert(det_id_type id)
Definition: DetSetVector.h:225
edm::DetSetVector< CTPPSPixelFittedRecHit > track_hits_vector_

◆ chiSquared()

float CTPPSPixelLocalTrack::chiSquared ( ) const
inline

Definition at line 155 of file CTPPSPixelLocalTrack.h.

References chiSquared_.

155 { return chiSquared_; }

◆ chiSquaredOverNDF()

float CTPPSPixelLocalTrack::chiSquaredOverNDF ( ) const
inline

Definition at line 157 of file CTPPSPixelLocalTrack.h.

References chiSquared_, dimension, and numberOfPointsUsedForFit_.

Referenced by RPixPlaneCombinatoryTracking::findTracks().

157  {
159  return -999.;
160  else
162  }
int numberOfPointsUsedForFit_
number of points used for the track fit
static constexpr int dimension

◆ covarianceMatrix()

const CovarianceMatrix& CTPPSPixelLocalTrack::covarianceMatrix ( ) const
inline

Definition at line 153 of file CTPPSPixelLocalTrack.h.

References par_covariance_matrix_.

153 { return par_covariance_matrix_; }
CovarianceMatrix par_covariance_matrix_

◆ directionVector()

GlobalVector CTPPSPixelLocalTrack::directionVector ( ) const
inline

Definition at line 146 of file CTPPSPixelLocalTrack.h.

References tx(), ty(), and Vector3DBase< T, FrameTag >::unit().

146  {
147  GlobalVector vect(tx(), ty(), 1);
148  return vect.unit();
149  }

◆ hits()

const edm::DetSetVector<CTPPSPixelFittedRecHit>& CTPPSPixelLocalTrack::hits ( ) const
inline

Definition at line 110 of file CTPPSPixelLocalTrack.h.

References track_hits_vector_.

Referenced by RPixPlaneCombinatoryTracking::findTracks().

110 { return track_hits_vector_; }
edm::DetSetVector< CTPPSPixelFittedRecHit > track_hits_vector_

◆ isValid()

bool CTPPSPixelLocalTrack::isValid ( void  ) const
inline

◆ ndf()

int CTPPSPixelLocalTrack::ndf ( void  ) const
inline

Definition at line 164 of file CTPPSPixelLocalTrack.h.

References dimension, and numberOfPointsUsedForFit_.

Referenced by RPixPlaneCombinatoryTracking::findTracks().

164 { return (2 * numberOfPointsUsedForFit_ - dimension); }
int numberOfPointsUsedForFit_
number of points used for the track fit
static constexpr int dimension

◆ numberOfPointsUsedForFit()

unsigned short CTPPSPixelLocalTrack::numberOfPointsUsedForFit ( ) const
inline

Definition at line 191 of file CTPPSPixelLocalTrack.h.

References numberOfPointsUsedForFit_.

191 { return numberOfPointsUsedForFit_; }
int numberOfPointsUsedForFit_
number of points used for the track fit

◆ operator<()

bool CTPPSPixelLocalTrack::operator< ( const CTPPSPixelLocalTrack r)

Definition at line 39 of file CTPPSPixelLocalTrack.cc.

References dimension, mps_fire::i, alignCSCRings::r, track_params_vector_, and z0_.

39  {
40  if (z0_ < r.z0_)
41  return true;
42  if (z0_ > r.z0_)
43  return false;
44 
45  for (int i = 0; i < CTPPSPixelLocalTrack::dimension; ++i) {
46  if (track_params_vector_[i] < r.track_params_vector_[i])
47  return true;
48  if (track_params_vector_[i] > r.track_params_vector_[i])
49  return false;
50  }
51 
52  return false;
53 }
static constexpr int dimension
ParameterVector track_params_vector_
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...

◆ parameterVector()

const ParameterVector& CTPPSPixelLocalTrack::parameterVector ( ) const
inline

Definition at line 151 of file CTPPSPixelLocalTrack.h.

References track_params_vector_.

151 { return track_params_vector_; }
ParameterVector track_params_vector_
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...

◆ recoInfo()

CTPPSpixelLocalTrackReconstructionInfo CTPPSPixelLocalTrack::recoInfo ( ) const
inline

Definition at line 188 of file CTPPSPixelLocalTrack.h.

References recoInfo_.

Referenced by setRecoInfo().

188 { return recoInfo_; }
CTPPSpixelLocalTrackReconstructionInfo recoInfo_

◆ setRecoInfo()

void CTPPSPixelLocalTrack::setRecoInfo ( CTPPSpixelLocalTrackReconstructionInfo  recoInfo)
inline

Definition at line 189 of file CTPPSPixelLocalTrack.h.

References recoInfo(), and recoInfo_.

189 { recoInfo_ = recoInfo; }
CTPPSpixelLocalTrackReconstructionInfo recoInfo_
CTPPSpixelLocalTrackReconstructionInfo recoInfo() const

◆ setValid()

void CTPPSPixelLocalTrack::setValid ( bool  valid)
inline

◆ setZ0()

void CTPPSPixelLocalTrack::setZ0 ( float  z0)
inline

Definition at line 134 of file CTPPSPixelLocalTrack.h.

References z0(), and z0_.

◆ trackCentrePoint()

GlobalPoint CTPPSPixelLocalTrack::trackCentrePoint ( )
inline

Definition at line 175 of file CTPPSPixelLocalTrack.h.

References track_params_vector_, x0, y0, and z0_.

175  {
176  return GlobalPoint(
177  track_params_vector_[(unsigned int)TrackPar::x0], track_params_vector_[(unsigned int)TrackPar::y0], z0_);
178  }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
ParameterVector track_params_vector_
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...

◆ trackPoint()

GlobalPoint CTPPSPixelLocalTrack::trackPoint ( float  z) const
inline

returns the point from which the track is passing by at the selected z

Definition at line 167 of file CTPPSPixelLocalTrack.h.

References track_params_vector_, tx, ty, x0, y0, z, and z0_.

167  {
168  float delta_z = z - z0_;
169  return GlobalPoint(
170  track_params_vector_[(unsigned int)TrackPar::x0] + track_params_vector_[(unsigned int)TrackPar::tx] * delta_z,
171  track_params_vector_[(unsigned int)TrackPar::y0] + track_params_vector_[(unsigned int)TrackPar::ty] * delta_z,
172  z);
173  }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
ParameterVector track_params_vector_
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...

◆ trackPointInterpolationCovariance()

AlgebraicSymMatrix22 CTPPSPixelLocalTrack::trackPointInterpolationCovariance ( float  z) const

Definition at line 15 of file CTPPSPixelLocalTrack.cc.

References h, par_covariance_matrix_, z, and z0_.

15  {
17  h(0, 0) = 1;
18  h(1, 1) = 1;
19  h(0, 2) = z - z0_;
20  h(1, 3) = z - z0_;
21 
22  return ROOT::Math::Similarity(h, par_covariance_matrix_);
23 }
ROOT::Math::SMatrix< double, N, M > type
Definition: Matrix.h:9
CovarianceMatrix par_covariance_matrix_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ tx()

float CTPPSPixelLocalTrack::tx ( ) const
inline

Definition at line 136 of file CTPPSPixelLocalTrack.h.

References createfilelist::int, track_params_vector_, and tx.

Referenced by directionVector().

136 { return track_params_vector_[(unsigned int)TrackPar::tx]; }
ParameterVector track_params_vector_
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...

◆ txSigma()

float CTPPSPixelLocalTrack::txSigma ( ) const
inline

Definition at line 137 of file CTPPSPixelLocalTrack.h.

References par_covariance_matrix_, mathSSE::sqrt(), and tx.

137  {
138  return sqrt(par_covariance_matrix_[(unsigned int)TrackPar::tx][(unsigned int)TrackPar::tx]);
139  }
T sqrt(T t)
Definition: SSEVec.h:23
CovarianceMatrix par_covariance_matrix_

◆ ty()

float CTPPSPixelLocalTrack::ty ( ) const
inline

Definition at line 141 of file CTPPSPixelLocalTrack.h.

References createfilelist::int, track_params_vector_, and ty.

Referenced by directionVector().

141 { return track_params_vector_[(unsigned int)TrackPar::ty]; }
ParameterVector track_params_vector_
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...

◆ tySigma()

float CTPPSPixelLocalTrack::tySigma ( ) const
inline

Definition at line 142 of file CTPPSPixelLocalTrack.h.

References par_covariance_matrix_, mathSSE::sqrt(), and ty.

142  {
143  return sqrt(par_covariance_matrix_[(unsigned int)TrackPar::ty][(unsigned int)TrackPar::ty]);
144  }
T sqrt(T t)
Definition: SSEVec.h:23
CovarianceMatrix par_covariance_matrix_

◆ x0()

float CTPPSPixelLocalTrack::x0 ( ) const
inline

Definition at line 117 of file CTPPSPixelLocalTrack.h.

References createfilelist::int, track_params_vector_, and x0.

117 { return track_params_vector_[(unsigned int)TrackPar::x0]; }
ParameterVector track_params_vector_
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...

◆ x0Sigma()

float CTPPSPixelLocalTrack::x0Sigma ( ) const
inline

Definition at line 118 of file CTPPSPixelLocalTrack.h.

References par_covariance_matrix_, mathSSE::sqrt(), and x0.

118  {
119  return sqrt(par_covariance_matrix_[(unsigned int)TrackPar::x0][(unsigned int)TrackPar::x0]);
120  }
T sqrt(T t)
Definition: SSEVec.h:23
CovarianceMatrix par_covariance_matrix_

◆ x0Variance()

float CTPPSPixelLocalTrack::x0Variance ( ) const
inline

Definition at line 121 of file CTPPSPixelLocalTrack.h.

References createfilelist::int, par_covariance_matrix_, and x0.

121  {
122  return par_covariance_matrix_[(unsigned int)TrackPar::x0][(unsigned int)TrackPar::x0];
123  }
CovarianceMatrix par_covariance_matrix_

◆ y0()

float CTPPSPixelLocalTrack::y0 ( ) const
inline

Definition at line 125 of file CTPPSPixelLocalTrack.h.

References createfilelist::int, track_params_vector_, and y0.

125 { return track_params_vector_[(unsigned int)TrackPar::y0]; }
ParameterVector track_params_vector_
track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0) ...

◆ y0Sigma()

float CTPPSPixelLocalTrack::y0Sigma ( ) const
inline

Definition at line 126 of file CTPPSPixelLocalTrack.h.

References par_covariance_matrix_, mathSSE::sqrt(), and y0.

126  {
127  return sqrt(par_covariance_matrix_[(unsigned int)TrackPar::y0][(unsigned int)TrackPar::y0]);
128  }
T sqrt(T t)
Definition: SSEVec.h:23
CovarianceMatrix par_covariance_matrix_

◆ y0Variance()

float CTPPSPixelLocalTrack::y0Variance ( ) const
inline

Definition at line 129 of file CTPPSPixelLocalTrack.h.

References createfilelist::int, par_covariance_matrix_, and y0.

129  {
130  return par_covariance_matrix_[(unsigned int)TrackPar::y0][(unsigned int)TrackPar::y0];
131  }
CovarianceMatrix par_covariance_matrix_

◆ z0()

float CTPPSPixelLocalTrack::z0 ( ) const
inline

Definition at line 133 of file CTPPSPixelLocalTrack.h.

References z0_.

Referenced by setZ0().

133 { return z0_; }

Member Data Documentation

◆ chiSquared_

float CTPPSPixelLocalTrack::chiSquared_
private

fit chi^2

Definition at line 206 of file CTPPSPixelLocalTrack.h.

Referenced by chiSquared(), and chiSquaredOverNDF().

◆ covarianceSize

constexpr int CTPPSPixelLocalTrack::covarianceSize = dimension * dimension
static

Definition at line 94 of file CTPPSPixelLocalTrack.h.

◆ dimension

constexpr int CTPPSPixelLocalTrack::dimension = 4
static

◆ numberOfPointsUsedForFit_

int CTPPSPixelLocalTrack::numberOfPointsUsedForFit_
private

number of points used for the track fit

Definition at line 212 of file CTPPSPixelLocalTrack.h.

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

◆ par_covariance_matrix_

CovarianceMatrix CTPPSPixelLocalTrack::par_covariance_matrix_
private

◆ recoInfo_

CTPPSpixelLocalTrackReconstructionInfo CTPPSPixelLocalTrack::recoInfo_
private

Definition at line 214 of file CTPPSPixelLocalTrack.h.

Referenced by recoInfo(), and setRecoInfo().

◆ track_hits_vector_

edm::DetSetVector<CTPPSPixelFittedRecHit> CTPPSPixelLocalTrack::track_hits_vector_
private

Definition at line 194 of file CTPPSPixelLocalTrack.h.

Referenced by addHit(), and hits().

◆ track_params_vector_

ParameterVector CTPPSPixelLocalTrack::track_params_vector_
private

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

Definition at line 197 of file CTPPSPixelLocalTrack.h.

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

◆ valid_

bool CTPPSPixelLocalTrack::valid_
private

fit valid?

Definition at line 209 of file CTPPSPixelLocalTrack.h.

Referenced by isValid(), and setValid().

◆ z0_

float CTPPSPixelLocalTrack::z0_
private

z where x0 and y0 are evaluated. filled from TotemRPGeometry::GetRPGlobalTranslation

Definition at line 201 of file CTPPSPixelLocalTrack.h.

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