Project
Loading...
Searching...
No Matches
TrackBasedCalib.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_TRACKBASEDCALIB_H
17#define O2_TRD_TRACKBASEDCALIB_H
18
27#include "TRDBase/RecoParam.h"
28
29#include "Rtypes.h"
30
31#include <gsl/span>
32
33namespace o2
34{
35
36namespace globaltracking
37{
38class RecoContainer;
39}
40
41namespace trd
42{
43
45{
47
48 public:
49 TrackBasedCalib() = default;
51 ~TrackBasedCalib() = default;
52
54 void init();
55
58
60 void setNoiseMapMCM(const NoiseStatusMCM* map) { mNoiseCalib = map; };
61
62 // Set the local gain factors with values from the ccdb
63 void setLocalGainFactors(const LocalGainFactor* localGain) { mLocalGain = localGain; }
64
65 void setApplyShift(bool f) { mApplyShift = f; }
66
68 void reset();
69
72
74 int doTrdOnlyTrackFits(gsl::span<const TrackTRD>& tracks);
75
79
81 int filldEdx(gsl::span<const TrackTRD>& tracks, bool isTPCTRD);
82
84 bool propagateAndUpdate(TrackTRD& trk, int iLayer, bool doUpdate) const;
85
86 const AngularResidHistos& getAngResHistos() const { return mAngResHistos; }
87 const auto& getGainCalibHistos() const { return mGainCalibHistos; }
88
89 private:
91 float mMaxStep{o2::base::Propagator::MAX_STEP};
92 MatCorrType mMatCorr{MatCorrType::USEMatCorrNONE};
93 RecoParam mRecoParam;
94 AngularResidHistos mAngResHistos;
95 std::vector<int> mGainCalibHistos;
96 float bz;
97 bool mApplyShift{true};
98
99 // input arrays which should not be modified since they are provided externally
100 gsl::span<const TrackTRD> mTracksInITSTPCTRD;
101 gsl::span<const TrackTRD> mTracksInTPCTRD;
102 gsl::span<const Tracklet64> mTrackletsRaw;
103 gsl::span<const CalibratedTracklet> mTrackletsCalib;
104 gsl::span<const o2::tpc::TrackTPC> mTracksTPC;
105 gsl::span<const o2::dataformats::TrackTPCITS> mTracksITSTPC;
106
107 // corrections from ccdb, some need to be loaded only once hence an init flag
108 const LocalGainFactor* mLocalGain{nullptr};
109 const NoiseStatusMCM* mNoiseCalib{nullptr};
110
111 ClassDefNV(TrackBasedCalib, 1);
112};
113
114} // namespace trd
115} // namespace o2
116
117#endif // O2_TRD_TRACKBASEDCALIB_H
Class to store the angular residuals of TRD tracklets wrt TPC tracks for each TRD chamber.
Class to store the TRD dEdx distribution for each TRD chamber.
Aliases for calibration values stored on a per-pad basis.
Error parameterizations and helper functions for TRD reconstruction.
static constexpr float MAX_SIN_PHI
Definition Propagator.h:72
static constexpr float MAX_STEP
Definition Propagator.h:73
Simple noise status bit for each MCM of the TRD.
void setInput(const o2::globaltracking::RecoContainer &input)
Initialize the input arrays.
int doTrdOnlyTrackFits(gsl::span< const TrackTRD > &tracks)
3-way fit to TRD tracklets
void setNoiseMapMCM(const NoiseStatusMCM *map)
Set the MCM noise map.
int filldEdx(gsl::span< const TrackTRD > &tracks, bool isTPCTRD)
Collect tracklet charges for given track.
void reset()
Reset the output.
void init()
Load geometry and apply magnetic field setting.
const auto & getGainCalibHistos() const
void calculateAngResHistos()
Main processing function for creating angular residual histograms for vDrift and ExB calibration.
bool propagateAndUpdate(TrackTRD &trk, int iLayer, bool doUpdate) const
Extrapolate track parameters to given layer and if requested perform update with tracklet.
void setLocalGainFactors(const LocalGainFactor *localGain)
TrackBasedCalib(const TrackBasedCalib &)=delete
const AngularResidHistos & getAngResHistos() const
GLdouble f
Definition glcorearb.h:310
PadCalibrations< float > LocalGainFactor
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...