Project
Loading...
Searching...
No Matches
o2::tpc::recohelpers Namespace Reference

Classes

struct  TPCPrimaryTrackSeed
 Reduced primary-track seed used by the TPC row evaluators. More...
 
struct  TPCSectorEdgeBatchResult
 Structure-of-arrays batch result for the TPC row/sector-edge evaluators. More...
 
struct  TPCSectorEdgeConfig
 Configuration for TPC row acceptance and sector-edge classification. More...
 
struct  TPCSectorEdgeResult
 Result of one TPC row/sector-edge evaluation. More...
 
struct  TrajectoryPoint
 Internal global trajectory sample at one TPC row-centre radius. More...
 

TPC row and sector-edge accounting

These helpers evaluate the first outward TPC trajectory branch at sampled Mapper row radii and classify every accepted crossed row using the physical active-pad edge plus an optional inward guard.

enum class  SectorEdgeStatus : int32_t {
  OK = 0 , InvalidInput = 1 , NoRowsCrossed = 2 , PropagationFailed = 3 ,
  FieldNotInitialized = 4
}
 Status returned by the TPC row/sector-edge evaluators. More...
 
void appendTrajectoryState (std::vector< o2::recohelpers::TrackParametersAtRadius > &trajectory, const TrajectoryPoint &p, float qpt, float tgl)
 Debug-only row state; trajectory[row] is the state at that sampled TPC row. Append even the first state rejected by maxSnp. With tracing disabled no momentum conversion is performed.
 
void setMaskBit (std::array< uint32_t, 5 > &mask, int row)
 Set one of the 152 TPC row bits in the five-word row mask.
 
int regionForRow (const o2::tpc::Mapper &mapper, int row)
 Return the Mapper pad-region index containing a global TPC row, or -1 if none.
 
float rowRadius (const o2::tpc::Mapper &mapper, int row)
 Current sampled TPC row radius [cm]; F6 physical pad-centre correction remains pending.
 
float rowLengthRadial (const o2::tpc::Mapper &mapper, int row)
 Radial row thickness, taken from the Mapper pad height [cm].
 
float rowActiveHalfWidth (const o2::tpc::Mapper &mapper, int row)
 Active half-width of one TPC row in local-y from Mapper pad count and pad width [cm].
 
float trajectoryRadialSnp (const TrajectoryPoint &p)
 Radial-frame sin(phiMom-phiPos); independent of the O2 TrackPar alpha rotation.
 
float trajectoryLocalSnp (const TrajectoryPoint &p)
 Backward-compatible internal spelling; use trajectoryRadialSnp for new code.
 
bool rowWithinAcceptance (const TrajectoryPoint &p, const TPCSectorEdgeConfig &cfg)
 True when a valid row-centre trajectory point satisfies the configured z and snp acceptance.
 
bool reachedMaxSnp (const TrajectoryPoint &p, const TPCSectorEdgeConfig &cfg)
 True when the radial-frame inclination reaches the configured stopping boundary.
 
bool trackOutwardReference (const o2::track::TrackPar &track, float &radius)
 Validate the complete input state and report its global reference radius. An outward-only row query does not back-propagate to rows inside this radius.
 
TrajectoryPoint helixAtRadius (const o2::track::TrackPar &track, float radius, float bzKG)
 One TPC row trajectory sample from a complete O2 local five-parameter track.
 
TrajectoryPoint primaryHelixAtRadius (const TPCPrimaryTrackSeed &seed, float radius)
 Legacy reduced-primary adapter to the same complete-track H implementation.
 
void accumulateRow (const o2::tpc::Mapper &mapper, int row, const TrajectoryPoint &p, float rowLength, const TPCSectorEdgeConfig &cfg, TPCSectorEdgeResult &out)
 Apply acceptance and classify one crossed row as Dead, Excluded, or Available.
 
TPCSectorEdgeResult sectorEdgeHelixRows (const o2::track::TrackPar &track, float bzKG, const TPCSectorEdgeConfig &cfg={}, std::vector< o2::recohelpers::TrackParametersAtRadius > *trajectory=nullptr)
 H row evaluator: analytic helix sampled at the current Mapper row radii.
 
TPCSectorEdgeResult sectorEdgeHelixRows (const TPCPrimaryTrackSeed &seed, const TPCSectorEdgeConfig &cfg={}, std::vector< o2::recohelpers::TrackParametersAtRadius > *trajectory=nullptr)
 Reduced-primary compatibility adapter: construct TrackPar and call the full H evaluator.
 
bool plausibleFirstOutwardStep (float dr, float ds, float tgl, float maxSnp)
 Conservative path-continuity guard against a later outward orbit.
 
