CMS 3D CMS Logo

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

#include <TrackResiduals.h>

Public Types

using StorageType = unsigned short
 

Public Member Functions

float pullX (int i) const
 
float pullY (int i) const
 
float residualX (int i) const
 get the residual of the ith hit More...
 
float residualY (int i) const
 
void resize (unsigned int nHits)
 
void setPullXY (int idx, float pullX, float pullY)
 
void setResidualXY (int idx, float residualX, float residualY)
 
 TrackResiduals ()
 

Static Private Member Functions

static StorageType pack_pull (float)
 
static StorageType pack_residual (float)
 
static float unpack_pull (StorageType)
 
static float unpack_residual (StorageType)
 

Private Attributes

std::vector< StorageTypem_storage
 

Detailed Description

Definition at line 8 of file TrackResiduals.h.

Member Typedef Documentation

◆ StorageType

using reco::TrackResiduals::StorageType = unsigned short

Definition at line 11 of file TrackResiduals.h.

Constructor & Destructor Documentation

◆ TrackResiduals()

reco::TrackResiduals::TrackResiduals ( )
inline

Definition at line 13 of file TrackResiduals.h.

13 {}

Member Function Documentation

◆ pack_pull()

TrackResiduals::StorageType reco::TrackResiduals::pack_pull ( float  x)
staticprivate

◆ pack_residual()

TrackResiduals::StorageType reco::TrackResiduals::pack_residual ( float  x)
staticprivate

Definition at line 28 of file TrackResiduals.cc.

References timeUnitHelper::pack(), and x.

Referenced by setResidualXY().

28 { return pack(x, rmin, rmult); }
def pack(high, low)

◆ pullX()

float reco::TrackResiduals::pullX ( int  i) const
inline

Definition at line 20 of file TrackResiduals.h.

References mps_fire::i, m_storage, and unpack_pull().

Referenced by setPullXY().

20 { return unpack_pull(m_storage[4 * i + 2]); }
std::vector< StorageType > m_storage
static float unpack_pull(StorageType)

◆ pullY()

float reco::TrackResiduals::pullY ( int  i) const
inline

Definition at line 21 of file TrackResiduals.h.

References mps_fire::i, m_storage, and unpack_pull().

Referenced by setPullXY().

21 { return unpack_pull(m_storage[4 * i + 3]); }
std::vector< StorageType > m_storage
static float unpack_pull(StorageType)

◆ residualX()

float reco::TrackResiduals::residualX ( int  i) const
inline

get the residual of the ith hit

Definition at line 18 of file TrackResiduals.h.

References mps_fire::i, m_storage, and unpack_residual().

Referenced by setResidualXY().

18 { return unpack_residual(m_storage[4 * i]); }
std::vector< StorageType > m_storage
static float unpack_residual(StorageType)

◆ residualY()

float reco::TrackResiduals::residualY ( int  i) const
inline

Definition at line 19 of file TrackResiduals.h.

References mps_fire::i, m_storage, and unpack_residual().

Referenced by setResidualXY().

19 { return unpack_residual(m_storage[4 * i + 1]); }
std::vector< StorageType > m_storage
static float unpack_residual(StorageType)

◆ resize()

void reco::TrackResiduals::resize ( unsigned int  nHits)
inline

Definition at line 14 of file TrackResiduals.h.

References m_storage, and nHits.

Referenced by trajectoryToResiduals().

14 { m_storage.resize(4 * nHits); }
std::vector< StorageType > m_storage
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits

◆ setPullXY()

void reco::TrackResiduals::setPullXY ( int  idx,
float  pullX,
float  pullY 
)

Definition at line 34 of file TrackResiduals.cc.

References heavyIonCSV_trainingSettings::idx, m_storage, pack_pull(), pullX(), and pullY().

Referenced by trajectoryToResiduals().

34  {
35  m_storage[4 * idx + 2] = pack_pull(pullX);
36  m_storage[4 * idx + 3] = pack_pull(pullY);
37  }
std::vector< StorageType > m_storage
static StorageType pack_pull(float)
float pullX(int i) const
float pullY(int i) const

◆ setResidualXY()

void reco::TrackResiduals::setResidualXY ( int  idx,
float  residualX,
float  residualY 
)

Definition at line 30 of file TrackResiduals.cc.

References heavyIonCSV_trainingSettings::idx, m_storage, pack_residual(), residualX(), and residualY().

Referenced by trajectoryToResiduals().

30  {
33  }
std::vector< StorageType > m_storage
float residualY(int i) const
static StorageType pack_residual(float)
float residualX(int i) const
get the residual of the ith hit

◆ unpack_pull()

float reco::TrackResiduals::unpack_pull ( StorageType  x)
staticprivate

Definition at line 25 of file TrackResiduals.cc.

References TrackingDataMCValidation_Standalone_cff::pmin, beamSpotPI::unpack(), and x.

Referenced by pullX(), and pullY().

25 { return unpack(x, pmin, pdiv); }
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)

◆ unpack_residual()

float reco::TrackResiduals::unpack_residual ( StorageType  x)
staticprivate

Definition at line 27 of file TrackResiduals.cc.

References beamSpotPI::unpack(), and x.

Referenced by residualX(), and residualY().

27 { return unpack(x, rmin, rdiv); }
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)

Member Data Documentation

◆ m_storage

std::vector<StorageType> reco::TrackResiduals::m_storage
private

Definition at line 30 of file TrackResiduals.h.

Referenced by pullX(), pullY(), residualX(), residualY(), resize(), setPullXY(), and setResidualXY().