13#include "../Detectors/AOD/include/AODProducerWorkflow/AODMcProducerHelpers.h"
49 "Interaction rate to simulate"};
73 LOG(
debug) <<
"=== Running extended MC AOD exporter ===";
77 using McTracks = std::vector<McTrack>;
85 if (nParts != nPartsVerify) {
86 LOG(warn) <<
"Mismatch between number of MC headers and "
87 <<
"number of track vectors: " << nParts
88 <<
" != " << nPartsVerify
89 <<
", shipping the empty timeframe";
97 for (
auto i = 0U;
i < nParts; ++
i) {
98 LOG(
debug) <<
"--- Loop over " << nParts <<
" parts ---";
101 auto header = pc.
inputs().
get<McHeader*>(
"mcheader",
i);
102 auto tracks = pc.
inputs().
get<McTracks>(
"mctracks",
i);
104 LOG(
debug) <<
"Updating collision table";
107 record.timeInBCNS * 1.e-3,
112 LOG(
debug) <<
"Updating HepMC tables";
117 LOG(
debug) <<
"Updating particles table";
127 LOG(
debug) <<
"Increment BC counter";
148 auto spec = adaptAnalysisTask<MctracksToAod>(cfgc);
149 spec.inputs.emplace_back(
"mctracks",
"MC",
"MCTRACKS", 0.,
150 Lifetime::Timeframe);
151 spec.inputs.emplace_back(
"mcheader",
"MC",
"MCHEADER", 0.,
152 Lifetime::Timeframe);
153 spec.outputs.emplace_back(
"TFF",
"TFFilename");
154 spec.outputs.emplace_back(
"TFN",
"TFNumber");
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 setFirstIR(const o2::InteractionRecord &ir)
const o2::InteractionTimeRecord & generateCollisionTime()
void setInteractionRate(float rateHz)
McCollisions_001 McCollisions
std::unordered_map< int, int > TrackToIndex
DataProcessorSpec adaptAnalysisTask(ConfigContext const &ctx, Args &&... args)
Lifetime
Possible Lifetime of objects being exchanged by the DPL.
std::vector< DataProcessorSpec > WorkflowSpec
MCTrackT< float > MCTrack
o2::framework::WorkflowSpec WorkflowSpec
WorkflowSpec defineDataProcessing(ConfigContext const &cfgc)
This function hooks up the the workflow specifications into the DPL driver.
o2::framework::Produces< Particles > mParticles
InteractionSampler mSampler
o2::framework::Produces< PdfInfos > mPdfInfos
o2::framework::Produces< Collisions > mCollisions
o2::aod::HepMCXSections XSections
o2::aod::HepMCPdfInfos PdfInfos
o2::framework::Produces< HeavyIons > mHeavyIons
o2::aod::HepMCHeavyIons HeavyIons
o2::aod::McCollisions Collisions
Configurable< uint64_t > tfOffset
void init(o2::framework::InitContext &)
o2::aod::StoredMcParticles_001 Particles
Configurable< bool > filt
o2::framework::Produces< XSections > mXSections
void run(o2::framework::ProcessingContext &pc)
Struct to differentiate task names from possible task string arguments.
decltype(FFL(std::declval< cursor_t >())) cursor
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"