16#include "TStopwatch.h"
59namespace globaltracking
78 std::shared_ptr<DataRequest> mDataRequest;
79 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
94 mTPCCorrMapsLoader.
init(ic);
103 updateTimeDependentParams(pc);
118 static bool initOnceDone =
false;
127 if (!grp->isDetContinuousReadOut(
DetID::ITS)) {
134 bool updateMaps =
false;
141 LOGP(info,
"Updating TPC fast transform map with new VDrift factor of {} wrt reference {} and DriftTimeOffset correction {} wrt {} from source {}",
166 LOG(info) <<
"cluster dictionary updated";
175 LOGF(info,
"Cosmics matching total timing: Cpu: %.3e Real: %.3e s in %d slots",
176 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
181 std::vector<OutputSpec> outputs;
183 {
"material-lut-path", VariantType::String,
"", {
"Path of the material LUT file"}},
184 {
"debug-tree-flags", VariantType::Int, 0, {
"DebugFlagTypes bit-pattern for debug tree"}}};
186 auto dataRequest = std::make_shared<DataRequest>();
188 dataRequest->requestTracks(
src, useMC);
189 dataRequest->requestClusters(
src,
false);
191 outputs.emplace_back(
"GLO",
"COSMICTRC", 0, Lifetime::Timeframe);
193 outputs.emplace_back(
"GLO",
"COSMICTRC_MC", 0, Lifetime::Timeframe);
196 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(
false,
211 AlgorithmSpec{adaptFromTask<CosmicsMatchingSpec>(dataRequest, ggRequest, sclOpts, useMC)},
Class of a TPC cluster in TPC-native coordinates (row, time)
Definition of the ITS/MFT clusterer settings.
Definition of the ITSMFT compact cluster.
Helper class to access load maps from CCDB.
gsl::span< const o2::MCCompLabel > MCLabelsTr
Definition of the Names Generator class.
Definition of the GeometryManager class.
Helper for geometry and GRP related CCDB requests.
Header of the General Run Parameters object.
Accessor for TrackParCov derived objects from multiple containers.
Global index for barrel track: provides provenance (detectors combination), index in respective array...
Definition of the GeometryTGeo class.
Definition of a container to keep Monte Carlo truth external to simulation objects.
Class to perform matching/refit of cosmic tracks legs.
Class to store the output of the matching to TOF.
Definition of the ITS track.
Result of refitting TPC-ITS matched track.
Result of refitting TPC with TOF match constraint.
Helper class to extract VDrift from different sources.
Helper class to obtain TPC clusters / digits / labels from DPL.
void checkUpdates(o2::framework::ProcessingContext &pc)
static GRPGeomHelper & instance()
void setRequest(std::shared_ptr< GRPGeomRequest > req)
static const DPLAlpideParam< N > & Instance()
Static class with identifiers, bitmasks and names for ALICE detectors.
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
ConfigParamRegistry const & options()
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
void endOfStream(framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void finaliseCCDB(framework::ConcreteDataMatcher &matcher, void *obj) final
void init(InitContext &ic) final
CosmicsMatchingSpec(std::shared_ptr< DataRequest > dr, std::shared_ptr< o2::base::GRPGeomRequest > gr, const o2::tpc::CorrectionMapsLoaderGloOpts &sclOpts, bool useMC)
void run(ProcessingContext &pc) final
~CosmicsMatchingSpec() override=default
void setITSROFrameLengthMUS(float fums)
auto getCosmicTracksLbl() const
void setTPCCorrMaps(o2::gpu::CorrectionMapsHelper *maph)
void setITSDict(const o2::itsmft::TopologyDictionary *dict)
void setDebugFlag(UInt_t flag, bool on=true)
set the name of output debug file
void setTPCVDrift(const o2::tpc::VDriftCorrFact &v)
auto getCosmicTracks() const
void process(const o2::globaltracking::RecoContainer &data)
void setLumiScaleType(int32_t v)
void setLumiScaleMode(int32_t v)
static GeometryTGeo * Instance()
void fillMatrixCache(int mask) override
void extractCCDBInputs(o2::framework::ProcessingContext &pc)
void updateVDrift(float vdriftCorr, float vdrifRef, float driftTimeOffset=0)
bool accountCCDBInputs(const o2::framework::ConcreteDataMatcher &matcher, void *obj)
static void requestCCDBInputs(std::vector< o2::framework::InputSpec > &inputs, std::vector< o2::framework::ConfigParamSpec > &options, const CorrectionMapsLoaderGloOpts &gloOpts)
recalculate inverse correction
void init(o2::framework::InitContext &ic)
static void requestCCDBInputs(std::vector< o2::framework::InputSpec > &inputs, bool laser=true, bool itstpcTgl=true)
void extractCCDBInputs(o2::framework::ProcessingContext &pc, bool laser=true, bool itstpcTgl=true)
const VDriftCorrFact & getVDriftObject() const
bool accountCCDBInputs(const o2::framework::ConcreteDataMatcher &matcher, void *obj)
static std::string_view getSourceName(Source s)
constexpr double LHCBunchSpacingNS
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
framework::DataProcessorSpec getCosmicsMatchingSpec(o2::dataformats::GlobalTrackID::mask_t src, bool useMC, const o2::tpc::CorrectionMapsLoaderGloOpts &sclOpts)
create a processor spec
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
void collectData(o2::framework::ProcessingContext &pc, const DataRequest &request)
int lumiType
what estimator to used for corrections scaling: 0: no scaling, 1: CTP, 2: IDC
int lumiMode
what corrections method to use: 0: classical scaling, 1: Using of the derivative map,...
float refTimeOffset
additive time offset reference (\mus)
float refVDrift
reference vdrift for which factor was extracted
float getTimeOffset() const
float timeOffsetCorr
additive time offset correction (\mus)
float corrFact
drift velocity correction factor (multiplicative)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"