Project
Loading...
Searching...
No Matches
o2::tpc::TrackInterpolation Class Reference

#include <TrackInterpolation.h>

Classes

struct  CacheStruct
 Structure for caching positions, covariances and angles for extrapolations from ITS and TRD/TOF and for interpolation. More...
 
struct  TrackValidationData
 
struct  ValidationPoint
 Structure for on-the-fly re-calculated track parameters at the validation stage. More...
 

Public Types

enum  { ExtOut = 0 , ExtIn , Int , NIndices }
 Enumeration for indexing the arrays of the CacheStruct. More...
 
using MatCorrType = o2::base::Propagator::MatCorrType
 

Public Member Functions

 TrackInterpolation ()=default
 Default constructor.
 
 TrackInterpolation (const TrackInterpolation &)=delete
 
TrackInterpolationoperator= (const TrackInterpolation &)=delete
 
 ~TrackInterpolation ()
 
void init (o2::dataformats::GlobalTrackID::mask_t src, o2::dataformats::GlobalTrackID::mask_t srcMap)
 Initialize everything, set the requested track sources.
 
bool isInputTrackAccepted (const o2::dataformats::GlobalTrackID &gid, const o2::globaltracking::RecoContainer::GlobalIDSet &gidTable, const o2::dataformats::PrimaryVertex &pv) const
 Check if input track passes configured cuts.
 
o2::dataformats::GlobalTrackID::Source findValidSource (const o2::dataformats::GlobalTrackID::mask_t mask, const o2::dataformats::GlobalTrackID::Source src) const
 For given vertex track source which is not in mSourcesConfigured find the seeding source which is enabled.
 
void prepareInputTrackSample (const o2::globaltracking::RecoContainer &inp)
 Prepare input track sample (not relying on CreateTracksVariadic functionality)
 
bool isTrackSelected (const o2::track::TrackParCov &trk) const
 Given the defined downsampling factor tsalisThreshold check if track is selected.
 
void process ()
 Main processing function.
 
void extrapolateTrack (int iSeed)
 
void interpolateTrack (int iSeed)
 
void reset ()
 Reset cache and output vectors.
 
bool refITSTrack (o2::dataformats::GlobalTrackID, int iSeed)
 
int8_t validateTrack (const TrackData &trk, TrackValidationData &params, const std::vector< TPCClusterResiduals > &clsRes, bool interpol)
 
bool outlierFiltering (const TrackData &trk, TrackValidationData &params, const std::vector< TPCClusterResiduals > &clsRes)
 
float checkResiduals (const TrackData &trk, TrackValidationData &params, const std::vector< TPCClusterResiduals > &clsRes)
 
bool compareToHelix (const TrackData &trk, TrackValidationData &params, const std::vector< TPCClusterResiduals > &clsRes)
 
void diffToLocLine (TrackValidationData &params, int start, int np)
 For a given set of points, calculate the differences from each point to the fitted lines from all other points in their neighbourhoods (+- nMAShort points)
 
void diffToMA (const int np, const std::array< float, param::NPadRows > &y, std::array< float, param::NPadRows > &diffMA)
 For a given set of points, calculate their deviation from the moving average (build from the neighbourhood +- nMALong points)
 
void setNHBPerTF (int n)
 
void setTPCVDrift (const o2::tpc::VDriftCorrFact &v)
 
void setMatCorr (MatCorrType matCorr)
 Sets the flag if material correction should be applied when extrapolating the tracks.
 
void setMaxTracksPerTF (int n)
 Sets the maximum number of tracks to be processed (successfully) per TF.
 
void setAddTracksForMapPerTF (int n)
 In addition to mMaxTracksPerTF up to the set number of additional tracks can be processed.
 
void setDumpTrackPoints ()
 Enable full output.
 
void setITSClusterDictionary (const o2::itsmft::TopologyDictionary *dict)
 Allow setting the ITS cluster dictionary from outside.
 
