16#include "TStopwatch.h"
59namespace globaltracking
65 CosmicsMatchingSpec(std::shared_ptr<DataRequest> dr, std::shared_ptr<o2::base::GRPGeomRequest> gr,
bool usePV,
bool useMC) : mDataRequest(dr), mGGCCDBRequest(gr), mUsePVInfo(usePV), mUseMC(useMC) {}
74 std::shared_ptr<DataRequest> mDataRequest;
75 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
80 bool mUsePVInfo =
false;
100 updateTimeDependentParams(pc);
114 auto const&
raw = pc.
inputs().
get<
const char*>(
"corrMap");
115 mCorrMap = &gpu::TPCFastTransformPOD::get(raw);
116 static bool initOnceDone =
false;
125 if (!grp->isDetContinuousReadOut(
DetID::ITS)) {
134 LOGP(info,
"Updating TPC fast transform map with new VDrift factor of {} wrt reference {} and DriftTimeOffset correction {} wrt {} from source {}",
152 LOG(info) <<
"cluster dictionary updated";
161 LOGF(info,
"Cosmics matching total timing: Cpu: %.3e Real: %.3e s in %d slots",
162 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
167 std::vector<OutputSpec> outputs;
169 {
"material-lut-path", VariantType::String,
"", {
"Path of the material LUT file"}},
170 {
"debug-tree-flags", VariantType::Int, 0, {
"DebugFlagTypes bit-pattern for debug tree"}}};
172 auto dataRequest = std::make_shared<DataRequest>();
174 dataRequest->requestTracks(
src, useMC);
175 dataRequest->requestClusters(
src,
false);
177 dataRequest->requestPrimaryVertices(useMC);
180 outputs.emplace_back(
"GLO",
"COSMICTRC", 0, Lifetime::Timeframe);
182 outputs.emplace_back(
"GLO",
"COSMICTRC_MC", 0, Lifetime::Timeframe);
185 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(
false,
200 AlgorithmSpec{adaptFromTask<CosmicsMatchingSpec>(dataRequest, ggRequest, usePV, 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.
gsl::span< const o2::MCCompLabel > MCLabelsTr
Definition of the Names Generator class.
Definition of the GeometryManager class.
o2::raw::RawFileWriter * raw
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.
InputRecord & inputs()
The inputs associated with this processing context.
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
void run(ProcessingContext &pc) final
~CosmicsMatchingSpec() override=default
CosmicsMatchingSpec(std::shared_ptr< DataRequest > dr, std::shared_ptr< o2::base::GRPGeomRequest > gr, bool usePV, bool useMC)
void setITSROFrameLengthMUS(float fums)
void setUsePVInfo(bool v)
auto getCosmicTracksLbl() const
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)
void setTPCCorrMaps(const o2::gpu::TPCFastTransformPOD *maph)
auto getCosmicTracks() const
void process(const o2::globaltracking::RecoContainer &data)
static GeometryTGeo * Instance()
void fillMatrixCache(int mask) override
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 o2::header::DataOrigin gDataOriginTPC
constexpr double LHCBunchSpacingNS
Defining ITS Vertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
framework::DataProcessorSpec getCosmicsMatchingSpec(o2::dataformats::GlobalTrackID::mask_t src, bool usePV, bool useMC)
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)
float refTimeOffset
additive time offset reference (\mus)
float refVDrift
reference vdrift for which factor was extracted
float timeOffsetCorr
additive time offset correction (\mus)
float corrFact
drift velocity correction factor (multiplicative)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"