TPCSectorEdgeResult sectorEdgeO2PropagatorRows (const o2::track::TrackPar &inputTrack, float bzKG, const TPCSectorEdgeConfig &cfg={}, std::vector< o2::recohelpers::TrackParametersAtRadius > *trajectory=nullptr)
 K row evaluator: O2 Propagator traversal of TPC row radii without material correction.
 
TPCSectorEdgeResult sectorEdgeO2PropagatorRows (const TPCPrimaryTrackSeed &seed, const TPCSectorEdgeConfig &cfg={}, std::vector< o2::recohelpers::TrackParametersAtRadius > *trajectory=nullptr)
 Reduced-primary compatibility adapter to complete-state K row evaluation.
 
TPCSectorEdgeResult sectorEdgeStackLinear (const o2::track::TrackPar &track, float bzKG, const TPCSectorEdgeConfig &cfg={}, std::vector< o2::recohelpers::TrackParametersAtRadius > *trajectory=nullptr)
 L row evaluator: stack-local linear approximation to the analytic helix.
 
TPCSectorEdgeResult sectorEdgeStackLinear (const TPCPrimaryTrackSeed &seed, const TPCSectorEdgeConfig &cfg={}, std::vector< o2::recohelpers::TrackParametersAtRadius > *trajectory=nullptr)
 Reduced-primary compatibility adapter to complete-state L row evaluation.
 
template<typename Evaluator >
TPCSectorEdgeBatchResult sectorEdgeBatch (const float *phi, const float *tgl, const float *qpt, const float *vz, std::size_t n, float bzKG, const TPCSectorEdgeConfig &cfg, Evaluator &&evaluate)
 
TPCSectorEdgeBatchResult sectorEdgeHelixRowsBatch (const float *phi, const float *tgl, const float *qpt, const float *vz, std::size_t n, float bzKG, const TPCSectorEdgeConfig &cfg={})
 Batch wrapper for the analytic H TPC row evaluator.
 
TPCSectorEdgeBatchResult sectorEdgeStackLinearBatch (const float *phi, const float *tgl, const float *qpt, const float *vz, std::size_t n, float bzKG, const TPCSectorEdgeConfig &cfg={})
 Batch wrapper for the stack-linear L TPC row evaluator.
 
TPCSectorEdgeBatchResult sectorEdgeO2PropagatorRowsBatch (const float *phi, const float *tgl, const float *qpt, const float *vz, std::size_t n, float bzKG, const TPCSectorEdgeConfig &cfg={})
 Batch wrapper for the O2 Propagator K TPC row evaluator, without material correction.
 
template<typename Evaluator >
TPCSectorEdgeBatchResult localSectorEdgeBatch (const float *x, const float *alpha, const float *y, const float *z, const float *snp, const float *tgl, const float *qpt, std::size_t n, float bzKG, const TPCSectorEdgeConfig &cfg, Evaluator &&evaluate)
 Evaluate row acceptance for a batch of complete O2 local 5D track states. Input arrays are x, alpha, y, z, snp, tgl, q/pT; all are mandatory. absCharge=1 is currently used by the convenience constructor, as in the generic state-at-radius batch interface. For multi-charge tracks use the scalar TrackPar API.
 
TPCSectorEdgeBatchResult localSectorEdgeHelixRowsBatch (const float *x, const float *alpha, const float *y, const float *z, const float *snp, const float *tgl, const float *qpt, std::size_t n, float bzKG, const TPCSectorEdgeConfig &cfg={})
 
TPCSectorEdgeBatchResult localSectorEdgeStackLinearBatch (const float *x, const float *alpha, const float *y, const float *z, const float *snp, const float *tgl, const float *qpt, std::size_t n, float bzKG, const TPCSectorEdgeConfig &cfg={})
 
TPCSectorEdgeBatchResult localSectorEdgeO2PropagatorRowsBatch (const float *x, const float *alpha, const float *y, const float *z, const float *snp, const float *tgl, const float *qpt, std::size_t n, float bzKG, const TPCSectorEdgeConfig &cfg={})
 

Enumeration Type Documentation

◆ SectorEdgeStatus

enum class o2::tpc::recohelpers::SectorEdgeStatus : int32_t
strong

Status returned by the TPC row/sector-edge evaluators.

Enumerator
OK 
InvalidInput 
NoRowsCrossed 
PropagationFailed 
FieldNotInitialized 

Definition at line 666 of file TrackGeometry.h.

Function Documentation

◆ accumulateRow()

