Project
Loading...
Searching...
No Matches
TRDGlobalTrackingSpec.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
13
14#ifndef O2_TRD_GLOBALTRACKING
15#define O2_TRD_GLOBALTRACKING
16
18#include "Framework/Task.h"
19#include "TStopwatch.h"
21#include "GPUO2ExternalUser.h"
22#include "GPUTRDTracker.h"
23#include "GPUTRDRecoParam.h"
28#include "DataFormatsTRD/PID.h"
29#include "TRDPID/PIDBase.h"
32#include <memory>
35#include "TPCFastTransformPOD.h"
36#include "GPUO2InterfaceRefit.h"
41
42#ifdef ENABLE_UPGRADES
44#endif
45
46namespace o2
47{
48namespace trd
49{
50
52{
53 public:
54 TRDGlobalTracking(bool useMC, bool withPID, PIDPolicy policy, std::shared_ptr<o2::globaltracking::DataRequest> dataRequest, std::shared_ptr<o2::base::GRPGeomRequest> gr,
55 o2::dataformats::GlobalTrackID::mask_t src, bool trigRecFilterActive, bool strict, bool requestCTPLumi) : mUseMC(useMC), mWithPID(withPID), mDataRequest(dataRequest), mGGCCDBRequest(gr), mTrkMask(src), mTrigRecFilter(trigRecFilterActive), mStrict(strict), mPolicy(policy), mRequestCTPLumi(requestCTPLumi) {}
56 ~TRDGlobalTracking() override = default;
57 void init(o2::framework::InitContext& ic) final;
58 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;
59 void fillTrackTriggerRecord(const std::vector<TrackTRD>& tracks, std::vector<TrackTriggerRecord>& trigRec, const gsl::span<const o2::trd::TriggerRecord>& trackletTrigRec) const;
61 void finaliseCCDB(o2::framework::ConcreteDataMatcher& matcher, void* obj) final;
62 bool refitITSTPCTRDTrack(TrackTRD& trk, float timeTRD, o2::globaltracking::RecoContainer* recoCont);
63 bool refitTPCTRDTrack(TrackTRD& trk, float timeTRD, o2::globaltracking::RecoContainer* recoCont);
64 bool refitTRDTrack(TrackTRD& trk, float& chi2, bool inwards, bool tpcSA);
66
67 private:
68 void updateTimeDependentParams(o2::framework::ProcessingContext& pc);
69
70 o2::gpu::GPUTRDTracker* mTracker{nullptr};
71 o2::gpu::GPUReconstruction* mRec{nullptr};
72 o2::gpu::GPUChainTracking* mChainTracking{nullptr};
73 std::unique_ptr<GeometryFlat> mFlatGeo{nullptr};
74 bool mUseMC{false};
75 bool mWithPID{false};
76 float mTPCTBinMUS{.2f};
77 float mTPCTBinMUSInv{1.f / mTPCTBinMUS};
78 float mTPCVdrift{2.58f};
79 float mTPCTDriftOffset{0.f};
80 std::shared_ptr<o2::globaltracking::DataRequest> mDataRequest;
81 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
82 o2::tpc::VDriftHelper mTPCVDriftHelper{};
83 const o2::gpu::TPCFastTransformPOD* mTPCCorrMaps{nullptr};
85 bool mTrigRecFilter{false};
86 bool mStrict{false};
87 TStopwatch mTimer;
88 // temporary members -> should go into processor (GPUTRDTracker or additional refit processor?)
89 std::unique_ptr<o2::gpu::GPUO2InterfaceRefit> mTPCRefitter;
90 const o2::tpc::ClusterNativeAccess* mTPCClusterIdxStruct = nullptr;
91 o2::gpu::GPUTRDRecoParam mRecoParam;
92 gsl::span<const Tracklet64> mTrackletsRaw;
93 gsl::span<const CalibratedTracklet> mTrackletsCalib;
94 gsl::span<const o2::tpc::TrackTPC> mTPCTracksArray;
95 gsl::span<const o2::its::TrackITS> mITSTracksArray;
96 gsl::span<const o2::itsmft::TrkClusRef> mITSABRefsArray;
97 gsl::span<const int> mITSTrackClusIdx;
98 gsl::span<const int> mITSABTrackClusIdx;
99 std::vector<o2::BaseCluster<float>> mITSClustersArray;
100 const o2::itsmft::TopologyDictionary* mITSDict = nullptr;
101#ifdef ENABLE_UPGRADES
102 const o2::its3::TopologyDictionary* mIT3Dict = nullptr;
103#endif
104 std::array<float, 5> mCovDiagInner{};
105 std::array<float, 5> mCovDiagOuter{};
106 // PID
108 bool mRequestCTPLumi{false};
109 std::unique_ptr<PIDBase> mBase;
110};
111
113framework::DataProcessorSpec getTRDGlobalTrackingSpec(bool useMC, o2::dataformats::GlobalTrackID::mask_t src, bool trigRecFilterActive, bool strict /* = false*/, bool withPID /* = false*/, PIDPolicy policy /* = PIDPolicy::DEFAULT*/, bool requestCTPLumi);
114
115} // namespace trd
116} // namespace o2
117
118#endif /* O2_TRD_TRACKLETREADER */
A const (ready only) version of MCTruthContainer.
Wrapper container for different reconstructed object types.
Definition of the ClusterTopology class.
Definition of the BuildTopologyDictionary class for ITS3.
Online TRD tracker based on extrapolated TPC tracks.
Helper for geometry and GRP related CCDB requests.
Global index for barrel track: provides provenance (detectors combination), index in respective array...
This file provides the base interface for pid policies.
POD correction map.
Definition of the ITS track.
Reference on ITS/MFT clusters set.
Helper class to extract VDrift from different sources.
A container to hold and manage MC truth information/labels.
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
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
TRDGlobalTracking(bool useMC, bool withPID, PIDPolicy policy, std::shared_ptr< o2::globaltracking::DataRequest > dataRequest, std::shared_ptr< o2::base::GRPGeomRequest > gr, o2::dataformats::GlobalTrackID::mask_t src, bool trigRecFilterActive, bool strict, bool requestCTPLumi)
void run(o2::framework::ProcessingContext &pc) final
bool refitTRDTrack(TrackTRD &trk, float &chi2, bool inwards, bool tpcSA)
~TRDGlobalTracking() override=default
void init(o2::framework::InitContext &ic) final
bool refitITSTPCTRDTrack(TrackTRD &trk, float timeTRD, o2::globaltracking::RecoContainer *recoCont)
void fillTrackTriggerRecord(const std::vector< TrackTRD > &tracks, std::vector< TrackTriggerRecord > &trigRec, const gsl::span< const o2::trd::TriggerRecord > &trackletTrigRec) const
bool refitTPCTRDTrack(TrackTRD &trk, float timeTRD, o2::globaltracking::RecoContainer *recoCont)
GLenum src
Definition glcorearb.h:1767
framework::DataProcessorSpec getTRDGlobalTrackingSpec(bool useMC, o2::dataformats::GlobalTrackID::mask_t src, bool trigRecFilterActive, bool strict, bool withPID, PIDPolicy policy, bool requestCTPLumi)
create a processor spec
PIDPolicy
Option for available PID policies.
Definition PID.h:29
@ DEFAULT
The default option.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...