17#ifndef ALICEO2_TPC_TRACKINTERPOLATION_H_
18#define ALICEO2_TPC_TRACKINTERPOLATION_H_
70 UnbinnedResid(
float dyIn,
float dzIn,
float tgSlpIn,
float yIn,
float zIn,
unsigned char rowIn,
unsigned char secIn,
short chanIn = -1) :
dy(static_cast<
short>(dyIn * 0x7fff /
param::MaxResid)),
97 static void init(
long timestamp = -1);
126 std::vector<o2::BaseCluster<float>>
clsITS{};
128 std::vector<o2::trd::CalibratedTracklet>
clsTRD{};
184 std::array<float, NIndices>
y{};
185 std::array<float, NIndices>
z{};
186 std::array<float, NIndices>
sy2{};
187 std::array<float, NIndices>
szy{};
188 std::array<float, NIndices>
sz2{};
189 std::array<float, NIndices>
snp{};
202 std::array<float, param::NPadRows>
zTrk{};
203 std::array<float, param::NPadRows>
xTrk{};
204 std::array<float, param::NPadRows>
dy{};
205 std::array<float, param::NPadRows>
dz{};
206 std::array<float, param::NPadRows>
tglArr{};
262 void diffToLocLine(
const int np,
int idxOffset,
const std::array<float, param::NPadRows>&
x,
const std::array<float, param::NPadRows>&
y, std::array<float, param::NPadRows>& diffY)
const;
265 void diffToMA(
const int np,
const std::array<float, param::NPadRows>&
y, std::array<float, param::NPadRows>& diffMA)
const;
307 static constexpr float sFloatEps{1.e-7f};
309 const SpacePointsCalibConfParam* mParams =
nullptr;
310 float mTPCTimeBinMUS{.2f};
311 float mTPCVDriftRef = -1.;
312 float mTPCDriftTimeOffsetRef = 0.;
313 float mSqrtS{13600.f};
315 int mMaxTracksPerTF{-1};
316 int mAddTracksForMapPerTF{0};
317 bool mDumpTrackPoints{
false};
318 bool mExtDetResid{
true};
319 bool mProcessSeeds{
false};
320 bool mProcessITSTPConly{
false};
323 bool mSingleSourcesConfigured{
true};
327 std::vector<o2::dataformats::GlobalTrackID> mGIDs{};
328 std::vector<o2::globaltracking::RecoContainer::GlobalIDSet> mGIDtables{};
329 std::vector<float> mTrackTimes{};
330 std::vector<o2::track::TrackParCov> mSeeds{};
331 std::vector<int> mParentID{};
332 std::map<int, int> mTrackTypes;
333 std::array<std::vector<uint32_t>, 4> mTrackIndices;
334 gsl::span<const TPCClRefElem> mTPCTracksClusIdx;
335 const ClusterNativeAccess* mTPCClusterIdxStruct =
nullptr;
337 gsl::span<const int> mITSTrackClusIdx;
338 std::vector<o2::BaseCluster<float>> mITSClustersArray;
342 std::vector<TrackData> mTrackData{};
343 std::vector<TrackDataCompact> mTrackDataCompact{};
344 std::vector<TrackDataExtended> mTrackDataExtended{};
345 std::vector<UnbinnedResid> mClRes{};
346 std::vector<TrackData> mTrackDataUnfiltered{};
347 std::vector<TPCClusterResiduals> mClResUnfiltered{};
350 std::array<CacheStruct, constants::MAXGLOBALPADROW> mCache{{}};
351 std::vector<o2::dataformats::GlobalTrackID> mGIDsSuccess;
356 std::unique_ptr<TPCFastTransform> mFastTransform{};
358 bool mInitDone{
false};
359 size_t mRejectedResiduals{};
Class to store event ID and index in the event for objects like track, cluster...
Global index for barrel track: provides provenance (detectors combination), index in respective array...
Class to store the output of the matching to TOF.
Class to refer to the 1st entry and N elements of some group in the continuous container.
Parameters used for TPC space point calibration.
Error parameterizations and helper functions for TRD reconstruction.
Definition of the ITS track.
Result of refitting TPC-ITS matched track.
Reference on ITS/MFT clusters set.
TrackInterpolation(const TrackInterpolation &)=delete
void prepareInputTrackSample(const o2::globaltracking::RecoContainer &inp)
Prepare input track sample (not relying on CreateTracksVariadic functionality)
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.
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)
void diffToMA(const int np, const std::array< float, param::NPadRows > &y, std::array< float, param::NPadRows > &diffMA) const
For a given set of points, calculate their deviation from the moving average (build from the neighbou...
std::vector< TrackData > & getReferenceTracks()
void setExtDetResid(bool v)
void diffToLocLine(const int np, int idxOffset, const std::array< float, param::NPadRows > &x, const std::array< float, param::NPadRows > &y, std::array< float, param::NPadRows > &diffY) const
For a given set of points, calculate the differences from each point to the fitted lines from all oth...
std::vector< TrackData > & getReferenceTracksUnfiltered()
void extrapolateTrack(int iSeed)
TrackInterpolation()=default
Default constructor.
@ ExtIn
extrapolation inwards of TRD/TOF track
@ NIndices
total number of indices (3)
@ Int
interpolation (mean positions of both extrapolations)
@ ExtOut
extrapolation outwards of ITS track
std::vector< TrackDataExtended > & getTrackDataExtended()
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 ena...
void setMatCorr(MatCorrType matCorr)
Sets the flag if material correction should be applied when extrapolating the tracks.
void setProcessSeeds()
Enable processing of seeds.
void setMaxTracksPerTF(int n)
Sets the maximum number of tracks to be processed (successfully) per TF.
std::vector< TrackDataCompact > & getTrackDataCompact()
float checkResiduals(const TrackData &trk, TrackParams ¶ms, const std::vector< TPCClusterResiduals > &clsRes) const
void interpolateTrack(int iSeed)
void setAddTracksForMapPerTF(int n)
In addition to mMaxTracksPerTF up to the set number of additional tracks can be processed.
bool compareToHelix(const TrackData &trk, TrackParams ¶ms, const std::vector< TPCClusterResiduals > &clsRes) const
std::vector< TPCClusterResiduals > & getClusterResidualsUnfiltered()
void process()
Main processing function.
void setITSClusterDictionary(const o2::itsmft::TopologyDictionary *dict)
Allow setting the ITS cluster dictionary from outside.
std::vector< UnbinnedResid > & getClusterResiduals()
TrackInterpolation & operator=(const TrackInterpolation &)=delete
void setDumpTrackPoints()
Enable full output.
void setTPCVDrift(const o2::tpc::VDriftCorrFact &v)
void setProcessITSTPConly()
Enable ITS-TPC only processing.
void setSqrtS(float s)
Set the centre of mass energy required for pT downsampling Tsalis function.
bool isTrackSelected(const o2::track::TrackParCov &trk) const
Given the defined downsampling factor tsalisThreshold check if track is selected.
void reset()
Reset cache and output vectors.
bool outlierFiltering(const TrackData &trk, TrackParams ¶ms, const std::vector< TPCClusterResiduals > &clsRes) const
void init(o2::dataformats::GlobalTrackID::mask_t src, o2::dataformats::GlobalTrackID::mask_t srcMap)
Initialize everything, set the requested track sources.
bool validateTrack(const TrackData &trk, TrackParams ¶ms, const std::vector< TPCClusterResiduals > &clsRes) const
GLsizei GLsizei GLchar * source
GLenum const GLfloat * params
GLdouble GLdouble GLdouble z
constexpr int MAXGLOBALPADROW
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::array< GTrackID, GTrackID::NSources > GlobalIDSet
Internal struct used to store the unbinned TPC cluster residuals with float values.
unsigned char dRow
distance to previous row in units of pad rows
ClassDefNV(TPCClusterResiduals, 4)
unsigned char sec
sector number 0..35
float snp
sin of the phi angle between padrow and track
Structure for the information required to associate each residual with a given track type (ITS-TPC-TR...
uint8_t nResiduals
total number of TPC residuals associated to this track
uint8_t sourceId
source ID obtained from the global track ID
uint8_t nExtDetResid
number of external detectors (wrt TPC) residuals stored, on top of clIdx.getEntries
uint32_t idxFirstResidual
the index of the first residual from this track
TrackDataCompact()=default
TrackDataCompact(uint32_t idx, uint8_t nRes, uint8_t source, uint8_t nextraRes=0)
ClassDefNV(TrackDataCompact, 2)
Heavy structure with track parameterizations + track points for debugging.
o2::dataformats::RangeReference clIdx
index of first cluster residual and total number of cluster residuals of this track
std::vector< o2::trd::CalibratedTracklet > clsTRD
the TRD space points (if available)
o2::dataformats::MatchInfoTOF matchTOF
TOF matching information.
o2::track::TrackPar trkOuter
refit of TRD and/or TOF points
o2::its::TrackITS trkITS
ITS seeding track.
uint8_t nExtDetResid
number of external detectors (to TPC) residuals stored, on top of clIdx.getEntries
o2::trd::TrackTRD trkTRD
TRD seeding track.
ClassDefNV(TrackDataExtended, 3)
std::vector< o2::trd::Tracklet64 > trkltTRD
attached TRD tracklets (if available)
o2::dataformats::GlobalTrackID gid
GID of the most global barrel track.
o2::tpc::TrackTPC trkTPC
TPC track (including dEdx information)
std::vector< o2::BaseCluster< float > > clsITS
attached ITS clusters
o2::tof::Cluster clsTOF
the TOF cluster (if available)
Structure filled for each track with track quality information and a vector with TPCClusterResiduals.
float chi2TRD
chi2 of TRD track
float dEdxTPC
TPC dEdx information.
unsigned short nTrkltsTRD
number of attached TRD tracklets
unsigned short clAvailTOF
whether or not track seed has a matched TOF cluster, if so, gives the resolution of the T0 in ps
unsigned short nClsITS
number of attached ITS clusters
o2::dataformats::RangeReference clIdx
index of first cluster residual and total number of TPC cluster residuals of this track
float chi2TPC
chi2 of TPC track
unsigned short nClsTPC
number of attached TPC clusters
o2::dataformats::GlobalTrackID gid
global track ID for seeding track
float deltaTOF
TOFsignal - T0 - texp(PID), if T0 is available.
uint8_t nExtDetResid
number of external detectors (to TPC) residuals stored, on top of clIdx.getEntries
o2::track::TrackPar par
ITS track at inner TPC radius.
float chi2ITS
chi2 of ITS track
Structure for caching positions, covariances and angles for extrapolations from ITS and TRD/TOF and f...
unsigned short clAvailable
std::array< float, NIndices > sz2
std::array< float, NIndices > szy
std::array< float, NIndices > snp
std::array< float, NIndices > sy2
Structure for on-the-fly re-calculated track parameters at the validation stage.
std::array< float, param::NPadRows > dz
std::array< float, param::NPadRows > tglArr
std::bitset< param::NPadRows > flagRej
std::array< float, param::NPadRows > dy
std::array< float, param::NPadRows > xTrk
std::array< float, param::NPadRows > zTrk
UnbinnedResid(float dyIn, float dzIn, float tgSlpIn, float yIn, float zIn, unsigned char rowIn, unsigned char secIn, short chanIn=-1)
unsigned char sec
TPC sector (0..35)
ClassDefNV(UnbinnedResid, 2)
unsigned char row
TPC pad row.
short tgSlp
tan of the phi angle between padrow and track
static void init(long timestamp=-1)
static void checkInitDone()
short channel
extra channel info (ITS chip ID, TRD chamber, TOF main pad within the sector)