CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
reco::TrackExtra Class Reference

#include <DataFormats/TrackReco/interface/TrackExtra.h>

Inheritance diagram for reco::TrackExtra:
reco::TrackExtraBase

Public Types

enum  { dimension = 5 }
 tracker parameter dimension More...
 
enum  { covarianceSize = dimension * (dimension + 1) / 2 }
 track error matrix size More...
 
typedef math::Error< 5 >::type CovarianceMatrix
 5 parameter covariance matrix More...
 
typedef unsigned int index
 index type More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef math::XYZVector Vector
 spatial vector More...
 
- Public Types inherited from reco::TrackExtraBase
using Chi2sFive = std::vector< unsigned char >
 
using TrajParams = std::vector< LocalTrajectoryParameters >
 

Public Member Functions

CovarianceMatrixfillInner (CovarianceMatrix &v) const
 fill outermost trajectory state curvilinear errors More...
 
CovarianceMatrixfillOuter (CovarianceMatrix &v) const
 fill outermost trajectory state curvilinear errors More...
 
unsigned int innerDetId () const
 DetId of the detector on which surface the innermost state is located. More...
 
const VectorinnerMomentum () const
 momentum vector at innermost hit position More...
 
bool innerOk () const
 returns true if the innermost hit is valid More...
 
const PointinnerPosition () const
 innermost hit position More...
 
CovarianceMatrix innerStateCovariance () const
 innermost trajectory state curvilinear errors More...
 
unsigned int outerDetId () const
 DetId of the detector on which surface the outermost state is located. More...
 
double outerEta () const
 pseudorapidity the momentum vector at the outermost hit position More...
 
const VectorouterMomentum () const
 momentum vector at outermost hit position More...
 
bool outerOk () const
 returns true if the outermost hit is valid More...
 
double outerP () const
 magnitude of momentum vector at the outermost hit position More...
 
double outerPhi () const
 azimuthal angle of the momentum vector at the outermost hit position More...
 
const PointouterPosition () const
 outermost hit position More...
 
double outerPt () const
 transverse momentum at the outermost hit position More...
 
double outerPx () const
 x coordinate of momentum vector at the outermost hit position More...
 
double outerPy () const
 y coordinate of momentum vector at the outermost hit position More...
 
double outerPz () const
 z coordinate of momentum vector at the outermost hit position More...
 
double outerRadius () const
 polar radius of the outermost hit position More...
 
CovarianceMatrix outerStateCovariance () const
 outermost trajectory state curvilinear errors More...
 
double outerTheta () const
 polar angle of the momentum vector at the outermost hit position More...
 
double outerX () const
 x coordinate the outermost hit position More...
 
double outerY () const
 y coordinate the outermost hit position More...
 
double outerZ () const
 z coordinate the outermost hit position More...
 
const TrackResidualsresiduals () const
 get the residuals More...
 
const PropagationDirectionseedDirection () const
 
const edm::RefToBase< TrajectorySeed > & seedRef () const
 
void setResiduals (const TrackResiduals &r)
 set the residuals More...
 
void setSeedRef (const edm::RefToBase< TrajectorySeed > &r)
 
 TrackExtra ()
 default constructor More...
 
 TrackExtra (const Point &outerPosition, const Vector &outerMomentum, bool ok, const Point &innerPosition, const Vector &innerMomentum, bool iok, const CovarianceMatrix &outerState, unsigned int outerId, const CovarianceMatrix &innerState, unsigned int innerId, PropagationDirection seedDir, edm::RefToBase< TrajectorySeed > seedRef=edm::RefToBase< TrajectorySeed >())
 constructor from outermost/innermost position and momentum and Seed information More...
 
- Public Member Functions inherited from reco::TrackExtraBase
Chi2sFive const & chi2sX5 () const
 
unsigned int firstRecHit () const
 
TrackingRecHitRef recHit (unsigned int i) const
 get i-th recHit More...
 
