Project
Loading...
Searching...
No Matches
TrackInterpolation.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
17#ifndef ALICEO2_TPC_TRACKINTERPOLATION_H_
18#define ALICEO2_TPC_TRACKINTERPOLATION_H_
19
20#include <gsl/span>
44#include "GPUTRDRecoParam.h"
45#include "TRDBase/Geometry.h"
47
48class TTree;
49
50namespace o2
51{
52
53namespace gpu
54{
55class GPUParam;
56}
57
58namespace tpc
59{
60class VDriftCorrFact;
61
64 float dy{};
65 float dz{};
66 float y{};
67 float z{};
68 float snp{};
69 unsigned char sec{};
70 unsigned char dRow{};
71 unsigned char flags{};
73};
74
78 UnbinnedResid() = default;
79 UnbinnedResid(float dyIn, float dzIn, float tgSlpIn, float yIn, float zIn,
80 unsigned char rowIn, unsigned char secIn, short chanIn = -1, bool rejFlag = false) : dy(static_cast<short>(dyIn * 0x7fff / param::MaxResid)),
81 dz(static_cast<short>(dzIn * 0x7fff / param::MaxResid)),
82 tgSlp(static_cast<short>(tgSlpIn * 0x7fff / param::MaxTgSlp)),
83 y(static_cast<short>(yIn * 0x7fff / param::MaxY)),
84 z(static_cast<short>(zIn * 0x7fff / param::MaxZ)),
85 row(rowIn),
86 sec(secIn),
87 channel(chanIn),
88 rejected(rejFlag) {}
89 short dy{0};
90 short dz{0};
91 short tgSlp{0};
92 short y{0};
93 short z{0};
94 unsigned char row{0};
95 unsigned char sec{0};
96 short channel{-1};
97 bool rejected{false};
98
100 bool isTgSlpClamped() const { return tgSlp == 0x7fff || tgSlp == -0x7fff; }
103 static constexpr short TgSlpPositionOnly = -0x8000;
104 bool isPositionOnly() const { return tgSlp == TgSlpPositionOnly; }
105 bool isTPC() const { return row < constants::MAXGLOBALPADROW; }
106 bool isTRD() const { return row >= 160 && row < 166; }
107 bool isTOF() const { return row == 170; }
108 bool isITS() const { return row >= 180; }
109 int getDetID() const { return isTPC() ? 1 : (isITS() ? 0 : (isTRD() ? 2 : (isTOF() ? 3 : -1))); }
110 int getITSLayer() const { return row - 180; }
111 int getTRDLayer() const { return row - 160; }
112 float getAlpha() const;
113 float getX() const;
114
115 static void init(long timestamp = -1);
116 static void checkInitDone();
117 static bool gInitDone;
118
120};
121
122struct DetInfoResid { // detector info associated with residual
123 uint32_t word = 0; // container interpreted in a different way depending on the detector type
124 //
125 // TPC view: qTot and qMax of the cluster
126 uint16_t qTotTPC() const { return static_cast<uint16_t>(word & 0xFFFFu); }
127 uint16_t qMaxTPC() const { return static_cast<uint16_t>((word >> 16) & 0xFFFFu); }
128 void setTPC(uint16_t qTot, uint16_t qMax) { word = (static_cast<uint32_t>(qMax) << 16) | static_cast<uint32_t>(qTot); }
129 //
130 // TRD view: q0, q1, q2 + calibrated slope (truncated to in +-3.5 range)
131 static constexpr uint32_t TRDQ0NB = 7, TRDQ1NB = 7, TRDQ2NB = 6, TRDSlpNB = 12;
132 static constexpr uint32_t TRDQ0Msk = (1 << TRDQ0NB) - 1, TRDQ1Msk = (1 << TRDQ1NB) - 1, TRDQ2Msk = ((1 << TRDQ2NB) - 1), TRDSlpMsk = (1 << TRDSlpNB) - 1;
133 static constexpr float TRDMaxSlope = 3.5, TRDSlope2Int = ((1 << TRDSlpNB) - 1) / (2 * TRDMaxSlope), TRDInt2Slope = 1.f / TRDSlope2Int;
134 uint16_t q0TRD() const { return static_cast<uint16_t>(word & TRDQ0Msk); }
135 uint16_t q1TRD() const { return static_cast<uint16_t>((word >> TRDQ0NB) & TRDQ1Msk); }
136 uint16_t q2TRD() const { return static_cast<uint16_t>((word >> (TRDQ0NB + TRDQ1NB)) & TRDQ2Msk); }
137 float slopeTRD() const { return ((word >> (TRDQ0NB + TRDQ1NB + TRDQ2NB)) & TRDSlpMsk) * TRDInt2Slope - TRDMaxSlope; }
138 void setTRD(uint8_t q0, uint8_t q1, uint8_t q2, float slope)
139 {
140 float rslope = (slope + TRDMaxSlope) * TRDSlope2Int;
141 if (rslope < 0.f) {
142 rslope = 0;
143 } else if (rslope > TRDSlpMsk) {
144 rslope = TRDSlpMsk;
145 }
146 uint32_t slpI = std::round(rslope);
147 word = (static_cast<uint32_t>(slpI << (TRDQ0NB + TRDQ1NB + TRDQ2NB)) |
148 static_cast<uint32_t>((q2 & TRDQ2Msk) << (TRDQ0NB + TRDQ1NB)) |
149 static_cast<uint32_t>((q1 & TRDQ1Msk) << TRDQ0NB) |
150 static_cast<uint32_t>(q0 & TRDQ0Msk));
151 }
152 //
153 // TOF view (time difference in \mus wrt seeding ITS-TPC track)
154 float timeTOF() const { return std::bit_cast<float>(word); }
155 void setTOF(float t) { word = std::bit_cast<uint32_t>(t); }
156 //
157 // No info for ITS is stored
158 //
159 // PV view (time difference in \mus wrt contributing ITS-TPC track)
160 float timePV() const { return std::bit_cast<float>(word); }
161 void setPV(float t) { word = std::bit_cast<uint32_t>(t); }
162
164};
165
168 TrackDataCompact() = default;
169 TrackDataCompact(uint32_t idx, std::array<uint8_t, 4> mlt, uint8_t nRes, uint8_t source, uint8_t nextraRes = 0, int8_t filt = -1) : idxFirstResidual(idx), multStack{mlt}, nResiduals(nRes), sourceId(source), filterFlag(filt), nExtDetResid(nextraRes) {}
171 std::array<uint8_t, 4> multStack{}; // multiplicity in the stack packed as asinh(x*0.05)/0.05
172 uint8_t nResiduals;
173 uint8_t nExtDetResid = 0;
174 uint8_t sourceId;
175 int8_t filterFlag = -1;
176
177 void setMultStack(float v, int stack)
178 {
179 uint32_t mltPacked = std::round(std::asinh(v * 0.05) / 0.05);
180 multStack[stack] = mltPacked < 0xff ? mltPacked : 0xff;
181 }
182 float getMultStack(int stack) const
183 {
184 return std::sinh(multStack[stack] * 0.05) / 0.05;
185 }
186 float getMultStackPacked(int stack) const { return multStack[stack]; }
187
189};
190
191// TODO add to UnbinnedResid::sec flag if cluster was used or not
192// TODO add to TrackDataCompact::sourceId flag if track was used or not (if possible)
193
211
213struct TrackData {
216 float dEdxTPC{};
217 float chi2TPC{};
218 float chi2ITS{};
219 float chi2TRD{};
220 float deltaTOF{};
221
222 unsigned short nClsTPC{};
223 unsigned short nClsITS{};
224 unsigned short nTrkltsTRD{};
225 unsigned short clAvailTOF{};
226 short TRDTrkltSlope[6] = {};
227 uint8_t nExtDetResid = 0;
228 int8_t filterFlag = -1;
230 std::array<uint8_t, 4> multStack{}; // multiplicity in the stack packed as asinh(x*0.05)/0.05
231 float getT0Error() const { return float(clAvailTOF); }
232 bool isTOFAvail() const { return clAvailTOF != 0; }
233
234 void setMultStack(float v, int stack)
235 {
236 uint32_t mltPacked = std::round(std::asinh(v * 0.05) / 0.05);
237 multStack[stack] = mltPacked < 0xff ? mltPacked : 0xff;
238 }
239 float getMultStack(int stack) const
240 {
241 return std::sinh(multStack[stack] * 0.05) / 0.05;
242 }
243 float getMultStackPacked(int stack) const { return multStack[stack]; }
244
246};
247
250 enum Flags : uint8_t { HasITSOut = 0x1,
251 HasTPCIn = 0x2,
253 HasTRDIn = 0x8,
254 IsPrimary = 0x10 };
260 float distITSRef{-1.f};
261 float distTPCRef{-1.f};
263 float yTRD[6] = {};
264 float zTRD[6] = {};
265 uint8_t trdLayerMask{0};
266 int pdg{0};
268 int motherPdg{0};
269 float prodX{0.f};
270 float prodY{0.f};
271 float prodZ{0.f};
272 float prodPx{0.f};
273 float prodPy{0.f};
274 float prodPz{0.f};
275 int sisterIdx{-1};
276 uint8_t process{0};
277 uint8_t flags{0};
278 bool hasITSOut() const { return flags & HasITSOut; }
279 bool hasTPCIn() const { return flags & HasTPCIn; }
280 bool isFakeITSTPC() const { return flags & FakeITSTPC; }
281 bool hasTRDIn() const { return flags & HasTRDIn; }
282 bool isPrimary() const { return flags & IsPrimary; }
284};
285
291{
292 public:
295
298
299 // since this class has pointer members, we should explicitly delete copy and assignment operators
302
304
306 enum {
307 ExtOut = 0,
310 NIndices
311 };
312
314 struct CacheStruct {
315 std::array<float, NIndices> y{};
316 std::array<float, NIndices> z{};
317 std::array<float, NIndices> sy2{};
318 std::array<float, NIndices> szy{};
319 std::array<float, NIndices> sz2{};
320 std::array<float, NIndices> snp{};
321 float clY{0.f};
322 float clZ{0.f};
323 float clAngle{0.f};
324 unsigned short clAvailable{0};
325 unsigned char clSec{0};
326 unsigned char clFlags{0};
327 };
328
331 float xTrk{0.f};
332 float yTrk{0.f};
333 float zTrk{0.f};
334 float xLab{0.f};
335 float yLab{0.f};
336 float sPath{0.f};
337 float dy{0.f};
338 float dz{0.f};
339 float tglArr{0.f};
340 float residHelixY{0.f};
341 float residHelixZ{0.f};
342 float diffYSmooth{0.f};
343 float diffZSmooth{0.f};
344 int8_t sec{0};
345 bool flagRej{false};
347 };
348
350 float qpt{0.f};
351 float tgl{0.f};
352 float xcLab{0.f};
353 float ycLab{0.f};
354 float r{0.f};
355 float zOffs{0.f};
356 uint8_t nRej = 0;
357 std::vector<ValidationPoint> points;
358 void clear()
359 {
360 points.clear();
361 nRej = 0;
362 }
364 };
365
366 // -------------------------------------- processing functions --------------------------------------------------
367
370
373
376
379
381 bool isTrackSelected(const o2::track::TrackParCov& trk) const;
382
384 void process();
385
388 void extrapolateTrack(int iSeed);
389
392 void interpolateTrack(int iSeed);
393
395 void reset();
396
397 // refit ITS track taking PID (unless already refitted) from the seed and reassign to the seed
399 // -------------------------------------- outlier rejection --------------------------------------------------
400
405 int8_t validateTrack(const TrackData& trk, TrackValidationData& params, const std::vector<TPCClusterResiduals>& clsRes, bool interpol);
406
409 bool outlierFiltering(const TrackData& trk, TrackValidationData& params, const std::vector<TPCClusterResiduals>& clsRes);
410
413 float checkResiduals(const TrackData& trk, TrackValidationData& params, const std::vector<TPCClusterResiduals>& clsRes);
414
417 bool compareToHelix(const TrackData& trk, TrackValidationData& params, const std::vector<TPCClusterResiduals>& clsRes);
418
420 void diffToLocLine(TrackValidationData& params, int start, int np);
421
423 void diffToMA(const int np, const std::array<float, param::NPadRows>& y, std::array<float, param::NPadRows>& diffMA);
424
425 // -------------------------------------- settings --------------------------------------------------
426 void setNHBPerTF(int n) { mNHBPerTF = n; }
427
429
431 void setMatCorr(MatCorrType matCorr) { mMatCorr = matCorr; }
432
434 void setMaxTracksPerTF(int n) { mMaxTracksPerTF = n; }
435
437 void setAddTracksForMapPerTF(int n) { mAddTracksForMapPerTF = n; }
438
440 void setDumpTrackPoints() { mDumpTrackPoints = true; }
441
443 void setITSClusterDictionary(const o2::itsmft::TopologyDictionary* dict) { mITSDict = dict; }
444
446 void setProcessSeeds() { mProcessSeeds = true; }
447
449 void setProcessITSTPConly() { mProcessITSTPConly = true; }
450
452 void setSqrtS(float s) { mSqrtS = s; }
453
454 void setExtDetResid(bool v) { mExtDetResid = v; }
455
456 int processTRDLayer(const o2::trd::TrackTRD& trkTRD, int iLayer, o2::track::TrackParCov& trkWork, std::array<float, 2>* trkltTRDYZ = nullptr,
457 std::array<float, 3>* trkltTRDCov = nullptr, TrackData* trkData = nullptr,
458 o2::trd::Tracklet64* trk64 = nullptr, o2::trd::CalibratedTracklet* trkCalib = nullptr);
459
460 // --------------------------------- output ---------------------------------------------
461 std::vector<UnbinnedResid>& getClusterResiduals() { return mClRes; }
462 std::vector<DetInfoResid>& getClusterResidualsDetInfo() { return mDetInfoRes; }
463 std::vector<TrackDataCompact>& getTrackDataCompact() { return mTrackDataCompact; }
464 std::vector<TrackDataExtended>& getTrackDataExtended() { return mTrackDataExtended; }
465 std::vector<TrackData>& getReferenceTracks() { return mTrackData; }
467 const std::vector<o2::dataformats::GlobalTrackID>& getTRDGIDsSuccess() const { return mTRDGIDsSuccess; }
468
469 void setLane(int lID, int nL)
470 {
471 mLaneID = lID;
472 mNLanes = nL;
473 }
474
475 void finalize();
476
477 private:
478 static constexpr float sFloatEps{1.e-7f};
479 static constexpr int NSTACKS = 4;
480 static constexpr std::array<int, NSTACKS + 1> STACKROWS{0, 63, 97, 127, 152};
481 // parameters + settings
482 const SpacePointsCalibConfParam* mParams = nullptr;
483 std::shared_ptr<o2::gpu::GPUParam> mTPCParam = nullptr;
484 int mLaneID = 0;
485 int mNLanes = 1;
486 int mNHBPerTF = 32;
487 int mNTPCOccBinLength = 16;
488 float mNTPCOccBinLengthInv = 1.f / 16;
489 float mTPCTimeBinMUS{.2f};
490 float mTPCVDriftRef = -1.;
491 float mTPCDriftTimeOffsetRef = 0.;
492 float mSqrtS{13600.f};
493 MatCorrType mMatCorr{MatCorrType::USEMatCorrNONE};
494 int mMaxTracksPerTF{-1};
495 int mAddTracksForMapPerTF{0};
496 bool mDumpTrackPoints{false};
497 bool mExtDetResid{true};
498 bool mProcessSeeds{false};
499 bool mProcessITSTPConly{false};
500 o2::dataformats::GlobalTrackID::mask_t mSourcesConfigured;
501 o2::dataformats::GlobalTrackID::mask_t mSourcesConfiguredMap;
502 bool mSingleSourcesConfigured{true};
503
504 // input
505 const o2::globaltracking::RecoContainer* mRecoCont = nullptr;
506 std::vector<o2::dataformats::GlobalTrackID> mGIDs{};
507 std::vector<o2::globaltracking::RecoContainer::GlobalIDSet> mGIDtables{};
508 std::vector<float> mTrackTimes{};
509 std::vector<int> mTrackPVID{};
510 std::vector<o2::track::TrackParCov> mSeeds{};
511 std::vector<int> mParentID{};
512 std::map<int, int> mTrackTypes;
513 std::array<std::vector<uint32_t>, 4> mTrackIndices;
514 gsl::span<const TPCClRefElem> mTPCTrackClusIdx;
515 gsl::span<const unsigned char> mTPCShClassMap;
516 const ClusterNativeAccess* mTPCClusterIdxStruct = nullptr;
517
518 // ITS specific input only needed for debugging
519 gsl::span<const int> mITSTrackClusIdx;
520 ITSClusters mITSClustersArray;
521 std::vector<int> mITSRefitSeedID;
522 const o2::itsmft::TopologyDictionary* mITSDict = nullptr;
523
524 // output
525 std::vector<TrackData> mTrackData{};
526 std::vector<TrackDataCompact> mTrackDataCompact{};
527 std::vector<TrackDataExtended> mTrackDataExtended{};
528 std::vector<UnbinnedResid> mClRes{};
529 std::vector<DetInfoResid> mDetInfoRes{};
530 std::unique_ptr<o2::utils::TreeStreamRedirector> mDBGOut;
531
532 // cache
533 std::array<CacheStruct, constants::MAXGLOBALPADROW> mCache{{}};
534 std::vector<o2::dataformats::GlobalTrackID> mGIDsSuccess;
535 std::vector<o2::dataformats::GlobalTrackID> mTRDGIDsSuccess;
536
537 TrackValidationData mTrackValidation;
538
539 // helpers
540 o2::gpu::GPUTRDRecoParam mRecoParam;
541 o2::trd::Geometry* mGeoTRD;
542 std::unique_ptr<TPCFastTransform> mFastTransform{};
543 float mBz;
544 bool mInitDone{false};
545 size_t mRejectedResiduals{};
546 size_t mNRejRefit = 0;
547 size_t mNRejProp = 0;
548 size_t mNRejLoop = 0;
549 size_t mNPosOnlyTracks = 0;
550 size_t mNPosOnlyClusters = 0;
551
552 ClassDefNV(TrackInterpolation, 1);
553};
554
555} // namespace tpc
556
557} // namespace o2
558
559#endif
Container of the ITS/MFT clusters addressed by the composed (layer,index) ID.
Wrapper container for different reconstructed object types.
Definition of the ITSMFT cluster.
Definition of the ClusterTopology class.
Definition of the TOF cluster.
Base track model for the Barrel, params only, w/o covariance.
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.
uint16_t slope
Definition RawData.h:1
uint32_t stack
Definition RawData.h:1
Parameters used for TPC space point calibration.
class to create TPC fast transformation
Definition of the ITS track.
Result of refitting TPC-ITS matched track.
Reference on ITS/MFT clusters set.
Cluster class for TOF.
Definition Cluster.h:37
float checkResiduals(const TrackData &trk, TrackValidationData &params, const std::vector< TPCClusterResiduals > &clsRes)
TrackInterpolation(const TrackInterpolation &)=delete
void prepareInputTrackSample(const o2::globaltracking::RecoContainer &inp)
Prepare input track sample (not relying on CreateTracksVariadic functionality)
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)
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.
std::vector< TrackData > & getReferenceTracks()
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...
const std::vector< o2::dataformats::GlobalTrackID > & getTRDGIDsSuccess() const
ITS-TPC-TRD track whose tracklets gave the TRD residuals of each stored track (not set if none),...
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.
bool refITSTrack(o2::dataformats::GlobalTrackID, int iSeed)
std::vector< TrackDataCompact > & getTrackDataCompact()
void setAddTracksForMapPerTF(int n)
In addition to mMaxTracksPerTF up to the set number of additional tracks can be processed.
void setLane(int lID, int nL)
std::vector< DetInfoResid > & getClusterResidualsDetInfo()
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 neighbou...
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 oth...
void process()
Main processing function.
void setITSClusterDictionary(const o2::itsmft::TopologyDictionary *dict)
Allow setting the ITS cluster dictionary from outside.
o2::itsmft::ClustersPerLayer< o2::BaseCluster< float > > ITSClusters
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.
int8_t validateTrack(const TrackData &trk, TrackValidationData &params, const std::vector< TPCClusterResiduals > &clsRes, bool interpol)
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, TrackValidationData &params, const std::vector< TPCClusterResiduals > &clsRes)
void init(o2::dataformats::GlobalTrackID::mask_t src, o2::dataformats::GlobalTrackID::mask_t srcMap)
Initialize everything, set the requested track sources.
GLdouble n
Definition glcorearb.h:1982
GLenum src
Definition glcorearb.h:1767
const GLdouble * v
Definition glcorearb.h:832
GLsizei GLsizei GLchar * source
Definition glcorearb.h:798
GLint y
Definition glcorearb.h:270
GLenum const GLfloat * params
Definition glcorearb.h:272
GLuint GLsizei const GLchar * label
Definition glcorearb.h:2519
GLbitfield flags
Definition glcorearb.h:1570
GLboolean r
Definition glcorearb.h:1233
GLuint start
Definition glcorearb.h:469
GLenum GLfloat param
Definition glcorearb.h:271
GLint GLuint mask
Definition glcorearb.h:291
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
TrackParCovF TrackParCov
Definition Track.h:33
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::array< GTrackID, GTrackID::NSources > GlobalIDSet
static constexpr uint32_t TRDQ2Msk
ClassDefNV(DetInfoResid, 1)
static constexpr float TRDSlope2Int
static constexpr uint32_t TRDQ1Msk
static constexpr uint32_t TRDSlpMsk
static constexpr uint32_t TRDQ0NB
static constexpr uint32_t TRDQ2NB
void setTRD(uint8_t q0, uint8_t q1, uint8_t q2, float slope)
static constexpr float TRDInt2Slope
static constexpr float TRDMaxSlope
void setTPC(uint16_t qTot, uint16_t qMax)
static constexpr uint32_t TRDQ1NB
static constexpr uint32_t TRDQ0Msk
static constexpr uint32_t TRDSlpNB
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, 6)
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
std::array< uint8_t, 4 > multStack
void setMultStack(float v, int stack)
TrackDataCompact(uint32_t idx, std::array< uint8_t, 4 > mlt, uint8_t nRes, uint8_t source, uint8_t nextraRes=0, int8_t filt=-1)
float getMultStack(int stack) const
ClassDefNV(TrackDataCompact, 4)
float getMultStackPacked(int stack) const
int8_t filterFlag
-1: validation was not done, 0: validated, >0 : reason not passing validation, see validateTrack meth...
uint32_t idxFirstResidual
the index of the first residual from this track
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.
std::vector< o2::trd::Tracklet64 > trkltTRD
attached TRD tracklets (if available)
ClassDefNV(TrackDataExtended, 4)
o2::dataformats::GlobalTrackID gid
GID of the most global barrel track.
o2::tpc::TrackTPC trkTPC
TPC track (including dEdx information)
int8_t filterFlag
-1: validation was not done, 0: validated, >0 : reason not passing validation, see validateTrack meth...
std::vector< o2::BaseCluster< float > > clsITS
attached ITS clusters
o2::tof::Cluster clsTOF
the TOF cluster (if available)
MC truth for a TrackData entry (stored only for MC, aligned 1:1 with the TrackData vector)
int sisterIdx
index in the TrackData vector of another stored track with the same mother (cycling through all of th...
uint8_t process
production process of the particle of the ITS-TPC part (TMCProcess)
uint8_t trdLayerMask
bit i set: yTRD[i], zTRD[i] filled
o2::track::TrackPar parITSOut
truth at x and alpha of TrackData::par, from the nearest ITS track reference (propagated with the mat...
float prodPz
momentum at production z (global, GeV/c)
float prodPy
momentum at production y (global, GeV/c)
float prodY
production vertex y (global, cm)
float yTRD[6]
truth y at the x of the TRD tracklet of each layer (tracklet sector frame), see trdLayerMask
float distTPCRef
distance (y,z) between parTPCIn propagated to the innermost TPC cluster of the track and that cluster...
int motherPdg
PDG code of that mother (0: none)
float prodX
production vertex x of the particle of the ITS-TPC part (global, cm)
float prodPx
momentum at production x (global, GeV/c), e.g. to compare a track propagated to the vertex
int pdg
PDG code of the particle of the ITS-TPC part (as for the origin and TRD fields)
o2::MCCompLabel labelTPC
MC label of its TPC part.
ClassDefNV(TrackDataMC, 3)
o2::track::TrackPar parTRDIn
truth at the first TRD track reference (sector frame), TRD-matched seeds only
@ FakeITSTPC
ITS and TPC parts of the track have different MC labels.
@ HasTPCIn
parTPCIn is filled
@ HasITSOut
parITSOut is filled
@ HasTRDIn
parTRDIn is filled
o2::MCCompLabel labelITS
MC label of its ITS part.
float zTRD[6]
truth z at the x of the TRD tracklet of each layer (tracklet sector frame), see trdLayerMask
o2::track::TrackPar parTPCIn
truth at the first TPC track reference (sector frame)
float prodZ
production vertex z (global, cm)
o2::MCCompLabel motherLabel
MC label of the mother of the particle of the ITS-TPC part (for primaries the generator-level parent)
float distITSRef
3D distance between the ITS track reference used and TrackData::par in cm
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
float getMultStackPacked(int stack) const
unsigned short clAvailTOF
whether or not track seed has a matched TOF cluster, if so, gives the resolution of the T0 in ps
std::array< uint8_t, 4 > multStack
short TRDTrkltSlope[6]
TRD tracklet slope 0x7fff / param::MaxTRDSlope.
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
o2::track::TrackParCov par
ITS track at inner TPC radius.
unsigned short nClsTPC
number of attached TPC clusters
void setMultStack(float v, int stack)
float getMultStack(int stack) const
ClassDefNV(TrackData, 12)
o2::dataformats::GlobalTrackID gid
global track ID for seeding track
float deltaTOF
TOFsignal - T0 - texp(PID), if T0 is available.
int8_t filterFlag
-1: validation was not done, 0: validated, >0 : reason not passing validation, see validateTrack meth...
uint8_t nExtDetResid
number of external detectors (to TPC) residuals stored, on top of clIdx.getEntries
float chi2ITS
chi2 of ITS track
Structure for caching positions, covariances and angles for extrapolations from ITS and TRD/TOF and f...
Structure for on-the-fly re-calculated track parameters at the validation stage.
ClassDefNV(UnbinnedResid, 3)
bool rejected
residual is flagged as rejected in the validateTrack
unsigned char sec
TPC sector (0..35)
bool isTgSlpClamped() const
true if tgSlp was saturated at +-param::MaxTgSlp (scdcalib.clampTgSlp): unclamped values have |tgSlp|...
UnbinnedResid(float dyIn, float dzIn, float tgSlpIn, float yIn, float zIn, unsigned char rowIn, unsigned char secIn, short chanIn=-1, bool rejFlag=false)
unsigned char row
TPC pad row.
short tgSlp
tan of the phi angle between padrow and track
static void init(long timestamp=-1)
static constexpr short TgSlpPositionOnly
short channel
extra channel info (ITS chip ID, TRD chamber, TOF main pad within the sector)