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>
21#include <algorithm>
22#include <cmath>
46#include "GPUTRDRecoParam.h"
47#include "TRDBase/Geometry.h"
49
50class TTree;
51
52namespace o2
53{
54
55namespace gpu
56{
57class GPUParam;
58}
59
60namespace tpc
61{
62class VDriftCorrFact;
63
66 float dy{};
67 float dz{};
68 float y{};
69 float z{};
70 float snp{};
71 unsigned char sec{};
72 unsigned char dRow{};
73 unsigned char flags{};
75};
76
80 UnbinnedResid() = default;
81 UnbinnedResid(float dyIn, float dzIn, float tgSlpIn, float yIn, float zIn,
82 unsigned char rowIn, unsigned char secIn, short chanIn = -1, bool rejFlag = false) : dy(packToShort(dyIn, param::MaxResid)),
83 dz(packToShort(dzIn, param::MaxResid)),
84 tgSlp(packToShort(tgSlpIn, param::MaxTgSlp, std::abs(tgSlpIn) < param::MaxTgSlp ? 0x7fff - 1 : 0x7fff)),
85 y(packToShort(yIn, param::MaxY)),
86 z(packToShort(zIn, param::MaxZ)),
87 row(rowIn),
88 sec(secIn),
89 channel(chanIn),
90 rejected(rejFlag) {}
91 short dy{0};
92 short dz{0};
93 short tgSlp{0};
94 short y{0};
95 short z{0};
96 unsigned char row{0};
97 unsigned char sec{0};
98 short channel{-1};
99 bool rejected{false};
100
106 static short packToShort(float value, float maximum, int limit = 0x7fff)
107 {
108 return static_cast<short>(std::clamp<long>(std::lround(value * 0x7fff / maximum), -limit, limit));
109 }
110
112 bool isTgSlpClamped() const { return tgSlp == 0x7fff || tgSlp == -0x7fff; }
115 static constexpr short TgSlpPositionOnly = -0x8000;
116 bool isPositionOnly() const { return tgSlp == TgSlpPositionOnly; }
117 bool isTPC() const { return row < constants::MAXGLOBALPADROW; }
118 bool isTRD() const { return row >= 160 && row < 166; }
119 bool isTOF() const { return row == 170; }
120 bool isITS() const { return row >= 180; }
121 int getDetID() const { return isTPC() ? 1 : (isITS() ? 0 : (isTRD() ? 2 : (isTOF() ? 3 : -1))); }
122 int getITSLayer() const { return row - 180; }
123 int getTRDLayer() const { return row - 160; }
124 float getAlpha() const;
125 float getX() const;
126
127 static void init(long timestamp = -1);
128 static void checkInitDone();
129 static bool gInitDone;
130
132};
133
134struct DetInfoResid { // detector info associated with residual
135 uint32_t word = 0; // container interpreted in a different way depending on the detector type
136 //
137 // TPC view: qTot and qMax of the cluster
138 uint16_t qTotTPC() const { return static_cast<uint16_t>(word & 0xFFFFu); }
139 uint16_t qMaxTPC() const { return static_cast<uint16_t>((word >> 16) & 0xFFFFu); }
140 void setTPC(uint16_t qTot, uint16_t qMax) { word = (static_cast<uint32_t>(qMax) << 16) | static_cast<uint32_t>(qTot); }
141 //
142 // TRD view: q0, q1, q2 + calibrated slope (truncated to in +-3.5 range)
143 static constexpr uint32_t TRDQ0NB = 7, TRDQ1NB = 7, TRDQ2NB = 6, TRDSlpNB = 12;
144 static constexpr uint32_t TRDQ0Msk = (1 << TRDQ0NB) - 1, TRDQ1Msk = (1 << TRDQ1NB) - 1, TRDQ2Msk = ((1 << TRDQ2NB) - 1), TRDSlpMsk = (1 << TRDSlpNB) - 1;
145 static constexpr float TRDMaxSlope = 3.5, TRDSlope2Int = ((1 << TRDSlpNB) - 1) / (2 * TRDMaxSlope), TRDInt2Slope = 1.f / TRDSlope2Int;
146 uint16_t q0TRD() const { return static_cast<uint16_t>(word & TRDQ0Msk); }
147 uint16_t q1TRD() const { return static_cast<uint16_t>((word >> TRDQ0NB) & TRDQ1Msk); }
148 uint16_t q2TRD() const { return static_cast<uint16_t>((word >> (TRDQ0NB + TRDQ1NB)) & TRDQ2Msk); }
149 float slopeTRD() const { return ((word >> (TRDQ0NB + TRDQ1NB + TRDQ2NB)) & TRDSlpMsk) * TRDInt2Slope - TRDMaxSlope; }
150 void setTRD(uint8_t q0, uint8_t q1, uint8_t q2, float slope)
151 {
152 float rslope = (slope + TRDMaxSlope) * TRDSlope2Int;
153 if (rslope < 0.f) {
154 rslope = 0;
155 } else if (rslope > TRDSlpMsk) {
156 rslope = TRDSlpMsk;
157 }
158 uint32_t slpI = std::round(rslope);
159 word = (static_cast<uint32_t>(slpI << (TRDQ0NB + TRDQ1NB + TRDQ2NB)) |
160 static_cast<uint32_t>((q2 & TRDQ2Msk) << (TRDQ0NB + TRDQ1NB)) |
161 static_cast<uint32_t>((q1 & TRDQ1Msk) << TRDQ0NB) |
162 static_cast<uint32_t>(q0 & TRDQ0Msk));
163 }
164 //
165 // TOF view (time difference in \mus wrt seeding ITS-TPC track)
166 float timeTOF() const { return std::bit_cast<float>(word); }
167 void setTOF(float t) { word = std::bit_cast<uint32_t>(t); }
168 //
169 // No info for ITS is stored
170 //
171 // PV view (time difference in \mus wrt contributing ITS-TPC track)
172 float timePV() const { return std::bit_cast<float>(word); }
173 void setPV(float t) { word = std::bit_cast<uint32_t>(t); }
174
176};
177
180 TrackDataCompact() = default;
181 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) {}
183 std::array<uint8_t, 4> multStack{}; // multiplicity in the stack packed as asinh(x*0.05)/0.05
188
189 void setMultStack(float v, int stack)
190 {
191 uint32_t mltPacked = std::round(std::asinh(v * 0.05) / 0.05);
192 multStack[stack] = mltPacked < 0xff ? mltPacked : 0xff;
193 }
194 float getMultStack(int stack) const
195 {
196 return std::sinh(multStack[stack] * 0.05) / 0.05;
197 }
198 float getMultStackPacked(int stack) const { return multStack[stack]; }
199
201};
202
203// TODO add to UnbinnedResid::sec flag if cluster was used or not
204// TODO add to TrackDataCompact::sourceId flag if track was used or not (if possible)
205
223
225struct TrackData {
228 float dEdxTPC{};
229 float chi2TPC{};
230 float chi2ITS{};
231 float chi2TRD{};
232 float deltaTOF{};
233
234 unsigned short nClsTPC{};
235 unsigned short nClsITS{};
236 unsigned short nTrkltsTRD{};
237 unsigned short clAvailTOF{};
238 short TRDTrkltSlope[6] = {};
242 std::array<uint8_t, 4> multStack{}; // multiplicity in the stack packed as asinh(x*0.05)/0.05
243 float getT0Error() const { return float(clAvailTOF); }
244 bool isTOFAvail() const { return clAvailTOF != 0; }
245
246 void setMultStack(float v, int stack)
247 {
248 uint32_t mltPacked = std::round(std::asinh(v * 0.05) / 0.05);
249 multStack[stack] = mltPacked < 0xff ? mltPacked : 0xff;
250 }
251 float getMultStack(int stack) const
252 {
253 return std::sinh(multStack[stack] * 0.05) / 0.05;
254 }
255 float getMultStackPacked(int stack) const { return multStack[stack]; }
256
258};
259
262 enum Flags : uint8_t { HasITSOut = 0x1,
263 HasTPCIn = 0x2,
265 HasTRDIn = 0x8,
266 IsPrimary = 0x10 };
272 float distITSRef{-1.f};
273 float distTPCRef{-1.f};
275 float yTRD[6] = {};
276 float zTRD[6] = {};
278 int pdg{0};
280 int motherPdg{0};
281 float prodX{0.f};
282 float prodY{0.f};
283 float prodZ{0.f};
284 float prodPx{0.f};
285 float prodPy{0.f};
286 float prodPz{0.f};
287 int sisterIdx{-1};
290 bool hasITSOut() const { return flags & HasITSOut; }
291 bool hasTPCIn() const { return flags & HasTPCIn; }
292 bool isFakeITSTPC() const { return flags & FakeITSTPC; }
293 bool hasTRDIn() const { return flags & HasTRDIn; }
294 bool isPrimary() const { return flags & IsPrimary; }
296};
297
303{
304 public:
307
310
311 // since this class has pointer members, we should explicitly delete copy and assignment operators
314
316
318 enum {
319 ExtOut = 0,
322 NIndices
323 };
324
326 struct CacheStruct {
327 std::array<float, NIndices> y{};
328 std::array<float, NIndices> z{};
329 std::array<float, NIndices> sy2{};
330 std::array<float, NIndices> szy{};
331 std::array<float, NIndices> sz2{};
332 std::array<float, NIndices> snp{};
333 float clY{0.f};
334 float clZ{0.f};
335 float clAngle{0.f};
336 unsigned short clAvailable{0};
337 unsigned char clSec{0};
338 unsigned char clFlags{0};
339 };
340
343 float xTrk{0.f};
344 float yTrk{0.f};
345 float zTrk{0.f};
346 float xLab{0.f};
347 float yLab{0.f};
348 float sPath{0.f};
349 float dy{0.f};
350 float dz{0.f};
351 float tglArr{0.f};
352 float residHelixY{0.f};
353 float residHelixZ{0.f};
354 float diffYSmooth{0.f};
355 float diffZSmooth{0.f};
357 bool flagRej{false};
359 };
360
362 float qpt{0.f};
363 float tgl{0.f};
364 float xcLab{0.f};
365 float ycLab{0.f};
366 float r{0.f};
367 float zOffs{0.f};
369 std::vector<ValidationPoint> points;
370 void clear()
371 {
372 points.clear();
373 nRej = 0;
374 }
376 };
377
378 // -------------------------------------- processing functions --------------------------------------------------
379
382
385
388
391
393 bool isTrackSelected(const o2::track::TrackParCov& trk) const;
394
396 void process();
397
400 void extrapolateTrack(int iSeed);
401
404 void interpolateTrack(int iSeed);
405
407 void reset();
408
409 // refit ITS track taking PID (unless already refitted) from the seed and reassign to the seed
411 // -------------------------------------- outlier rejection --------------------------------------------------
412
417 int8_t validateTrack(const TrackData& trk, TrackValidationData& params, const std::vector<TPCClusterResiduals>& clsRes, bool interpol);
418
421 bool outlierFiltering(const TrackData& trk, TrackValidationData& params, const std::vector<TPCClusterResiduals>& clsRes);
422
425 float checkResiduals(const TrackData& trk, TrackValidationData& params, const std::vector<TPCClusterResiduals>& clsRes);
426
429 bool compareToHelix(const TrackData& trk, TrackValidationData& params, const std::vector<TPCClusterResiduals>& clsRes);
430
432 void diffToLocLine(TrackValidationData& params, int start, int np);
433
435 void diffToMA(const int np, const std::array<float, param::NPadRows>& y, std::array<float, param::NPadRows>& diffMA);
436
437 // -------------------------------------- settings --------------------------------------------------
438 void setNHBPerTF(int n) { mNHBPerTF = n; }
439
441
443 void setMatCorr(MatCorrType matCorr) { mMatCorr = matCorr; }
444
446 void setMaxTracksPerTF(int n) { mMaxTracksPerTF = n; }
447
449 void setAddTracksForMapPerTF(int n) { mAddTracksForMapPerTF = n; }
450
452 void setDumpTrackPoints() { mDumpTrackPoints = true; }
453
455 void setITSClusterDictionary(const o2::itsmft::TopologyDictionary* dict) { mITSDict = dict; }
456
458 void setProcessSeeds() { mProcessSeeds = true; }
459
461 void setProcessITSTPConly() { mProcessITSTPConly = true; }
462
464 void setSqrtS(float s) { mSqrtS = s; }
465
466 void setExtDetResid(bool v) { mExtDetResid = v; }
467
468 int processTRDLayer(const o2::trd::TrackTRD& trkTRD, int iLayer, o2::track::TrackParCov& trkWork, std::array<float, 2>* trkltTRDYZ = nullptr,
469 std::array<float, 3>* trkltTRDCov = nullptr, TrackData* trkData = nullptr,
470 o2::trd::Tracklet64* trk64 = nullptr, o2::trd::CalibratedTracklet* trkCalib = nullptr);
471
472 // --------------------------------- output ---------------------------------------------
473 std::vector<UnbinnedResid>& getClusterResiduals() { return mClRes; }
474 std::vector<DetInfoResid>& getClusterResidualsDetInfo() { return mDetInfoRes; }
475 std::vector<TrackDataCompact>& getTrackDataCompact() { return mTrackDataCompact; }
476 std::vector<TrackDataExtended>& getTrackDataExtended() { return mTrackDataExtended; }
477 std::vector<TrackData>& getReferenceTracks() { return mTrackData; }
479 const std::vector<o2::dataformats::GlobalTrackID>& getTRDGIDsSuccess() const { return mTRDGIDsSuccess; }
480
481 void setLane(int lID, int nL)
482 {
483 mLaneID = lID;
484 mNLanes = nL;
485 }
486
487 void finalize();
488
489 private:
490 static constexpr float sFloatEps{1.e-7f};
491 static constexpr int NSTACKS = 4;
492 static constexpr std::array<int, NSTACKS + 1> STACKROWS{0, 63, 97, 127, 152};
493 // parameters + settings
494 const SpacePointsCalibConfParam* mParams = nullptr;
495 std::shared_ptr<o2::gpu::GPUParam> mTPCParam = nullptr;
496 int mLaneID = 0;
497 int mNLanes = 1;
498 int mNHBPerTF = 32;
499 int mNTPCOccBinLength = 16;
500 float mNTPCOccBinLengthInv = 1.f / 16;
501 float mTPCTimeBinMUS{.2f};
502 float mTPCVDriftRef = -1.;
503 float mTPCDriftTimeOffsetRef = 0.;
504 float mSqrtS{13600.f};
505 MatCorrType mMatCorr{MatCorrType::USEMatCorrNONE};
506 int mMaxTracksPerTF{-1};
507 int mAddTracksForMapPerTF{0};
508 bool mDumpTrackPoints{false};
509 bool mExtDetResid{true};
510 bool mProcessSeeds{false};
511 bool mProcessITSTPConly{false};
512 o2::dataformats::GlobalTrackID::mask_t mSourcesConfigured;
513 o2::dataformats::GlobalTrackID::mask_t mSourcesConfiguredMap;
514 bool mSingleSourcesConfigured{true};
515
516 // input
517 const o2::globaltracking::RecoContainer* mRecoCont = nullptr;
518 std::vector<o2::dataformats::GlobalTrackID> mGIDs{};
519 std::vector<o2::globaltracking::RecoContainer::GlobalIDSet> mGIDtables{};
520 std::vector<float> mTrackTimes{};
521 std::vector<int> mTrackPVID{};
522 std::vector<o2::track::TrackParCov> mSeeds{};
523 std::vector<int> mParentID{};
524 std::map<int, int> mTrackTypes;
525 std::array<std::vector<uint32_t>, 4> mTrackIndices;
526 gsl::span<const TPCClRefElem> mTPCTrackClusIdx;
527 gsl::span<const unsigned char> mTPCShClassMap;
528 const ClusterNativeAccess* mTPCClusterIdxStruct = nullptr;
529
530 // ITS specific input only needed for debugging
531 gsl::span<const int> mITSTrackClusIdx;
532 ITSClusters mITSClustersArray;
533 std::vector<int> mITSRefitSeedID;
534 const o2::itsmft::TopologyDictionary* mITSDict = nullptr;
535
536 // output
537 std::vector<TrackData> mTrackData{};
538 std::vector<TrackDataCompact> mTrackDataCompact{};
539 std::vector<TrackDataExtended> mTrackDataExtended{};
540 std::vector<UnbinnedResid> mClRes{};
541 std::vector<DetInfoResid> mDetInfoRes{};
542 std::unique_ptr<o2::utils::TreeStreamRedirector> mDBGOut;
543
544 // cache
545 std::array<CacheStruct, constants::MAXGLOBALPADROW> mCache{{}};
546 std::vector<o2::dataformats::GlobalTrackID> mGIDsSuccess;
547 std::vector<o2::dataformats::GlobalTrackID> mTRDGIDsSuccess;
548
549 TrackValidationData mTrackValidation;
550
551 // helpers
552 o2::gpu::GPUTRDRecoParam mRecoParam;
553 o2::trd::Geometry* mGeoTRD;
554 std::unique_ptr<TPCFastTransform> mFastTransform{};
555 float mBz;
556 bool mInitDone{false};
557 size_t mRejectedResiduals{};
558 size_t mNRejRefit = 0;
559 size_t mNRejProp = 0;
560 size_t mNRejLoop = 0;
561 size_t mNPosOnlyTracks = 0;
562 size_t mNPosOnlyClusters = 0;
563
564 ClassDefNV(TrackInterpolation, 1);
565};
566
567} // namespace tpc
568
569} // namespace o2
570
571#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...
unsigned short int uint16_t
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error s
configStandalone Reconstruction rec_tpc float
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
const GLdouble * v
Definition glcorearb.h:832
GLsizei GLsizei GLchar * source
Definition glcorearb.h:798
GLint y
Definition glcorearb.h:270
GLsizei const GLfloat * value
Definition glcorearb.h:819
GLenum const GLfloat * params
Definition glcorearb.h:272
GLuint GLsizei const GLchar * label
Definition glcorearb.h:2519
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 short packToShort(float value, float maximum, int limit=0x7fff)
static constexpr short TgSlpPositionOnly
short channel
extra channel info (ITS chip ID, TRD chamber, TOF main pad within the sector)