TrackingRecHitRef recHitRef (unsigned int i) const
 get a ref to i-th recHit More...
 
trackingRecHit_iterator recHitsBegin () const
 first iterator over RecHits More...
 
trackingRecHit_iterator recHitsEnd () const
 last iterator over RecHits More...
 
TrackingRecHitCollection const & recHitsProduct () const
 
unsigned int recHitsSize () const
 number of RecHits More...
 
void setHits (TrackingRecHitRefProd const &prod, unsigned firstH, unsigned int nH)
 
void setTrajParams (TrajParams tmps, Chi2sFive chi2s)
 
 TrackExtraBase ()
 default constructor More...
 
TrajParams const & trajParams () const
 

Private Attributes

float innerCovariance_ [covarianceSize]
 innermost trajectory state More...
 
unsigned int innerDetId_
 
Vector innerMomentum_
 momentum vector at innermost hit position More...
 
bool innerOk_
 innermost hit validity flag More...
 
Point innerPosition_
 innermost hit position More...
 
float outerCovariance_ [covarianceSize]
 outermost trajectory state curvilinear errors More...
 
unsigned int outerDetId_
 
Vector outerMomentum_
 momentum vector at outermost hit position More...
 
bool outerOk_
 outermost hit validity flag More...
 
Point outerPosition_
 outermost hit position More...
 
PropagationDirection seedDir_
 
edm::RefToBase< TrajectorySeedseedRef_
 
TrackResiduals trackResiduals_
 unbiased track residuals More...
 

Detailed Description

Additional information about a reconstructed track. It is stored in RECO and supplements the basic information stored in the Track class that is stored on AOD only. If you wish to use information in the TrackExtra class, you should access it via the reference supplied in the Track class.

Author
Luca Lista, INFN

Definition at line 27 of file TrackExtra.h.

Member Typedef Documentation

5 parameter covariance matrix

Definition at line 39 of file TrackExtra.h.

typedef unsigned int reco::TrackExtra::index

index type

Definition at line 41 of file TrackExtra.h.

point in the space

Definition at line 35 of file TrackExtra.h.

spatial vector

Definition at line 37 of file TrackExtra.h.

Member Enumeration Documentation

anonymous enum

tracker parameter dimension

Enumerator
dimension 

Definition at line 31 of file TrackExtra.h.

anonymous enum

track error matrix size

Enumerator
covarianceSize 

Definition at line 33 of file TrackExtra.h.

Constructor & Destructor Documentation

reco::TrackExtra::TrackExtra ( )
inline

default constructor

Definition at line 44 of file TrackExtra.h.

References covarianceSize, mps_fire::i, innerCovariance_, innerMomentum(), innerPosition(), convertSQLiteXML::ok, outerCovariance_, outerMomentum(), outerPosition(), and seedRef().

44  :
46  outerOk_(false),
47  outerDetId_(0),
50  innerOk_(false),
51  innerDetId_(0),
53  seedRef_() {
54  for (index i = 0; i < covarianceSize; ++i) {
55  outerCovariance_[i] = 0;
56  innerCovariance_[i] = 0;
57  }
58  }
bool innerOk_
innermost hit validity flag
Definition: TrackExtra.h:201
Vector outerMomentum_
momentum vector at outermost hit position
Definition: TrackExtra.h:188
bool outerOk_
outermost hit validity flag
Definition: TrackExtra.h:190
float outerCovariance_[covarianceSize]
outermost trajectory state curvilinear errors
Definition: TrackExtra.h:192
edm::RefToBase< TrajectorySeed > seedRef_
Definition: TrackExtra.h:207
unsigned int index
index type
Definition: TrackExtra.h:41
unsigned int outerDetId_
Definition: TrackExtra.h:193
Vector innerMomentum_
momentum vector at innermost hit position
Definition: TrackExtra.h:199
unsigned int innerDetId_
Definition: TrackExtra.h:204
Point innerPosition_
innermost hit position
Definition: TrackExtra.h:197
float innerCovariance_[covarianceSize]
innermost trajectory state
Definition: TrackExtra.h:203
PropagationDirection seedDir_
Definition: TrackExtra.h:206
TrackExtra::TrackExtra ( const Point outerPosition,
const Vector outerMomentum,
bool  ok,
const Point innerPosition,
const Vector innerMomentum,
bool  iok,
const CovarianceMatrix outerState,
unsigned int  outerId,
const CovarianceMatrix innerState,
unsigned int  innerId,
PropagationDirection  seedDir,
edm::RefToBase< TrajectorySeed seedRef = edm::RefToBase<TrajectorySeed>() 
)

