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
336 mDigitizer.setEventTime(timesview[collID], trigger.any());
337 if (!mDigitizer.isCurrentEventTriggered()) {
338 LOG(debug) << "reject collision";
339 continue;
340 }
341 LOG(debug) << "accept collision";
342
343 // Trigger sim: Prepare CTP input digit
344 acceptedTriggers.push_back(std::make_tuple(timesview[collID], trigger));
345 LOG(debug) << "EMCAL TRU simulation: Sending trg = " << trigger << " to CTP";
346
347 // for each collision, loop over the constituents event and source IDs
348 // (background signal merging is basically taking place here)
349 for (auto& part : eventParts[collID]) {
350
351 mSumDigitizer.setCurrEvID(part.entryID);
352 mSumDigitizer.setCurrSrcID(part.sourceID);
353
354 // retrieve information about the MC collision via the MCEventHeader
355 auto& mcEventHeader = mcReader->getMCEventHeader(part.sourceID, part.entryID);
356 mcEventHeader.print();
357
358 // get the hits for this event and this source
359 mHits.clear();
360 context->retrieveHits(mSimChains, "EMCHit", part.sourceID, part.entryID, &mHits);
361
362 LOG(info) << "For collision " << collID << " eventID " << part.entryID << " found " << mHits.size() << " hits ";
363
364 std::vector<o2::emcal::LabeledDigit> summedDigits;
365 if (mRunSDitizer) {
366 summedDigits = mSumDigitizer.process(mHits);
367 } else {
368 for (auto& hit : mHits) {
369 o2::emcal::MCLabel digitlabel(hit.GetTrackID(), part.entryID, part.sourceID, false, 1.);
370 if (hit.GetEnergyLoss() < __DBL_EPSILON__) {
371 digitlabel.setAmplitudeFraction(0);
372 }
373 summedDigits.emplace_back(hit.GetDetectorID(), hit.GetEnergyLoss(), hit.GetTime(), digitlabel);
374 }
375 }
376
377 // call actual digitization procedure
378 mDigitizer.process(summedDigits);
379 }
380 }
381
382 mDigitizer.finish();
383
384 // here we have all digits and we can send them to consumer (aka snapshot it onto output)
385 ctx.outputs().snapshot(Output{"EMC", "DIGITS", 0}, mDigitizer.getDigits());
386 ctx.outputs().snapshot(Output{"EMC", "TRGRDIG", 0}, mDigitizer.getTriggerRecords());
387 if (ctx.outputs().isAllowed({"EMC", "DIGITSMCTR", 0})) {
388 ctx.outputs().snapshot(Output{"EMC", "DIGITSMCTR", 0}, mDigitizer.getMCLabels());
389 }
390 // EMCAL is always a triggering detector
392 LOG(info) << "EMCAL: Sending ROMode= " << roMode << " to GRPUpdater";
393 ctx.outputs().snapshot(Output{"EMC", "ROMode", 0}, roMode);
394 // Create CTP digits
395 std::vector<o2::ctp::CTPInputDigit> triggerinputs;
396 // for (auto& trg : mDigitizer.getTriggerRecords()) {
397 // // covert TriggerRecord into CTP trigger digit
398 // o2::ctp::CTPInputDigit nextdigit;
399 // nextdigit.intRecord = trg.getBCData();
400 // nextdigit.detector = o2::detectors::DetID::EMC;
401 // // Set min. bias accept trigger (input 0) as fake trigger
402 // // Other inputs will be added once available
403 // nextdigit.inputsMask.set(0);
404 // triggerinputs.push_back(nextdigit);
405 // }
406 for (auto& trg : acceptedTriggers) {
407 // convert TriggerRecord into CTP trigger digit
408 o2::ctp::CTPInputDigit nextdigit;
409 nextdigit.intRecord = std::get<0>(trg);
411 // nextdigit.inputsMask = std::get<1>(trg);
412 for (size_t i = 0; i < nextdigit.inputsMask.size(); i++) {
413 if (std::get<1>(trg)[i] != 0) {
414 nextdigit.inputsMask.set(i);
415 }
416 }
417 LOG(debug) << "EMCAL TRU simulation: assigned = " << nextdigit.inputsMask << " as nextdigit for CTP, with IR = " << nextdigit.intRecord.bc << ", orbit = " << nextdigit.intRecord.orbit;
418 triggerinputs.push_back(nextdigit);
419 }
420 ctx.outputs().snapshot(Output{"EMC", "TRIGGERINPUT", 0}, triggerinputs);
421
422 timer.Stop();
423 LOG(info) << "Digitization took " << timer.CpuTime() << "s";
424 // we should be only called once; tell DPL that this process is ready to exit
425 ctx.services().get<ControlService>().readyToQuit(QuitRequest::Me);
426 mFinished = true;
427}
428
430{
431 mDigitizer.init();
432 mDigitizerTRU.init();
433}
434
436{
437 if (mCalibHandler->finalizeCCDB(matcher, obj)) {
438 return;
439 }
440 if (matcher == o2::framework::ConcreteDataMatcher("CTP", "CTPCONFIG", 0)) {
441 std::cout << "Loading CTP configuration" << std::endl;
442 mCTPConfig = reinterpret_cast<o2::ctp::CTPConfiguration*>(obj);
443 for (const auto& trg : mCTPConfig->getCTPClasses()) {
444 if (trg.cluster->maskCluster[o2::detectors::DetID::EMC]) {
445 // Class triggering EMCAL cluster
446 LOG(debug) << "ENABLING Trigger simulation, found trigger class for EMCAL cluster: " << trg.name << " with input mask " << std::bitset<64>(trg.descriptor->getInputsMask());
447 for (const auto& [det, ctpinputs] : mCTPConfig->getDet2InputMap()) {
448 if (!(det == o2::detectors::DetID::EMC)) {
449 continue;
450 }
451 // if the detector ID is EMC AND the input mask is not empty, run the trigger simulation
452 for (const auto& input : ctpinputs) {
453 if (input.inputMask != 0) {
454 mRunDigitizerTRU = true;
455 }
456 }
457 }
458 }
459 }
460 }
461}
462
463o2::framework::DataProcessorSpec getEMCALDigitizerSpec(int channel, bool requireCTPInput, bool mctruth, bool useccdb)
464{
465 // create the full data processor spec using
466 // a name identifier
467 // input description
468 // algorithmic description (here a lambda getting called once to setup the actual processing function)
469 // options that can be used for this processor (here: input file names where to take the hits)
470 std::vector<OutputSpec> outputs;
471 outputs.emplace_back("EMC", "DIGITS", 0, Lifetime::Timeframe);
472 outputs.emplace_back("EMC", "TRGRDIG", 0, Lifetime::Timeframe);
473 if (mctruth) {
474 outputs.emplace_back("EMC", "DIGITSMCTR", 0, Lifetime::Timeframe);
475 }
476 outputs.emplace_back("EMC", "ROMode", 0, Lifetime::Timeframe);
477 outputs.emplace_back("EMC", "TRIGGERINPUT", 0, Lifetime::Timeframe);
478
479 std::vector<o2::framework::InputSpec> inputs;
480 inputs.emplace_back("collisioncontext", "SIM", "COLLISIONCONTEXT", static_cast<SubSpecificationType>(channel), Lifetime::Timeframe);
481 std::shared_ptr<CalibLoader> calibloader;
482 if (useccdb) {
483 calibloader = std::make_shared<CalibLoader>();
484 calibloader->enableSimParams(true);
485 calibloader->enableFEEDCS(true);
486 calibloader->defineInputSpecs(inputs);
487 }
488 if (requireCTPInput) {
489 inputs.emplace_back("ft0inputs", "FT0", "TRIGGERINPUT", 0, Lifetime::Timeframe);
490 inputs.emplace_back("fv0inputs", "FV0", "TRIGGERINPUT", 0, Lifetime::Timeframe);
491 inputs.emplace_back("ctpconfig", "CTP", "CTPCONFIG", 0, Lifetime::Condition, ccdbParamSpec("CTP/Config/Config", true));
492 }
493
494 return DataProcessorSpec{
495 "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")}},
496 inputs,
497 outputs,
498 AlgorithmSpec{o2::framework::adaptFromTask<DigitizerSpec>(calibloader, requireCTPInput)},
499 Options{
500 {"pileup", VariantType::Int, 1, {"whether to run in continuous time mode"}},
501 {"disable-dig-tru", VariantType::Bool, false, {"Disable TRU digitisation"}},
502 {"debug-stream", VariantType::Bool, false, {"Enable debug streaming"}}}
503 // I can't use VariantType::Bool as it seems to have a problem
504 };
505}
506} // end namespace emcal
507} // 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:77
void setEventTime(o2::InteractionTimeRecord record, bool trigger)
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:95
const std::vector< o2::emcal::Digit > & getDigits() const
Definition Digitizer.h:94
bool isCurrentEventTriggered() const
Definition Digitizer.h:75
const o2::dataformats::MCTruthContainer< o2::emcal::MCLabel > & getMCLabels() const
Definition Digitizer.h:96
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"