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

Definition at line 26 of file TrackResiduals.cc.

26 { return pack(x, pmin, pmult); }

References timeUnitHelper::pack().

Referenced by setPullXY().

◆ pack_residual()

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

Definition at line 28 of file TrackResiduals.cc.

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

References timeUnitHelper::pack().

Referenced by setResidualXY().

◆ pullX()

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

Definition at line 20 of file TrackResiduals.h.

20 { return unpack_pull(m_storage[4 * i + 2]); }

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

Referenced by setPullXY().

◆ pullY()

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

Definition at line 21 of file TrackResiduals.h.

21 { return unpack_pull(m_storage[4 * i + 3]); }

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

Referenced by setPullXY().

◆ residualX()

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

get the residual of the ith hit

Definition at line 18 of file TrackResiduals.h.

18 { return unpack_residual(m_storage[4 * i]); }

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

Referenced by setResidualXY().

◆ residualY()

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

Definition at line 19 of file TrackResiduals.h.

19 { return unpack_residual(m_storage[4 * i + 1]); }

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

Referenced by setResidualXY().

◆ resize()

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

Definition at line 14 of file TrackResiduals.h.

14 { m_storage.resize(4 * nHits); }

References m_storage, and nHits.

Referenced by trajectoryToResiduals().

◆ setPullXY()

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

Definition at line 34 of file TrackResiduals.cc.

34  {
35  m_storage[4 * idx + 2] = pack_pull(pullX);
36  m_storage[4 * idx + 3] = pack_pull(pullY);
37  }

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

Referenced by trajectoryToResiduals().

◆ setResidualXY()

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

Definition at line 30 of file TrackResiduals.cc.

30  {
33  }

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

Referenced by trajectoryToResiduals().

◆ unpack_pull()

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

Definition at line 25 of file TrackResiduals.cc.

25 { return unpack(x, pmin, pdiv); }

References BeamSpotPI::unpack().

Referenced by pullX(), and pullY().

◆ unpack_residual()

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

Definition at line 27 of file TrackResiduals.cc.

27 { return unpack(x, rmin, rdiv); }

References BeamSpotPI::unpack().

Referenced by residualX(), and residualY().

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

reco::TrackResiduals::residualY
float residualY(int i) const
Definition: TrackResiduals.h:19
mps_fire.i
i
Definition: mps_fire.py:428
reco::TrackResiduals::pullY
float pullY(int i) const
Definition: TrackResiduals.h:21
reco::TrackResiduals::residualX
float residualX(int i) const
get the residual of the ith hit
Definition: TrackResiduals.h:18
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
nHits
const caConstants::TupleMultiplicity *__restrict__ const HitsOnGPU *__restrict__ double *__restrict__ float *__restrict__ double *__restrict__ uint32_t nHits
Definition: BrokenLineFitOnGPU.h:27
reco::TrackResiduals::m_storage
std::vector< StorageType > m_storage
Definition: TrackResiduals.h:30
timeUnitHelper.pack
def pack(high, low)
Definition: timeUnitHelper.py:3
reco::TrackResiduals::unpack_pull
static float unpack_pull(StorageType)
Definition: TrackResiduals.cc:25
reco::TrackResiduals::pack_pull
static StorageType pack_pull(float)
Definition: TrackResiduals.cc:26
BeamSpotPI::unpack
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
Definition: BeamSpotPayloadInspectorHelper.h:23
reco::TrackResiduals::unpack_residual
static float unpack_residual(StorageType)
Definition: TrackResiduals.cc:27
reco::TrackResiduals::pack_residual
static StorageType pack_residual(float)
Definition: TrackResiduals.cc:28
reco::TrackResiduals::pullX
float pullX(int i) const
Definition: TrackResiduals.h:20