12#include "TOFWorkflow/RecoWorkflowSpec.h"
29#include "TStopwatch.h"
50 using MatchOutputType = std::vector<o2::dataformats::MatchInfoTOF>;
56 explicit TOFDPLRecoWorkflowTask(std::shared_ptr<o2::base::GRPGeomRequest> gr,
bool useMC,
bool useFIT) : mGGCCDBRequest(gr), mUseMC(useMC), mUseFIT(useFIT) {}
70 const auto clustersRO = pc.
inputs().
get<gsl::span<o2::tof::Cluster>>(
"tofcluster");
71 const auto tracksRO = pc.
inputs().
get<gsl::span<o2::dataformats::TrackTPCITS>>(
"globaltrack");
76 auto recPoints = std::move(pc.
inputs().
get<gsl::span<o2::ft0::RecPoints>>(
"fitrecpoints"));
77 mMatcher.setFITRecPoints(recPoints);
78 LOG(info) <<
"TOF Reco Workflow pulled " << recPoints.size() <<
" FIT RecPoints";
83 gsl::span<const o2::MCCompLabel> itstpclab;
87 itstpclab = pc.
inputs().
get<gsl::span<o2::MCCompLabel>>(
"itstpclabel");
88 toflab = std::move(*toflabel);
91 mMatcher.
run(tracksRO, clustersRO, toflab, itstpclab);
110 LOGF(info,
"TOF Matching total timing: Cpu: %.3e Real: %.3e s in %d slots",
111 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
118 static bool initOnceDone =
false;
125 LOGP(info,
"Updating TPC fast transform map with new VDrift factor of {} wrt reference {} from source {}",
144 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
151 std::vector<InputSpec> inputs;
152 std::vector<OutputSpec> outputs;
154 inputs.emplace_back(
"globaltrack",
"GLO",
"TPCITS", 0, Lifetime::Timeframe);
157 inputs.emplace_back(
"itstpclabel",
"GLO",
"TPCITS_MC", 0, Lifetime::Timeframe);
163 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(
false,
183 AlgorithmSpec{adaptFromTask<TOFDPLRecoWorkflowTask>(ggRequest, useMC, useFIT)},
185 {
"material-lut-path", VariantType::String,
"", {
"Path of the material LUT file"}}}};
Definition of the GeometryManager class.
Helper for geometry and GRP related CCDB requests.
Class to perform TOF matching to global tracks.
Definition of the Names Generator class.
Type wrappers for enfording a specific serialization method.
Result of refitting TPC-ITS matched track.
Helper class to extract VDrift from different sources.
void checkUpdates(o2::framework::ProcessingContext &pc)
static GRPGeomHelper & instance()
void setRequest(std::shared_ptr< GRPGeomRequest > req)
void snapshot(const Output &spec, T const &object)
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
InputRecord & inputs()
The inputs associated with this processing context.
void setTPCVDrift(const o2::tpc::VDriftCorrFact &v)
std::vector< o2::MCCompLabel > & getMatchedTOFLabelsVector(trkType index)
get vector of TOF labels of matched tracks
std::vector< o2::dataformats::CalibInfoTOF > & getCalibVector()
std::vector< o2::dataformats::MatchInfoTOF > & getMatchedTrackVector(trkType index)
void run(const o2::globaltracking::RecoContainer &inp, unsigned long firstTForbit=0)
< perform matching for provided input
void updateTimeDependentParams(ProcessingContext &pc)
void run(framework::ProcessingContext &pc)
void finaliseCCDB(ConcreteDataMatcher &matcher, void *obj)
void init(framework::InitContext &ic)
TOFDPLRecoWorkflowTask(std::shared_ptr< o2::base::GRPGeomRequest > gr, bool useMC, bool useFIT)
void endOfStream(EndOfStreamContext &ec)
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 gDataOriginFT0
constexpr o2::header::DataOrigin gDataOriginTOF
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
o2::framework::DataProcessorSpec getTOFRecoWorkflowSpec(bool useMC, bool useFIT)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
float refVDrift
reference vdrift for which factor was extracted
float corrFact
drift velocity correction factor (multiplicative)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"