Project
Loading...
Searching...
No Matches
EMCALDigitizerSpec.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
20#include "Framework/Lifetime.h"
21#include "Headers/DataHeader.h"
22#include "TStopwatch.h"
23#include "Steer/HitProcessingManager.h" // for DigitizationContext
24#include "TChain.h"
25#include <TGeoManager.h>
26
36
37using namespace o2::framework;
39
40namespace o2
41{
42namespace emcal
43{
44
46{
47 if (!gGeoManager) {
48 LOG(error) << "Geometry needs to be loaded before";
49 }
50 // run 3 geometry == run 2 geometry for EMCAL
51 // to be adapted with run numbers at a later stage
52 auto geom = o2::emcal::Geometry::GetInstance("EMCAL_COMPLETE12SMV1_DCAL_8SM", "Geant4", "EMV-EMCAL");
53 // init digitizer
54
55 mSumDigitizer.setGeometry(geom);
56 mSumDigitizerTRU.setGeometry(geom);
57 mDigitizerTRU.setGeometry(geom);
58
59 if (ctx.options().get<bool>("debug-stream")) {
60 mDigitizer.setDebugStreaming(true);
61 mDigitizerTRU.setDebugStreaming(true);
62 }
63 // mDigitizer.init();
64 if (ctx.options().get<bool>("disable-dig-tru")) {
65 mRunDigitizerTRU = false;
66 }
67
68 mFinished = false;
69}
70
72{
73 if (mFinished) {
74 return;
75 }
76 if (mCalibHandler) {
77 // Load CCDB object (sim params)
78 mCalibHandler->checkUpdates(ctx);
79 }
80
81 if (!mIsConfigured) {
82 configure();
83 mIsConfigured = true;
84 }
85
86 o2::emcal::SimParam::Instance().printKeyValues(true, true);
87
88 mDigitizer.flush();
89 mDigitizerTRU.flush();
90
91 // read collision context from input
92 auto context = ctx.inputs().get<o2::steer::DigitizationContext*>("collisioncontext");
93
94 // get interaction rate ... so that it can be used in digitization
95 auto intRate = context->getDigitizerInteractionRate();
96 context->initSimChains(o2::detectors::DetID::EMC, mSimChains);
97
98 // init the MCKinematicsReader from the digitization context
99 if (mcReader == nullptr) {
100 mcReader = new o2::steer::MCKinematicsReader(context.get());
101 }
102
103 auto& timesview = context->getEventRecords();
104 LOG(debug) << "GOT " << timesview.size() << " COLLISSION TIMES";
105
106 // if there is nothing to do ... return
107 if (timesview.size() == 0) {
108 return;
109 }
110
111 TStopwatch timer;
112 timer.Start();
113
114 auto& eventParts = context->getEventParts();
115
116 // ------------------------------
117 // For the TRIGGER Simulation
118 // ------------------------------
119 // Load the masked fastOr
120 // This impact the acceptance
121 // of the detector, and thus the
122 // overall efficiency of the L0
123 if (mCalibHandler) {
124 mDigitizerTRU.setFEE(mCalibHandler->getFEEDCS());
125 mDigitizerTRU.setMaskedFastOrsInLZERO();
126 }
127
128 // ------------------------------
129 // TRIGGER Simulation
130 // ------------------------------
131 // 1. Run SDigitizer separate loop -> map of vector of SDigits
132 // 2. Run Trigger simulation chain (Digitizer -> Digits writeout buffer -> L0 Simulation)
133 // 3. Run Loop SDigits -> Digits, set live only if the trigger is accepted.
134 //
135 // loop over all composite collisions given from context
136 // (aka loop over all the interaction records)
137 int collisionN = 0;
138 for (int collID = 0; collID < timesview.size(); ++collID) {
139
140 if (mRunDigitizerTRU == false) {
141 break;
142 }
143
144 if (intRate < 10000.) {
145 break;
146 }
147
148 collisionN++;
149
150 mDigitizerTRU.setEventTime(timesview[collID]);
151
152 // for each collision, loop over the constituents event and source IDs
153 // (background signal merging is basically taking place here)
154 for (auto& part : eventParts[collID]) {
155
156 mSumDigitizerTRU.setCurrEvID(part.entryID);
157 mSumDigitizerTRU.setCurrSrcID(part.sourceID);
158
159 // get the hits for this event and this source
160 mHits.clear();
161 context->retrieveHits(mSimChains, "EMCHit", part.sourceID, part.entryID, &mHits);
162
163 // LOG(info) << "DIG TRU For collision " << collID << " eventID " << part.entryID << " found " << mHits.size() << " hits ";
164
165 // std::vector<o2::emcal::LabeledDigit> summedLabeledDigits = mSumDigitizerTRU.process(mHits);
166 // std::vector<o2::emcal::Digit> summedDigits;
167 // for (auto labeledsummeddigit : summedLabeledDigits) {
168 // summedDigits.push_back(labeledsummeddigit.getDigit());
169 // }
170
171 std::vector<o2::emcal::LabeledDigit> summedLabeledDigits;
172 std::vector<o2::emcal::Digit> summedDigits;
173 if (mRunSDitizer) {
174 summedLabeledDigits = mSumDigitizerTRU.process(mHits);
175 for (auto labeledsummeddigit : summedLabeledDigits) {
176 summedDigits.push_back(labeledsummeddigit.getDigit());
177 }
178 } else {
179 for (auto& hit : mHits) {
180 summedDigits.emplace_back(hit.GetDetectorID(), hit.GetEnergyLoss(), hit.GetTime());
181 }
182 }
183
184 // call actual digitization procedure
185 mDigitizerTRU.process(summedDigits);
186 }
187 }
188 mDigitizerTRU.printMaskedFastOrsInLZERO();
189 mDigitizerTRU.finish();
190 // Result of the trigger simulation
191 // -> Set of BCs with triggering patches
192 auto emcalTriggers = mDigitizerTRU.getTriggerInputs();
193
194 // Load FIT triggers if not running in self-triggered mode
195 std::vector<o2::InteractionRecord> mbtriggers;
196 if (mRequireCTPInput) {
197 // Hopefully at some point we can replace it by CTP input digits
198 // In case of CTP digits react only to trigger inputs activated in trigger configuration
199 // For the moment react to FIT vertex, cent and semicent triggers
200 ctx.inputs().get<o2::ctp::CTPConfiguration*>("ctpconfig");
201 std::vector<uint64_t> inputmasks;
202 for (const auto& trg : mCTPConfig->getCTPClasses()) {
203 if (trg.cluster->maskCluster[o2::detectors::DetID::EMC]) {
204 // Class triggering EMCAL cluster
205 LOG(debug) << "Found trigger class for EMCAL cluster: " << trg.name << " with input mask " << std::bitset<64>(trg.descriptor->getInputsMask());
206 inputmasks.emplace_back(trg.descriptor->getInputsMask());
207 }
208 }
209 unsigned long ft0mask = 0, fv0mask = 0;
210 std::map<std::string, uint64_t> detInputName2Mask =
211 {{"MVBA", 1}, {"MVOR", 2}, {"MVNC", 4}, {"MVCH", 8}, {"MVIR", 0x10}, {"MT0A", 1}, {"MT0C", 2}, {"MTSC", 4}, {"MTCE", 8}, {"MTVX", 0x10}};
212 // Translation 2022: EMCAL cluster received CTP input masks, need to track it to FIT trigger masks
213 std::map<std::string, std::pair<o2::detectors::DetID, std::string>> ctpInput2DetInput = {
214 {"0VBA", {o2::detectors::DetID::FV0, "MVBA"}}, {"0VOR", {o2::detectors::DetID::FV0, "MVOR"}}, {"0VNC", {o2::detectors::DetID::FV0, "MVNC"}}, {"0VCH", {o2::detectors::DetID::FV0, "MVCH"}}, {"0VIR", {o2::detectors::DetID::FV0, "MVIR"}}, {"0T0A", {o2::detectors::DetID::FT0, "MT0A"}}, {"0T0C", {o2::detectors::DetID::FT0, "MT0C"}}, {"0TSC", {o2::detectors::DetID::FT0, "MTSC"}}, {"0TCE", {o2::detectors::DetID::FT0, "MTCE"}}, {"0TVX", {o2::detectors::DetID::FT0, "MTVX"}}};
215 for (const auto& [det, ctpinputs] : mCTPConfig->getDet2InputMap()) {
217 continue;
218 }
219 for (const auto& input : ctpinputs) {
220 LOG(debug) << "CTP det input: " << input.name << " with mask " << std::bitset<64>(input.inputMask);
221 bool isSelected = false;
222 for (auto testmask : inputmasks) {
223 if (testmask & input.inputMask) {
224 isSelected = true;
225 }
226 }
227 if (isSelected) {
228 std::string usedInputName = input.name;
229 o2::detectors::DetID usedDetID = det;
230 if (det == o2::detectors::DetID::CTP) {
231 auto found = ctpInput2DetInput.find(input.name);
232 if (found != ctpInput2DetInput.end()) {
233 usedInputName = found->second.second;
234 usedDetID = found->second.first;
235 LOG(debug) << "Decoded " << input.name << " -> " << usedInputName;
236 }
237 }
238 auto maskFound = detInputName2Mask.find(usedInputName);
239 if (maskFound != detInputName2Mask.end()) {
240 if (usedDetID == o2::detectors::DetID::FT0) {
241 ft0mask |= maskFound->second;
242 } else {
243 fv0mask |= maskFound->second;
244 }
245 }
246 }
247 }
248 }
249 LOG(debug) << "FTO mask: " << std::bitset<64>(ft0mask);
250 LOG(debug) << "FVO mask: " << std::bitset<64>(fv0mask);
251 for (const auto& trg : ctx.inputs().get<gsl::span<o2::ft0::DetTrigInput>>("ft0inputs")) {
252 if (trg.mInputs.to_ulong() & ft0mask) {
253 mbtriggers.emplace_back(trg.mIntRecord);
254 }
255 }
256 for (const auto& trg : ctx.inputs().get<gsl::span<o2::fv0::DetTrigInput>>("fv0inputs")) {
257 if (trg.mInputs.to_ulong() & fv0mask) {
258 if (std::find(mbtriggers.begin(), mbtriggers.end(), trg.mIntRecord) == mbtriggers.end()) {
259 mbtriggers.emplace_back(trg.mIntRecord);
260 }
261 }
262 }
263 }
264
265 LOG(info) << " CALLING EMCAL DIGITIZATION ";
267
268 // auto& eventParts = context->getEventParts();
269 std::vector<std::tuple<o2::InteractionRecord, std::bitset<5>>> acceptedTriggers;
270 enum EMCALTriggerBits { kMB,
271 kEMC,
272 kDMC }; // EMCAL trigger bits enum for CTP inputs
273 TRandom3 mRandomGenerator(std::chrono::high_resolution_clock::now().time_since_epoch().count());
274
275 // loop over all composite collisions given from context
276 // (aka loop over all the interaction records)
277 for (int collID = 0; collID < timesview.size(); ++collID) {
278
279 std::bitset<5> trigger{0x1}; // Default: Self-triggered mode - all collisions treated as trigger
280 if (mRequireCTPInput) {
281 // ====================================================
282 // check if we have a trigger input from CTP
283 // Simulated L0 and downsampling
284 // 2 cases -> Check from CTP config
285 // 1) EMCAL trigger active -> MB downsampled
286 // - Accept the event in 2 conditions
287 // + MB downsampling (first condition) -> Set trigger bit kTVXinEMC
288 // + EMCAL L0 trigger -> Set bit EMCAL L0
289 // Always test both, set trigger 0x1 -> EMBA, 0x2 -> 0EMC, 0x4 -> 0DCMX, 0 -> No trigger
290 // 2) EMCAL triggers not active
291 // . - Old logics kept, no downscaling, pure busy
292 // ----------------------------------------------------
293 // PRNG for downscaling check
294 auto mbtrigger = std::find(mbtriggers.begin(), mbtriggers.end(), timesview[collID]);
295 if (mbtrigger != mbtriggers.end()) {
296
297 // ============================
298 // retrieve downscaling from
299 // configuration of CTP classes
300 int downscaling = 0;
301 for (const auto& trg : mCTPConfig->getCTPClasses()) {
302 if (trg.cluster->maskCluster[o2::detectors::DetID::EMC]) {
303 // Class triggering EMCAL cluster
304 downscaling = trg.downScale;
305 }
306 }
307 if (mRandomGenerator.Uniform(0., 1) < downscaling) {
308 // accept as minimum bias
309 trigger.set(EMCALTriggerBits::kMB, true);
310 }
311 // check for LO triggers in 12 BCs
312 for (auto emcalTrigger : emcalTriggers) {
313 auto bcTimingOfEmcalTrigger = emcalTrigger.mInterRecord.bc;
314 auto bcTimingOfMBTrigger = (*mbtrigger).bc;
315 if (std::abs(bcTimingOfEmcalTrigger - bcTimingOfMBTrigger) < 12) {
316 if (emcalTrigger.mTriggeredTRU < 32) {
317 trigger.set(EMCALTriggerBits::kEMC, true);
318 } else {
319 trigger.set(EMCALTriggerBits::kDMC, true);
320 }
321 }
322 }
323
324 } else {
325 // No trigger active
326 // Set busy
327 trigger.set(EMCALTriggerBits::kMB, false);
328 }
329 }
330 // Bitset
331 // Trigger sim: Select event
332 if (!trigger.any()) {
333 continue;
334 }
335 // Trigger sim: Prepare CTP input digit
336 acceptedTriggers.push_back(std::make_tuple(timesview[collID], trigger));
337 LOG(debug) << "EMCAL TRU simulation: Sending trg = " << trigger << " to CTP";
338
339 mDigitizer.setEventTime(timesview[collID], trigger.any());
340
341 if (!mDigitizer.isLive()) {
342 continue;
343 }
344
345 // for each collision, loop over the constituents event and source IDs
346 // (background signal merging is basically taking place here)
347 for (auto& part : eventParts[collID]) {
348
349 mSumDigitizer.setCurrEvID(part.entryID);
350 mSumDigitizer.setCurrSrcID(part.sourceID);
351
352 // retrieve information about the MC collision via the MCEventHeader
353 auto& mcEventHeader = mcReader->getMCEventHeader(part.sourceID, part.entryID);
354 mcEventHeader.print();
355
356 // get the hits for this event and this source
357 mHits.clear();
358 context->retrieveHits(mSimChains, "EMCHit", part.sourceID, part.entryID, &mHits);
359
360 LOG(info) << "For collision " << collID << " eventID " << part.entryID << " found " << mHits.size() << " hits ";
361
362 std::vector<o2::emcal::LabeledDigit> summedDigits;
363 if (mRunSDitizer) {
364 summedDigits = mSumDigitizer.process(mHits);
365 } else {
366 for (auto& hit : mHits) {
367 o2::emcal::MCLabel digitlabel(hit.GetTrackID(), part.entryID, part.sourceID, false, 1.);
368 if (hit.GetEnergyLoss() < __DBL_EPSILON__) {
369 digitlabel.setAmplitudeFraction(0);
370 }
371 summedDigits.emplace_back(hit.GetDetectorID(), hit.GetEnergyLoss(), hit.GetTime(), digitlabel);
372 }
373 }
374
375 // call actual digitization procedure
376 mDigitizer.process(summedDigits);
377 }
378 }
379
380 mDigitizer.finish();
381
382 // here we have all digits and we can send them to consumer (aka snapshot it onto output)
383 ctx.outputs().snapshot(Output{"EMC", "DIGITS", 0}, mDigitizer.getDigits());
384 ctx.outputs().snapshot(Output{"EMC", "TRGRDIG", 0}, mDigitizer.getTriggerRecords());
385 if (ctx.outputs().isAllowed({"EMC", "DIGITSMCTR", 0})) {
386 ctx.outputs().snapshot(Output{"EMC", "DIGITSMCTR", 0}, mDigitizer.getMCLabels());
387 }
388 // EMCAL is always a triggering detector
390 LOG(info) << "EMCAL: Sending ROMode= " << roMode << " to GRPUpdater";
391 ctx.outputs().snapshot(Output{"EMC", "ROMode", 0}, roMode);
392 // Create CTP digits
393 std::vector<o2::ctp::CTPInputDigit> triggerinputs;
394 // for (auto& trg : mDigitizer.getTriggerRecords()) {
395 // // covert TriggerRecord into CTP trigger digit
396 // o2::ctp::CTPInputDigit nextdigit;
397 // nextdigit.intRecord = trg.getBCData();
398 // nextdigit.detector = o2::detectors::DetID::EMC;
399 // // Set min. bias accept trigger (input 0) as fake trigger
400 // // Other inputs will be added once available
401 // nextdigit.inputsMask.set(0);
402 // triggerinputs.push_back(nextdigit);
403 // }
404 for (auto& trg : acceptedTriggers) {
405 // convert TriggerRecord into CTP trigger digit
406 o2::ctp::CTPInputDigit nextdigit;
407 nextdigit.intRecord = std::get<0>(trg);
409 // nextdigit.inputsMask = std::get<1>(trg);
410 for (size_t i = 0; i < nextdigit.inputsMask.size(); i++) {
411 if (std::get<1>(trg)[i] != 0) {
412 nextdigit.inputsMask.set(i);
413 }
414 }
415 LOG(debug) << "EMCAL TRU simulation: assigned = " << nextdigit.inputsMask << " as nextdigit for CTP, with IR = " << nextdigit.intRecord.bc << ", orbit = " << nextdigit.intRecord.orbit;
416 triggerinputs.push_back(nextdigit);
417 }
418 ctx.outputs().snapshot(Output{"EMC", "TRIGGERINPUT", 0}, triggerinputs);
419
420 timer.Stop();
421 LOG(info) << "Digitization took " << timer.CpuTime() << "s";
422 // we should be only called once; tell DPL that this process is ready to exit
423 ctx.services().get<ControlService>().readyToQuit(QuitRequest::Me);
424 mFinished = true;
425}
426
428{
429 mDigitizer.init();
430 mDigitizerTRU.init();
431}
432
434{
435 if (mCalibHandler->finalizeCCDB(matcher, obj)) {
436 return;
437 }
438 if (matcher == o2::framework::ConcreteDataMatcher("CTP", "CTPCONFIG", 0)) {
439 std::cout << "Loading CTP configuration" << std::endl;
440 mCTPConfig = reinterpret_cast<o2::ctp::CTPConfiguration*>(obj);
441 for (const auto& trg : mCTPConfig->getCTPClasses()) {
442 if (trg.cluster->maskCluster[o2::detectors::DetID::EMC]) {
443 // Class triggering EMCAL cluster
444 LOG(debug) << "ENABLING Trigger simulation, found trigger class for EMCAL cluster: " << trg.name << " with input mask " << std::bitset<64>(trg.descriptor->getInputsMask());
445 for (const auto& [det, ctpinputs] : mCTPConfig->getDet2InputMap()) {
446 if (!(det == o2::detectors::DetID::EMC)) {
447 continue;
448 }
449 // if the detector ID is EMC AND the input mask is not empty, run the trigger simulation
450 for (const auto& input : ctpinputs) {
451 if (input.inputMask != 0) {
452 mRunDigitizerTRU = true;
453 }
454 }
455 }
456 }
457 }
458 }
459}
460
461o2::framework::DataProcessorSpec getEMCALDigitizerSpec(int channel, bool requireCTPInput, bool mctruth, bool useccdb)
462{
463 // create the full data processor spec using
464 // a name identifier
465 // input description
466 // algorithmic description (here a lambda getting called once to setup the actual processing function)
467 // options that can be used for this processor (here: input file names where to take the hits)
468 std::vector<OutputSpec> outputs;
469 outputs.emplace_back("EMC", "DIGITS", 0, Lifetime::Timeframe);
470 outputs.emplace_back("EMC", "TRGRDIG", 0, Lifetime::Timeframe);
471 if (mctruth) {
472 outputs.emplace_back("EMC", "DIGITSMCTR", 0, Lifetime::Timeframe);
473 }
474 outputs.emplace_back("EMC", "ROMode", 0, Lifetime::Timeframe);
475 outputs.emplace_back("EMC", "TRIGGERINPUT", 0, Lifetime::Timeframe);
476
477 std::vector<o2::framework::InputSpec> inputs;
478 inputs.emplace_back("collisioncontext", "SIM", "COLLISIONCONTEXT", static_cast<SubSpecificationType>(channel), Lifetime::Timeframe);
479 std::shared_ptr<CalibLoader> calibloader;
480 if (useccdb) {
481 calibloader = std::make_shared<CalibLoader>();
482 calibloader->enableSimParams(true);
483 calibloader->enableFEEDCS(true);
484 calibloader->defineInputSpecs(inputs);
485 }
486 if (requireCTPInput) {
487 inputs.emplace_back("ft0inputs", "FT0", "TRIGGERINPUT", 0, Lifetime::Timeframe);
488 inputs.emplace_back("fv0inputs", "FV0", "TRIGGERINPUT", 0, Lifetime::Timeframe);
489 inputs.emplace_back("ctpconfig", "CTP", "CTPCONFIG", 0, Lifetime::Condition, ccdbParamSpec("CTP/Config/Config", true));
490 }
491
492 return DataProcessorSpec{
493 "EMCALDigitizer", // Inputs{InputSpec{"collisioncontext", "SIM", "COLLISIONCONTEXT", static_cast<SubSpecificationType>(channel), Lifetime::Timeframe}, InputSpec{"EMC_SimParam", o2::header::gDataOriginEMC, "SIMPARAM", 0, Lifetime::Condition, ccdbParamSpec("EMC/Config/SimParam")}},
494 inputs,
495 outputs,
496 AlgorithmSpec{o2::framework::adaptFromTask<DigitizerSpec>(calibloader, requireCTPInput)},
497 Options{
498 {"pileup", VariantType::Int, 1, {"whether to run in continuous time mode"}},
499 {"disable-dig-tru", VariantType::Bool, false, {"Disable TRU digitisation"}},
500 {"debug-stream", VariantType::Bool, false, {"Enable debug streaming"}}}
501 // I can't use VariantType::Bool as it seems to have a problem
502 };
503}
504} // end namespace emcal
505} // end namespace o2
Definition of the 32 Central Trigger System (CTS) Trigger Types defined in https://twiki....
definition of CTPConfiguration and related CTP structures
Class to describe fired triggered and/or stored channels for the BC and to refer to channel data.
definition of CTPDigit, CTPInputDigit
o2::framework::DataAllocator::SubSpecificationType SubSpecificationType
Class to store event ID and index in the event for objects like track, cluster...
int32_t i
Header of the General Run Parameters object.
std::ostringstream debug
std::vector< CTPClass > & getCTPClasses()
std::map< o2::detectors::DetID::ID, std::vector< CTPInput > > getDet2InputMap()
A container to hold and manage MC truth information/labels.
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:58
static constexpr ID CTP
Definition DetID.h:79
static constexpr ID FV0
Definition DetID.h:76
static constexpr ID FT0
Definition DetID.h:75
static constexpr ID EMC
Definition DetID.h:69
void run(framework::ProcessingContext &ctx) override
run digitizer
void initDigitizerTask(framework::InitContext &ctx) final
init digitizer
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
const std::vector< EMCALTriggerInputs > & getTriggerInputs()
Getter for triggers.
void setDebugStreaming(bool doStreaming)
void setEventTime(o2::InteractionTimeRecord record)
void finish()
This is for the readout window that was interrupted by the end of the run.
void setMaskedFastOrsInLZERO()
Sets the masked fastOrs from the CCDB in the LZERO.
void setGeometry(o2::emcal::Geometry *gm)
Sets geometry for trigger mapping.
void flush()
clear DigitsVectorStream
void setFEE(o2::emcal::FeeDCS *fees)
Sets FEE DCS for the masking of the fastOrs.
void process(const gsl::span< const Digit > summableDigits)
Steer conversion of hits to digits.
void flush()
clear DigitsVectorStream
Definition Digitizer.h:62
void setDebugStreaming(bool doStreaming)
Definition Digitizer.h:76
void setEventTime(o2::InteractionTimeRecord record, bool trigger)
bool isLive(double t) const
Definition Digitizer.h:73
void finish()
This is for the readout window that was interrupted by the end of the run.
Definition Digitizer.h:65
void process(const std::vector< LabeledDigit > &labeledDigit)
Steer conversion of hits to digits.
const std::vector< o2::emcal::TriggerRecord > & getTriggerRecords() const
Definition Digitizer.h:94
const std::vector< o2::emcal::Digit > & getDigits() const
Definition Digitizer.h:93
const o2::dataformats::MCTruthContainer< o2::emcal::MCLabel > & getMCLabels() const
Definition Digitizer.h:95
static Geometry * GetInstance()
Get geometry instance. It should have been set before.
Definition Geometry.cxx:190
Monte-Carlo label for EMCAL clusters / digits.
Definition MCLabel.h:28
void setAmplitudeFraction(Double_t afraction)
Definition MCLabel.h:36
std::vector< o2::emcal::LabeledDigit > process(const std::vector< Hit > &hits)
Steer conversion of hits to digits.
void setGeometry(const o2::emcal::Geometry *gm)
Definition SDigitizer.h:59
void snapshot(const Output &spec, T const &object)
o2::header::DataHeader::SubSpecificationType SubSpecificationType
bool isAllowed(Output const &query)
check if a certain output is allowed
ConfigParamRegistry const & options()
Definition InitContext.h:33
decltype(auto) get(R binding, int part=0) const
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::dataformats::MCEventHeader const & getMCEventHeader(int source, int event) const
retrieves the MCEventHeader for a given eventID and sourceID
GLint GLsizei count
Definition glcorearb.h:399
o2::framework::DataProcessorSpec getEMCALDigitizerSpec(int channel, bool requireCTPInput, bool mctruth=true, bool useccdb=true)
Create new digitizer spec.
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
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 ...
uint32_t orbit
LHC orbit.
uint16_t bc
bunch crossing ID of interaction
o2::detectors::DetID::ID detector
Definition Digits.h:73
o2::InteractionRecord intRecord
Definition Digits.h:71
std::bitset< CTP_MAXTRIGINPPERDET > inputsMask
Definition Digits.h:72
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"