29#include <TStopwatch.h>
56 std::vector<o2::ctp::CTPInputDigit> finputs;
60 LOG(info) <<
"CALLING CTP DIGITIZATION";
64 auto ft0inputs = pc.
inputs().
get<gsl::span<o2::ft0::DetTrigInput>>(
"ft0");
65 for (
const auto& inp : ft0inputs) {
66 finputs.emplace_back(
CTPInputDigit{inp.mIntRecord, inp.mInputs, o2::detectors::DetID::FT0});
71 auto fv0inputs = pc.
inputs().
get<gsl::span<o2::fv0::DetTrigInput>>(
"fv0");
72 for (
const auto& inp : fv0inputs) {
73 finputs.emplace_back(
CTPInputDigit{inp.mIntRecord, inp.mInputs, o2::detectors::DetID::FV0});
78 auto emcinputs = pc.
inputs().
get<gsl::span<o2::ctp::CTPInputDigit>>(
"emc");
79 for (
const auto& inp : emcinputs) {
80 finputs.emplace_back(inp);
83 gsl::span<CTPInputDigit> ginputs(finputs);
86 LOG(info) <<
"CTP DIGITS being sent.";
88 LOG(info) <<
"CTP PRESENT being sent.";
93 LOG(info) <<
"CTP Lumi scaler " << lminfo.counts <<
" for integration time of " << lminfo.nHBFCounted <<
" being sent";
97 LOG(info) <<
"CTP Digitization took " << timer.CpuTime() <<
"s";
104 LOG(info) <<
"Loading CTP configuration" << std::endl;
118 std::vector<InputSpec> inputs;
119 std::vector<OutputSpec>
output;
121 if (std::find(detList.begin(), detList.end(), o2::detectors::DetID::FT0) != detList.end()) {
122 inputs.emplace_back(
"ft0",
"FT0",
"TRIGGERINPUT", 0, Lifetime::Timeframe);
124 if (std::find(detList.begin(), detList.end(), o2::detectors::DetID::FV0) != detList.end()) {
125 inputs.emplace_back(
"fv0",
"FV0",
"TRIGGERINPUT", 0, Lifetime::Timeframe);
127 if (std::find(detList.begin(), detList.end(), o2::detectors::DetID::EMC) != detList.end()) {
128 inputs.emplace_back(
"emc",
"EMC",
"TRIGGERINPUT", 0, Lifetime::Timeframe);
130 inputs.emplace_back(
"ctpconfig",
"CTP",
"CTPCONFIG", 0, Lifetime::Condition,
ccdbParamSpec(
"CTP/Config/Config",
true));
131 output.emplace_back(
"CTP",
"DIGITS", 0, Lifetime::Timeframe);
132 if (ctpLumiScaler >= 0.f) {
133 output.emplace_back(
"CTP",
"LUMI", 0, Lifetime::Timeframe);
135 output.emplace_back(
"CTP",
"ROMode", 0, Lifetime::Timeframe);
140 AlgorithmSpec{adaptFromTask<CTPDPLDigitizerTask>(detList, ctpLumiScaler)},
141 Options{{
"pileup", VariantType::Int, 1, {
"whether to run in continuous time mode"}},
Definition of the base digitizer task class.
definition of CTPDigit, CTPInputDigit
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
Header to collect LHC related constants.
BaseDPLDigitizer()=default
std::vector< o2::detectors::DetID > mDetList
CTPDPLDigitizerTask(const std::vector< o2::detectors::DetID > &detList, float ctpLumiScaler)
void run(framework::ProcessingContext &pc)
void initDigitizerTask(framework::InitContext &ic) override
~CTPDPLDigitizerTask() override=default
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj)
o2::parameters::GRPObject::ROMode mROMode
o2::ctp::Digitizer mDigitizer
Digitizer.
std::vector< CTPDigit > process(const gsl::span< o2::ctp::CTPInputDigit > detinputs)
void setCTPConfiguration(o2::ctp::CTPConfiguration *config)
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.
o2::framework::DataProcessorSpec getCTPDigitizerSpec(int channel, std::vector< o2::detectors::DetID > &detList, float ctpLumiScaler, bool mctruth)
Defining ITS Vertex explicitly as messageable.
std::vector< ConfigParamSpec > ccdbParamSpec(std::string const &path, int runDependent, std::vector< CCDBMetadata > metadata={}, int qrate=0)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::vector< Digit > digits