constructor from outermost/innermost position and momentum and Seed information

Definition at line 6 of file TrackExtra.cc.

References dimension, mps_fire::i, training_settings::idx, innerCovariance_, and outerCovariance_.

11  :
12 
15  outerMomentum_(outerMomentum),
16  outerOk_(ok),
17  outerDetId_(outerId),
19  innerMomentum_(innerMomentum),
20  innerOk_(iok),
21  innerDetId_(innerId),
22  seedDir_(seedDir),
23  seedRef_(seedRef)
24 {
25  index idx = 0;
26  for (index i = 0; i < dimension; ++i) {
27  for (index j = 0; j <= i; ++j) {
28  outerCovariance_[idx] = outerCov(i, j);
29  innerCovariance_[idx] = innerCov(i, j);
30  ++idx;
31  }
32  }
33 }
bool innerOk_
innermost hit validity flag
Definition: TrackExtra.h:201
Vector outerMomentum_
momentum vector at outermost hit position
Definition: TrackExtra.h:188
bool outerOk_
outermost hit validity flag
Definition: TrackExtra.h:190
float outerCovariance_[covarianceSize]
outermost trajectory state curvilinear errors
Definition: TrackExtra.h:192
edm::RefToBase< TrajectorySeed > seedRef_
Definition: TrackExtra.h:207
unsigned int index
index type
Definition: TrackExtra.h:41
unsigned int outerDetId_
Definition: TrackExtra.h:193
Vector innerMomentum_
momentum vector at innermost hit position
Definition: TrackExtra.h:199
const Point & innerPosition() const
innermost hit position
Definition: TrackExtra.h:81
TrackExtraBase()
default constructor
unsigned int innerDetId_
Definition: TrackExtra.h:204
Point innerPosition_
innermost hit position
Definition: TrackExtra.h:197
Point outerPosition_
outermost hit position
Definition: TrackExtra.h:186
float innerCovariance_[covarianceSize]
innermost trajectory state
Definition: TrackExtra.h:203
const Point & outerPosition() const
outermost hit position
Definition: TrackExtra.h:69
PropagationDirection seedDir_
Definition: TrackExtra.h:206

Member Function Documentation

TrackExtra::CovarianceMatrix & TrackExtra::fillInner ( CovarianceMatrix v) const

fill outermost trajectory state curvilinear errors

Definition at line 54 of file TrackExtra.cc.

References reco::fillCovariance(), and innerCovariance_.

Referenced by outerRadius().

55 {
57 }
PerigeeCovarianceMatrix & fillCovariance(PerigeeCovarianceMatrix &v, const float *data)
float innerCovariance_[covarianceSize]
innermost trajectory state
Definition: TrackExtra.h:203
TrackExtra::CovarianceMatrix & TrackExtra::fillOuter ( CovarianceMatrix v) const

fill outermost trajectory state curvilinear errors

Definition at line 49 of file TrackExtra.cc.

References reco::fillCovariance(), and outerCovariance_.

Referenced by outerRadius().

50 {
52 }
float outerCovariance_[covarianceSize]
outermost trajectory state curvilinear errors
Definition: TrackExtra.h:192
PerigeeCovarianceMatrix & fillCovariance(PerigeeCovarianceMatrix &v, const float *data)
unsigned int reco::TrackExtra::innerDetId ( ) const
inline

