Project
Loading...
Searching...
No Matches
ITSMFTDigitizerSpec.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
12#include "ITSMFTDigitizerSpec.h"
16#include "Framework/Lifetime.h"
17#include "Framework/Task.h"
34#include "MFTBase/GeometryTGeo.h"
35#include <TChain.h>
36#include <TStopwatch.h>
37#include <string>
38
39using namespace o2::framework;
41
42namespace o2::itsmft
43{
44
45using namespace o2::base;
46template <int N>
48{
49 public:
52
54
56 {
57 mDisableQED = ic.options().get<bool>("disable-qed");
58 if (mDoStaggering) {
60 }
61 mDigits.resize(mLayers);
62 mROFRecords.resize(mLayers);
64 mLabels.resize(mLayers);
65 mLabelsAccum.resize(mLayers);
66 }
67
69 {
70 if (mFinished) {
71 return;
72 }
73
75 const o2::InteractionRecord firstIR(0, mFirstOrbitTF);
77
78 TStopwatch timer;
79 timer.Start();
80 LOG(info) << " CALLING ITS DIGITIZATION ";
81
82 // read collision context from input
83 auto context = pc.inputs().get<o2::steer::DigitizationContext*>("collisioncontext");
84 context->initSimChains(ID, mSimChains);
85 const bool withQED = context->isQEDProvided() && !mDisableQED;
86 auto& timesview = context->getEventRecords(withQED);
87 LOG(info) << "GOT " << timesview.size() << " COLLISSION TIMES";
88 LOG(info) << "SIMCHAINS: " << mSimChains.size();
89
90 // if there is nothing to do ... return
91 if (timesview.size() == 0) {
92 return;
93 }
94
95 uint64_t nDigits{0};
96 for (uint32_t iLayer = 0; iLayer < mLayers; ++iLayer) {
97 const int layer = (mDoStaggering) ? iLayer : -1;
102
103 // digits are directly put into DPL owned resource
104 auto& digitsAccum = pc.outputs().make<std::vector<itsmft::Digit>>(Output{Origin, "DIGITS", iLayer});
105
106 // rofs are accumulated first and the copied
107 const int nROFsPerOrbit = o2::constants::lhc::LHCMaxBunches / DPLAlpideParam<N>::Instance().getROFLengthInBC(iLayer);
108 const int nROFsTF = nROFsPerOrbit * raw::HBFUtils::Instance().getNOrbitsPerTF();
109 mROFRecordsAccum[iLayer].reserve(nROFsTF);
110
111 auto accumulate = [this, &digitsAccum, &iLayer]() {
112 // accumulate result of single event processing on a specific layer, called after processing every event supplied
113 // AND after the final flushing via digitizer::fillOutputContainer
114 if (!mDigits[iLayer].size()) {
115 return; // no digits were flushed, nothing to accumulate
116 }
117 auto ndigAcc = digitsAccum.size();
118 std::copy(mDigits[iLayer].begin(), mDigits[iLayer].end(), std::back_inserter(digitsAccum));
119
120 // fix ROFrecords references on ROF entries
121 auto nROFRecsOld = mROFRecordsAccum[iLayer].size();
122
123 for (int i = 0; i < mROFRecords[iLayer].size(); i++) {
124 auto& rof = mROFRecords[iLayer][i];
125 rof.setFirstEntry(ndigAcc + rof.getFirstEntry());
126 rof.print();
127 }
128
129 std::copy(mROFRecords[iLayer].begin(), mROFRecords[iLayer].end(), std::back_inserter(mROFRecordsAccum[iLayer]));
130 if (mWithMCTruth) {
131 mLabelsAccum[iLayer].mergeAtBack(mLabels[iLayer]);
132 }
133 LOG(info) << "Added " << mDigits[iLayer].size() << " digits" << ((mDoStaggering) ? std::format(" on layer {}", iLayer) : "");
134 // clean containers from already accumulated stuff
135 mLabels[iLayer].clear();
136 mDigits[iLayer].clear();
137 mROFRecords[iLayer].clear();
138 }; // and accumulate lambda
139
140 const auto& eventParts = context->getEventParts(withQED);
141 const int64_t bcShift = mDigitizer.getParams().getROFrameBiasInBC(layer); // this accounts the misalignment and the opt. imposed rof delay
142 // loop over all composite collisions given from context (aka loop over all the interaction records)
143 for (int collID = 0; collID < timesview.size(); ++collID) {
144 auto irt = timesview[collID];
145 if (irt.toLong() < bcShift) { // due to the ROF misalignment (+opt. delay) the collision would go to negative ROF ID, discard
146 continue;
147 }
148 irt -= bcShift; // account for the ROF start shift
149
151 mDigitizer.resetEventROFrames(); // to estimate min/max ROF for this collID
152 // for each collision, loop over the constituents event and source IDs
153 // (background signal merging is basically taking place here)
154 for (const auto& part : eventParts[collID]) {
155
156 // get the hits for this event and this source
157 mHits.clear();
158 context->retrieveHits(mSimChains, o2::detectors::SimTraits::DETECTORBRANCHNAMES[ID][0].c_str(), part.sourceID, part.entryID, &mHits);
159
160 if (mHits.size() > 0) {
161 LOG(debug) << "For collision " << collID << " eventID " << part.entryID << " found " << mHits.size() << " hits ";
162 mDigitizer.process(&mHits, part.entryID, part.sourceID, layer); // call actual digitization procedure
163 }
164 }
165 accumulate();
166 }
168 accumulate();
169 nDigits += digitsAccum.size();
170
171 // here we have all digits and labels and we can send them to consumer (aka snapshot it onto output)
172 // ensure that the rof output is continuous
173 if (nROFsTF != mROFRecordsAccum[iLayer].size()) {
174 // it can happen that in the digitization rofs without contributing hits are skipped
175 // however downstream consumers of the clusters cannot know apriori the time structure
176 // the cluster rofs do not account for the bias so it will start always at BC=0
177 // also have to account for spillage into next TF
178 const size_t nROFsLayer = std::max((size_t)nROFsTF, mROFRecordsAccum[iLayer].size());
179 std::vector<o2::itsmft::ROFRecord> expDigitRofVec(nROFsLayer);
180 for (int iROF{0}; iROF < nROFsLayer; ++iROF) {
181 auto& rof = expDigitRofVec[iROF];
182 int orb = iROF * DPLAlpideParam<N>::Instance().getROFLengthInBC(iLayer) / o2::constants::lhc::LHCMaxBunches + mFirstOrbitTF;
183 int bc = iROF * DPLAlpideParam<N>::Instance().getROFLengthInBC(iLayer) % o2::constants::lhc::LHCMaxBunches + DPLAlpideParam<N>::Instance().getROFDelayInBC(iLayer);
185 rof.setBCData(ir);
186 rof.setROFrame(iROF);
187 rof.setNEntries(0);
188 rof.setFirstEntry(-1);
189 }
190 uint32_t prevEntry{0};
191 for (const auto& rof : mROFRecordsAccum[iLayer]) {
192 const auto& ir = rof.getBCData();
193 if (ir < firstIR) {
194 LOGP(warn, "Discard ROF {} preceding TF 1st orbit {}{}", ir.asString(), mFirstOrbitTF, ((mDoStaggering) ? std::format(" on layer {}", iLayer) : ""));
195 continue;
196 }
197 auto irToFirst = ir - firstIR;
198 if (irToFirst.toLong() - DPLAlpideParam<N>::Instance().getROFDelayInBC(iLayer) < 0) {
199 LOGP(warn, "Discard ROF {} preceding TF 1st orbit {} due to imposed ROF delay{}", ir.asString(), mFirstOrbitTF, ((mDoStaggering) ? std::format(" on layer {}", iLayer) : ""));
200 continue;
201 }
202 irToFirst -= DPLAlpideParam<N>::Instance().getROFDelayInBC(iLayer);
203 const int irROF = irToFirst.toLong() / DPLAlpideParam<N>::Instance().getROFLengthInBC(iLayer);
204 auto& expROF = expDigitRofVec[irROF];
205 expROF.setFirstEntry(rof.getFirstEntry());
206 expROF.setNEntries(rof.getNEntries());
207 if (expROF.getBCData() != rof.getBCData()) {
208 LOGP(fatal, "detected mismatch between expected {} and received {}", expROF.asString(), rof.asString());
209 }
210 }
211 int prevFirst{0};
212 for (auto& rof : expDigitRofVec) {
213 if (rof.getFirstEntry() < 0) {
214 rof.setFirstEntry(prevFirst);
215 }
216 prevFirst = rof.getFirstEntry();
217 }
218 // if more rofs where accumulated than ROFs possible in the TF, cut them away
219 // by construction expDigitRofVec is at least nROFsTF long
220 expDigitRofVec.resize(nROFsTF);
221 pc.outputs().snapshot(Output{Origin, "DIGITSROF", iLayer}, expDigitRofVec);
222 } else {
223 pc.outputs().snapshot(Output{Origin, "DIGITSROF", iLayer}, mROFRecordsAccum[iLayer]);
224 }
225 if (mWithMCTruth) {
226 auto& sharedlabels = pc.outputs().make<o2::dataformats::ConstMCTruthContainer<o2::MCCompLabel>>(Output{Origin, "DIGITSMCTR", iLayer});
227 mLabelsAccum[iLayer].flatten_to(sharedlabels);
228 // free space of existing label containers
229 mLabels[iLayer].clear_andfreememory();
230 mLabelsAccum[iLayer].clear_andfreememory();
231 // write dummy MC2ROF vector to keep writer/readers backward compatible
232 static std::vector<o2::itsmft::MC2ROFRecord> dummyMC2ROF;
233 pc.outputs().snapshot(Output{Origin, "DIGITSMC2ROF", iLayer}, dummyMC2ROF);
234 }
235 }
236
237 LOG(info) << ID.getName() << ": Sending ROMode= " << mROMode << " to GRPUpdater";
238 pc.outputs().snapshot(Output{Origin, "ROMode", 0}, mROMode);
239
240 timer.Stop();
241 LOG(info) << "Digitization took " << timer.CpuTime() << "s";
242 LOG(info) << "Produced " << nDigits << " digits";
243
244 // we should be only called once; tell DPL that this process is ready to exit
245 pc.services().get<ControlService>().readyToQuit(QuitRequest::Me);
246
247 mFinished = true;
248 }
249
250 void finaliseCCDB(ConcreteDataMatcher& matcher, void* obj)
251 {
252 if (matcher == ConcreteDataMatcher(Origin, "NOISEMAP", 0)) {
253 LOG(info) << ID.getName() << " noise map updated";
255 return;
256 }
257 if (matcher == ConcreteDataMatcher(Origin, "DEADMAP", 0)) {
258 LOG(info) << ID.getName() << " static dead map updated";
261 return;
262 }
263 if (matcher == ConcreteDataMatcher(Origin, "TimeDeadMap", 0)) {
265 if (!timedeadmap->isDefault()) {
266 timedeadmap->decodeMap(mFirstOrbitTF, *mDeadMap, true);
268 LOGP(fatal, "Attempt to add time-dependent map to already modified static map");
269 }
270 mTimeDeadMapUpdated = true;
272 LOG(info) << ID.getName() << " time-dependent dead map updated";
273 } else {
274 LOG(info) << ID.getName() << " time-dependent dead map is default/empty";
275 }
276
277 return;
278 }
279 if (matcher == ConcreteDataMatcher(Origin, "ALPIDEPARAM", 0)) {
280 LOG(info) << ID.getName() << " Alpide param updated";
281 const auto& par = o2::itsmft::DPLAlpideParam<N>::Instance();
282 par.printKeyValues();
283 return;
284 }
285 if (matcher == ConcreteDataMatcher(Origin, "ALPIDERESPVbb0", 0)) {
286 LOG(info) << ID.getName() << " loaded AlpideResponseData for Vbb=0V";
288 }
289 if (matcher == ConcreteDataMatcher(Origin, "ALPIDERESPVbbM3", 0)) {
290 LOG(info) << ID.getName() << " loaded AlpideResponseData for Vbb=-3V";
292 }
293 }
294
295 protected:
296 ITSMFTDPLDigitizerTask(bool mctruth = true, bool doStag = false) : BaseDPLDigitizer(InitServices::FIELD | InitServices::GEOM), mWithMCTruth(mctruth), mDoStaggering(doStag) {}
297
299 {
300 std::string detstr(o2::detectors::DetID::getName(ID));
301 pc.inputs().get<o2::itsmft::NoiseMap*>(detstr + "_noise");
302 pc.inputs().get<o2::itsmft::NoiseMap*>(detstr + "_dead");
303 // TODO: the code should run even if this object does not exist. Or: create default object
304 pc.inputs().get<o2::itsmft::TimeDeadMap*>(detstr + "_time_dead");
305 pc.inputs().get<o2::itsmft::DPLAlpideParam<N>*>(detstr + "_alppar");
306 pc.inputs().get<o2::itsmft::AlpideSimResponse*>(detstr + "_alpiderespvbb0");
307 pc.inputs().get<o2::itsmft::AlpideSimResponse*>(detstr + "_alpiderespvbbm3");
308
311 auto& digipar = mDigitizer.getParams();
312 digipar.setContinuous(dopt.continuous);
313 digipar.setROFrameBiasInBC(aopt.roFrameBiasInBC);
314 if (dopt.continuous) {
315 auto frameNS = aopt.roFrameLengthInBC * o2::constants::lhc::LHCBunchSpacingNS;
316 digipar.setROFrameLengthInBC(aopt.roFrameLengthInBC);
317 digipar.setROFrameLength(frameNS); // RO frame in ns
318 digipar.setStrobeDelay(aopt.strobeDelay); // Strobe delay wrt beginning of the RO frame, in ns
319 digipar.setStrobeLength(aopt.strobeLengthCont > 0 ? aopt.strobeLengthCont : frameNS - aopt.strobeDelay); // Strobe length in ns
320 } else {
321 digipar.setROFrameLength(aopt.roFrameLengthTrig); // RO frame in ns
322 digipar.setStrobeDelay(aopt.strobeDelay); // Strobe delay wrt beginning of the RO frame, in ns
323 digipar.setStrobeLength(aopt.strobeLengthTrig); // Strobe length in ns
324 }
325 // parameters of signal time response: flat-top duration, max rise time and q @ which rise time is 0
326 digipar.getSignalShape().setParameters(dopt.strobeFlatTop, dopt.strobeMaxRiseTime, dopt.strobeQRiseTime0);
327 digipar.setChargeThreshold(dopt.chargeThreshold); // charge threshold in electrons
328 digipar.setNoisePerPixel(dopt.noisePerPixel); // noise level
329 digipar.setTimeOffset(dopt.timeOffset);
330 digipar.setNSimSteps(dopt.nSimSteps);
331 digipar.setIBVbb(dopt.IBVbb);
332 digipar.setOBVbb(dopt.OBVbb);
333 digipar.setVbb(dopt.Vbb);
334 // staggering parameters
335 if (mDoStaggering) {
336 for (int iLayer{0}; iLayer < o2::itsmft::DPLAlpideParam<N>::getNLayers(); ++iLayer) {
337 auto frameNS = aopt.getROFLengthInBC(iLayer) * o2::constants::lhc::LHCBunchSpacingNS;
338 digipar.addROFrameLayerLengthInBC(aopt.getROFLengthInBC(iLayer));
339 // NOTE: the rof delay looks from the digitizer like an additional bias
340 digipar.addROFrameLayerBiasInBC(aopt.getROFBiasInBC(iLayer) + aopt.getROFDelayInBC(iLayer));
341 digipar.addStrobeDelay(aopt.strobeDelay);
342 digipar.addStrobeLength(aopt.strobeLengthCont > 0 ? aopt.strobeLengthCont : frameNS - aopt.strobeDelay);
343 digipar.setROFrameLength(aopt.getROFLengthInBC(iLayer) * o2::constants::lhc::LHCBunchSpacingNS, iLayer);
344 }
345 }
346
348 LOG(info) << detstr << " simulated in "
349 << ((mROMode == o2::parameters::GRPObject::CONTINUOUS) ? "CONTINUOUS" : "TRIGGERED")
350 << " RO mode";
351
352 // configure digitizer
353 o2::itsmft::GeometryTGeo* geom = nullptr;
354 if constexpr (N == o2::detectors::DetID::ITS) {
356 } else {
358 }
359 geom->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::L2G)); // make sure L2G matrices are loaded
362 }
363
364 bool mWithMCTruth = true;
365 bool mDoStaggering = false;
366 bool mFinished = false;
367 bool mDisableQED = false;
368 int mLayers = 1;
369 unsigned long mFirstOrbitTF = 0x0;
371 std::vector<std::vector<o2::itsmft::Digit>> mDigits;
372 std::vector<std::vector<o2::itsmft::ROFRecord>> mROFRecords;
373 std::vector<std::vector<o2::itsmft::ROFRecord>> mROFRecordsAccum;
374 std::vector<o2::itsmft::Hit> mHits;
375 std::vector<o2::itsmft::Hit>* mHitsP = &mHits;
376 std::vector<o2::dataformats::MCTruthContainer<o2::MCCompLabel>> mLabels;
377 std::vector<o2::dataformats::MCTruthContainer<o2::MCCompLabel>> mLabelsAccum;
378 std::vector<TChain*> mSimChains;
380
383};
384
385//_______________________________________________
386class ITSDPLDigitizerTask : public ITSMFTDPLDigitizerTask<o2::detectors::DetID::ITS>
387{
388 public:
389 ITSDPLDigitizerTask(bool mctruth = true, bool doStag = false) : ITSMFTDPLDigitizerTask<o2::detectors::DetID::ITS>(mctruth, doStag) {}
390};
391
392//_______________________________________________
393class MFTDPLDigitizerTask : public ITSMFTDPLDigitizerTask<o2::detectors::DetID::MFT>
394{
395 public:
396 MFTDPLDigitizerTask(bool mctruth = true, bool doStag = false) : ITSMFTDPLDigitizerTask<o2::detectors::DetID::MFT>(mctruth, doStag) {}
397};
398
399namespace
400{
401template <int N>
402std::vector<OutputSpec> makeOutChannels(o2::header::DataOrigin detOrig, bool mctruth, bool doStag)
403{
404 std::vector<OutputSpec> outputs;
405 uint32_t nLayers = doStag ? DPLAlpideParam<N>::getNLayers() : 1;
406 for (uint32_t iLayer = 0; iLayer < nLayers; ++iLayer) {
407 outputs.emplace_back(detOrig, "DIGITS", iLayer, Lifetime::Timeframe);
408 outputs.emplace_back(detOrig, "DIGITSROF", iLayer, Lifetime::Timeframe);
409 if (mctruth) {
410 outputs.emplace_back(detOrig, "DIGITSMC2ROF", iLayer, Lifetime::Timeframe);
411 outputs.emplace_back(detOrig, "DIGITSMCTR", iLayer, Lifetime::Timeframe);
412 }
413 }
414 outputs.emplace_back(detOrig, "ROMode", 0, Lifetime::Timeframe);
415 return outputs;
416}
417} // namespace
418
419DataProcessorSpec getITSDigitizerSpec(int channel, bool mctruth, bool doStag)
420{
422 auto detOrig = ITSDPLDigitizerTask::Origin;
423 std::vector<InputSpec> inputs;
424 inputs.emplace_back("collisioncontext", "SIM", "COLLISIONCONTEXT", static_cast<SubSpecificationType>(channel), Lifetime::Timeframe);
425 inputs.emplace_back("ITS_noise", "ITS", "NOISEMAP", 0, Lifetime::Condition, ccdbParamSpec("ITS/Calib/NoiseMap"));
426 inputs.emplace_back("ITS_dead", "ITS", "DEADMAP", 0, Lifetime::Condition, ccdbParamSpec("ITS/Calib/DeadMap"));
427 inputs.emplace_back("ITS_time_dead", "ITS", "TimeDeadMap", 0, Lifetime::Condition, ccdbParamSpec("ITS/Calib/TimeDeadMap"));
428 inputs.emplace_back("ITS_alppar", "ITS", "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec("ITS/Config/AlpideParam"));
429 inputs.emplace_back("ITS_alpiderespvbb0", "ITS", "ALPIDERESPVbb0", 0, Lifetime::Condition, ccdbParamSpec("ITSMFT/Calib/ALPIDEResponseVbb0"));
430 inputs.emplace_back("ITS_alpiderespvbbm3", "ITS", "ALPIDERESPVbbM3", 0, Lifetime::Condition, ccdbParamSpec("ITSMFT/Calib/ALPIDEResponseVbbM3"));
431 return DataProcessorSpec{.name = detStr + "Digitizer",
432 .inputs = inputs,
433 .outputs = makeOutChannels<o2::detectors::DetID::ITS>(detOrig, mctruth, doStag),
434 .algorithm = AlgorithmSpec{adaptFromTask<ITSDPLDigitizerTask>(mctruth, doStag)},
435 .options = Options{
436 {"disable-qed", o2::framework::VariantType::Bool, false, {"disable QED handling"}}}};
437}
438
439DataProcessorSpec getMFTDigitizerSpec(int channel, bool mctruth, bool doStag)
440{
442 auto detOrig = MFTDPLDigitizerTask::Origin;
443 std::vector<InputSpec> inputs;
444 inputs.emplace_back("collisioncontext", "SIM", "COLLISIONCONTEXT", static_cast<SubSpecificationType>(channel), Lifetime::Timeframe);
445 inputs.emplace_back("MFT_noise", "MFT", "NOISEMAP", 0, Lifetime::Condition, ccdbParamSpec("MFT/Calib/NoiseMap"));
446 inputs.emplace_back("MFT_dead", "MFT", "DEADMAP", 0, Lifetime::Condition, ccdbParamSpec("MFT/Calib/DeadMap"));
447 inputs.emplace_back("MFT_time_dead", "MFT", "TimeDeadMap", 0, Lifetime::Condition, ccdbParamSpec("MFT/Calib/TimeDeadMap"));
448 inputs.emplace_back("MFT_alppar", "MFT", "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec("MFT/Config/AlpideParam"));
449 inputs.emplace_back("MFT_alpiderespvbb0", "MFT", "ALPIDERESPVbb0", 0, Lifetime::Condition, ccdbParamSpec("ITSMFT/Calib/ALPIDEResponseVbb0"));
450 inputs.emplace_back("MFT_alpiderespvbbm3", "MFT", "ALPIDERESPVbbM3", 0, Lifetime::Condition, ccdbParamSpec("ITSMFT/Calib/ALPIDEResponseVbbM3"));
451 return DataProcessorSpec{.name = detStr + "Digitizer",
452 .inputs = inputs,
453 .outputs = makeOutChannels<o2::detectors::DetID::MFT>(detOrig, mctruth, doStag),
454 .algorithm = AlgorithmSpec{adaptFromTask<MFTDPLDigitizerTask>(mctruth, doStag)},
455 .options = Options{{"disable-qed", o2::framework::VariantType::Bool, false, {"disable QED handling"}}}};
456}
457
458} // namespace o2::itsmft
459// end namespace o2
Definition of the base digitizer task class.
A const (ready only) version of MCTruthContainer.
Definition of the ITSMFT digit.
o2::framework::DataAllocator::SubSpecificationType SubSpecificationType
std::ostringstream debug
uint64_t bc
Definition RawEventData.h:5
int32_t i
Header of the General Run Parameters object.
Definition of the GeometryTGeo class.
Definition of the ITSMFT ROFrame (trigger) record.
Definition of the ITS digitizer.
Definition of the ITSMFT NoiseMap.
Definition of the ITSMFT time-dependend dead map.
virtual void init(o2::framework::InitContext &) final
A read-only version of MCTruthContainer allowing for storage optimisation.
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:58
static constexpr const char * getName(ID id)
names of defined detectors
Definition DetID.h:146
static constexpr ID ITS
Definition DetID.h:63
static constexpr ID MFT
Definition DetID.h:71
static const std::array< std::vector< std::string >, DetID::nDetectors > DETECTORBRANCHNAMES
Definition SimTraits.h:39
void snapshot(const Output &spec, T const &object)
o2::header::DataHeader::SubSpecificationType SubSpecificationType
decltype(auto) make(const Output &spec, Args... args)
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.
static GeometryTGeo * Instance()
int getROFrameBiasInBC(int layer=-1) const
Definition DigiParams.h:73
void setContinuous(bool v)
Definition DigiParams.h:53
void setDeadChannelsMap(const o2::itsmft::NoiseMap *mp)
Definition Digitizer.h:64
void fillOutputContainer(uint32_t maxFrame=0xffffffff, int layer=-1)
void setGeometry(const o2::itsmft::GeometryTGeo *gm)
Definition Digitizer.h:88
void setMCLabels(o2::dataformats::MCTruthContainer< o2::MCCompLabel > *mclb)
Definition Digitizer.h:59
void setAlpideResponse(const o2::itsmft::AlpideSimResponse *resp, int i)
Definition Digitizer.h:67
void setNoiseMap(const o2::itsmft::NoiseMap *mp)
Definition Digitizer.h:63
void setROFRecords(std::vector< o2::itsmft::ROFRecord > *rec)
Definition Digitizer.h:60
void setDigits(std::vector< o2::itsmft::Digit > *dig)
Definition Digitizer.h:58
o2::itsmft::DigiParams & getParams()
Definition Digitizer.h:61
void setEventTime(const o2::InteractionTimeRecord &irt, int layer=-1)
void process(const std::vector< Hit > *hits, int evID, int srcID, int layer=-1)
Steer conversion of hits to digits.
ITSDPLDigitizerTask(bool mctruth=true, bool doStag=false)
std::vector< o2::itsmft::Hit > * mHitsP
std::vector< std::vector< o2::itsmft::ROFRecord > > mROFRecords
std::vector< o2::dataformats::MCTruthContainer< o2::MCCompLabel > > mLabels
void updateTimeDependentParams(ProcessingContext &pc)
o2::parameters::GRPObject::ROMode mROMode
static constexpr o2::detectors::DetID ID
void finaliseCCDB(ConcreteDataMatcher &matcher, void *obj)
void initDigitizerTask(framework::InitContext &ic) override
std::vector< o2::itsmft::Hit > mHits
std::vector< std::vector< o2::itsmft::ROFRecord > > mROFRecordsAccum
static constexpr o2::header::DataOrigin Origin
std::vector< o2::dataformats::MCTruthContainer< o2::MCCompLabel > > mLabelsAccum
std::vector< std::vector< o2::itsmft::Digit > > mDigits
ITSMFTDPLDigitizerTask(bool mctruth=true, bool doStag=false)
void run(framework::ProcessingContext &pc)
MFTDPLDigitizerTask(bool mctruth=true, bool doStag=false)
NoiseMap class for the ITS and MFT.
Definition NoiseMap.h:39
void decodeMap(NoiseMap &noisemap) const
static GeometryTGeo * Instance()
bool initSimChains(o2::detectors::DetID detid, std::vector< TChain * > &simchains) const
GLsizeiptr size
Definition glcorearb.h:659
GLuint GLuint end
Definition glcorearb.h:469
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
constexpr o2::header::DataOrigin gDataOriginMFT
Definition DataHeader.h:572
constexpr o2::header::DataOrigin gDataOriginITS
Definition DataHeader.h:570
constexpr int LHCMaxBunches
constexpr double LHCBunchSpacingNS
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
DataProcessorSpec getMFTDigitizerSpec(int channel, bool mctruth, bool doStag)
DataProcessorSpec getITSDigitizerSpec(int channel, bool mctruth, bool doStag)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string asString() const
class listing possible services
static constexpr int getNLayers()
int getROFDelayInBC(int layer) const noexcept
static constexpr int L2G
Definition Cartesian.h:54
int getNOrbitsPerTF() const
get IR corresponding to start of the HBF
Definition HBFUtils.h:49
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
o2::InteractionRecord ir(0, 0)