void setProcessSeeds ()
 Enable processing of seeds.
 
void setProcessITSTPConly ()
 Enable ITS-TPC only processing.
 
void setSqrtS (float s)
 Set the centre of mass energy required for pT downsampling Tsalis function.
 
void setExtDetResid (bool v)
 
int processTRDLayer (const o2::trd::TrackTRD &trkTRD, int iLayer, o2::track::TrackParCov &trkWork, std::array< float, 2 > *trkltTRDYZ=nullptr, std::array< float, 3 > *trkltTRDCov=nullptr, TrackData *trkData=nullptr, o2::trd::Tracklet64 *trk64=nullptr, o2::trd::CalibratedTracklet *trkCalib=nullptr)
 
std::vector< UnbinnedResid > & getClusterResiduals ()
 
std::vector< DetInfoResid > & getClusterResidualsDetInfo ()
 
std::vector< TrackDataCompact > & getTrackDataCompact ()
 
std::vector< TrackDataExtended > & getTrackDataExtended ()
 
std::vector< TrackData > & getReferenceTracks ()
 
void setLane (int lID, int nL)
 
void finalize ()
 

Detailed Description

This class is retrieving the TPC space point residuals by interpolating ITS/TRD/TOF tracks. The residuals are stored in the specified vectors of TPCClusterResiduals It has been ported from the AliTPCcalibAlignInterpolation class from AliRoot.

Definition at line 243 of file TrackInterpolation.h.

Member Typedef Documentation

◆ MatCorrType

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Enumeration for indexing the arrays of the CacheStruct.

Enumerator
ExtOut 

extrapolation outwards of ITS track

ExtIn 

extrapolation inwards of TRD/TOF track

Int 

interpolation (mean positions of both extrapolations)

NIndices 

total number of indices (3)

Definition at line 258 of file TrackInterpolation.h.

Constructor & Destructor Documentation

◆ TrackInterpolation() [1/2]

o2::tpc::TrackInterpolation::TrackInterpolation ( )
default

Default constructor.

◆ TrackInterpolation() [2/2]

o2::tpc::TrackInterpolation::TrackInterpolation ( const TrackInterpolation )
delete

◆ ~TrackInterpolation()

TrackInterpolation::~TrackInterpolation ( )

Definition at line 114 of file TrackInterpolation.cxx.

Member Function Documentation

◆ checkResiduals()

float TrackInterpolation::checkResiduals ( const TrackData trk,
TrackValidationData params,
const std::vector< TPCClusterResiduals > &  clsRes 
)

Is called from outlierFiltering() and does the actual calculations (moving average filter etc.)

Returns
The RMS of the long range moving average

Definition at line 1425 of file TrackInterpolation.cxx.

◆ compareToHelix()

bool TrackInterpolation::compareToHelix ( const TrackData trk,
TrackValidationData params,
const std::vector< TPCClusterResiduals > &  clsRes 
)

Calculates the differences in Y and Z for a given set of clusters to a fitted helix. First a circular fit in the azimuthal plane is performed and subsequently a linear fit in the transversal plane

Definition at line 1282 of file TrackInterpolation.cxx.

◆ diffToLocLine()

void TrackInterpolation::diffToLocLine ( TrackValidationData params,
int  start,
int  np 
)

For a given set of points, calculate the differences from each point to the fitted lines from all other points in their neighbourhoods (+- nMAShort points)

Definition at line 1527 of file TrackInterpolation.cxx.

◆ diffToMA()

void TrackInterpolation::diffToMA ( const int  np,
const std::array< float, param::NPadRows > &  y,
std::array< float, param::NPadRows > &  diffMA 
)

For a given set of points, calculate their deviation from the moving average (build from the neighbourhood +- nMALong points)

Definition at line 1577 of file TrackInterpolation.cxx.

◆ extrapolateTrack()

void TrackInterpolation::extrapolateTrack ( int  iSeed)

