16#include "TStopwatch.h"
59namespace globaltracking
65 CosmicsMatchingSpec(std::shared_ptr<DataRequest> dr, std::shared_ptr<o2::base::GRPGeomRequest> gr,
bool useMC) : mDataRequest(dr), mGGCCDBRequest(gr), mUseMC(useMC) {}
74 std::shared_ptr<DataRequest> mDataRequest;
75 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
98 updateTimeDependentParams(pc);
112 auto const&
raw = pc.
inputs().
get<
const char*>(
"corrMap");
113 mCorrMap = &gpu::TPCFastTransformPOD::get(raw);
114 static bool initOnceDone =
false;
123 if (!grp->isDetContinuousReadOut(
DetID::ITS)) {
132 LOGP(info,
"Updating TPC fast transform map with new VDrift factor of {} wrt reference {} and DriftTimeOffset correction {} wrt {} from source {}",
150 LOG(info) <<
"cluster dictionary updated";
159 LOGF(info,
"Cosmics matching total timing: Cpu: %.3e Real: %.3e s in %d slots",
160 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
165 std::vector<OutputSpec> outputs;
167 {
"material-lut-path", VariantType::String,
"", {
"Path of the material LUT file"}},
168 {
"debug-tree-flags", VariantType::Int, 0, {
"DebugFlagTypes bit-pattern for debug tree"}}};
170 auto dataRequest = std::make_shared<DataRequest>();
172 dataRequest->requestTracks(
src, useMC);
173 dataRequest->requestClusters(
src,
false);
175 outputs.emplace_back(
"GLO",
"COSMICTRC", 0, Lifetime::Timeframe);
177 outputs.emplace_back(
"GLO",
"COSMICTRC_MC", 0, Lifetime::Timeframe);
180 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(
false,
195 AlgorithmSpec{adaptFromTask<CosmicsMatchingSpec>(dataRequest, ggRequest, 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
CosmicsMatchingSpec(std::shared_ptr< DataRequest > dr, std::shared_ptr< o2::base::GRPGeomRequest > gr, bool useMC)
void run(ProcessingContext &pc) final
~CosmicsMatchingSpec() override=default
void setITSROFrameLengthMUS(float fums)
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 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"