DetId of the detector on which surface the innermost state is located.

Definition at line 154 of file TrackExtra.h.

References innerDetId_.

154  {
155  return innerDetId_;
156  }
unsigned int innerDetId_
Definition: TrackExtra.h:204
const Vector& reco::TrackExtra::innerMomentum ( ) const
inline

momentum vector at innermost hit position

Definition at line 85 of file TrackExtra.h.

References innerMomentum_.

Referenced by TrackExtra().

85  {
86  return innerMomentum_;
87  }
Vector innerMomentum_
momentum vector at innermost hit position
Definition: TrackExtra.h:199
bool reco::TrackExtra::innerOk ( ) const
inline

returns true if the innermost hit is valid

Definition at line 89 of file TrackExtra.h.

References innerOk_.

89  {
90  return innerOk_;
91  }
bool innerOk_
innermost hit validity flag
Definition: TrackExtra.h:201
const Point& reco::TrackExtra::innerPosition ( ) const
inline

innermost hit position

Definition at line 81 of file TrackExtra.h.

References innerPosition_.

Referenced by TrackExtra().

81  {
82  return innerPosition_;
83  }
Point innerPosition_
innermost hit position
Definition: TrackExtra.h:197
TrackExtra::CovarianceMatrix TrackExtra::innerStateCovariance ( ) const

innermost trajectory state curvilinear errors

Definition at line 42 of file TrackExtra.cc.

References reco::fillCovariance(), innerCovariance_, and findQualityFiles::v.

Referenced by outerRadius().

43 {
46  return v;
47 }
PerigeeCovarianceMatrix & fillCovariance(PerigeeCovarianceMatrix &v, const float *data)
float innerCovariance_[covarianceSize]
innermost trajectory state
Definition: TrackExtra.h:203
unsigned int reco::TrackExtra::outerDetId ( ) const
inline

DetId of the detector on which surface the outermost state is located.

Definition at line 150 of file TrackExtra.h.

References outerDetId_.

150  {
151  return outerDetId_;
152  }
unsigned int outerDetId_
Definition: TrackExtra.h:193
double reco::TrackExtra::outerEta ( ) const
inline

pseudorapidity the momentum vector at the outermost hit position

Definition at line 129 of file TrackExtra.h.

References outerMomentum().

129  {
130  return outerMomentum().Eta();
131  }
const Vector & outerMomentum() const
momentum vector at outermost hit position
Definition: TrackExtra.h:73
const Vector& reco::TrackExtra::outerMomentum ( ) const
inline

momentum vector at outermost hit position

Definition at line 73 of file TrackExtra.h.

References outerMomentum_.

Referenced by outerEta(), outerP(), outerPhi(), outerPt(), outerTheta(), and TrackExtra().

73  {
74  return outerMomentum_;
75  }
Vector outerMomentum_
momentum vector at outermost hit position
Definition: TrackExtra.h:188
bool reco::TrackExtra::outerOk ( ) const
inline

returns true if the outermost hit is valid

Definition at line 77 of file TrackExtra.h.

References outerOk_.

77  {
78  return outerOk_;
79  }
bool outerOk_
outermost hit validity flag
Definition: TrackExtra.h:190
double reco::TrackExtra::outerP ( ) const
inline

magnitude of momentum vector at the outermost hit position

Definition at line 117 of file TrackExtra.h.

References outerMomentum().

117  {
118  return outerMomentum().R();
119  }
const Vector & outerMomentum() const
momentum vector at outermost hit position
Definition: TrackExtra.h:73
double reco::TrackExtra::outerPhi ( ) const
inline

azimuthal angle of the momentum vector at the outermost hit position

Definition at line 125 of file TrackExtra.h.

References outerMomentum().

125  {
126  return outerMomentum().Phi();
127  }
const Vector & outerMomentum() const
momentum vector at outermost hit position
Definition: TrackExtra.h:73
const Point& reco::TrackExtra::outerPosition ( ) const
inline

