Project
Loading...
Searching...
No Matches
DigitizerTRU.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
15#include "EMCALCalib/FeeDCS.h"
17#include "EMCALBase/Hit.h"
18#include "MathUtils/Cartesian.h"
21#include <climits>
22#include <forward_list>
23#include <chrono>
24#include <TRandom.h>
25#include <TF1.h>
26#include <fairlogger/Logger.h> // for LOG
29
34#include "Framework/Lifetime.h"
35
37
39using o2::emcal::Hit;
40
41using namespace o2::emcal;
42
43//_______________________________________________________________________
45{
46 setPatches();
47 auto mSimParam = &(o2::emcal::SimParam::Instance());
48 // mRandomGenerator = new TRandom3(std::chrono::high_resolution_clock::now().time_since_epoch().count());
49
50 float tau = mSimParam->getTimeResponseTauTRU();
51 float N = mSimParam->getTimeResponsePowerTRU();
52
53 mSmearEnergy = mSimParam->doSmearEnergy();
54 mSimulateTimeResponse = mSimParam->doSimulateTimeResponse();
55
56 mDigits.init();
57 mDigits.reserve(15);
58
59 LZERO.setGeometry(mGeometry);
60 LZERO.init();
61
62 // Parameters from data (@Martin Poghosyan)
63 // tau = 61.45 / 25.; // 61.45 ns, according to the fact that the
64 // N = 2.;
65
66 if (mSimulateTimeResponse) {
67 // for each phase create a template distribution
68 TF1 RawResponse("RawResponse", rawResponseFunction, 0, 256, 5);
69 RawResponse.SetParameters(1., 0., tau, N, 0.);
70 RawResponse.SetParameter(1, 425. / o2::emcal::constants::EMCAL_TIMESAMPLE);
71
72 // parameter 1: Handling phase + delay
73 // phase: 25 ns * phase index (-4)
74 // delay: Average signal delay
75 RawResponse.SetParameter(1, mSimParam->getSignalDelay() / constants::EMCAL_TIMESAMPLE);
76 for (int sample = 0; sample < constants::EMCAL_MAXTIMEBINS; sample++) {
77 mAmplitudeInTimeBins[sample] = RawResponse.Eval(sample);
78 LOG(info) << "DIG TRU init in DigitizerTRU: amplitudes[" << sample << "] = " << mAmplitudeInTimeBins[sample];
79 }
80
81 // Rescale the TRU time response function
82 // so that the sum of the samples at [5], [6], [7] and [8]
83 // is equal to 1
84 auto maxElement = std::max_element(mAmplitudeInTimeBins.begin(), mAmplitudeInTimeBins.end());
85 double rescalingFactor = *(maxElement - 1) + *maxElement + *(maxElement + 1) + *(maxElement + 2);
86 double normalisationTRU = mSimParam->getTimeResponseNormalisationTRU();
87 rescalingFactor /= normalisationTRU;
88 // rescalingFactor /= (5. / 3.93); // the slope seen in the single fastOr correlation
89 // rescalingFactor /= (45. / 39.25); // the slope seen in the single fastOr correlation
90 for (int sample = 0; sample < constants::EMCAL_MAXTIMEBINS; sample++) {
91 mAmplitudeInTimeBins[sample] /= rescalingFactor;
92 LOG(info) << "DIG TRU init in DigitizerTRU after RESCALING: amplitudes[" << sample << "] = " << mAmplitudeInTimeBins[sample];
93 }
94 } else {
95 }
96
97 if (mEnableDebugStreaming) {
98 mDebugStream = std::make_unique<o2::utils::TreeStreamRedirector>("emcaldigitsDebugTRU.root", "RECREATE");
99 // mDebugStreamPatch = std::make_unique<o2::utils::TreeStreamRedirector>("emcaldigitsDebugPatchTRU.root", "RECREATE");
100 }
101}
102//_______________________________________________________________________
103double DigitizerTRU::rawResponseFunction(double* x, double* par)
104{
105 double signal = 0.;
106 double tau = par[2];
107 double n = par[3];
108 double ped = par[4];
109 double xx = (x[0] - par[1] + tau) / tau;
110
111 // par[0] amp, par[1] peak time
112
113 if (xx <= 0) {
114 signal = ped;
115 } else {
116 signal = ped + par[0] * std::pow(xx, n) * std::exp(n * (1 - xx));
117 }
118
119 return signal;
120}
121//_______________________________________________________________________
123{
124 mDigits.clear();
125}
126//_______________________________________________________________________
127void DigitizerTRU::process(const gsl::span<const Digit> summableDigits)
128{
129
130 auto processedSDigits = makeAnaloguesFastorSums(summableDigits);
131
132 for (auto vectorelement : processedSDigits) {
133
134 int& fastorID = std::get<0>(vectorelement);
135 auto& digit = std::get<1>(vectorelement);
136
137 int tower = digit.getTower();
138
139 sampleSDigit(digit);
140
141 if (mTempDigitVector.size() == 0) {
142 continue;
143 }
144
145 mDigits.addDigits(fastorID, mTempDigitVector);
146 }
147}
148//_______________________________________________________________________
149std::vector<std::tuple<int, Digit>> DigitizerTRU::makeAnaloguesFastorSums(const gsl::span<const Digit> sdigits)
150{
151 TriggerMappingV2 mTriggerMap(mGeometry);
152 std::unordered_map<int, Digit> sdigitsFastOR;
153 std::vector<int> fastorIndicesFound;
154 for (const auto& dig : sdigits) {
155 o2::emcal::TriggerMappingV2::IndexCell towerid = dig.getTower();
156 int fastorIndex = mTriggerMap.getAbsFastORIndexFromCellIndex(towerid);
157 auto whichTRU = std::get<0>(mTriggerMap.getTRUFromAbsFastORIndex(fastorIndex));
158 auto whichFastOrTRU = std::get<1>(mTriggerMap.getTRUFromAbsFastORIndex(fastorIndex));
159 auto found = sdigitsFastOR.find(fastorIndex);
160 if (found != sdigitsFastOR.end()) {
161 // sum energy
162 Digit digitToSum((found->second).getTower(), dig.getAmplitude(), (found->second).getTimeStamp());
163 (found->second) += digitToSum;
164 } else {
165 // create new digit
166 fastorIndicesFound.emplace_back(fastorIndex);
167 sdigitsFastOR.emplace(fastorIndex, dig);
168 }
169 }
170 // sort digits for output
171 std::sort(fastorIndicesFound.begin(), fastorIndicesFound.end(), std::less<>());
172
173 for (auto& elem : sdigitsFastOR) {
174 auto dig = elem.second;
175 int fastorIndex = elem.first;
176 auto whichTRU = std::get<0>(mTriggerMap.getTRUFromAbsFastORIndex(fastorIndex));
177 auto whichFastOrTRU = std::get<1>(mTriggerMap.getTRUFromAbsFastORIndex(fastorIndex));
178 }
179
180 // Setting them to be TRU digits
181 for (auto& elem : sdigitsFastOR) {
182 (elem.second).setTRU();
183 }
184
185 for (auto& elem : sdigitsFastOR) {
186 auto dig = elem.second;
187 int fastorIndex = elem.first;
188 auto whichTRU = std::get<0>(mTriggerMap.getTRUFromAbsFastORIndex(fastorIndex));
189 auto whichFastOrTRU = std::get<1>(mTriggerMap.getTRUFromAbsFastORIndex(fastorIndex));
190 }
191
192 std::vector<std::tuple<int, Digit>> outputFastorSDigits;
193 std::for_each(fastorIndicesFound.begin(), fastorIndicesFound.end(), [&outputFastorSDigits, &sdigitsFastOR](int fastorIndex) { outputFastorSDigits.emplace_back(fastorIndex, sdigitsFastOR[fastorIndex]); });
194 return outputFastorSDigits;
195}
196
197//_______________________________________________________________________
199{
200 mTempDigitVector.clear();
201 Int_t tower = sDigit.getTower();
202 Double_t energy = sDigit.getAmplitude();
203
204 if (mSmearEnergy) {
205 energy = smearEnergy(energy);
206 }
207
208 if (energy < __DBL_EPSILON__) {
209 return;
210 }
211
212 Double_t energies[15];
213 if (mSimulateTimeResponse) {
214 for (int sample = 0; sample < mAmplitudeInTimeBins.size(); sample++) {
215
216 double val = energy * (mAmplitudeInTimeBins[sample]);
217 energies[sample] = val;
218 double digitTime = mEventTimeOffset * constants::EMCAL_TIMESAMPLE;
219 Digit digit(tower, val, digitTime);
220 digit.setTRU();
221 mTempDigitVector.push_back(digit);
222 }
223
224 } else {
225 Digit digit(tower, energy, smearTime(sDigit.getTimeStamp(), energy));
226 digit.setTRU();
227 mTempDigitVector.push_back(digit);
228 }
229
230 if (mEnableDebugStreaming) {
231 double timeStamp = sDigit.getTimeStamp();
232 (*mDebugStream).GetFile()->cd();
233 (*mDebugStream) << "DigitsTimeSamples"
234 << "Tower=" << tower
235 << "Time=" << timeStamp
236 << "DigitEnergy=" << energy
237 << "Sample0=" << energies[0]
238 << "Sample1=" << energies[1]
239 << "Sample2=" << energies[2]
240 << "Sample3=" << energies[3]
241 << "Sample4=" << energies[4]
242 << "Sample5=" << energies[5]
243 << "Sample6=" << energies[6]
244 << "Sample7=" << energies[7]
245 << "Sample8=" << energies[8]
246 << "Sample9=" << energies[9]
247 << "Sample10=" << energies[10]
248 << "Sample11=" << energies[11]
249 << "Sample12=" << energies[12]
250 << "Sample13=" << energies[13]
251 << "Sample14=" << energies[14]
252 << "\n";
253 }
254}
255
256//_______________________________________________________________________
257double DigitizerTRU::smearEnergy(double energy)
258{
259 auto mSimParam = &(o2::emcal::SimParam::Instance());
260 Double_t fluct = (energy * mSimParam->getMeanPhotonElectron()) / mSimParam->getGainFluctuations();
261 TRandom3 mRandomGenerator(std::chrono::high_resolution_clock::now().time_since_epoch().count());
262 energy *= mRandomGenerator.Poisson(fluct) / fluct;
263 return energy;
264}
265//_______________________________________________________________________
266double DigitizerTRU::smearTime(double time, double energy)
267{
268 auto mSimParam = &(o2::emcal::SimParam::Instance());
269 TRandom3 mRandomGenerator(std::chrono::high_resolution_clock::now().time_since_epoch().count());
270 return mRandomGenerator.Gaus(time + mSimParam->getSignalDelay(), mSimParam->getTimeResolution(energy));
271}
272
273//_______________________________________________________________________
275{
276
277 // For the digitisation logic, at this time you would do:
278 // mDigits.forwardMarker(record);
279 // In the case of the trigger simulation, what is needed is to
280 // fill the corresponding LZEROElectronics object and
281 // launch the peak finder.
282 // If a trigger is found the logic is set to be live.
283 mDigits.fillOutputContainer(false, record, patchesFromAllTRUs, LZERO);
284 mEventTimeOffset = 0;
285
286 if (mEnableDebugStreaming) {
287 auto TriggerInputsAll = LZERO.getTriggerInputs();
288 auto TriggerInputsPatchesAll = LZERO.getTriggerInputsPatches();
289
290 std::vector<o2::emcal::EMCALTriggerInputs> TriggerInputs;
291 if (TriggerInputsAll.size() != mPreviousTriggerSize) {
292 mWasTriggerFound = true;
293 mPreviousTriggerSize = TriggerInputsAll.size();
294 } else {
295 mWasTriggerFound = false;
296 }
297 if (TriggerInputsAll.size() > 0 && mWasTriggerFound == true) {
298 TriggerInputs.push_back(TriggerInputsAll.back());
299 }
300 std::vector<o2::emcal::EMCALTriggerInputsPatch> TriggerInputsPatches;
301 if (TriggerInputsPatchesAll.size() > 0 && mWasTriggerFound == true) {
302 TriggerInputsPatches.push_back(TriggerInputsPatchesAll.back());
303 }
304 int nIter = TriggerInputs.size();
305
306 if (nIter != 0) {
307 for (auto& trigger : TriggerInputs) {
308 auto InteractionRecordData = trigger.mInterRecord;
309 auto bc = InteractionRecordData.bc;
310 auto orbit = InteractionRecordData.orbit;
311 for (auto& fastor : trigger.mLastTimesumAllFastOrs) {
312 auto WhichTRU = std::get<0>(fastor);
313 auto WhichFastOr = std::get<1>(fastor);
314 auto FastOrAmp = std::get<2>(fastor);
315 (*mDebugStream).GetFile()->cd();
316 (*mDebugStream) << "L0Timesums"
317 << "bc=" << bc
318 << "orbit=" << orbit
319 << "WhichTRU=" << WhichTRU
320 << "WhichFastOr=" << WhichFastOr
321 << "FastOrAmp=" << FastOrAmp
322 << "\n";
323 }
324 }
325 // for (auto& trigger : TriggerInputsPatches) {
326 // auto lastTimeSum = trigger.mLastTimesumAllPatches.end() - 1;
327 // for (auto& patches : trigger.mLastTimesumAllPatches) {
328 // auto WhichTRU = std::get<0>(patches);
329 // auto WhichPatch = std::get<1>(patches);
330 // auto PatchTimesum = std::get<2>(patches);
331 // auto isFired = std::get<3>(patches);
332 // (*mDebugStreamPatch).GetFile()->cd();
333 // (*mDebugStreamPatch) << "L0TimesumsPatch"
334 // << "WhichTRU=" << WhichTRU
335 // << "WhichPatch=" << WhichPatch
336 // << "PatchTimesum=" << PatchTimesum
337 // << "isFired=" << isFired
338 // << "\n";
339 // }
340 // }
341 }
342 }
343}
344//_______________________________________________________________________
346{
347 // Using Run 2 geometry, found in:
348 // https://www.dropbox.com/s/pussj0olcctroim/PHOS+DCAL_STU.pdf?dl=0
349 // TRUs[0+6n, 1+6n, 2+6n] are on the A-side
350 // TRUs[3+6n, 4+6n, 5+6n] are on the C-side
351
352 patchesFromAllTRUs.clear();
353 // patchesFromAllTRUs.resize();
354 TRUElectronics FullAside(2, 0, 0);
355 TRUElectronics FullCside(2, 1, 0);
356 TRUElectronics ThirdAside(2, 0, 1);
357 TRUElectronics ThirdCside(2, 1, 1);
358 FullAside.init();
359 FullCside.init();
360 ThirdAside.init();
361 ThirdCside.init();
362
363 for (int j = 0; j < 3; j++) {
364 patchesFromAllTRUs.push_back(FullAside); // TRU ID 0,1,2 EMCAL A-side, Full
365 }
366 for (int j = 0; j < 3; j++) {
367 patchesFromAllTRUs.push_back(FullCside); // TRU ID 3,4,5 EMCAL C-side, Full
368 }
369 for (int j = 0; j < 3; j++) {
370 patchesFromAllTRUs.push_back(FullAside); // TRU ID 6,7,8 EMCAL A-side, Full
371 }
372 for (int j = 0; j < 3; j++) {
373 patchesFromAllTRUs.push_back(FullCside); // TRU ID 9,10,11 EMCAL C-side, Full
374 }
375 for (int j = 0; j < 3; j++) {
376 patchesFromAllTRUs.push_back(FullAside); // TRU ID 12,13,14 EMCAL A-side, Full
377 }
378 for (int j = 0; j < 3; j++) {
379 patchesFromAllTRUs.push_back(FullCside); // TRU ID 15,16,17 EMCAL C-side, Full
380 }
381 for (int j = 0; j < 3; j++) {
382 patchesFromAllTRUs.push_back(FullAside); // TRU ID 18,19,20 EMCAL A-side, Full
383 }
384 for (int j = 0; j < 3; j++) {
385 patchesFromAllTRUs.push_back(FullCside); // TRU ID 21,22,23 EMCAL C-side, Full
386 }
387 for (int j = 0; j < 3; j++) {
388 patchesFromAllTRUs.push_back(FullAside); // TRU ID 24,25,26 EMCAL A-side, Full
389 }
390 for (int j = 0; j < 3; j++) {
391 patchesFromAllTRUs.push_back(FullCside); // TRU ID 27,28,29 EMCAL C-side, Full
392 }
393 patchesFromAllTRUs.push_back(ThirdAside); // TRU ID 30 EMCAL A-side, Third
394 patchesFromAllTRUs.push_back(ThirdCside); // TRU ID 31 EMCAL C-side, Third
395 for (int j = 0; j < 3; j++) {
396 patchesFromAllTRUs.push_back(FullAside); // TRU ID 32,33,34 DCAL A-side, Full
397 }
398 for (int j = 0; j < 3; j++) {
399 patchesFromAllTRUs.push_back(FullCside); // TRU ID 35,36,37 DCAL C-side, Full
400 }
401 for (int j = 0; j < 3; j++) {
402 patchesFromAllTRUs.push_back(FullAside); // TRU ID 38,39,40 DCAL A-side, Full
403 }
404 for (int j = 0; j < 3; j++) {
405 patchesFromAllTRUs.push_back(FullCside); // TRU ID 41,42,43 DCAL C-side, Full
406 }
407 for (int j = 0; j < 3; j++) {
408 patchesFromAllTRUs.push_back(FullAside); // TRU ID 44,45,46 DCAL A-side, Full
409 }
410 for (int j = 0; j < 3; j++) {
411 patchesFromAllTRUs.push_back(FullCside); // TRU ID 47,48,49 DCAL C-side, Full
412 }
413 patchesFromAllTRUs.push_back(ThirdAside); // TRU ID 50 DCAL A-side, Third
414 patchesFromAllTRUs.push_back(ThirdCside); // TRU ID 51 DCAL C-side, Third
415
416 while (patchesFromAllTRUs[30].mPatchIDSeedFastOrIDs.size() > 69) {
417 patchesFromAllTRUs[30].mPatchIDSeedFastOrIDs.pop_back();
418 patchesFromAllTRUs[30].mIndexMapPatch.pop_back();
419 }
420 while (patchesFromAllTRUs[31].mPatchIDSeedFastOrIDs.size() > 69) {
421 patchesFromAllTRUs[31].mPatchIDSeedFastOrIDs.pop_back();
422 patchesFromAllTRUs[31].mIndexMapPatch.pop_back();
423 }
424 while (patchesFromAllTRUs[50].mPatchIDSeedFastOrIDs.size() > 69) {
425 patchesFromAllTRUs[50].mPatchIDSeedFastOrIDs.pop_back();
426 patchesFromAllTRUs[50].mIndexMapPatch.pop_back();
427 }
428 while (patchesFromAllTRUs[51].mPatchIDSeedFastOrIDs.size() > 69) {
429 patchesFromAllTRUs[51].mPatchIDSeedFastOrIDs.pop_back();
430 patchesFromAllTRUs[51].mIndexMapPatch.pop_back();
431 }
432}
433//______________________________________________________________________
435{
436 mDigits.finish();
437 if (isDebugMode() == true) {
439 }
440}
441//______________________________________________________________________
442int DigitizerTRU::GetTRUIndexFromSTUIndex(Int_t id, Int_t detector)
443{
444 Int_t kEMCAL = 0;
445 Int_t kDCAL = 1;
446
447 if ((id > 31 && detector == kEMCAL) || (id > 13 && detector == kDCAL) || id < 0) {
448 return -1; // Error Condition
449 }
450
451 if (detector == kEMCAL) {
452 return id;
453 } else if (detector == kDCAL) {
454 return 32 + ((int)(id / 4) * 6) + ((id % 4 < 2) ? (id % 4) : (id % 4 + 2));
455 }
456 return -1;
457}
458//______________________________________________________________________
459int DigitizerTRU::GetChannelForMaskRun2(int mask, int bitnumber, bool onethirdsm)
460{
461 if (onethirdsm) {
462 return mask * 16 + bitnumber;
463 }
464 const int kChannelMap[6][16] = {{8, 9, 10, 11, 20, 21, 22, 23, 32, 33, 34, 35, 44, 45, 46, 47}, // Channels in mask0
465 {56, 57, 58, 59, 68, 69, 70, 71, 80, 81, 82, 83, 92, 93, 94, 95}, // Channels in mask1
466 {4, 5, 6, 7, 16, 17, 18, 19, 28, 29, 30, 31, 40, 41, 42, 43}, // Channels in mask2
467 {52, 53, 54, 55, 64, 65, 66, 67, 76, 77, 78, 79, 88, 89, 90, 91}, // Channels in mask3
468 {0, 1, 2, 3, 12, 13, 14, 15, 24, 25, 26, 27, 36, 37, 38, 39}, // Channels in mask4
469 {48, 49, 50, 51, 60, 61, 62, 63, 72, 73, 74, 75, 84, 85, 86, 87}}; // Channels in mask5
470 return kChannelMap[mask][bitnumber];
471}
472//______________________________________________________________________
474{
475 TriggerMappingV2 mTriggerMap(mGeometry);
476 std::vector<int> maskedfastors;
477 int itru = 0;
478 for (Int_t i = 0; i < 46; i++) {
479 int localtru = itru % 32, detector = itru >= 32 ? 1 : 0,
480 globaltru = GetTRUIndexFromSTUIndex(localtru, detector);
481 bool onethirdsm = ((globaltru >= 30 && globaltru < 32) || (globaltru >= 50 && globaltru < 52));
482 for (int ipos = 0; ipos < 6; ipos++) {
483 auto regmask = mFeeDCS->getTRUDCS(i).getMaskReg(ipos);
484 std::bitset<16> bitsregmask(regmask);
485 for (int ibit = 0; ibit < 16; ibit++) {
486 if (bitsregmask.test(ibit)) {
487 auto channel = GetChannelForMaskRun2(ipos, ibit, onethirdsm);
488 int absfastor = mTriggerMap.getAbsFastORIndexFromIndexInTRU(globaltru, channel);
489 maskedfastors.push_back(absfastor);
490 }
491 }
492 }
493 itru++;
494 }
495 return maskedfastors;
496}
497//______________________________________________________________________
499{
500 auto maskedFastOrs = GetAbsFastORIndexFromMask();
501 LOG(info) << "======================================";
502 LOG(info) << "== PRINT MASK COMPUTED IN DIGITIZER ==";
503 int counter = 0;
504 for (auto fastOr : maskedFastOrs) {
505 LOG(info) << "fastOr masked (number, ID) = (" << counter << ", " << fastOr;
506 counter += 1;
507 }
508 LZERO.setMaskedFastOrs(maskedFastOrs);
509}
510//______________________________________________________________________
ClassImp(o2::emcal::DigitizerTRU)
uint64_t orbit
Definition RawEventData.h:6
uint64_t bc
Definition RawEventData.h:5
int16_t time
Definition RawEventData.h:4
int32_t i
uint32_t j
Definition RawData.h:0
EMCAL digit implementation.
Definition Digit.h:34
void setTRU()
Definition Digit.h:80
Short_t getTower() const
Definition Digit.h:59
Double_t getAmplitude() const
Definition Digit.cxx:101
EMCAL DigitizerTRU, digitizes with the help of a temporary description based upon a pol9*Heavyside.
int GetChannelForMaskRun2(int mask, int bitnumber, bool onethirdsm)
std::vector< int > GetAbsFastORIndexFromMask()
double smearEnergy(double energy)
void setEventTime(o2::InteractionTimeRecord record)
int GetTRUIndexFromSTUIndex(Int_t id, Int_t detector)
Utility functions obtained from QC for EMC.
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 sampleSDigit(const Digit &sdigit)
std::vector< std::tuple< int, Digit > > makeAnaloguesFastorSums(const gsl::span< const Digit > sdigits)
static double rawResponseFunction(double *x, double *par)
raw pointers used here to allow interface with TF1
double smearTime(double time, double energy)
void endDebugStream()
Close the TreeStreamer to make the file readable.
void setPatches()
Sets patches for the current geometry.
bool isDebugMode()
Getter for debug mode.
void process(const gsl::span< const Digit > summableDigits)
Steer conversion of hits to digits.
void addDigits(unsigned int towerID, std::vector< o2::emcal::Digit > &digList)
void finish()
This is for the readout window that was interrupted by the end of the run.
void fillOutputContainer(bool isEndOfTimeFrame, InteractionRecord &nextInteractionRecord, std::vector< TRUElectronics > &patchesFromAllTRUs, LZEROElectronics &LZERO)
o2::emcal::TriggerTRUDCS getTRUDCS(Int_t iTRU) const
Definition FeeDCS.h:50
EMCAL simulation hit information.
Definition Hit.h:28
void setMaskedFastOrs(std::vector< int > const &maskedfastors)
Sets the masked fastOrs from the CCDB in the LZERO.
void setGeometry(o2::emcal::Geometry *gm)
Sets geometry for trigger mapping.
void init()
Initialize the L0 electronics.
const std::vector< EMCALTriggerInputsPatch > & getTriggerInputsPatches() const
Getter for the trigger inputs per patches found by the LZERO algorithm.
const std::vector< EMCALTriggerInputs > & getTriggerInputs() const
Getter for the trigger inputs found by the LZERO algorithm.
Trigger mapping starting from Run2.
IndexFastOR getAbsFastORIndexFromIndexInTRU(IndexTRU truIndex, IndexFastOR fastorIndexTRU) const
Get the absolute index of the FastOr from the index in the TRU.
IndexFastOR getAbsFastORIndexFromCellIndex(IndexCell cellIndex) const
Get the absolute FastOR index of the module containing a given cell.
std::tuple< IndexTRU, IndexFastOR > getTRUFromAbsFastORIndex(IndexFastOR fastOrAbsID) const
Get the TRU index and FastOR index in TRU from the absolute FastOR ID.
uint32_t getMaskReg(int pos) const
GLdouble n
Definition glcorearb.h:1982
GLint GLenum GLint x
Definition glcorearb.h:403
GLint GLsizei count
Definition glcorearb.h:399
GLuint GLfloat * val
Definition glcorearb.h:1582
GLint GLuint mask
Definition glcorearb.h:291
GLuint id
Definition glcorearb.h:650
GLuint counter
Definition glcorearb.h:3987
TRUElectronics creator, based on the TRUElectronics.
void init()
Initialise internal members.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"