void o2::tpc::recohelpers::accumulateRow ( const o2::tpc::Mapper &  mapper,
int  row,
const TrajectoryPoint &  p,
float  rowLength,
const TPCSectorEdgeConfig &  cfg,
TPCSectorEdgeResult &  out 
)
inline

Apply acceptance and classify one crossed row as Dead, Excluded, or Available.

The physical active-pad edge is N_pads(row) * padWidth / 2 in sector-local y. A point outside that edge is Dead. Otherwise the side-dependent guard is measured inward from that edge; points inside the guard are Excluded and the remaining crossed rows are Available.

This function updates row counts, approximate lengths, row masks, and first/last Dead row consistently.

Definition at line 959 of file TrackGeometry.h.

◆ appendTrajectoryState()

void o2::tpc::recohelpers::appendTrajectoryState ( std::vector< o2::recohelpers::TrackParametersAtRadius > &  trajectory,
const TrajectoryPoint &  p,
float  qpt,
float  tgl 
)
inline

Debug-only row state; trajectory[row] is the state at that sampled TPC row. Append even the first state rejected by maxSnp. With tracing disabled no momentum conversion is performed.

Definition at line 810 of file TrackGeometry.h.

◆ helixAtRadius()

TrajectoryPoint o2::tpc::recohelpers::helixAtRadius ( const o2::track::TrackPar &  track,
float  radius,
float  bzKG 
)
inline

One TPC row trajectory sample from a complete O2 local five-parameter track.

Definition at line 916 of file TrackGeometry.h.

◆ localSectorEdgeBatch()

template<typename Evaluator >
TPCSectorEdgeBatchResult o2::tpc::recohelpers::localSectorEdgeBatch ( const float *  x,
const float *  alpha,
const float *  y,
const float *  z,
const float *  snp,
const float *  tgl,
const float *  qpt,
std::size_t  n,
float  bzKG,
const TPCSectorEdgeConfig &  cfg,
Evaluator &&  evaluate 
)
inline

Evaluate row acceptance for a batch of complete O2 local 5D track states. Input arrays are x, alpha, y, z, snp, tgl, q/pT; all are mandatory. absCharge=1 is currently used by the convenience constructor, as in the generic state-at-radius batch interface. For multi-charge tracks use the scalar TrackPar API.

Definition at line 1397 of file TrackGeometry.h.

◆ localSectorEdgeHelixRowsBatch()

TPCSectorEdgeBatchResult o2::tpc::recohelpers::localSectorEdgeHelixRowsBatch ( const float *  x,
const float *  alpha,
const float *  y,
const float *  z,
const float *  snp,
const float *  tgl,
const float *  qpt,
std::size_t  n,
float  bzKG,
const TPCSectorEdgeConfig &  cfg = {} 
)
inline

Definition at line 1421 of file TrackGeometry.h.

◆ localSectorEdgeO2PropagatorRowsBatch()

TPCSectorEdgeBatchResult o2::tpc::recohelpers::localSectorEdgeO2PropagatorRowsBatch ( const float *  x,
const float *  alpha,
const float *  y,
const float *  z,
const float *  snp,
const float *  tgl,
const float *  qpt,
std::size_t  n,
float  bzKG,
const TPCSectorEdgeConfig &  cfg = {} 
)
inline

Definition at line 1443 of file TrackGeometry.h.

◆ localSectorEdgeStackLinearBatch()

TPCSectorEdgeBatchResult o2::tpc::recohelpers::localSectorEdgeStackLinearBatch ( const float *  x,
const float *  alpha,
const float *  y,
const float *  z,
const float *  snp,
const float *  tgl,
const float *  qpt,
std::size_t  n,
float  bzKG,
const TPCSectorEdgeConfig &  cfg = {} 
)
inline

Definition at line 1432 of file TrackGeometry.h.

◆ plausibleFirstOutwardStep()

bool o2::tpc::recohelpers::plausibleFirstOutwardStep ( float  dr,
float  ds,
float  tgl,
float  maxSnp 
)
inline

Conservative path-continuity guard against a later outward orbit.

This is a gross-branch-rejection criterion, NOT an H/K numerical-agreement tolerance. The generous factor 10 avoids flagging near-boundary valid segments; a long detour around a curl cannot be accepted merely because its final radial direction is outward.

Definition at line 1065 of file TrackGeometry.h.

◆ primaryHelixAtRadius()

TrajectoryPoint o2::tpc::recohelpers::primaryHelixAtRadius ( const TPCPrimaryTrackSeed &  seed,
float  radius 
)
inline

Legacy reduced-primary adapter to the same complete-track H implementation.

Definition at line 940 of file TrackGeometry.h.

◆ reachedMaxSnp()

bool o2::tpc::recohelpers::reachedMaxSnp ( const TrajectoryPoint &  p,
const TPCSectorEdgeConfig &  cfg 
)
inline

True when the radial-frame inclination reaches the configured stopping boundary.

Definition at line 891 of file TrackGeometry.h.

◆ regionForRow()

int o2::tpc::recohelpers::regionForRow ( const o2::tpc::Mapper &  mapper,
int  row 
)
inline

Return the Mapper pad-region index containing a global TPC row, or -1 if none.

Definition at line 825 of file TrackGeometry.h.

◆ rowActiveHalfWidth()

float o2::tpc::recohelpers::rowActiveHalfWidth ( const o2::tpc::Mapper &  mapper,
int  row 
)
inline

Active half-width of one TPC row in local-y from Mapper pad count and pad width [cm].

Definition at line 856 of file TrackGeometry.h.

◆ rowLengthRadial()

float o2::tpc::recohelpers::rowLengthRadial ( const o2::tpc::Mapper &  mapper,
int  row 
)
inline

Radial row thickness, taken from the Mapper pad height [cm].

Definition at line 849 of file TrackGeometry.h.

◆ rowRadius()

float o2::tpc::recohelpers::rowRadius ( const o2::tpc::Mapper &  mapper,
int  row 
)
inline

Current sampled TPC row radius [cm]; F6 physical pad-centre correction remains pending.

Definition at line 838 of file TrackGeometry.h.

◆ rowWithinAcceptance()

bool o2::tpc::recohelpers::rowWithinAcceptance ( const TrajectoryPoint &  p,
const TPCSectorEdgeConfig &  cfg 
)
inline

True when a valid row-centre trajectory point satisfies the configured z and snp acceptance.

Definition at line 883 of file TrackGeometry.h.

◆ sectorEdgeBatch()

template<typename Evaluator >
TPCSectorEdgeBatchResult o2::tpc::recohelpers::sectorEdgeBatch ( const float *  phi,
const float *  tgl,
const float *  qpt,
const float *  vz,
std::size_t  n,
float  bzKG,
const TPCSectorEdgeConfig &  cfg,
Evaluator &&  evaluate 
)
inline

Definition at line 1338 of file TrackGeometry.h.

◆ sectorEdgeHelixRows() [1/2]

TPCSectorEdgeResult o2::tpc::recohelpers::sectorEdgeHelixRows ( const o2::track::TrackPar &  track,
float  bzKG,
const TPCSectorEdgeConfig &  cfg = {},
std::vector< o2::recohelpers::TrackParametersAtRadius > *  trajectory = nullptr 
)
inline

H row evaluator: analytic helix sampled at the current Mapper row radii.

Rows are processed from inner to outer radius. Evaluation stops when radial |snp| reaches cfg.maxSnp. The result uses the common Crossed/Dead/Excluded/Available classification in accumulateRow().

Definition at line 1003 of file TrackGeometry.h.

◆ sectorEdgeHelixRows() [2/2]

TPCSectorEdgeResult o2::tpc::recohelpers::sectorEdgeHelixRows ( const TPCPrimaryTrackSeed &  seed,
const TPCSectorEdgeConfig &  cfg = {},
std::vector< o2::recohelpers::TrackParametersAtRadius > *  trajectory = nullptr 
)
inline

Reduced-primary compatibility adapter: construct TrackPar and call the full H evaluator.

Definition at line 1045 of file TrackGeometry.h.

◆ sectorEdgeHelixRowsBatch()

TPCSectorEdgeBatchResult o2::tpc::recohelpers::sectorEdgeHelixRowsBatch ( const float *  phi,
const float *  tgl,
const float *  qpt,
const float *  vz,
std::size_t  n,
float  bzKG,
const TPCSectorEdgeConfig &  cfg = {} 
)
inline

Batch wrapper for the analytic H TPC row evaluator.

Definition at line 1366 of file TrackGeometry.h.

◆ sectorEdgeO2PropagatorRows() [1/2]

TPCSectorEdgeResult o2::tpc::recohelpers::sectorEdgeO2PropagatorRows ( const o2::track::TrackPar &  inputTrack,
float  bzKG,
const TPCSectorEdgeConfig &  cfg = {},
std::vector< o2::recohelpers::TrackParametersAtRadius > *  trajectory = nullptr 
)
inline

K row evaluator: O2 Propagator traversal of TPC row radii without material correction.

The first eligible row is initialized from analytic H propagation of the supplied complete TrackPar, after which the O2 Propagator advances the track row by row with MatCorrType::USEMatCorrNONE. The radial-frame maxSnp stop and common row classification are applied independently of the Propagator's rotating internal tracking frame. Numerical propagation failures return PropagationFailed; a physical snp stop returns OK with the last accepted row reported in maxRadiusCm.

The O2 magnetic field must already be initialized; otherwise FieldNotInitialized is returned.

Definition at line 1086 of file TrackGeometry.h.

◆ sectorEdgeO2PropagatorRows() [2/2]

TPCSectorEdgeResult o2::tpc::recohelpers::sectorEdgeO2PropagatorRows ( const TPCPrimaryTrackSeed &  seed,
const TPCSectorEdgeConfig &  cfg = {},
std::vector< o2::recohelpers::TrackParametersAtRadius > *  trajectory = nullptr 
)
inline

Reduced-primary compatibility adapter to complete-state K row evaluation.

Definition at line 1204 of file TrackGeometry.h.

◆ sectorEdgeO2PropagatorRowsBatch()

TPCSectorEdgeBatchResult o2::tpc::recohelpers::sectorEdgeO2PropagatorRowsBatch ( const float *  phi,
const float *  tgl,
const float *  qpt,
const float *  vz,
std::size_t  n,
float  bzKG,
const TPCSectorEdgeConfig &  cfg = {} 
)
inline

Batch wrapper for the O2 Propagator K TPC row evaluator, without material correction.

Definition at line 1382 of file TrackGeometry.h.

◆ sectorEdgeStackLinear() [1/2]

TPCSectorEdgeResult o2::tpc::recohelpers::sectorEdgeStackLinear ( const o2::track::TrackPar &  track,
float  bzKG,
const TPCSectorEdgeConfig &  cfg = {},
std::vector< o2::recohelpers::TrackParametersAtRadius > *  trajectory = nullptr 
)
inline

L row evaluator: stack-local linear approximation to the analytic helix.

Rows with equal Mapper pad height are treated as one stack. Analytic H endpoints define linear interpolation in phi and z versus radius. If the nominal outer endpoint is unreachable or reaches maxSnp first, the last reachable row below maxSnp becomes the endpoint of a retained partial stack and the outward traversal stops after that stack. Row position, momentum direction, and ds/dr are then evaluated from the local approximation before classification.

Definition at line 1226 of file TrackGeometry.h.

◆ sectorEdgeStackLinear() [2/2]

TPCSectorEdgeResult o2::tpc::recohelpers::sectorEdgeStackLinear ( const TPCPrimaryTrackSeed &  seed,
const TPCSectorEdgeConfig &  cfg = {},
std::vector< o2::recohelpers::TrackParametersAtRadius > *  trajectory = nullptr 
)
inline

Reduced-primary compatibility adapter to complete-state L row evaluation.

Definition at line 1323 of file TrackGeometry.h.

◆ sectorEdgeStackLinearBatch()

TPCSectorEdgeBatchResult o2::tpc::recohelpers::sectorEdgeStackLinearBatch ( const float *  phi,
const float *  tgl,
const float *  qpt,
const float *  vz,
std::size_t  n,
float  bzKG,
const TPCSectorEdgeConfig &  cfg = {} 
)
inline

Batch wrapper for the stack-linear L TPC row evaluator.

Definition at line 1374 of file TrackGeometry.h.

◆ setMaskBit()

void o2::tpc::recohelpers::setMaskBit ( std::array< uint32_t, 5 > &  mask,
int  row 
)
inline

Set one of the 152 TPC row bits in the five-word row mask.

Definition at line 819 of file TrackGeometry.h.

◆ trackOutwardReference()

bool o2::tpc::recohelpers::trackOutwardReference ( const o2::track::TrackPar &  track,
float &  radius 
)
inline

Validate the complete input state and report its global reference radius. An outward-only row query does not back-propagate to rows inside this radius.

Definition at line 900 of file TrackGeometry.h.

◆ trajectoryLocalSnp()

float o2::tpc::recohelpers::trajectoryLocalSnp ( const TrajectoryPoint &  p)
inline

Backward-compatible internal spelling; use trajectoryRadialSnp for new code.

Definition at line 880 of file TrackGeometry.h.

◆ trajectoryRadialSnp()

float o2::tpc::recohelpers::trajectoryRadialSnp ( const TrajectoryPoint &  p)
inline

Radial-frame sin(phiMom-phiPos); independent of the O2 TrackPar alpha rotation.

This is the row-stopping convention ratified for PHASE_0_3. The Mapper sector-local inclination (phiMom-alphaSector) is distinct and does not control row reachability.

Definition at line 871 of file TrackGeometry.h.