15#include <TObjString.h>
16#include "TGeoGlobalMagField.h"
35#include <fmt/format.h>
39namespace strangeness_tracking
63 LOG(info) <<
"Initialized strangeness tracker...";
69 LOG(
debug) <<
"Running strangeness tracker...";
73 updateTimeDependentParams(pc);
91 static bool first =
true;
98 md.SetOwnerKeyValue();
109 static bool initOnceDone =
false;
133 LOG(info) <<
"cluster dictionary updated";
138 LOG(info) <<
"ITS GeomtetryTGeo loaded from ccdb";
142#ifdef ENABLE_UPGRADES
144 LOG(info) <<
"it3 cluster dictionary updated";
153 LOGF(info,
"Strangeness tracking total timing: Cpu: %.3e Real: %.3e s in %d slots",
154 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
160 auto dataRequest = std::make_shared<DataRequest>();
161 dataRequest->requestITSClusters(useMC);
162 dataRequest->requestTracks(
src, useMC);
163 dataRequest->requestPrimaryVertices(useMC);
164 dataRequest->requestSecondaryVertices(useMC);
166 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(
false,
175 ggRequest->addInput({
"itsTGeo",
"ITS",
"GEOMTGEO", 0, Lifetime::Condition,
framework::ccdbParamSpec(
"ITS/Config/Geometry")}, dataRequest->inputs);
177 std::vector<OutputSpec> outputs;
178 outputs.emplace_back(
"GLO",
"STRANGETRACKS", 0, Lifetime::Timeframe);
179 outputs.emplace_back(
"GLO",
"CLUSUPDATES", 0, Lifetime::Timeframe);
181 outputs.emplace_back(
"GLO",
"STRANGETRACKS_MC", 0, Lifetime::Timeframe);
182 LOG(info) <<
"Strangeness tracker will use MC";
184 outputs.emplace_back(
"META",
"STRTRACKER", 0, Lifetime::Sporadic);
187 "strangeness-tracker",
190 AlgorithmSpec{adaptFromTask<StrangenessTrackerSpec>(dataRequest, ggRequest, useMC)},
Definition of the Names Generator class.
Header of the General Run Parameters object.
Definition of the MagF class.
Definition of the ITS track.
Result of refitting TPC-ITS matched track.
void checkUpdates(o2::framework::ProcessingContext &pc)
static GRPGeomHelper & instance()
void setRequest(std::shared_ptr< GRPGeomRequest > req)
static std::string getConfigOutputFileName(const std::string &procName, const std::string &confName="", bool json=true)
GPUd() value_type estimateLTFast(o2 static GPUd() float estimateLTIncrement(const o2 PropagatorImpl * Instance(bool uninitialized=false)
static const StrangenessTrackingParamConfig & Instance()
static std::string asJSON(std::string const &keyOnly="")
static void write(std::string const &filename, std::string const &keyOnly="")
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.
ServiceRegistryRef services()
The services registry associated with this processing context.
static GeometryTGeo * Instance()
void fillMatrixCache(int mask) override
static void adopt(GeometryTGeo *raw, bool canDelete=false)
StrangenessTrackerSpec(std::shared_ptr< DataRequest > dr, std::shared_ptr< o2::base::GRPGeomRequest > gr, bool isMC)
void finaliseCCDB(framework::ConcreteDataMatcher &matcher, void *obj) final
void init(framework::InitContext &ic) final
void run(framework::ProcessingContext &pc) final
void endOfStream(framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void setConfigParams(const StrangenessTrackingParamConfig *params)
std::vector< StrangeTrack > & getStrangeTrackVec(int iThread=0)
void setupThreads(int nThreads=1)
void setCorrType(const o2::base::PropagatorImpl< float >::MatCorrType &type)
std::vector< ClusAttachments > & getClusAttachments(int iThread=0)
void setClusterDictionaryITS(const o2::itsmft::TopologyDictionary *d)
void setMCTruthOn(bool v)
bool loadData(const o2::globaltracking::RecoContainer &recoData)
std::vector< o2::MCCompLabel > & getStrangeTrackLabels(int iThread=0)
Defining ITS Vertex explicitly as messageable.
std::vector< ConfigParamSpec > ccdbParamSpec(std::string const &path, int runDependent, std::vector< CCDBMetadata > metadata={}, int qrate=0)
std::vector< ConfigParamSpec > Options
o2::framework::DataProcessorSpec getStrangenessTrackerSpec(o2::dataformats::GlobalTrackID::mask_t src, bool useMC, bool useGeom)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string name
The name of the associated DataProcessorSpec.
size_t inputTimesliceId
The time pipelining id of this particular device.
void collectData(o2::framework::ProcessingContext &pc, const DataRequest &request)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"