outermost hit position

Definition at line 69 of file TrackExtra.h.

References outerPosition_.

Referenced by outerRadius(), and TrackExtra().

69  {
70  return outerPosition_;
71  }
Point outerPosition_
outermost hit position
Definition: TrackExtra.h:186
double reco::TrackExtra::outerPt ( ) const
inline

transverse momentum at the outermost hit position

Definition at line 121 of file TrackExtra.h.

References outerMomentum().

121  {
122  return outerMomentum().Rho();
123  }
const Vector & outerMomentum() const
momentum vector at outermost hit position
Definition: TrackExtra.h:73
double reco::TrackExtra::outerPx ( ) const
inline

x coordinate of momentum vector at the outermost hit position

Definition at line 93 of file TrackExtra.h.

References outerMomentum_.

93  {
94  return outerMomentum_.X();
95  }
Vector outerMomentum_
momentum vector at outermost hit position
Definition: TrackExtra.h:188
double reco::TrackExtra::outerPy ( ) const
inline

y coordinate of momentum vector at the outermost hit position

Definition at line 97 of file TrackExtra.h.

References outerMomentum_.

97  {
98  return outerMomentum_.Y();
99  }
Vector outerMomentum_
momentum vector at outermost hit position
Definition: TrackExtra.h:188
double reco::TrackExtra::outerPz ( ) const
inline

z coordinate of momentum vector at the outermost hit position

Definition at line 101 of file TrackExtra.h.

References outerMomentum_.

101  {
102  return outerMomentum_.Z();
103  }
Vector outerMomentum_
momentum vector at outermost hit position
Definition: TrackExtra.h:188
double reco::TrackExtra::outerRadius ( ) const
inline

polar radius of the outermost hit position

Definition at line 137 of file TrackExtra.h.

References CMS_THREAD_SAFE, fillInner(), fillOuter(), innerStateCovariance(), outerPosition(), outerStateCovariance(), and findQualityFiles::v.

137  {
138  return outerPosition().Rho();
139  }
const Point & outerPosition() const
outermost hit position
Definition: TrackExtra.h:69
TrackExtra::CovarianceMatrix TrackExtra::outerStateCovariance ( ) const

outermost trajectory state curvilinear errors

Definition at line 35 of file TrackExtra.cc.

References reco::fillCovariance(), outerCovariance_, and findQualityFiles::v.

Referenced by outerRadius().

36 {
39  return v;
40 }
float outerCovariance_[covarianceSize]
outermost trajectory state curvilinear errors
Definition: TrackExtra.h:192
PerigeeCovarianceMatrix & fillCovariance(PerigeeCovarianceMatrix &v, const float *data)
double reco::TrackExtra::outerTheta ( ) const
inline

polar angle of the momentum vector at the outermost hit position

Definition at line 133 of file TrackExtra.h.

References outerMomentum().

133  {
134  return outerMomentum().Theta();
135  }
const Vector & outerMomentum() const
momentum vector at outermost hit position
Definition: TrackExtra.h:73
double reco::TrackExtra::outerX ( ) const
inline

x coordinate the outermost hit position

Definition at line 105 of file TrackExtra.h.

References outerPosition_.

105  {
106  return outerPosition_.X();
107  }
Point outerPosition_
outermost hit position
Definition: TrackExtra.h:186
double reco::TrackExtra::outerY ( ) const
inline

y coordinate the outermost hit position

Definition at line 109 of file TrackExtra.h.

References outerPosition_.

109  {
110  return outerPosition_.Y();
111  }
Point outerPosition_
outermost hit position
Definition: TrackExtra.h:186
double reco::TrackExtra::outerZ ( ) const
inline

z coordinate the outermost hit position

Definition at line 113 of file TrackExtra.h.

References outerPosition_.

113  {
114  return outerPosition_.Z();
115  }
Point outerPosition_
outermost hit position
Definition: TrackExtra.h:186
const TrackResiduals& reco::TrackExtra::residuals ( ) const
inline

