50 LOG(info) <<
"initializing FDD digitization";
55 mUseDeadChannelMap = !ic.
options().
get<
bool>(
"disable-dead-channel-map");
56 mUpdateDeadChannelMap = mUseDeadChannelMap;
63 mUpdateDeadChannelMap =
false;
72 LOG(info) <<
"Doing FDD digitization";
82 mDigitizer.
setEventTime(context->getGRP().getTimeStart());
83 for (
auto& record : irecords) {
84 LOG(info) <<
"FDD TIME RECEIVED " << record.getTimeNS();
88 if (mUpdateDeadChannelMap && mUseDeadChannelMap) {
93 auto& eventParts = context->getEventParts();
97 std::vector<o2::fdd::Hit> hits;
103 for (
int collID = 0; collID < irecords.size(); ++collID) {
108 if (irecords[collID] < firstTF) {
109 LOG(info) <<
"Too early: Not digitizing collision " << collID;
113 const auto& irec = irecords[collID];
116 for (
auto& part : eventParts[collID]) {
119 context->retrieveHits(mSimChains,
"FDDHit", part.sourceID, part.entryID, &hits);
120 LOG(info) <<
"For collision " << collID <<
" eventID " << part.entryID <<
" found FDD " << hits.size() <<
" hits ";
125 mDigitizer.
process(hits, mDigitsBC, mDigitsCh, mDigitsTrig, labels);
130 terminateIR.
orbit = 0xffffffff;
132 mDigitizer.
flush(mDigitsBC, mDigitsCh, mDigitsTrig, labels);
144 LOG(info) <<
"FDD: Sending ROMode= " << mROMode <<
" to GRPUpdater";
153 bool mFinished =
false;
155 std::vector<TChain*> mSimChains;
156 std::vector<o2::fdd::ChannelData> mDigitsCh;
157 std::vector<o2::fdd::Digit> mDigitsBC;
158 std::vector<o2::fdd::DetTrigInput> mDigitsTrig;
163 bool mUseDeadChannelMap =
true;
164 bool mUpdateDeadChannelMap =
true;
174 std::vector<InputSpec> inputs;
175 inputs.emplace_back(
"collisioncontext",
"SIM",
"COLLISIONCONTEXT",
static_cast<SubSpecificationType>(channel), Lifetime::Timeframe);
176 inputs.emplace_back(
"fdddeadchannelmap",
"FDD",
"DeadChannelMap", 0,
179 std::vector<OutputSpec> outputs;
180 outputs.emplace_back(
"FDD",
"DIGITSBC", 0, Lifetime::Timeframe);
181 outputs.emplace_back(
"FDD",
"DIGITSCH", 0, Lifetime::Timeframe);
182 outputs.emplace_back(
"FDD",
"TRIGGERINPUT", 0, Lifetime::Timeframe);
184 outputs.emplace_back(
"FDD",
"DIGITLBL", 0, Lifetime::Timeframe);
186 outputs.emplace_back(
"FDD",
"ROMode", 0, Lifetime::Timeframe);
193 Options{{
"disable-dead-channel-map", VariantType::Bool,
false, {
"Don't mask dead channels"}}}};
Definition of the base digitizer task class.
A const (ready only) version of MCTruthContainer.
Dead channel map for FIT.
o2::framework::DataAllocator::SubSpecificationType SubSpecificationType
Base definition of FIT-FDD geometry.
Header of the General Run Parameters object.
static const HBFUtils & Instance()
void setEventTime(long value)
void setInteractionRecord(const o2::InteractionTimeRecord &src)
void setDeadChannelMap(o2::fit::DeadChannelMap const *deadChannelMap)
void process(const std::vector< o2::fdd::Hit > &hits, std::vector< o2::fdd::Digit > &digitsBC, std::vector< o2::fdd::ChannelData > &digitsCh, std::vector< o2::fdd::DetTrigInput > &digitsTrig, o2::dataformats::MCTruthContainer< o2::fdd::MCLabel > &labels)
void flush(std::vector< o2::fdd::Digit > &digitsBC, std::vector< o2::fdd::ChannelData > &digitsCh, std::vector< o2::fdd::DetTrigInput > &digitsTrig, o2::dataformats::MCTruthContainer< o2::fdd::MCLabel > &labels)
void finaliseCCDB(ConcreteDataMatcher &matcher, void *obj)
void run(framework::ProcessingContext &pc)
void initDigitizerTask(framework::InitContext &ic) override
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
o2::header::DataHeader::SubSpecificationType SubSpecificationType
decltype(auto) make(const Output &spec, Args... args)
bool isAllowed(Output const &query)
check if a certain output is allowed
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.
ServiceRegistryRef services()
The services registry associated with this processing context.
std::vector< o2::InteractionTimeRecord > & getEventRecords(bool withQED=false)
o2::framework::DataProcessorSpec getFDDDigitizerSpec(int channel, bool mctruth)
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > ccdbParamSpec(std::string const &path, int runDependent, std::vector< CCDBMetadata > metadata={}, int qrate=0)
std::vector< ConfigParamSpec > Options
header::DataHeader::SubSpecificationType SubSpecificationType
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"