Skip to content

Commit 3206b56

Browse files
martenoleshahor02
andauthored
TRD tracking improvements (#6943)
* Revert dummy TRD track base class * Suppress fit parameter range warning * TRD tracking default parameter adjustment * Add TRD refits (temporarily in DPL device) - refits inward/outward for ITS-TPC-TRD and TPC-TRD tracks - calculation of TrackLTIntegral during inward refit * dummy commit to restart fullCI Co-authored-by: Ruben Shahoyan <shahor02@users.noreply.github.com>
1 parent 4a48c75 commit 3206b56

16 files changed

Lines changed: 312 additions & 85 deletions

File tree

DataFormats/Detectors/TRD/include/DataFormatsTRD/RecoInputContainer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ inline auto getRecoInputContainer(o2::framework::ProcessingContext& pc, o2::gpu:
8080
retVal->fillGPUIOPtr(ptrs);
8181
}
8282

83-
return std::move(retVal);
83+
return retVal;
8484
}
8585

8686
inline void RecoInputContainer::fillGPUIOPtr(o2::gpu::GPUTrackingInOutPointers* ptrs)

DataFormats/Detectors/TRD/include/DataFormatsTRD/TrackTRD.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ namespace gpu
3535
{
3636
static_assert(sizeof(o2::dataformats::GlobalTrackID) == sizeof(unsigned int));
3737
template <>
38-
GPUdi() o2::dataformats::GlobalTrackID GPUTRDTrack_t<trackInterface<GPUTRDO2BaseTrack>>::getRefGlobalTrackId() const
38+
GPUdi() o2::dataformats::GlobalTrackID GPUTRDTrack_t<trackInterface<o2::track::TrackParCov>>::getRefGlobalTrackId() const
3939
{
4040
return o2::dataformats::GlobalTrackID{mRefGlobalTrackId};
4141
}
4242
template <>
43-
GPUdi() void GPUTRDTrack_t<trackInterface<GPUTRDO2BaseTrack>>::setRefGlobalTrackId(o2::dataformats::GlobalTrackID id)
43+
GPUdi() void GPUTRDTrack_t<trackInterface<o2::track::TrackParCov>>::setRefGlobalTrackId(o2::dataformats::GlobalTrackID id)
4444
{
4545
setRefGlobalTrackIdRaw(id.getRaw());
4646
}

Detectors/TRD/calibration/include/TRDCalibration/KrClusterFinder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class KrClusterFinder
9494
LandauChi2Functor mLandauChi2Functor; ///< stores the binned ADC data and provides a chi2 estimate
9595
std::shared_ptr<ROOT::Fit::FitResult> mFitResult{new ROOT::Fit::FitResult()}; ///< pointer to the results of the Landau fit
9696
ROOT::Fit::Fitter mFitter{mFitResult}; ///< an instance of the ROOT fitter
97-
std::array<double, 3> mInitialFitParams{}; ///< initial fit parameters for the Landau fit
97+
std::array<double, 3> mInitialFitParams{1., 1., 1.}; ///< initial fit parameters for the Landau fit
9898
std::unique_ptr<TF1> mFuncLandauFit; ///< helper function to approximate the binned ADC data with a Landau distribution
9999
// settings
100100
const int mBaselineAdc{10}; ///< ADC baseline for each pad (can maybe be moved into Constants.h)

Detectors/TRD/workflow/include/TRDWorkflow/TRDGlobalTrackingSpec.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
#include "SimulationDataFormat/ConstMCTruthContainer.h"
2929
#include <memory>
3030

31+
#include "GPUO2InterfaceRefit.h"
32+
#include "TPCFastTransform.h"
33+
#include "TRDBase/RecoParam.h"
34+
#include "DataFormatsTPC/TrackTPC.h"
35+
#include "DataFormatsITS/TrackITS.h"
36+
#include "DataFormatsITSMFT/TopologyDictionary.h"
37+
3138
namespace o2
3239
{
3340
namespace trd
@@ -43,6 +50,9 @@ class TRDGlobalTracking : public o2::framework::Task
4350
void fillMCTruthInfo(const TrackTRD& trk, o2::MCCompLabel lblSeed, std::vector<o2::MCCompLabel>& lblContainerTrd, std::vector<o2::MCCompLabel>& lblContainerMatch, const o2::dataformats::MCTruthContainer<o2::MCCompLabel>* trkltLabels) const;
4451
void fillTrackTriggerRecord(const std::vector<TrackTRD>& tracks, std::vector<TrackTriggerRecord>& trigRec, const gsl::span<const o2::trd::TriggerRecord>& trackletTrigRec) const;
4552
void run(o2::framework::ProcessingContext& pc) final;
53+
bool refitITSTPCTRDTrack(TrackTRD& trk, float timeTRD, o2::globaltracking::RecoContainer* recoCont);
54+
bool refitTPCTRDTrack(TrackTRD& trk, float timeTRD, o2::globaltracking::RecoContainer* recoCont);
55+
bool refitTRDTrack(TrackTRD& trk, float& chi2, bool inwards);
4656
void endOfStream(o2::framework::EndOfStreamContext& ec) final;
4757

4858
private:
@@ -54,10 +64,23 @@ class TRDGlobalTracking : public o2::framework::Task
5464
bool mTrigRecFilter{false}; ///< if true, TRD trigger records without matching ITS IR are filtered out
5565
bool mStrict{false}; ///< preliminary matching in strict mode
5666
float mTPCTBinMUS{.2f}; ///< width of a TPC time bin in us
67+
float mTPCTBinMUSInv{1.f / mTPCTBinMUS}; ///< inverse width of a TPC time bin in 1/us
5768
float mTPCVdrift{2.58f}; ///< TPC drift velocity (for shifting TPC tracks along Z)
5869
std::shared_ptr<o2::globaltracking::DataRequest> mDataRequest; ///< seeding input (TPC-only, ITS-TPC or both)
5970
o2::dataformats::GlobalTrackID::mask_t mTrkMask; ///< seeding track sources (TPC, ITS-TPC)
6071
TStopwatch mTimer;
72+
// temporary members -> should go into processor (GPUTRDTracker or additional refit processor?)
73+
std::unique_ptr<o2::gpu::GPUO2InterfaceRefit> mTPCRefitter; ///< TPC refitter used for TPC tracks refit during the reconstruction
74+
const o2::tpc::ClusterNativeAccess* mTPCClusterIdxStruct = nullptr; ///< struct holding the TPC cluster indices
75+
std::unique_ptr<o2::gpu::TPCFastTransform> mTPCTransform; ///< TPC cluster transformation
76+
RecoParam mRecoParam; ///< parameters required for TRD reconstruction
77+
gsl::span<const Tracklet64> mTrackletsRaw; ///< array of raw tracklets needed for TRD refit
78+
gsl::span<const CalibratedTracklet> mTrackletsCalib; ///< array of calibrated tracklets needed for TRD refit
79+
gsl::span<const o2::tpc::TrackTPC> mTPCTracksArray; ///< input TPC tracks used for refit
80+
gsl::span<const o2::its::TrackITS> mITSTracksArray; ///< input ITS tracks used for refit
81+
gsl::span<const int> mITSTrackClusIdx; ///< input ITS track cluster indices span
82+
std::vector<o2::BaseCluster<float>> mITSClustersArray; ///< ITS clusters created in run() method from compact clusters
83+
o2::itsmft::TopologyDictionary mITSDict; ///< cluster patterns dictionary
6184
};
6285

6386
/// create a processor spec

0 commit comments

Comments
 (0)