get the residuals

Definition at line 179 of file TrackExtra.h.

References trackResiduals_.

179  {
180  return trackResiduals_;
181  }
TrackResiduals trackResiduals_
unbiased track residuals
Definition: TrackExtra.h:210
const PropagationDirection& reco::TrackExtra::seedDirection ( ) const
inline

Definition at line 158 of file TrackExtra.h.

References seedDir_.

158  {
159  return seedDir_;
160  }
PropagationDirection seedDir_
Definition: TrackExtra.h:206
const edm::RefToBase<TrajectorySeed>& reco::TrackExtra::seedRef ( ) const
inline

return the edm::reference to the trajectory seed in the original seeds collection. If the collection has been dropped from the Event, the reference may be invalid. Its validity should be tested, before the reference is actually used.

Definition at line 167 of file TrackExtra.h.

References seedRef_.

Referenced by ExtraFromSeeds::produce(), and TrackExtra().

167  {
168  return seedRef_;
169  }
edm::RefToBase< TrajectorySeed > seedRef_
Definition: TrackExtra.h:207
void reco::TrackExtra::setResiduals ( const TrackResiduals r)
inline
void reco::TrackExtra::setSeedRef ( const edm::RefToBase< TrajectorySeed > &  r)
inline

Definition at line 170 of file TrackExtra.h.

References alignCSCRings::r, and seedRef_.

170  {
171  seedRef_ = r;
172  }
edm::RefToBase< TrajectorySeed > seedRef_
Definition: TrackExtra.h:207

Member Data Documentation

float reco::TrackExtra::innerCovariance_[covarianceSize]
private

innermost trajectory state

Definition at line 203 of file TrackExtra.h.

Referenced by fillInner(), innerStateCovariance(), and TrackExtra().

unsigned int reco::TrackExtra::innerDetId_
private

Definition at line 204 of file TrackExtra.h.

Referenced by innerDetId().

Vector reco::TrackExtra::innerMomentum_
private

momentum vector at innermost hit position

Definition at line 199 of file TrackExtra.h.

Referenced by innerMomentum().

bool reco::TrackExtra::innerOk_
private

innermost hit validity flag

Definition at line 201 of file TrackExtra.h.

Referenced by innerOk().

Point reco::TrackExtra::innerPosition_
private

innermost hit position

Definition at line 197 of file TrackExtra.h.

Referenced by innerPosition().

float reco::TrackExtra::outerCovariance_[covarianceSize]
private

outermost trajectory state curvilinear errors

Definition at line 192 of file TrackExtra.h.

Referenced by fillOuter(), outerStateCovariance(), and TrackExtra().

unsigned int reco::TrackExtra::outerDetId_
private

Definition at line 193 of file TrackExtra.h.

Referenced by outerDetId().

Vector reco::TrackExtra::outerMomentum_
private

momentum vector at outermost hit position

Definition at line 188 of file TrackExtra.h.

Referenced by outerMomentum(), outerPx(), outerPy(), and outerPz().

bool reco::TrackExtra::outerOk_
private

outermost hit validity flag

Definition at line 190 of file TrackExtra.h.

Referenced by outerOk().

Point reco::TrackExtra::outerPosition_
private

outermost hit position

Definition at line 186 of file TrackExtra.h.

Referenced by outerPosition(), outerX(), outerY(), and outerZ().

PropagationDirection reco::TrackExtra::seedDir_
private

Definition at line 206 of file TrackExtra.h.

Referenced by seedDirection().

edm::RefToBase<TrajectorySeed> reco::TrackExtra::seedRef_
private

Definition at line 207 of file TrackExtra.h.

Referenced by seedRef(), and setSeedRef().

TrackResiduals reco::TrackExtra::trackResiduals_
private

unbiased track residuals

Definition at line 210 of file TrackExtra.h.

Referenced by residuals(), and setResiduals().