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 if (mDetMask[o2::detectors::DetID::FT0]) {
252 for (const auto& trg : ctx.inputs().get<gsl::span<o2::ft0::DetTrigInput>>("ft0inputs")) {
253 if (trg.mInputs.to_ulong() & ft0mask) {
254 mbtriggers.emplace_back(trg.mIntRecord);
255 }
256 }
257 }
258 if (mDetMask[o2::detectors::DetID::FV0]) {
259 for (const auto& trg : ctx.inputs().get<gsl::span<o2::fv0::DetTrigInput>>("fv0inputs")) {
260 if (trg.mInputs.to_ulong() & fv0mask) {
261 if (std::find(mbtriggers.begin(), mbtriggers.end(), trg.mIntRecord) == mbtriggers.end()) {
262 mbtriggers.emplace_back(trg.mIntRecord);
263 }
264 }
265 }
266 }
267 }
268
269 LOG(info) << " CALLING EMCAL DIGITIZATION ";
271
272 // auto& eventParts = context->getEventParts();
273 std::vector<std::tuple<o2::InteractionRecord, std::bitset<5>>> acceptedTriggers;
274 enum EMCALTriggerBits { kMB,
275 kEMC,
276 kDMC }; // EMCAL trigger bits enum for CTP inputs
277 TRandom3 mRandomGenerator(std::chrono::high_resolution_clock::now().time_since_epoch().count());
278
279 // loop over all composite collisions given from context
280 // (aka loop over all the interaction records)
281 for (int collID = 0; collID < timesview.size(); ++collID) {
282
283 std::bitset<5> trigger{0x1}; // Default: Self-triggered mode - all collisions treated as trigger
284 if (mRequireCTPInput) {
285 // ====================================================
286 // check if we have a trigger input from CTP
287 // Simulated L0 and downsampling
288 // 2 cases -> Check from CTP config
289 // 1) EMCAL trigger active -> MB downsampled
290 // - Accept the event in 2 conditions
291 // + MB downsampling (first condition) -> Set trigger bit kTVXinEMC
292 // + EMCAL L0 trigger -> Set bit EMCAL L0
293 // Always test both, set trigger 0x1 -> EMBA, 0x2 -> 0EMC, 0x4 -> 0DCMX, 0 -> No trigger
294 // 2) EMCAL triggers not active
295 // . - Old logics kept, no downscaling, pure busy
296 // ----------------------------------------------------
297 // PRNG for downscaling check
298 auto mbtrigger = std::find(mbtriggers.begin(), mbtriggers.end(), timesview[collID]);
299 if (mbtrigger != mbtriggers.end()) {
300
301 // ============================
302 // retrieve downscaling from
303 // configuration of CTP classes
304 int downscaling = 0;
305 for (const auto& trg : mCTPConfig->getCTPClasses()) {
306 if (trg.cluster->maskCluster[o2::detectors::DetID::EMC]) {
307 // Class triggering EMCAL cluster
308 downscaling = trg.downScale;
309 }
310 }
311 if (mRandomGenerator.Uniform(0., 1) < downscaling) {
312 // accept as minimum bias
313 trigger.set(EMCALTriggerBits::kMB, true);
314 }
315 // check for LO triggers in 12 BCs
316 for (auto emcalTrigger : emcalTriggers) {
317 auto bcTimingOfEmcalTrigger = emcalTrigger.mInterRecord.bc;
318 auto bcTimingOfMBTrigger = (*mbtrigger).bc;
319 if (std::abs(bcTimingOfEmcalTrigger - bcTimingOfMBTrigger) < 12) {
320 if (emcalTrigger.mTriggeredTRU < 32) {
321 trigger.set(EMCALTriggerBits::kEMC, true);
322 } else {
323 trigger.set(EMCALTriggerBits::kDMC, true);
324 }
325 }
326 }
327
328 } else {
329 // No trigger active
330 // Set busy
331 trigger.set(EMCALTriggerBits::kMB, false);
332 }
333 }
334 // Bitset
335 // Trigger sim: Select event
336 if (!trigger.any()) {
337 continue;
338 }
339
340 mDigitizer.setEventTime(timesview[collID], trigger.any());
341 if (!mDigitizer.isCurrentEventTriggered()) {
342 LOG(debug) << "reject collision";
343 continue;
344 }
345 LOG(debug) << "accept collision";
346
347 // Trigger sim: Prepare CTP input digit
348 acceptedTriggers.push_back(std::make_tuple(timesview[collID], trigger));
349 LOG(debug) << "EMCAL TRU simulation: Sending trg = " << trigger << " to CTP";
350
351 // for each collision, loop over the constituents event and source IDs
352 // (background signal merging is basically taking place here)
353 for (auto& part : eventParts[collID]) {
354
355 mSumDigitizer.setCurrEvID(part.entryID);
356 mSumDigitizer.setCurrSrcID(part.sourceID);
357
358 // retrieve information about the MC collision via the MCEventHeader
359 auto& mcEventHeader = mcReader->getMCEventHeader(part.sourceID, part.entryID);
360 mcEventHeader.print();
361
362 // get the hits for this event and this source
363 mHits.clear();
364 context->retrieveHits(mSimChains, "EMCHit", part.sourceID, part.entryID, &mHits);
365
366 LOG(info) << "For collision " << collID << " eventID " << part.entryID << " found " << mHits.size() << " hits ";
367
368 std::vector<o2::emcal::LabeledDigit> summedDigits;
369 if (mRunSDitizer) {
370 summedDigits = mSumDigitizer.process(mHits);
371 } else {
372 for (auto& hit : mHits) {
373 o2::emcal::MCLabel digitlabel(hit.GetTrackID(), part.entryID, part.sourceID, false, 1.);
374 if (hit.GetEnergyLoss() < __DBL_EPSILON__) {
375 digitlabel.setAmplitudeFraction(0);
376 }
377 summedDigits.emplace_back(hit.GetDetectorID(), hit.GetEnergyLoss(), hit.GetTime(), digitlabel);
378 }
379 }
380
381 // call actual digitization procedure
382 mDigitizer.process(summedDigits);
383 }
384 }
385
386 mDigitizer.finish();
387
388 // here we have all digits and we can send them to consumer (aka snapshot it onto output)
389 ctx.outputs().snapshot(Output{"EMC", "DIGITS", 0}, mDigitizer.getDigits());
390 ctx.outputs().snapshot(Output{"EMC", "TRGRDIG", 0}, mDigitizer.getTriggerRecords());
391 if (ctx.outputs().isAllowed({"EMC", "DIGITSMCTR", 0})) {
392 ctx.outputs().snapshot(Output{"EMC", "DIGITSMCTR", 0}, mDigitizer.getMCLabels());
393 }
394 // EMCAL is always a triggering detector
396 LOG(info) << "EMCAL: Sending ROMode= " << roMode << " to GRPUpdater";
397 ctx.outputs().snapshot(Output{"EMC", "ROMode", 0}, roMode);
398 // Create CTP digits
399 std::vector<o2::ctp::CTPInputDigit> triggerinputs;
400 // for (auto& trg : mDigitizer.getTriggerRecords()) {
401 // // covert TriggerRecord into CTP trigger digit
402 // o2::ctp::CTPInputDigit nextdigit;
403 // nextdigit.intRecord = trg.getBCData();
404 // nextdigit.detector = o2::detectors::DetID::EMC;
405 // // Set min. bias accept trigger (input 0) as fake trigger
406 // // Other inputs will be added once available
407 // nextdigit.inputsMask.set(0);
408 // triggerinputs.push_back(nextdigit);
409 // }
410 for (auto& trg : acceptedTriggers) {
411 // convert TriggerRecord into CTP trigger digit
412 o2::ctp::CTPInputDigit nextdigit;
413 nextdigit.intRecord = std::get<0>(trg);
415 // nextdigit.inputsMask = std::get<1>(trg);
416 for (size_t i = 0; i < nextdigit.inputsMask.size(); i++) {
417 if (std::get<1>(trg)[i] != 0) {
418 nextdigit.inputsMask.set(i);
419 }
420 }
421 LOG(debug) << "EMCAL TRU simulation: assigned = " << nextdigit.inputsMask << " as nextdigit for CTP, with IR = " << nextdigit.intRecord.bc << ", orbit = " << nextdigit.intRecord.orbit;
422 triggerinputs.push_back(nextdigit);
423 }
424 ctx.outputs().snapshot(Output{"EMC", "TRIGGERINPUT", 0}, triggerinputs);
425
426 timer.Stop();
427 LOG(info) << "Digitization took " << timer.CpuTime() << "s";
428 // we should be only called once; tell DPL that this process is ready to exit
429 ctx.services().get<ControlService>().readyToQuit(QuitRequest::Me);
430 mFinished = true;
431}
432
434{
435 mDigitizer.init();
436 mDigitizerTRU.init();
437}
438
440{
441 if (mCalibHandler->finalizeCCDB(matcher, obj)) {
442 return;
443 }
444 if (matcher == o2::framework::ConcreteDataMatcher("CTP", "CTPCONFIG", 0)) {
445 std::cout << "Loading CTP configuration" << std::endl;
446 mCTPConfig = reinterpret_cast<o2::ctp::CTPConfiguration*>(obj);
447 for (const auto& trg : mCTPConfig->getCTPClasses()) {
448 if (trg.cluster->maskCluster[o2::detectors::DetID::EMC]) {
449 // Class triggering EMCAL cluster
450 LOG(debug) << "ENABLING Trigger simulation, found trigger class for EMCAL cluster: " << trg.name << " with input mask " << std::bitset<64>(trg.descriptor->getInputsMask());
451 for (const auto& [det, ctpinputs] : mCTPConfig->getDet2InputMap()) {
452 if (!(det == o2::detectors::DetID::EMC)) {
453 continue;
454 }
455 // if the detector ID is EMC AND the input mask is not empty, run the trigger simulation
456 for (const auto& input : ctpinputs) {
457 if (input.inputMask != 0) {
458 mRunDigitizerTRU = true;
459 }
460 }
461 }
462 }
463 }
464 }
465}
466
467o2::framework::DataProcessorSpec getEMCALDigitizerSpec(int channel, bool requireCTPInput, const std::vector<o2::detectors::DetID>& detList, bool mctruth, bool useccdb)
468{
469 // create the full data processor spec using
470 // a name identifier
471 // input description
472 // algorithmic description (here a lambda getting called once to setup the actual processing function)
473 // options that can be used for this processor (here: input file names where to take the hits)
474 std::vector<OutputSpec> outputs;
475 outputs.emplace_back("EMC", "DIGITS", 0, Lifetime::Timeframe);
476 outputs.emplace_back("EMC", "TRGRDIG", 0, Lifetime::Timeframe);
477 if (mctruth) {
478 outputs.emplace_back("EMC", "DIGITSMCTR", 0, Lifetime::Timeframe);
479 }
480 outputs.emplace_back("EMC", "ROMode", 0, Lifetime::Timeframe);
481 outputs.emplace_back("EMC", "TRIGGERINPUT", 0, Lifetime::Timeframe);
482
483 std::vector<o2::framework::InputSpec> inputs;
484 inputs.emplace_back("collisioncontext", "SIM", "COLLISIONCONTEXT", static_cast<SubSpecificationType>(channel), Lifetime::Timeframe);
485 std::shared_ptr<CalibLoader> calibloader;
486 if (useccdb) {
487 calibloader = std::make_shared<CalibLoader>();
488 calibloader->enableSimParams(true);
489 calibloader->enableFEEDCS(true);
490 calibloader->defineInputSpecs(inputs);
491 }
493 if (requireCTPInput) {
494 if (std::find(detList.begin(), detList.end(), o2::detectors::DetID::FT0) != detList.end()) {
495 detMask.set(o2::detectors::DetID::FT0);
496 inputs.emplace_back("ft0inputs", "FT0", "TRIGGERINPUT", 0, Lifetime::Timeframe);
497 }
498 if (std::find(detList.begin(), detList.end(), o2::detectors::DetID::FV0) != detList.end()) {
499 detMask.set(o2::detectors::DetID::FV0);
500 inputs.emplace_back("fv0inputs", "FV0", "TRIGGERINPUT", 0, Lifetime::Timeframe);
501 }
502 inputs.emplace_back("ctpconfig", "CTP", "CTPCONFIG", 0, Lifetime::Condition, ccdbParamSpec("CTP/Config/Config", true));
503 }
504
505 return DataProcessorSpec{
506 "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")}},
507 inputs,
508 outputs,
509 AlgorithmSpec{o2::framework::adaptFromTask<DigitizerSpec>(calibloader, requireCTPInput, detMask)},
510 Options{
511 {"pileup", VariantType::Int, 1, {"whether to run in continuous time mode"}},
512 {"disable-dig-tru", VariantType::Bool, false, {"Disable TRU digitisation"}},
513 {"debug-stream", VariantType::Bool, false, {"Enable debug streaming"}}}
514 // I can't use VariantType::Bool as it seems to have a problem
515 };
516}
517} // end namespace emcal
518} // 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...
std::ostringstream debug
int32_t i
Header of the General Run Parameters object.
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:154
Monte-Carlo label for EMCAL clusters / digits.
Definition MCLabel.h:26
void setAmplitudeFraction(Double_t afraction)
Definition MCLabel.h:34
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
o2::header::DataHeader::SubSpecificationType SubSpecificationType
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, const std::vector< o2::detectors::DetID > &detList, bool mctruth=true, bool useccdb=true)
Create new digitizer spec.
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
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"