Extrapolate ITS-only track through TPC and store residuals to TPC clusters along the way

Parameters
seedindex

Definition at line 942 of file TrackInterpolation.cxx.

◆ finalize()

void TrackInterpolation::finalize ( )

Definition at line 119 of file TrackInterpolation.cxx.

◆ findValidSource()

GTrackID::Source TrackInterpolation::findValidSource ( const o2::dataformats::GlobalTrackID::mask_t  mask,
const o2::dataformats::GlobalTrackID::Source  src 
) const

For given vertex track source which is not in mSourcesConfigured find the seeding source which is enabled.

Definition at line 215 of file TrackInterpolation.cxx.

◆ getClusterResiduals()

std::vector< UnbinnedResid > & o2::tpc::TrackInterpolation::getClusterResiduals ( )
inline

Definition at line 412 of file TrackInterpolation.h.

◆ getClusterResidualsDetInfo()

std::vector< DetInfoResid > & o2::tpc::TrackInterpolation::getClusterResidualsDetInfo ( )
inline

Definition at line 413 of file TrackInterpolation.h.

◆ getReferenceTracks()

std::vector< TrackData > & o2::tpc::TrackInterpolation::getReferenceTracks ( )
inline

Definition at line 416 of file TrackInterpolation.h.

◆ getTrackDataCompact()

std::vector< TrackDataCompact > & o2::tpc::TrackInterpolation::getTrackDataCompact ( )
inline

Definition at line 414 of file TrackInterpolation.h.

◆ getTrackDataExtended()

std::vector< TrackDataExtended > & o2::tpc::TrackInterpolation::getTrackDataExtended ( )
inline

Definition at line 415 of file TrackInterpolation.h.

◆ init()

Initialize everything, set the requested track sources.

Definition at line 127 of file TrackInterpolation.cxx.

◆ interpolateTrack()

void TrackInterpolation::interpolateTrack ( int  iSeed)

Interpolate ITS-TRD-TOF track inside TPC and store residuals to TPC clusters along the way

Parameters
seedindex

Definition at line 468 of file TrackInterpolation.cxx.

◆ isInputTrackAccepted()

bool TrackInterpolation::isInputTrackAccepted ( const o2::dataformats::GlobalTrackID gid,
const o2::globaltracking::RecoContainer::GlobalIDSet gidTable,
const o2::dataformats::PrimaryVertex pv 
) const

Check if input track passes configured cuts.

Definition at line 168 of file TrackInterpolation.cxx.

◆ isTrackSelected()

bool TrackInterpolation::isTrackSelected ( const o2::track::TrackParCov trk) const

Given the defined downsampling factor tsalisThreshold check if track is selected.

Definition at line 324 of file TrackInterpolation.cxx.

◆ operator=()

TrackInterpolation & o2::tpc::TrackInterpolation::operator= ( const TrackInterpolation )
delete

◆ outlierFiltering()

bool TrackInterpolation::outlierFiltering ( const TrackData trk,
TrackValidationData params,
const std::vector< TPCClusterResiduals > &  clsRes 
)

Filter out individual outliers from all cluster residuals of given track

Returns
true for tracks which pass the cuts on e.g. max. masked clusters and false for rejected tracks

Definition at line 1407 of file TrackInterpolation.cxx.

◆ prepareInputTrackSample()

void TrackInterpolation::prepareInputTrackSample ( const o2::globaltracking::RecoContainer inp)

Prepare input track sample (not relying on CreateTracksVariadic functionality)

Definition at line 237 of file TrackInterpolation.cxx.

◆ process()

void TrackInterpolation::process ( )

Main processing function.

Definition at line 333 of file TrackInterpolation.cxx.

◆ processTRDLayer()

