Project
Loading...
Searching...
No Matches
Tracking.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
15
16#ifndef O2_TRD_TRACKINGQC_H
17#define O2_TRD_TRACKINGQC_H
18
28#include "TRDBase/RecoParam.h"
29
30#include "Rtypes.h"
31#include "TH1.h"
32
33#include <gsl/span>
34#include <bitset>
35
37
38namespace o2
39{
40
41namespace globaltracking
42{
43class RecoContainer;
44}
45
46namespace trd
47{
48
49struct TrackQC {
50
54 float dEdxTotTPC;
55
56 std::array<o2::track::TrackPar, constants::NLAYER> trackProp{};
57 std::array<Tracklet64, constants::NLAYER> trklt64{};
58 std::array<CalibratedTracklet, constants::NLAYER> trkltCalib{};
59
60 std::array<float, constants::NLAYER> trackletY{};
61 std::array<float, constants::NLAYER> trackletZ{};
62 std::array<float, constants::NLAYER> trackletChi2{};
63 std::array<std::array<float, constants::NCHARGES>, constants::NLAYER> trackletCorCharges{};
64
66};
67
69{
71
72 public:
73 Tracking() = default;
74 Tracking(const Tracking&) = delete;
75 ~Tracking() = default;
76
78 void init();
79
82
83 void setApplyShift(bool f) { mApplyShift = f; }
84
86 void run();
87
89 void reset() { mTrackQC.clear(); }
90
92 void checkTrack(const TrackTRD& trk, bool isTPCTRD);
93
95 void disablePID() { mPID = false; }
96
97 // Make output accessible to DPL processor
98 std::vector<TrackQC>& getTrackQC() { return mTrackQC; }
99
100 // Set the local gain factors with values from the ccdb
102 {
103 mLocalGain = localGain;
104 }
105
106 private:
107 float mMaxSnp{o2::base::Propagator::MAX_SIN_PHI};
108 float mMaxStep{o2::base::Propagator::MAX_STEP};
109 MatCorrType mMatCorr{MatCorrType::USEMatCorrNONE};
110 RecoParam mRecoParam;
111 bool mPID{true};
112 bool mApplyShift{true};
113
114 // QA results
115 std::vector<TrackQC> mTrackQC;
116
117 // input from DPL
118 gsl::span<const o2::dataformats::TrackTPCITS> mTracksITSTPC;
119 gsl::span<const o2::tpc::TrackTPC> mTracksTPC;
120 gsl::span<const TrackTRD> mTracksITSTPCTRD;
121 gsl::span<const TrackTRD> mTracksTPCTRD;
122 gsl::span<const Tracklet64> mTrackletsRaw;
123 gsl::span<const CalibratedTracklet> mTrackletsCalib;
124
125 // corrections from ccdb, some need to be loaded only once hence an init flag
126 o2::trd::LocalGainFactor mLocalGain;
127
128 ClassDefNV(Tracking, 2);
129};
130
131} // namespace trd
132
133namespace framework
134{
135template <typename T>
136struct is_messageable;
137template <>
138struct is_messageable<o2::trd::TrackQC> : std::true_type {
139};
140} // namespace framework
141
142} // namespace o2
143
144#endif // O2_TRD_TRACKINGQC_H
Global TRD definitions and constants.
Global index for barrel track: provides provenance (detectors combination), index in respective array...
Aliases for calibration values stored on a per-pad basis.
Error parameterizations and helper functions for TRD reconstruction.
Result of refitting TPC-ITS matched track.
static constexpr float MAX_SIN_PHI
Definition Propagator.h:72
static constexpr float MAX_STEP
Definition Propagator.h:73
void setInput(const o2::globaltracking::RecoContainer &input)
Initialize the input arrays.
Definition Tracking.cxx:31
void run()
Main processing function.
Definition Tracking.cxx:41
void checkTrack(const TrackTRD &trk, bool isTPCTRD)
Check track QC.
Definition Tracking.cxx:51
std::vector< TrackQC > & getTrackQC()
Definition Tracking.h:98
void disablePID()
Disable TPC dEdx information.
Definition Tracking.h:95
Tracking()=default
void reset()
Reset the output vector.
Definition Tracking.h:89
Tracking(const Tracking &)=delete
void setLocalGainFactors(const o2::trd::LocalGainFactor &localGain)
Definition Tracking.h:101
void init()
Load geometry and apply magnetic field setting.
Definition Tracking.cxx:26
~Tracking()=default
void setApplyShift(bool f)
Definition Tracking.h:83
GLdouble f
Definition glcorearb.h:310
TrackParCovF TrackParCov
Definition Track.h:33
constexpr int NLAYER
the number of layers
Definition Constants.h:27
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
ClassDefNV(TrackQC, 6)
float dEdxTotTPC
raw total dEdx information for seeding track in TPC
Definition Tracking.h:54
std::array< o2::track::TrackPar, constants::NLAYER > trackProp
the track parameters stored at the radius where the track is updated with TRD info
Definition Tracking.h:56
GTrackID refGlobalTrackId
GlobalTrackID of the seeding track (either ITS-TPC or TPC)
Definition Tracking.h:51
std::array< float, constants::NLAYER > trackletChi2
estimated chi2 for the update of the track with the given tracklet
Definition Tracking.h:62
std::array< CalibratedTracklet, constants::NLAYER > trkltCalib
the TRD space point used for the update (not yet tilt-corrected and z-shift corrected)
Definition Tracking.h:58
TrackTRD trackTRD
the found TRD track
Definition Tracking.h:52
std::array< float, constants::NLAYER > trackletY
y-position of tracklet used for track update (including correction)
Definition Tracking.h:60
std::array< std::array< float, constants::NCHARGES >, constants::NLAYER > trackletCorCharges
corrected charges of tracklets
Definition Tracking.h:63
std::array< Tracklet64, constants::NLAYER > trklt64
the raw tracklet used for the update (includes uncorrected charges)
Definition Tracking.h:57
std::array< float, constants::NLAYER > trackletZ
z-position of tracklet used for track update (including correction)
Definition Tracking.h:61
o2::track::TrackParCov trackSeed
outer param of the seeding track
Definition Tracking.h:53