CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
< CTPPSPixelFittedRecHit
track_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

Definition at line 90 of file CTPPSPixelLocalTrack.h.

covariance matrix size

Definition at line 91 of file CTPPSPixelLocalTrack.h.

Member Enumeration Documentation

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::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::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 ( )
inline

Definition at line 108 of file CTPPSPixelLocalTrack.h.

108 {}

Member Function Documentation

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

Definition at line 111 of file CTPPSPixelLocalTrack.h.

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

Referenced by RPixPlaneCombinatoryTracking::findTracks(), and RPixPlaneCombinatoryTracking::fitTrack().

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:234
edm::DetSetVector< CTPPSPixelFittedRecHit > track_hits_vector_
float CTPPSPixelLocalTrack::chiSquared ( ) const
inline

Definition at line 155 of file CTPPSPixelLocalTrack.h.

References chiSquared_.

155 { return chiSquared_; }
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
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_
GlobalVector CTPPSPixelLocalTrack::directionVector ( ) const
inline

Definition at line 146 of file CTPPSPixelLocalTrack.h.

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

Referenced by RPixPlaneCombinatoryTracking::calculatePointOnDetector().

146  {
147  GlobalVector vect(tx(), ty(), 1);
148  return vect.unit();
149  }
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_
bool CTPPSPixelLocalTrack::isValid ( void  ) const
inline
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
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
bool CTPPSPixelLocalTrack::operator< ( const CTPPSPixelLocalTrack r)

Definition at line 39 of file CTPPSPixelLocalTrack.cc.

References dimension, mps_fire::i, 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) {
47  return true;
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) ...
const ParameterVector& CTPPSPixelLocalTrack::parameterVector ( ) const
inline

Definition at line 151 of file CTPPSPixelLocalTrack.h.

References track_params_vector_.

Referenced by RPixPlaneCombinatoryTracking::calculatePointOnDetector().

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

Definition at line 188 of file CTPPSPixelLocalTrack.h.

References recoInfo_.

Referenced by setRecoInfo().

188 { return recoInfo_; }
CTPPSpixelLocalTrackReconstructionInfo recoInfo_
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
void CTPPSPixelLocalTrack::setValid ( bool  valid)
inline

Definition at line 184 of file CTPPSPixelLocalTrack.h.

References valid_.

Referenced by RPixPlaneCombinatoryTracking::fitTrack().

184 { valid_ = valid; }
void CTPPSPixelLocalTrack::setZ0 ( float  z0)
inline

Definition at line 134 of file CTPPSPixelLocalTrack.h.

References z0(), and z0_.

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) ...
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, 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) ...
AlgebraicSymMatrix22 CTPPSPixelLocalTrack::trackPointInterpolationCovariance ( float  z) const

Definition at line 15 of file CTPPSPixelLocalTrack.cc.

References h, par_covariance_matrix_, 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
float CTPPSPixelLocalTrack::tx ( ) const
inline

Definition at line 136 of file CTPPSPixelLocalTrack.h.

References 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) ...
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:19
CovarianceMatrix par_covariance_matrix_
float CTPPSPixelLocalTrack::ty ( ) const
inline

Definition at line 141 of file CTPPSPixelLocalTrack.h.

References 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) ...
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:19
CovarianceMatrix par_covariance_matrix_
float CTPPSPixelLocalTrack::x0 ( ) const
inline

Definition at line 117 of file CTPPSPixelLocalTrack.h.

References 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) ...
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:19
CovarianceMatrix par_covariance_matrix_
float CTPPSPixelLocalTrack::x0Variance ( ) const
inline

Definition at line 121 of file CTPPSPixelLocalTrack.h.

References par_covariance_matrix_, and x0.

121  {
122  return par_covariance_matrix_[(unsigned int)TrackPar::x0][(unsigned int)TrackPar::x0];
123  }
CovarianceMatrix par_covariance_matrix_
float CTPPSPixelLocalTrack::y0 ( ) const
inline

Definition at line 125 of file CTPPSPixelLocalTrack.h.

References 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) ...
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:19
CovarianceMatrix par_covariance_matrix_
float CTPPSPixelLocalTrack::y0Variance ( ) const
inline

Definition at line 129 of file CTPPSPixelLocalTrack.h.

References par_covariance_matrix_, and y0.

129  {
130  return par_covariance_matrix_[(unsigned int)TrackPar::y0][(unsigned int)TrackPar::y0];
131  }
CovarianceMatrix par_covariance_matrix_
float CTPPSPixelLocalTrack::z0 ( ) const
inline

Definition at line 133 of file CTPPSPixelLocalTrack.h.

References z0_.

Referenced by RPixPlaneCombinatoryTracking::calculatePointOnDetector(), and setZ0().

133 { return z0_; }

Member Data Documentation

float CTPPSPixelLocalTrack::chiSquared_
private

fit chi^2

Definition at line 206 of file CTPPSPixelLocalTrack.h.

Referenced by chiSquared(), and chiSquaredOverNDF().

constexpr int CTPPSPixelLocalTrack::covarianceSize = dimension * dimension
static

Definition at line 94 of file CTPPSPixelLocalTrack.h.

constexpr int CTPPSPixelLocalTrack::dimension = 4
static
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().

CovarianceMatrix CTPPSPixelLocalTrack::par_covariance_matrix_
private
CTPPSpixelLocalTrackReconstructionInfo CTPPSPixelLocalTrack::recoInfo_
private

Definition at line 214 of file CTPPSPixelLocalTrack.h.

Referenced by recoInfo(), and setRecoInfo().

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

Definition at line 194 of file CTPPSPixelLocalTrack.h.

Referenced by addHit(), and hits().

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().

bool CTPPSPixelLocalTrack::valid_
private

fit valid?

Definition at line 209 of file CTPPSPixelLocalTrack.h.

Referenced by isValid(), and setValid().

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().