int TrackInterpolation::processTRDLayer ( const o2::trd::TrackTRD trkTRD,
int  iLayer,
o2::track::TrackParCov trkWork,
std::array< float, 2 > *  trkltTRDYZ = nullptr,
std::array< float, 3 > *  trkltTRDCov = nullptr,
TrackData trkData = nullptr,
o2::trd::Tracklet64 trk64 = nullptr,
o2::trd::CalibratedTracklet trkCalib = nullptr 
)

Definition at line 889 of file TrackInterpolation.cxx.

◆ refITSTrack()

bool TrackInterpolation::refITSTrack ( o2::dataformats::GlobalTrackID  gid,
int  iSeed 
)

Definition at line 1629 of file TrackInterpolation.cxx.

◆ reset()

void TrackInterpolation::reset ( )

Reset cache and output vectors.

Definition at line 1597 of file TrackInterpolation.cxx.

◆ setAddTracksForMapPerTF()

void o2::tpc::TrackInterpolation::setAddTracksForMapPerTF ( int  n)
inline

In addition to mMaxTracksPerTF up to the set number of additional tracks can be processed.

Definition at line 388 of file TrackInterpolation.h.

◆ setDumpTrackPoints()

void o2::tpc::TrackInterpolation::setDumpTrackPoints ( )
inline

Enable full output.

Definition at line 391 of file TrackInterpolation.h.

◆ setExtDetResid()

void o2::tpc::TrackInterpolation::setExtDetResid ( bool  v)
inline

Definition at line 405 of file TrackInterpolation.h.

◆ setITSClusterDictionary()

void o2::tpc::TrackInterpolation::setITSClusterDictionary ( const o2::itsmft::TopologyDictionary dict)
inline

Allow setting the ITS cluster dictionary from outside.

Definition at line 394 of file TrackInterpolation.h.

◆ setLane()

void o2::tpc::TrackInterpolation::setLane ( int  lID,
int  nL 
)
inline

Definition at line 418 of file TrackInterpolation.h.

◆ setMatCorr()

void o2::tpc::TrackInterpolation::setMatCorr ( MatCorrType  matCorr)
inline

Sets the flag if material correction should be applied when extrapolating the tracks.

Definition at line 382 of file TrackInterpolation.h.

◆ setMaxTracksPerTF()

void o2::tpc::TrackInterpolation::setMaxTracksPerTF ( int  n)
inline

Sets the maximum number of tracks to be processed (successfully) per TF.

Definition at line 385 of file TrackInterpolation.h.

◆ setNHBPerTF()

void o2::tpc::TrackInterpolation::setNHBPerTF ( int  n)
inline

Definition at line 377 of file TrackInterpolation.h.

◆ setProcessITSTPConly()

void o2::tpc::TrackInterpolation::setProcessITSTPConly ( )
inline

Enable ITS-TPC only processing.

Definition at line 400 of file TrackInterpolation.h.

◆ setProcessSeeds()

void o2::tpc::TrackInterpolation::setProcessSeeds ( )
inline

Enable processing of seeds.

Definition at line 397 of file TrackInterpolation.h.

◆ setSqrtS()

void o2::tpc::TrackInterpolation::setSqrtS ( float  s)
inline

Set the centre of mass energy required for pT downsampling Tsalis function.

Definition at line 403 of file TrackInterpolation.h.

◆ setTPCVDrift()

void TrackInterpolation::setTPCVDrift ( const o2::tpc::VDriftCorrFact v)

Definition at line 1617 of file TrackInterpolation.cxx.

◆ validateTrack()

int8_t TrackInterpolation::validateTrack ( const TrackData trk,
TrackValidationData params,
const std::vector< TPCClusterResiduals > &  clsRes,
bool  interpol 
)

Validates the given input track and its residuals

Parameters
trkThe track parameters, e.g. q/pT, eta, ...
paramsStructure with per pad information recalculated on the fly
Returns
0 if the track could be validated, otherwise returns rejection code

Definition at line 1243 of file TrackInterpolation.cxx.


The documentation for this class was generated from the following files: