Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
LArTTL1Maker.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // +======================================================================+
6 // + +
7 // + Author ........: F. Ledroit +
8 // + Institut ......: ISN Grenoble +
9 // + Creation date .: 09/01/2003 +
10 // + +
11 // +======================================================================+
12 //
13 //
14 #include "LArL1Sim/LArTTL1Maker.h"
15 // .......... utilities
16 //
18 //
19 #include "CLHEP/Random/RandGaussZiggurat.h"
20 #include "CLHEP/Random/RandomEngine.h"
21 //
22 #include "LArRawEvent/LArTTL1.h"
23 //
26 //
31 #include "CaloIdentifier/LArID.h"
33 //
34 // ........ Gaudi needed includes
35 //
36 #include "GaudiKernel/IChronoStatSvc.h"
37 #include "GaudiKernel/IIncidentSvc.h"
39 
40 // trigger time
42 
43 //
44 #include <cmath>
45 #include <fstream>
46 
47 using CLHEP::RandGaussZiggurat;
48 
49 namespace {
50 constexpr double crossingTime = 25 /* nanosecond */;
51 constexpr double crossingRate = 1. / crossingTime;
52 } // namespace
53 
54 LArTTL1Maker::LArTTL1Maker(const std::string& name, ISvcLocator* pSvcLocator)
55  : AthAlgorithm(name, pSvcLocator),
56  m_ttSvc("CaloTriggerTowerService"),
57  m_fSamplKey("LArfSamplSym"),
58  m_EmTTL1ContainerName{"LArTTL1EM"},
59  m_HadTTL1ContainerName{"LArTTL1HAD"},
60  m_xxxHitContainerName{SG::ReadHandleKey<LArHitContainer>("LArHitEMB"),
64 
65 // + -------------------------------------------------------------------- +
66 // + Author ........: F. Ledroit +
67 // + Creation date .: 09/01/2003 +
68 // + Subject: TTL1 Maker constructor +
69 // + -------------------------------------------------------------------- +
70 {
71  //
72  // ........ default values of private data
73  //
74  m_chronSvc = nullptr;
75  m_useTriggerTime = false;
76  // m_triggerTimeToolName = "CosmicTriggerTimeTool";
77  // p_triggerTimeTool = 0;
78 
79  m_BeginRunPriority = 100;
80 
81  m_lvl1Helper = nullptr;
82  m_emHelper = nullptr;
83  m_hecHelper = nullptr;
84  m_fcalHelper = nullptr;
85 
86  m_NoiseOnOff = true;
87  m_PileUp = false;
88  m_noEmCalibMode = false;
89  m_noHadCalibMode = false;
90  m_chronoTest = false;
91  m_debugThresh = 5000.;
92 
93  m_calibCoeffEmb.resize(s_NBETABINS);
94  m_calibCoeffEmec.resize(s_NBETABINS);
95  m_calibCoeffHec.resize(s_NBETABINS);
96  for (int ieta = 0; ieta < s_NBETABINS; ieta++) {
97  m_calibCoeffEmb[ieta] = 1.;
98  m_calibCoeffEmec[ieta] = 1.;
99  m_calibCoeffHec[ieta] = 1.;
100  }
101  const int nEta = 4;
102  m_calibCoeffFcalEm.resize(nEta);
103  m_calibCoeffFcalHad.resize(nEta);
104  for (int ieta = 0; ieta < nEta; ieta++) {
105  m_calibCoeffFcalEm[ieta] = .03;
106  m_calibCoeffFcalHad[ieta] = .03;
107  }
108 
109  //
110  // ........ declare the private data as properties
111  //
112 
113  declareProperty("EmBarrelHitContainerName", m_xxxHitContainerName[0]);
114  declareProperty("EmEndCapHitContainerName", m_xxxHitContainerName[1]);
115  declareProperty("HecHitContainerName", m_xxxHitContainerName[2]);
116  declareProperty("ForWardHitContainerName", m_xxxHitContainerName[3]);
117 
118  declareProperty("EmTTL1ContainerName", m_EmTTL1ContainerName);
119  declareProperty("HadTTL1ContainerName", m_HadTTL1ContainerName);
120 
121  declareProperty("NoiseOnOff", m_NoiseOnOff);
122 
123  declareProperty("PileUp", m_PileUp);
124  declareProperty("UseTriggerTime", m_useTriggerTime);
125  declareProperty("TriggerTimeToolName", m_triggerTimeTool);
126 
127  declareProperty("EmBarrelCalibrationCoeffs", m_calibCoeffEmb);
128  declareProperty("EmEndCapCalibrationCoeffs", m_calibCoeffEmec);
129  declareProperty("HECCalibrationCoeffs", m_calibCoeffHec);
130  declareProperty("EmFcalCalibrationCoeffs", m_calibCoeffFcalEm);
131  declareProperty("HadFcalCalibrationCoeffs", m_calibCoeffFcalHad);
132 
133  declareProperty("NoEmCalibrationMode", m_noEmCalibMode);
134  declareProperty("NoHadCalibrationMode", m_noHadCalibMode);
135  declareProperty("ChronoTest", m_chronoTest);
136  declareProperty("DebugThreshold", m_debugThresh);
137 
138  declareProperty("TruthHitsContainer", m_truthHitsContainer = "",
139  "Specify a value to get a pair of LArTTL1 containers with "
140  "the truth hits in them");
141  declareProperty("LArfSamplKey", m_fSamplKey);
142 
143  //
144  return;
145 }
146 
148 
150  // +======================================================================+
151  // + +
152  // + Author ........: F. Ledroit +
153  // + Creation date .: 09/01/2003 +
154  // + +
155  // +======================================================================+
156  //
157  // ......... declaration
158  //
159  m_chronSvc = chronoSvc();
160 
161  ATH_MSG_INFO("***********************************************");
162  ATH_MSG_INFO("* Steering options for LArTTL1Maker algorithm *");
163  ATH_MSG_INFO("***********************************************");
164  //
165  // ......... print the noise flag
166  //
167  if (m_NoiseOnOff) {
168  ATH_MSG_INFO(
169  "Electronic noise will be added in each TT for selected "
170  "sub-detectors.");
171  } else {
172  ATH_MSG_INFO("No electronic noise added.");
173  }
174 
175  //
176  // ......... print the pile-up flag
177  //
178  if (m_PileUp) {
179  ATH_MSG_INFO("processing pile-up events");
180  } else {
181  ATH_MSG_INFO("no pile up");
182  }
183 
184  //
185  // ......... print the trigger time flag
186  //
187  if (m_useTriggerTime) {
188  ATH_MSG_INFO("use Trigger Time service " << m_triggerTimeTool);
189  } else {
190  ATH_MSG_INFO("no Trigger Time used");
191  }
192 
193  //
194  // ......... print the calibration flags
195  //
196  // currently the calib modes are not used anymore -> turning INFO logs into
197  // DEBUG
198  if (m_noEmCalibMode) {
200  "NO calibration mode chosen for EM towers "
201  << " == technical option. Should not be used for physics !!! ");
202  } else {
203  ATH_MSG_DEBUG("standard calibration chosen for EM towers");
204  }
205 
206  if (m_noHadCalibMode) {
208  "NO calibration mode chosen for HEC towers "
209  << " == technical option. Should not be used for physics !!! ");
210  } else {
211  ATH_MSG_DEBUG("standard calibration mode chosen for HEC towers ");
212  }
213 
214  //
215  // .........retrieve tool computing trigger time if requested
216  //
217  if (m_useTriggerTime && m_PileUp) {
218  ATH_MSG_INFO(
219  " In case of pileup, the trigger time subtraction is done in "
220  "PileUpSvc ");
221  ATH_MSG_INFO(" => LArTTL1Maker will not apply Trigger Time ");
222  m_useTriggerTime = false;
223  }
224 
225  if (m_useTriggerTime) {
226  ATH_CHECK(m_triggerTimeTool.retrieve());
227  } else {
228  m_triggerTimeTool.disable();
229  }
230 
231  //
232  // ..... need LAr and CaloIdManager to retrieve all needed helpers
233  //
234  const CaloIdManager* caloMgr = nullptr;
235  ATH_CHECK(detStore()->retrieve(caloMgr));
236  ATH_CHECK(detStore()->retrieve(m_OflHelper, "CaloCell_ID"));
237  //
238  //..... need of course the LVL1 helper
239  //
240  m_lvl1Helper = caloMgr->getLVL1_ID();
241  if (!m_lvl1Helper) {
242  ATH_MSG_ERROR("Could not access CaloLVL1_ID helper");
243  return StatusCode::FAILURE;
244  } else {
245  ATH_MSG_DEBUG("Successfully accessed CaloLVL1_ID helper");
246  }
247 
248  //..... also need the LArEM helper (e.g. to deal with the barrel end part)
250  ATH_MSG_DEBUG("Successfully retrieved LArEM helper from DetectorStore");
251 
252  //..... also need the LArHEC helper to avoid adding up energy from 4th
253  // compartment
255  ATH_MSG_DEBUG("Successfully retrieved LArHEC helper from DetectorStore");
256 
257  //..... also need the LArFCAL helper to use hash ids to store all gains
259  ATH_MSG_DEBUG("Successfully retrieved LArFCAL helper from DetectorStore");
260 
261  ATH_CHECK(m_ttSvc.retrieve());
262 
263  // Incident Service:
264  SmartIF<IIncidentSvc> incSvc{service("IncidentSvc")};
265  ATH_CHECK(incSvc.isValid());
266  // start listening to "BeginRun"
267  incSvc->addListener(this, "BeginRun", m_BeginRunPriority);
268 
269  ATH_CHECK(m_RandomSvc.retrieve());
270 
272 
273  // Initialize read-handle keys
274  for (auto& dhk : m_xxxHitContainerName) {
275  ATH_CHECK(dhk.initialize(!m_PileUp));
276  }
277 
280 
282 
283  ATH_MSG_DEBUG("Initialization completed successfully");
284  return StatusCode::SUCCESS;
285 }
286 
287 void LArTTL1Maker::handle(const Incident& /* inc*/) {
288  ATH_MSG_DEBUG("LArTTL1Maker handle()");
289 
290  // ...... Read auxiliary data files
291  //
292  if (this->readAuxiliary() == StatusCode::FAILURE) {
293  ATH_MSG_ERROR(" Error from readAuxiliary() ");
294  }
295 
296  return;
297 }
298 
300  // +======================================================================+
301  // + +
302  // + Author: F. Ledroit +
303  // + Creation date: 2003/01/13 +
304  // + Subject: Make the TTL1s and put them into the container +
305  // + +
306  // +======================================================================+
307 
308  ATH_MSG_DEBUG("Begining of execution");
309 
310  // Prepare RNG Service
311  ATHRNG::RNGWrapper* rngWrapper =
312  m_RandomSvc->getEngine(this, m_randomStreamName);
316  rngWrapper->setSeedLegacy(m_randomStreamName, Gaudi::Hive::currentContext(),
317  m_randomSeedOffset, seedingmode);
318  CLHEP::HepRandomEngine* rndmEngine = *rngWrapper;
319 
320  //
321  // ....... fill the LArHitEMap
322  //
323  if (m_chronoTest) {
324  m_chronSvc->chronoStart("fill LArHitEMap ");
325  }
326 
328  const ILArfSampl* fSampl = *fSamplhdl;
329 
331 
332  if (m_chronoTest) {
333  m_chronSvc->chronoStop("fill LArHitEMap ");
334  m_chronSvc->chronoPrint("fill LArHitEMap ");
335  }
336 
337  //
338  // .....get the trigger time if requested
339  //
340  double trigtime = 0;
341  if (m_useTriggerTime) {
342  trigtime = m_triggerTimeTool->time();
343  }
344  ATH_MSG_DEBUG("Trigger time used : " << trigtime);
345 
346  //
347  // ....... create the LAr TTL1 Containers
348  //
349 
351  ATH_CHECK(ttL1ContainerEm.record(std::make_unique<LArTTL1Container>()));
352 
354  ATH_CHECK(ttL1ContainerHad.record(std::make_unique<LArTTL1Container>()));
355 
356  std::unique_ptr<LArTTL1Container> truth_ttL1ContainerEm;
357  std::unique_ptr<LArTTL1Container> truth_ttL1ContainerHad;
358  if (!m_truthHitsContainer.empty()) {
359  truth_ttL1ContainerEm = std::make_unique<LArTTL1Container>();
360  truth_ttL1ContainerHad = std::make_unique<LArTTL1Container>();
361  }
362 
363  // ... initialise vectors for sums of energy in each TT
364  //
365  unsigned int nbTT = (unsigned int)m_lvl1Helper->tower_hash_max();
366  ATH_MSG_DEBUG("Max number of LAr Trigger Towers= " << nbTT);
367  std::vector<std::vector<float> >
368  sumEnergy; // inner index = time slot (from 0 to visEvecSize-1)
369  std::vector<std::vector<float> >
370  sumEnergy2; // to allow barrel/endcap separation in 15th TT + FCAL2/3
371  sumEnergy.resize(nbTT);
372  sumEnergy2.resize(nbTT);
373  std::vector<float> ttSumE;
374  int ttSumEvecSize = 0;
375  int refTime = 0;
376  if (!m_PileUp) {
377  ttSumEvecSize = 2 * crossingTime - 1;
378  refTime = crossingTime - 1;
379  } else {
380  ttSumEvecSize = s_MAXSAMPLES + s_NBSAMPLES - 1;
381  refTime = s_MAXSAMPLES - 1;
382  }
383  ATH_MSG_DEBUG("Number of time slots considered= "
384  << ttSumEvecSize << " reference time= " << refTime);
385  ttSumE.resize(ttSumEvecSize);
386  for (unsigned int iTT = 0; iTT < nbTT; iTT++) {
387  sumEnergy[iTT] = ttSumE;
388  sumEnergy2[iTT] = ttSumE;
389  }
390 
391  m_chronSvc->chronoStart("LArTTL1Mk hit loop ");
392 
393  int it = 0;
394  int it_end = hitmap->GetNbCells();
395  ATH_MSG_DEBUG("Size of the hit map= " << it_end);
396 
397  //
398  // .... loop on hit lists in the map
399  // .... and fill sumEnergy vector according to hit membership to TT
400  // .... (one sum per time slot for each TT)
401  //
402  float outOfTimeE = 0.;
403  int nOutOfTime = 0;
404  float inTimeE = 0.;
405  int nInTime = 0;
406  float printEthresh = 20.;
407  int nMissingGain = 0;
408  for (; it != it_end; ++it) {
409  const LArHitList& hitlist = hitmap->GetCell(it);
410  const std::vector<std::pair<float, float> >& timeE = hitlist.getData();
411  if (!timeE.empty()) {
413  int specialCase = 0;
414  bool skipCell = false;
415  //
416  // ... skip cells not summed up in LVL1 (end of barrel PS and 4th
417  // compartment of HEC)
418  //
419  if (!m_ttSvc->is_in_lvl1(cellId))
420  skipCell = true;
421 
422  if (!skipCell) {
423  //
424  // ...determine to which TT this channel belongs
425  //
426  Identifier ttId = m_ttSvc->whichTTID(cellId);
427 
428  if (m_chronoTest) {
429  m_chronSvc->chronoStart("retrieve RG ");
430  }
431 
432  //
433  // ....... determine the sampling fraction
434  //........ and the relative (layer) gains for this cellId
435  //
436  const float cellSampFraction = fSampl->FSAMPL(cellId);
437  const float inv_cellSampFraction = 1. / cellSampFraction;
438  // std::cout << "cellid, SF= " <<
439  // m_lvl1Helper->show_to_string(cellId) << " " << cellSampFraction <<
440  // std::endl;
441  float relGain = 0.;
442  float sinTheta = 0.;
443 
444  int region = m_lvl1Helper->region(ttId);
445  int eta = m_lvl1Helper->eta(ttId);
446  int Ieta = decodeInverse(region, eta);
447 
448  // case EM cell
449  if (m_lvl1Helper->is_lar_em(cellId)) {
450  bool barrelEnd = m_lvl1Helper->is_barrel_end(ttId);
451  std::vector<float> vecRG;
452  if (m_emHelper->is_em_barrel(cellId)) {
453  // Barrel
454  sinTheta = m_sinThetaEmb[Ieta - 1]; // Ieta starts at 1
455  } else {
456  // End-Cap
457  if (!barrelEnd) {
458  sinTheta = m_sinThetaEmec[Ieta - 1];
459  } else {
460  // patching the fact that TT offline ID is ambiguous
461  // decodeInverse(eta,region) returns 15 (ok barrel) instead of 1
462  // (ec value).
463  sinTheta = m_sinThetaEmec[0];
464  specialCase = 1;
465  ATH_MSG_VERBOSE(" special case "
466  << m_emHelper->show_to_string(ttId));
467  }
468  }
469  relGain = 1.; // no relative gain for EMB and EMEC
470  }
471 
472  // case HEC cell
473  else if (m_lvl1Helper->is_lar_hec(cellId)) {
474  sinTheta = m_sinThetaHec[Ieta - 1]; // Ieta starts at 1
475  relGain = 1.;
476  }
477 
478  // case FCAL cell
479  else if (m_lvl1Helper->is_lar_fcal(cellId)) {
480  IdentifierHash fcalHash = m_fcalHelper->channel_hash(cellId);
481  relGain = m_cellRelGainFcal[fcalHash];
482  if (relGain < 0.001) {
483  nMissingGain++;
484  ATH_MSG_WARNING(" No relative gain value found for FCAL cell "
485  << m_emHelper->show_to_string(cellId) << " (index "
486  << fcalHash << "), setting default value 1. ");
487  relGain = 1.;
488  }
489  sinTheta = 1.; // this factor is included in the relative gain
490  }
491  if (m_chronoTest) {
492  m_chronSvc->chronoStop("retrieve RG ");
493  m_chronSvc->chronoPrint("retrieve RG ");
494  }
495 
496  IdentifierHash ttHash = m_lvl1Helper->tower_hash(ttId);
497 
498  //
499  // .... loop on hits in hit list
500  //
501  // std::vector<std::pair<float,float> >::const_iterator first =
502  // timeEbegin(); std::vector<std::pair<float,float> >::const_iterator
503  // last = timeE->end(); while (first != last) {
504  for (const auto& first : timeE) {
505  float hitEnergy = first.first;
506  float hitTime = first.second - trigtime;
507  if (hitTime > 99000.) {
508  if (hitEnergy > printEthresh) {
509  ATH_MSG_WARNING(" Found pathological hit time, cellId= "
510  << m_emHelper->show_to_string(cellId)
511  << " time= " << hitTime
512  << " energy= " << hitEnergy);
513  }
514  // provisionally fix a bug in PileUpEvent. Normally not needed
515  // starting from 10.5.0
516  hitTime -= 100000.;
517  }
518  // remove pathological energies (found in some Grid simulated DC2/Rome
519  // samples)
520  if (fabs(hitEnergy) > 1e+9) {
521  ATH_MSG_WARNING(" Pathological energy ignored cellId= "
522  << m_emHelper->show_to_string(cellId)
523  << " energy= " << hitEnergy);
524  hitEnergy = 0.;
525  hitTime = 0.;
526  }
527  //
528  // ....determine time with respect to ref shape
529  //
530  int iShift = 0;
531  if (!m_PileUp) {
532  // keep 1ns granularity
533  // iShift = (int)(hitTime+0.5);
534  iShift = static_cast<int>(floor(hitTime + 0.5));
535  } else {
536  // round to 25ns
537  // iShift = (int)(hitTime/25.+0.5);
538  iShift = static_cast<int>(floor(hitTime * crossingRate + 0.5));
539  }
540  //
541  // ....make time positive to allow using it as an index
542  //
543  int iTime = iShift + refTime;
544  //
545  // .... keep only hits in the timing window
546  //
547  if (iTime >= 0 && iTime < ttSumEvecSize) {
548 
549  if (!specialCase) {
550  // standard case
551  // ....... make the energy sum
552  ttSumE = sumEnergy[ttHash];
553  ttSumE[iTime] +=
554  hitEnergy * inv_cellSampFraction * sinTheta * relGain;
555  sumEnergy[ttHash] = ttSumE;
556  } else {
557  // ec part of barrel-end or FCAL3
558  // ....... make the energy sum
559  ttSumE = sumEnergy2[ttHash];
560  ttSumE[iTime] +=
561  hitEnergy * inv_cellSampFraction * sinTheta * relGain;
562  sumEnergy2[ttHash] = ttSumE;
563  }
564  // msglog << MSG::VERBOSE << "applied relative layer gain "
565  //<< relGain
566  // << " to a hit of cell " <<
567  // m_emHelper->show_to_string(cellId) << endmsg;
568  inTimeE += hitEnergy;
569  nInTime++;
570  } // only hits in timing window
571  else {
572  outOfTimeE += hitEnergy;
573  nOutOfTime++;
574  if (hitEnergy > printEthresh) {
575  if (!m_PileUp) {
576  ATH_MSG_DEBUG("Found a hit out of the timing window, hitTime= "
577  << hitTime << " with more than " << printEthresh
578  << " MeV: hitEnergy= " << hitEnergy << " MeV");
579  } else {
581  "Found a hit out of the timing window, hitTime= "
582  << hitTime << " with more than " << printEthresh
583  << " MeV: hitEnergy= " << hitEnergy << " MeV");
584  }
585  }
586  }
587  } // end of loop on hits in the list
588  } // skip cell condition
589  } // check timeE->size() > 0
590 
591  } // end of loop on hit lists
592 
593  ATH_MSG_DEBUG("Number of missing relative FCAL gains for this event = "
594  << nMissingGain);
595  if (inTimeE == 0 || nInTime == 0)
596  ATH_MSG_VERBOSE("No in time energy");
597  else
598  ATH_MSG_VERBOSE("Out of time energy = "
599  << outOfTimeE << " MeV"
600  << " represents " << 100. * outOfTimeE / inTimeE
601  << " % of in time energy for " << nOutOfTime << " ("
602  << 100. * nOutOfTime / nInTime << " %) hits");
603  if (outOfTimeE > 0.02 * inTimeE) {
604  ATH_MSG_WARNING("Out of time energy = "
605  << outOfTimeE << " MeV"
606  << " larger than 2% of in time energy = " << inTimeE
607  << " MeV; nb of out of time hits = " << nInTime << " ("
608  << (nInTime > 0 ? 100. * nOutOfTime / nInTime : 0)
609  << " %)");
610  }
611 
612  if (m_chronoTest) {
613  m_chronSvc->chronoStop("LArTTL1Mk hit loop ");
614  m_chronSvc->chronoPrint("LArTTL1Mk hit loop ");
615  m_chronSvc->chronoStart("LArTTL1Mk TT loop ");
616  }
617 
618  std::vector<std::string> emHadString(2);
619  emHadString[0] = "ElectroMagnetic";
620  emHadString[1] = "Hadronic";
621 
622  std::vector<Identifier>::const_iterator itTt = m_lvl1Helper->tower_begin();
623  std::vector<Identifier>::const_iterator itEnd = m_lvl1Helper->tower_end();
624 
625  //
626  // ....... loop on Trigger Towers
627  // ....... and build signals using pulse shape and noise for each TT
628  //
629  ATH_MSG_DEBUG(" Starting loop on Trigger Towers ");
630  for (; itTt != itEnd; ++itTt) {
631 
632  Identifier towerId = (*itTt);
633 
634  //
635  // ........ skip Tile cal
636  //
637  if (!m_lvl1Helper->is_tile(towerId)) {
638 
639  int emHad = m_lvl1Helper->sampling(towerId);
640  // convert offline id to hash id
641  IdentifierHash ttHash = m_lvl1Helper->tower_hash(towerId);
642  int region = m_lvl1Helper->region(towerId);
643  int eta = m_lvl1Helper->eta(towerId);
644  int Ieta = decodeInverse(region, eta);
645 
646  //
647  // .... compute the signal for current trigger tower
648  //
649  if (m_chronoTest) {
650  m_chronSvc->chronoStart("compute signal ");
651  }
652  std::vector<float> analogSum(s_NBSAMPLES);
653  std::vector<float> analogSum2(s_NBSAMPLES);
654  std::vector<float> sumTTE = sumEnergy[ttHash];
655  std::vector<float> sumTTE2 = sumEnergy2[ttHash];
656  int nSpecialCase = 0;
657 
658  bool hasE = false;
659  for (unsigned int i = 0; i < sumTTE.size(); ++i) {
660  if (fabs(sumTTE[i]) > 0.) {
661  hasE = true;
662  break;
663  }
664  }
665 
666  bool hasE2 = false;
667  for (unsigned int i = 0; i < sumTTE2.size(); ++i) {
668  if (fabs(sumTTE2[i]) > 0.) {
669  hasE2 = true;
670  break;
671  }
672  }
673 
674  // if ( fabs(sumTTE[refTime]) > 0.|| fabs(sumTTE2[refTime]) > 0. ) {
675  if (hasE || hasE2) {
676 
677  // if(fabs(sumTTE[refTime]) > 0.) {
678  if (hasE) {
679  analogSum = computeSignal(towerId, Ieta, 0, sumTTE, refTime);
680  }
681 
682  // treat special case of ec part of the "barrel end" and special case of
683  // FCAL2/FCAL3 fix me !! this way, we double the saturation energy in
684  // this tower...(because it is cut into 2 pieces)
685  // if(fabs(sumTTE2[refTime]) > 0.) {
686  if (hasE2) {
687  nSpecialCase += 1;
688  if (nSpecialCase > 1) {
690  " more than 1 special case, current Trigger Tower is "
691  << emHadString[emHad] << ": "
692  << m_emHelper->show_to_string(towerId) << " ");
693  }
694  analogSum2 = computeSignal(towerId, Ieta, 1, sumTTE2, refTime);
695  for (int isamp = 0; isamp < s_NBSAMPLES; isamp++) {
696  analogSum[isamp] += analogSum2[isamp];
697  }
698  }
699 
700  if (sumTTE[refTime] > m_debugThresh) {
701  ATH_MSG_DEBUG(" current Trigger Tower is "
702  << emHadString[emHad] << ": "
703  << m_emHelper->show_to_string(towerId) << " ");
705  " transverse E (i.e. sum E / sampling fraction * sin_theta * rel "
706  "gain)= (at ref. time, before calib)"
707  << sumTTE[refTime] << " + " << sumTTE2[refTime]
708  << " (special cases) ");
709  } else if (sumTTE[refTime] > 0.) {
710  ATH_MSG_VERBOSE(" current Trigger Tower is "
711  << emHadString[emHad] << ": "
712  << m_emHelper->show_to_string(towerId) << " ");
714  " [very low] transverse E (i.e. sum E / sampling fraction * "
715  "sin_theta * rel gain)= (at ref. time, before calib)"
716  << sumTTE[refTime] << " + " << sumTTE2[refTime]
717  << " (special cases) ");
718  }
719  }
720  if (m_chronoTest) {
721  m_chronSvc->chronoStop("compute signal ");
722  m_chronSvc->chronoPrint("compute signal ");
723  }
724 
725  //
726  // ........ add the noise
727  //
728  if (m_chronoTest) {
729  m_chronSvc->chronoStart("adding noise ");
730  }
731  std::vector<float> fullSignal(s_NBSAMPLES);
732  if (m_NoiseOnOff) {
733  fullSignal = computeNoise(towerId, Ieta, analogSum, rndmEngine);
734  } else {
735  fullSignal = analogSum;
736  }
737 
738  if (m_chronoTest) {
739  m_chronSvc->chronoStop("adding noise ");
740  m_chronSvc->chronoPrint("adding noise ");
741  }
742 
743  if (sumTTE[refTime] > m_debugThresh) {
744  ATH_MSG_DEBUG(" uncalibrated amplitudes around peak (+-3 time slots): "
745  << sumTTE[refTime - 3] << ", " << sumTTE[refTime - 2]
746  << ", " << sumTTE[refTime - 1] << ", " << sumTTE[refTime]
747  << ", " << sumTTE[refTime + 1] << ", "
748  << sumTTE[refTime + 2] << ", " << sumTTE[refTime + 3]);
749  ATH_MSG_DEBUG(" calibrated signal is "
750  << analogSum[0] << ", " << analogSum[1] << ", "
751  << analogSum[2] << ", " << analogSum[3] << ", "
752  << analogSum[4] << ", " << analogSum[5] << ", "
753  << analogSum[6]);
754  ATH_MSG_DEBUG(" shape of calibrated signal is "
755  << analogSum[0] / analogSum[3] << ", "
756  << analogSum[1] / analogSum[3] << ", "
757  << analogSum[2] / analogSum[3] << ", "
758  << analogSum[3] / analogSum[3] << ", "
759  << analogSum[4] / analogSum[3] << ", "
760  << analogSum[5] / analogSum[3] << ", "
761  << analogSum[6] / analogSum[3]);
762  ATH_MSG_DEBUG(" after adding noise, full signal is "
763  << fullSignal[0] << ", " << fullSignal[1] << ", "
764  << fullSignal[2] << ", " << fullSignal[3] << ", "
765  << fullSignal[4] << ", " << fullSignal[5] << ", "
766  << fullSignal[6]);
767  if (msgLvl(MSG::VERBOSE)) {
768  for (unsigned int iTime = 0; iTime < sumTTE.size(); iTime++) {
769  ATH_MSG_VERBOSE(" iTime [range=0-28 or 0-299] = "
770  << iTime << " hit energy = " << sumTTE[iTime]);
771  }
772  }
773  } else if (sumTTE[refTime] > 0.) {
775  " uncalibrated amplitudes around peak (+-3 time slots): "
776  << sumTTE[refTime - 3] << ", " << sumTTE[refTime - 2] << ", "
777  << sumTTE[refTime - 1] << ", " << sumTTE[refTime] << ", "
778  << sumTTE[refTime + 1] << ", " << sumTTE[refTime + 2] << ", "
779  << sumTTE[refTime + 3]);
780  ATH_MSG_VERBOSE(" calibrated signal is "
781  << analogSum[0] << ", " << analogSum[1] << ", "
782  << analogSum[2] << ", " << analogSum[3] << ", "
783  << analogSum[4] << ", " << analogSum[5] << ", "
784  << analogSum[6]);
785  ATH_MSG_VERBOSE(" shape of calibrated signal is "
786  << analogSum[0] / analogSum[3] << ", "
787  << analogSum[1] / analogSum[3] << ", "
788  << analogSum[2] / analogSum[3] << ", "
789  << analogSum[3] / analogSum[3] << ", "
790  << analogSum[4] / analogSum[3] << ", "
791  << analogSum[5] / analogSum[3] << ", "
792  << analogSum[6] / analogSum[3]);
793  ATH_MSG_VERBOSE(" after adding noise, full signal is "
794  << fullSignal[0] << ", " << fullSignal[1] << ", "
795  << fullSignal[2] << ", " << fullSignal[3] << ", "
796  << fullSignal[4] << ", " << fullSignal[5] << ", "
797  << fullSignal[6]);
798  }
799 
800  if (fabs(fullSignal[s_PEAKPOS]) > 0.) {
801  //
802  // ...... create the LArTTL1 and push it into the appropriate TTL1
803  // container
804  //
805  LArTTL1* ttL1;
806  HWIdentifier ttChannel;
807  ttL1 = new LArTTL1(ttChannel, towerId, fullSignal);
808  if (emHad) {
809  ttL1ContainerHad->push_back(ttL1);
810  } else {
811  ttL1ContainerEm->push_back(ttL1);
812  }
813 
814  if (!m_truthHitsContainer.empty()) {
815  std::vector<float> et(3);
816  et[0] = sumTTE[refTime - 1];
817  et[1] = sumTTE[refTime];
818  et[2] = sumTTE[refTime + 1];
819  LArTTL1* truth_ttL1 = new LArTTL1(ttChannel, towerId, et);
820  if (emHad) {
821  truth_ttL1ContainerHad->push_back(truth_ttL1);
822  } else {
823  truth_ttL1ContainerEm->push_back(truth_ttL1);
824  }
825  }
826  }
827 
828  } // end excluding Tile cal
829  } // end of for loop on TT
830  if (m_chronoTest) {
831  m_chronSvc->chronoStop("LArTTL1Mk TT loop ");
832  m_chronSvc->chronoPrint("LArTTL1Mk TT loop ");
833  }
834 
835  ATH_MSG_DEBUG("number of created TTL1s (Em, Had) = "
836  << ttL1ContainerEm->size() << " , "
837  << ttL1ContainerHad->size());
838 
839  return StatusCode::SUCCESS;
840 }
841 
843  // +======================================================================+
844  // + +
845  // + Author: F. Ledroit +
846  // + Creation date: 2003/01/13 +
847  // + +
848  // +======================================================================+
849  //
850  // ......... declaration
851  //
852 
853  ATH_MSG_INFO(" LArTTL1Maker finalize completed successfully");
854 
855  m_chronSvc->chronoPrint("LArTTL1Mk hit loop ");
856  m_chronSvc->chronoPrint("LArTTL1Mk TT loop ");
857 
858  return StatusCode::SUCCESS;
859 }
860 
861 std::vector<float> LArTTL1Maker::computeSignal(const Identifier towerId,
862  const int Ieta,
863  const int specialCase,
864  std::vector<float> ttSumEnergy,
865  const int refTime) const
866 
867 {
868  // +======================================================================+
869  // + +
870  // + Author: F. Ledroit +
871  // + Creation date: 2003/01/13 +
872  // + +
873  // +======================================================================+
874  //
875 
876  std::vector<float> bareSignal(s_NBSAMPLES);
877  std::vector<float> pulseShape(s_MAXSAMPLES);
878  std::vector<float> pulseShapeDer(s_MAXSAMPLES);
879 
880  bool emb = m_lvl1Helper->is_emb(towerId);
881  bool barrelEnd = m_lvl1Helper->is_barrel_end(towerId);
882  bool emec = m_lvl1Helper->is_emec(towerId);
883 
884  int visEvecSize = std::ssize(ttSumEnergy);
885  ATH_MSG_VERBOSE("computeSignal: special case = " << specialCase);
886 
887  //
888  // ..... case EM
889  //
890  if (emb || barrelEnd || emec) {
891  //
892  // ..... retrieve calib coeffs for the tower
893  //
894  float calibCoeff = 0.;
895  if (emb) {
896  calibCoeff = m_calibCoeffEmb[Ieta - 1];
897  } else if (emec) {
898  calibCoeff = m_calibCoeffEmec[Ieta - 1];
899  } else { // barrelEnd
900  if (!specialCase) {
901  calibCoeff = m_calibCoeffEmb[14];
902  } else {
903  calibCoeff = m_calibCoeffEmec[0];
904  }
905  }
906  if (calibCoeff < 0.001) {
907  ATH_MSG_WARNING(" No calibration coefficient value found for tower "
908  << m_emHelper->show_to_string(towerId)
909  << " setting default value 6. ");
910  calibCoeff = 6.;
911  }
912 
913  //
914  // ... loop on time samples
915  //
916  for (int iTime = 0; iTime < visEvecSize; iTime++) {
917  if (fabs(ttSumEnergy[iTime]) > 0.) {
918  if (!m_noEmCalibMode) {
919  // apply calibration coefficient
920  ttSumEnergy[iTime] *= calibCoeff;
922  " ComputeSignal: applied EM calibration coefficient (iTime) "
923  << calibCoeff << " (" << iTime << ") ");
924  }
925 
926  // with respect to saturation
927  // to compute the amplitude
928  float theEnergy = ttSumEnergy[iTime];
929  if (ttSumEnergy[iTime] > m_refEnergyEm[0]) {
931  }
932  // to determine the shape
933  if (ttSumEnergy[iTime] > m_refEnergyEm[s_NBENERGIES - 1]) {
934  // don't know the shape after highest energy point -> stick to 'last'
935  // shape
936  ttSumEnergy[iTime] = m_refEnergyEm[s_NBENERGIES - 1];
937  }
938 
939  //
940  // ... determine regime: linear(iene=0) or saturation
941  //
942  for (int iene = 0; iene < s_NBENERGIES; iene++) {
943  if (ttSumEnergy[iTime] <= m_refEnergyEm[iene]) {
944  pulseShape = m_pulseShapeEm[iene];
945  pulseShapeDer = m_pulseShapeDerEm[iene];
946 
947  // make samples
948  for (int iSamp = 0; iSamp < s_NBSAMPLES; iSamp++) {
949  if (!m_PileUp) {
950  // go back to signed value of time
951  int hitTime = iTime - refTime;
952  // go to 25 ns sampling
953  // int time = (int)(hitTime/25.+0.5) ;
954  int time =
955  static_cast<int>(floor(hitTime * crossingRate + 0.5));
956  // ....determine fine shift within 25ns
957  float dTime = (float)(hitTime - crossingTime * time);
958  int j = iSamp - time;
959  if (j >= 0 && j < s_MAXSAMPLES) {
960  bareSignal[iSamp] +=
961  (pulseShape[j] - pulseShapeDer[j] * dTime) * theEnergy;
962  }
963  } else {
964  int j = iSamp - iTime + refTime;
965  if (j >= 0 && j < s_MAXSAMPLES) {
966  bareSignal[iSamp] += pulseShape[j] * theEnergy;
967  }
968  }
969  } // end loop on samples
970 
971  break;
972  }
973  } // end of loop on reference energies
974  } // end condition visE>0
975  } // end loop on times
976  } // end case EM
977  //
978  // ..... case HEC
979  //
980  else if (m_lvl1Helper->is_hec(towerId)) {
981  pulseShape = m_pulseShapeHec;
982  pulseShapeDer = m_pulseShapeDerHec;
983  //
984  // ... loop on time samples
985  //
986  for (int iTime = 0; iTime < visEvecSize; iTime++) {
987  float theEnergy = ttSumEnergy[iTime];
988  if (!m_noHadCalibMode) {
989  // apply calibration coefficient
990  theEnergy *= m_calibCoeffHec[Ieta - 1];
991  }
992 
993  float satEt = m_satEnergyHec[Ieta - 1];
994  for (int iSamp = 0; iSamp < s_NBSAMPLES; iSamp++) {
995  if (!m_PileUp) {
996  // go back to signed value of time
997  int hitTime = iTime - refTime;
998  // go to 25 ns sampling
999  // int time = (int)(hitTime/25.+0.5) ;
1000  int time = static_cast<int>(floor(hitTime * crossingRate + 0.5));
1001  // ....determine fine shift within 25ns
1002  float dTime = (float)(hitTime - crossingTime * time);
1003  int j = iSamp - time;
1004  if (j >= 0 && j < s_MAXSAMPLES) {
1005  bareSignal[iSamp] +=
1006  (pulseShape[j] - pulseShapeDer[j] * dTime) * theEnergy;
1007  }
1008  } else {
1009  int j = iSamp - iTime + refTime;
1010  if (j >= 0 && j < s_MAXSAMPLES) {
1011  bareSignal[iSamp] += pulseShape[j] * theEnergy;
1012  }
1013  }
1014  // saturation
1015  if (bareSignal[iSamp] > satEt) {
1016  bareSignal[iSamp] = satEt;
1017  }
1018  }
1019  }
1020  }
1021  //
1022  // ..... case FCAL
1023  //
1024  else if (m_lvl1Helper->is_fcal(towerId)) {
1025 
1026  int emOrHad = m_lvl1Helper->sampling(towerId);
1027  int module = emOrHad + 1;
1028  std::vector<float> calibCoeff2 = m_calibCoeffFcal[module - 1];
1029  if (emOrHad && (Ieta == 3 || Ieta == 4)) {
1030  module += 1; // FCAL3
1031  }
1032  pulseShape = m_pulseShapeFcal[module - 1];
1033  pulseShapeDer = m_pulseShapeDerFcal[module - 1];
1034 
1035  //
1036  // ... loop on time samples (only one if no pile-up)
1037  //
1038  for (int iTime = 0; iTime < visEvecSize; iTime++) {
1039  float theEnergy = ttSumEnergy[iTime];
1040  if ((!m_noEmCalibMode && module == 1) ||
1041  (!m_noHadCalibMode && module > 1)) {
1042  // apply calibration coefficient
1043  theEnergy *= calibCoeff2[Ieta - 1];
1044  }
1045 
1046  // make samples
1047  for (int iSamp = 0; iSamp < s_NBSAMPLES; iSamp++) {
1048  if (!m_PileUp) {
1049  // go back to signed value of time
1050  int hitTime = iTime - refTime;
1051  // go to 25 ns sampling
1052  // int time = (int)(hitTime/25.+0.5) ;
1053  int time = static_cast<int>(floor(hitTime * crossingRate + 0.5));
1054  // ....determine fine shift within 25ns
1055  float dTime = (float)(hitTime - crossingTime * time);
1056  int j = iSamp - time;
1057  if (j >= 0 && j < s_MAXSAMPLES) {
1058  bareSignal[iSamp] +=
1059  (pulseShape[j] - pulseShapeDer[j] * dTime) * theEnergy;
1060  }
1061  } else {
1062  int j = iSamp - iTime + refTime;
1063  if (j >= 0 && j < s_MAXSAMPLES) {
1064  bareSignal[iSamp] += pulseShape[j] * theEnergy;
1065  }
1066  }
1067  }
1068  }
1069  } else {
1070  ATH_MSG_WARNING(" LArTTL1Maker: computeSignal unknown towerId "
1071  << m_lvl1Helper->show_to_string(towerId));
1072  return bareSignal;
1073  }
1074 
1075  return bareSignal;
1076 }
1077 
1078 std::vector<float> LArTTL1Maker::computeNoise(
1079  const Identifier towerId, const int Ieta, std::vector<float>& inputV,
1080  CLHEP::HepRandomEngine* rndmEngine) {
1081 
1082  // +======================================================================+
1083  // + +
1084  // + Author: F. Ledroit +
1085  // + Creation date: 2003/01/13 +
1086  // + +
1087  // +======================================================================+
1088 
1089  std::vector<float> outputV(s_NBSAMPLES);
1090 
1091  //
1092  // .... first retrieve auto-correlation matrix and noise rms
1093  //
1094 
1095  float sigmaNoise = 0;
1096  std::vector<float>* autoC = nullptr;
1097  std::vector<float> noiseRms(4);
1098 
1099  bool emb = m_lvl1Helper->is_emb(towerId);
1100  bool barrelEnd = m_lvl1Helper->is_barrel_end(towerId);
1101  bool emec = m_lvl1Helper->is_emec(towerId);
1102  //
1103  // ..... case EM
1104  //
1105  if (emb || barrelEnd || emec) {
1106  //
1107  // ..... retrieve noise info for the tower
1108  //
1109  autoC = &(m_autoCorrEm);
1110  if (emb) {
1111  sigmaNoise = m_noiseRmsEmb[Ieta - 1];
1112  } else if (emec) {
1113  sigmaNoise = m_noiseRmsEmec[Ieta - 1];
1114  } else { // barrelEnd
1115  sigmaNoise = sqrt(m_noiseRmsEmb[14] * m_noiseRmsEmb[14] +
1116  m_noiseRmsEmec[0] * m_noiseRmsEmec[0]);
1117  ATH_MSG_VERBOSE(" LArTTL1Maker: barrelEnd noise rms" << sigmaNoise);
1118  }
1119  } // end case EM
1120  //
1121  // ..... case HEC
1122  //
1123  else if (m_lvl1Helper->is_hec(towerId)) {
1124 
1125  autoC = &(m_autoCorrHec[Ieta - 1]);
1126  sigmaNoise = m_noiseRmsHec[Ieta - 1];
1127  }
1128  //
1129  // ..... case FCAL
1130  //
1131  else if (m_lvl1Helper->is_fcal(towerId)) {
1132 
1133  int emOrHad = m_lvl1Helper->sampling(towerId);
1134  int module = emOrHad + 1;
1135  if (emOrHad && (Ieta == 3 || Ieta == 4)) {
1136  module += 1; // FCAL3
1137  }
1138  autoC = &m_autoCorrFcal;
1139  // sigmaNoise = m_noiseRmsFcal[module-1];
1140  noiseRms = m_noiseRmsFcal[module - 1];
1141  sigmaNoise = noiseRms[Ieta - 1];
1142  ATH_MSG_VERBOSE(" LArTTL1Maker: noise FCAL= "
1143  << sigmaNoise << " module= " << module << "Ieta= " << Ieta);
1144  } else {
1145  ATH_MSG_WARNING(" LArTTL1Maker: computeNoise unknown towerId "
1146  << m_lvl1Helper->show_to_string(towerId));
1147  return inputV;
1148  }
1149 
1150  if (fabs((*autoC)[0]) < 0.001) {
1151  ATH_MSG_WARNING(" No autocorrelation matrix found for tower "
1152  << m_emHelper->show_to_string(towerId) << " "
1153  << "setting default values 1.00 0.10 -0.30 -0.20 "
1154  "-0.05 -0.01 -0.01 ");
1155  (*autoC)[0] = 1.00;
1156  (*autoC)[1] = 0.10;
1157  (*autoC)[2] = -0.30;
1158  (*autoC)[3] = -0.20;
1159  (*autoC)[4] = -0.05;
1160  (*autoC)[5] = -0.01;
1161  (*autoC)[6] = -0.01;
1162  }
1163  if (sigmaNoise < 0.001) {
1164  ATH_MSG_WARNING(" No noise rms value found for tower "
1165  << m_emHelper->show_to_string(towerId) << " "
1166  << "setting default value 300 MeV ");
1167  sigmaNoise = 300.;
1168  }
1169 
1170  //
1171  // .... now compute the noise 'signal'
1172  //
1173 
1174  const float c11 = sigmaNoise * (*autoC)[0];
1175  const float c21 = sigmaNoise * (*autoC)[1];
1176  const float c31 = sigmaNoise * (*autoC)[2];
1177  const float c41 = sigmaNoise * (*autoC)[3];
1178  const float c51 = sigmaNoise * (*autoC)[4];
1179  const float c61 = sigmaNoise * (*autoC)[5];
1180  const float c71 = sigmaNoise * (*autoC)[6];
1181  //
1182  const float c22 = sqrt(c11 * c11 - c21 * c21);
1183  const float inv_c22 = 1. / c22;
1184  const float c32 = (c21 * c11 - c21 * c31) * inv_c22;
1185  const float c33 = sqrt(c11 * c11 - c31 * c31 - c32 * c32);
1186  const float inv_c33 = 1. / c33;
1187  const float c42 = (c31 * c11 - c21 * c41) * inv_c22;
1188  const float c43 = (c21 * c11 - c31 * c41 - c32 * c42) * inv_c33;
1189  const float c44 = sqrt(c11 * c11 - c41 * c41 - c42 * c42 - c43 * c43);
1190  const float inv_c44 = 1. / c44;
1191  const float c52 = (c41 * c11 - c21 * c51) * inv_c22;
1192  const float c53 = (c31 * c11 - c31 * c51 - c32 * c52) * inv_c33;
1193  const float c54 = (c21 * c11 - c41 * c51 - c42 * c52 - c43 * c53) * inv_c44;
1194  const float c55 =
1195  sqrt(c11 * c11 - c51 * c51 - c52 * c52 - c53 * c53 - c54 * c54);
1196  const float inv_c55 = 1. / c55;
1197  const float c62 = (c51 * c11 - c21 * c61) * inv_c22;
1198  const float c63 = (c41 * c11 - c31 * c61 - c32 * c62) * inv_c33;
1199  const float c64 = (c31 * c11 - c41 * c61 - c42 * c62 - c43 * c63) * inv_c44;
1200  const float c65 =
1201  (c21 * c11 - c51 * c61 - c52 * c62 - c53 * c63 - c54 * c64) * inv_c55;
1202  const float c66 = sqrt(c11 * c11 - c61 * c61 - c62 * c62 - c63 * c63 -
1203  c64 * c64 - c65 * c65);
1204  const float c72 = (c61 * c11 - c21 * c71) * inv_c22;
1205  const float c73 = (c51 * c11 - c31 * c71 - c32 * c72) * inv_c33;
1206  const float c74 = (c41 * c11 - c41 * c71 - c42 * c72 - c43 * c73) * inv_c44;
1207  const float c75 =
1208  (c31 * c11 - c51 * c71 - c52 * c72 - c53 * c73 - c54 * c74) * inv_c55;
1209  const float c76 =
1210  (c21 * c11 - c61 * c71 - c62 * c72 - c63 * c73 - c64 * c74 - c65 * c75) /
1211  c66;
1212  const float c77 = sqrt(c11 * c11 - c71 * c71 - c72 * c72 - c73 * c73 -
1213  c74 * c74 - c75 * c75 - c76 * c76);
1214 
1215  double rndm[s_NBSAMPLES];
1216  RandGaussZiggurat::shootArray(rndmEngine, static_cast<int>(s_NBSAMPLES), rndm,
1217  0., 1.);
1218  outputV[0] = inputV[0] + c11 * rndm[0];
1219  outputV[1] = inputV[1] + c21 * rndm[0] + c22 * rndm[1];
1220  outputV[2] = inputV[2] + c31 * rndm[0] + c32 * rndm[1] + c33 * rndm[2];
1221  outputV[3] =
1222  inputV[3] + c41 * rndm[0] + c42 * rndm[1] + c43 * rndm[2] + c44 * rndm[3];
1223  outputV[4] = inputV[4] + c51 * rndm[0] + c52 * rndm[1] + c53 * rndm[2] +
1224  c54 * rndm[3] + c55 * rndm[4];
1225  outputV[5] = inputV[5] + c61 * rndm[0] + c62 * rndm[1] + c63 * rndm[2] +
1226  c64 * rndm[3] + c65 * rndm[4] + c66 * rndm[5];
1227  outputV[6] = inputV[6] + c71 * rndm[0] + c72 * rndm[1] + c73 * rndm[2] +
1228  c74 * rndm[3] + c75 * rndm[4] + c76 * rndm[5] + c77 * rndm[6];
1229 
1230  return outputV;
1231 }
1232 
1234  //
1235  // ...... Read auxiliary data file for EM (barrel and EC)
1236  //
1237 
1238  ATH_MSG_DEBUG("executing readAuxiliary()");
1239 
1240  float refEnergy;
1241  std::vector<float> pulseShape(s_MAXSAMPLES);
1242  std::vector<float> pulseShapeDer(s_MAXSAMPLES);
1243  std::string barrel_endcap;
1244  int Ieta;
1245  float sinTheta = 0.;
1246  std::vector<float> layerRelGain(s_NBDEPTHS);
1247  std::vector<float> noiseRms(3);
1248  std::vector<float> noiseRms4(4);
1249  std::vector<float> autoCorr(s_NBSAMPLES);
1250 
1251  std::string pulsedataname =
1252  PathResolver::find_file("LArEmLvl1.data", "DATAPATH");
1253  if (pulsedataname.empty()) {
1254  ATH_MSG_ERROR("Could not locate LArEmLvl1.data file");
1255  return StatusCode::FAILURE;
1256  }
1257  const char* pulsedatafile = pulsedataname.c_str();
1258  std::ifstream infile(pulsedatafile);
1259 
1260  if (!infile) {
1261  ATH_MSG_ERROR(" cannot open EM file ");
1262  return StatusCode::FAILURE;
1263  } else {
1264  ATH_MSG_DEBUG(" EM file opened ");
1265  }
1266 
1267  // first read the pulse shape for all energies
1268  // valid for both barrel and endcap (from Xavier de la Broise)
1269  for (int iene = 0; iene < s_NBENERGIES; iene++) {
1270  infile >> refEnergy >> pulseShape[0] >> pulseShape[1] >> pulseShape[2] >>
1271  pulseShape[3] >> pulseShape[4] >> pulseShape[5] >> pulseShape[6] >>
1272  pulseShape[7] >> pulseShape[8] >> pulseShape[9] >> pulseShape[10] >>
1273  pulseShape[11] >> pulseShape[12] >> pulseShape[13] >> pulseShape[14] >>
1274  pulseShape[15] >> pulseShape[16] >> pulseShape[17] >> pulseShape[18] >>
1275  pulseShape[19] >> pulseShape[20] >> pulseShape[21] >> pulseShape[22] >>
1276  pulseShape[23];
1277  m_refEnergyEm.push_back(refEnergy);
1278  m_pulseShapeEm.push_back(pulseShape);
1279  infile >> pulseShapeDer[0] >> pulseShapeDer[1] >> pulseShapeDer[2] >>
1280  pulseShapeDer[3] >> pulseShapeDer[4] >> pulseShapeDer[5] >>
1281  pulseShapeDer[6] >> pulseShapeDer[7] >> pulseShapeDer[8] >>
1282  pulseShapeDer[9] >> pulseShapeDer[10] >> pulseShapeDer[11] >>
1283  pulseShapeDer[12] >> pulseShapeDer[13] >> pulseShapeDer[14] >>
1284  pulseShapeDer[15] >> pulseShapeDer[16] >> pulseShapeDer[17] >>
1285  pulseShapeDer[18] >> pulseShapeDer[19] >> pulseShapeDer[20] >>
1286  pulseShapeDer[21] >> pulseShapeDer[22] >> pulseShapeDer[23];
1287  m_pulseShapeDerEm.push_back(pulseShapeDer);
1288  }
1289 
1290  // then read autocorrelation function valid for barrel and endcap
1291  // ("default" auto-correlation function)
1292  m_autoCorrEm.resize(s_NBSAMPLES);
1293  infile >> m_autoCorrEm[0] >> m_autoCorrEm[1] >> m_autoCorrEm[2] >>
1294  m_autoCorrEm[3] >> m_autoCorrEm[4] >> m_autoCorrEm[5] >> m_autoCorrEm[6];
1295 
1296  // then read the separator for barrel
1297  infile >> barrel_endcap;
1298 
1299  for (int ieta = 0; ieta < s_NBETABINS; ieta++) {
1300  // then read the calibration factor (from MC)
1301  // and the noise rms (from Bill Cleland) for each eta bin, in barrel
1302  infile >> Ieta >> sinTheta;
1303  m_sinThetaEmb.push_back(sinTheta);
1304  infile >> noiseRms[0] >> noiseRms[1] >> noiseRms[2];
1305  m_noiseRmsEmb.push_back(noiseRms[2]);
1306  // if later we want to disentangle between pre-sum and summing electronic
1307  // noise...
1308  // m_noiseRmsEmb.push_back(noiseRms);
1309  }
1310 
1311  // now read the separator for endcap
1312  infile >> barrel_endcap;
1313 
1314  for (int ieta = 0; ieta < s_NBETABINS; ieta++) {
1315  // then read the calibration coefficient (from MC)
1316  // and the noise rms (from Bill Cleland) for each eta bin, in barrel
1317  infile >> Ieta >> sinTheta;
1318  m_sinThetaEmec.push_back(sinTheta);
1319  infile >> noiseRms[0] >> noiseRms[1] >> noiseRms[2];
1320  m_noiseRmsEmec.push_back(noiseRms[2]);
1321  // if later we want to disentangle between pre-sum and summing electronic
1322  // noise...
1323  // m_noiseRmsEmec.push_back(noiseRms);
1324  }
1325 
1326  infile.close();
1327  ATH_MSG_DEBUG(" EM file closed ");
1328 
1329  ATH_MSG_INFO(" 1 pulse shape per energy for EMB+EMEC : ");
1330  for (int iene = 0; iene < s_NBENERGIES; iene++) {
1331  ATH_MSG_INFO(
1332  m_refEnergyEm[iene]
1333  << " MeV: " << (m_pulseShapeEm[iene])[0] << ", "
1334  << (m_pulseShapeEm[iene])[1] << ", " << (m_pulseShapeEm[iene])[2]
1335  << ", " << (m_pulseShapeEm[iene])[3] << ", "
1336  << (m_pulseShapeEm[iene])[4] << ", " << (m_pulseShapeEm[iene])[5]
1337  << ", " << (m_pulseShapeEm[iene])[6] << ", "
1338  << (m_pulseShapeEm[iene])[7] << ", " << (m_pulseShapeEm[iene])[8]
1339  << ", " << (m_pulseShapeEm[iene])[9] << ", "
1340  << (m_pulseShapeEm[iene])[10] << ", " << (m_pulseShapeEm[iene])[11]
1341  << ", " << (m_pulseShapeEm[iene])[12] << ", "
1342  << (m_pulseShapeEm[iene])[13] << ", " << (m_pulseShapeEm[iene])[14]
1343  << ", " << (m_pulseShapeEm[iene])[15] << ", "
1344  << (m_pulseShapeEm[iene])[16] << ", " << (m_pulseShapeEm[iene])[17]
1345  << ", " << (m_pulseShapeEm[iene])[18] << ", "
1346  << (m_pulseShapeEm[iene])[19] << ", " << (m_pulseShapeEm[iene])[20]
1347  << ", " << (m_pulseShapeEm[iene])[21] << ", "
1348  << (m_pulseShapeEm[iene])[22] << ", " << (m_pulseShapeEm[iene])[23]
1349  << ", ");
1350  }
1351  ATH_MSG_INFO(" 1 auto-corr matrix for EMB+EMEC : "
1352  << m_autoCorrEm[0] << ", " << m_autoCorrEm[1] << ", "
1353  << m_autoCorrEm[2] << ", " << m_autoCorrEm[3] << ", "
1354  << m_autoCorrEm[4] << ", " << m_autoCorrEm[5] << ", "
1355  << m_autoCorrEm[6]);
1356 
1357  ATH_MSG_DEBUG(
1358  " Finished reading 1 calib coeff + 1 noise value per eta bin for EM: ");
1359  for (int ieta = 0; ieta < s_NBETABINS; ieta++) {
1360  // currently the calib coeffs are all set to 1 -> turning INFO logs into
1361  // DEBUG
1362  ATH_MSG_DEBUG("Ieta= " << ieta + 1
1363  << ", calib coeff EMB: " << m_calibCoeffEmb[ieta]
1364  << ", calib coeff EMEC: " << m_calibCoeffEmec[ieta]);
1365  ATH_MSG_INFO("Ieta= " << ieta + 1 << ", noise rms EMB: "
1366  << m_noiseRmsEmb[ieta] << " MeV"
1367  << ", noise rms EMEC: " << m_noiseRmsEmec[ieta]
1368  << " MeV");
1369  }
1370 
1371  //
1372  // ...... Read auxiliary data file for HEC
1373  //
1374 
1375  pulsedataname = PathResolver::find_file("LArHecLvl1.data", "DATAPATH");
1376  if (pulsedataname.empty()) {
1377  ATH_MSG_ERROR("Could not locate LArHecLvl1.data file");
1378  return StatusCode::FAILURE;
1379  }
1380  pulsedatafile = pulsedataname.c_str();
1381  infile.open(pulsedatafile);
1382 
1383  if (!infile) {
1384  ATH_MSG_ERROR(" cannot open HEC file ");
1385  return StatusCode::FAILURE;
1386  } else {
1387  ATH_MSG_DEBUG(" HEC file opened ");
1388  }
1389 
1390  // first read the pulse shape for each eta bin (from Leonid Kurchaninov)
1391  m_pulseShapeHec.resize(s_MAXSAMPLES);
1395  m_pulseShapeHec[9] >> m_pulseShapeHec[10] >> m_pulseShapeHec[11] >>
1396  m_pulseShapeHec[12] >> m_pulseShapeHec[13] >> m_pulseShapeHec[14] >>
1397  m_pulseShapeHec[15] >> m_pulseShapeHec[16] >> m_pulseShapeHec[17] >>
1398  m_pulseShapeHec[18] >> m_pulseShapeHec[19] >> m_pulseShapeHec[20] >>
1400 
1413 
1414  m_satEnergyHec.resize(s_NBETABINS);
1415  m_sinThetaHec.resize(s_NBETABINS);
1416  m_noiseRmsHec.resize(s_NBETABINS);
1417  m_autoCorrHec.push_back(autoCorr);
1418  for (int ieta = 1; ieta < s_NBETABINS; ieta++) {
1419  // now read for each eta bin:
1420  // - the calibration factor (determined from MC)
1421  // - the transverse saturating energies (same in all eta bins but Ieta=15)
1422  // - the value of sin_theta
1423  // - the noise rms
1424  infile >> Ieta >> m_satEnergyHec[ieta] >> m_sinThetaHec[ieta] >>
1425  m_noiseRmsHec[ieta];
1426 
1427  // and the autocorrelation function for each eta bin (from Leonid
1428  // Kurchaninov)
1429  infile >> autoCorr[0] >> autoCorr[1] >> autoCorr[2] >> autoCorr[3] >>
1430  autoCorr[4] >> autoCorr[5] >> autoCorr[6];
1431  m_autoCorrHec.push_back(autoCorr);
1432  }
1433  infile.close();
1434  ATH_MSG_DEBUG(" HEC file closed ");
1435  ATH_MSG_INFO(" 1 pulse shape for HEC : "
1436  << m_pulseShapeHec[0] << ", " << m_pulseShapeHec[1] << ", "
1437  << m_pulseShapeHec[2] << ", " << m_pulseShapeHec[3] << ", "
1438  << m_pulseShapeHec[4] << ", " << m_pulseShapeHec[5] << ", "
1439  << m_pulseShapeHec[5] << ", " << m_pulseShapeHec[6] << ", "
1440  << m_pulseShapeHec[7] << ", " << m_pulseShapeHec[8] << ", "
1441  << m_pulseShapeHec[9] << ", " << m_pulseShapeHec[10] << ", "
1442  << m_pulseShapeHec[11] << ", " << m_pulseShapeHec[12] << ", "
1443  << m_pulseShapeHec[13] << ", " << m_pulseShapeHec[14] << ", "
1444  << m_pulseShapeHec[15] << ", " << m_pulseShapeHec[16] << ", "
1445  << m_pulseShapeHec[17] << ", " << m_pulseShapeHec[18] << ", "
1446  << m_pulseShapeHec[19] << ", " << m_pulseShapeHec[20] << ", "
1447  << m_pulseShapeHec[21] << ", " << m_pulseShapeHec[22] << ", "
1448  << m_pulseShapeHec[23]);
1449  ATH_MSG_DEBUG(
1450  "Finished reading calib coeff, noise rms, sat ene, auto corr for each "
1451  "eta bin for HEC: ");
1452  for (int ieta = 1; ieta < s_NBETABINS; ieta++) {
1453  // currently the calib coeffs are all set to 1 -> turning INFO logs into
1454  // DEBUG
1455  ATH_MSG_DEBUG(" Ieta= " << ieta + 1
1456  << ", calib coeff HEC: " << m_calibCoeffHec[ieta]);
1457  ATH_MSG_INFO(" Ieta= " << ieta + 1 << ", noise rms HEC: "
1458  << m_noiseRmsHec[ieta] << " MeV"
1459  << ", sat ene HEC: " << m_satEnergyHec[ieta]
1460  << " MeV");
1461  ATH_MSG_INFO(" Ieta= " << ieta + 1
1462  << ", auto corr HEC: " << (m_autoCorrHec[ieta])[0]
1463  << ", " << (m_autoCorrHec[ieta])[1] << ", "
1464  << (m_autoCorrHec[ieta])[2] << ", "
1465  << (m_autoCorrHec[ieta])[3] << ", "
1466  << (m_autoCorrHec[ieta])[4] << ", "
1467  << (m_autoCorrHec[ieta])[5] << ", "
1468  << (m_autoCorrHec[ieta])[6] << ", ");
1469  }
1470 
1471  //
1472  // ...... Read auxiliary data files for FCAL
1473  //
1474 
1475  pulsedataname = PathResolver::find_file("LArFcalLvl1.data", "DATAPATH");
1476  if (pulsedataname.empty()) {
1477  ATH_MSG_ERROR("Could not locate LArFcalLvl1.data file");
1478  return StatusCode::FAILURE;
1479  }
1480  pulsedatafile = pulsedataname.c_str();
1481  infile.open(pulsedatafile);
1482 
1483  if (!infile) {
1484  ATH_MSG_ERROR(" cannot open FCAL file ");
1485  return StatusCode::FAILURE;
1486  } else {
1487  ATH_MSG_DEBUG(" FCAL file opened ");
1488  }
1489 
1490  const int nMod = 3;
1491  // m_noiseRmsFcal.resize(nMod);
1492  int imod = 0;
1493 
1494  for (int iMod = 0; iMod < nMod; iMod++) {
1495 
1496  // first read the module number + noise rms (from J. Rutherfoord)
1497  // infile >> imod >> m_noiseRmsFcal[iMod] ;
1498  infile >> imod >> noiseRms4[0] >> noiseRms4[1] >> noiseRms4[2] >>
1499  noiseRms4[3];
1500  m_noiseRmsFcal.push_back(noiseRms4);
1501 
1502  // read the pulse shape for this module (from John Rutherfoord)
1503  infile >> pulseShape[0] >> pulseShape[1] >> pulseShape[2] >>
1504  pulseShape[3] >> pulseShape[4] >> pulseShape[5] >> pulseShape[6] >>
1505  pulseShape[7] >> pulseShape[8] >> pulseShape[9] >> pulseShape[10] >>
1506  pulseShape[11] >> pulseShape[12] >> pulseShape[13] >> pulseShape[14] >>
1507  pulseShape[15] >> pulseShape[16] >> pulseShape[17] >> pulseShape[18] >>
1508  pulseShape[19] >> pulseShape[20] >> pulseShape[21] >> pulseShape[22] >>
1509  pulseShape[23];
1510  m_pulseShapeFcal.push_back(pulseShape);
1511 
1512  // read the pulse shape derivative
1513  infile >> pulseShapeDer[0] >> pulseShapeDer[1] >> pulseShapeDer[2] >>
1514  pulseShapeDer[3] >> pulseShapeDer[4] >> pulseShapeDer[5] >>
1515  pulseShapeDer[6] >> pulseShapeDer[7] >> pulseShapeDer[8] >>
1516  pulseShapeDer[9] >> pulseShapeDer[10] >> pulseShapeDer[11] >>
1517  pulseShapeDer[12] >> pulseShapeDer[13] >> pulseShapeDer[14] >>
1518  pulseShapeDer[15] >> pulseShapeDer[16] >> pulseShapeDer[17] >>
1519  pulseShapeDer[18] >> pulseShapeDer[19] >> pulseShapeDer[20] >>
1520  pulseShapeDer[21] >> pulseShapeDer[22] >> pulseShapeDer[23];
1521  m_pulseShapeDerFcal.push_back(pulseShapeDer);
1522  }
1523 
1524  m_autoCorrFcal.resize(s_NBSAMPLES);
1525  // finally read standard autocorrelation matrix
1526  infile >> m_autoCorrFcal[0] >> m_autoCorrFcal[1] >> m_autoCorrFcal[2] >>
1527  m_autoCorrFcal[3] >> m_autoCorrFcal[4] >> m_autoCorrFcal[5] >>
1528  m_autoCorrFcal[6];
1529 
1530  infile.close();
1531  ATH_MSG_DEBUG(" FCAL file closed ");
1532 
1533  std::vector<float> auxV(3);
1536 
1537  ATH_MSG_DEBUG(
1538  "Finished reading noise, calib coeff and pulse shape for each module for "
1539  "FCAL: ");
1540  for (int iMod = 0; iMod < nMod; iMod++) {
1541 
1542  ATH_MSG_INFO(" iMod= " << iMod << ", noise rms FCAL (eta bin 1,2,3,4): "
1543  << m_noiseRmsFcal[iMod] << " (transverse) MeV ");
1544  if (iMod < 2) {
1545  ATH_MSG_INFO(" iMod= " << iMod << ", calib coeff FCAL (eta bin 1,2,3,4): "
1546  << (m_calibCoeffFcal[iMod])[0] << ", "
1547  << (m_calibCoeffFcal[iMod])[1] << ", "
1548  << (m_calibCoeffFcal[iMod])[2] << ", "
1549  << (m_calibCoeffFcal[iMod])[3]);
1550  }
1551  ATH_MSG_INFO(
1552  " iMod= "
1553  << iMod << ", pulse shape FCAL: " << (m_pulseShapeFcal[iMod])[0] << ", "
1554  << (m_pulseShapeFcal[iMod])[1] << ", " << (m_pulseShapeFcal[iMod])[2]
1555  << ", " << (m_pulseShapeFcal[iMod])[3] << ", "
1556  << (m_pulseShapeFcal[iMod])[4] << ", " << (m_pulseShapeFcal[iMod])[5]
1557  << ", " << (m_pulseShapeFcal[iMod])[6] << ", "
1558  << (m_pulseShapeFcal[iMod])[7] << ", " << (m_pulseShapeFcal[iMod])[8]
1559  << ", " << (m_pulseShapeFcal[iMod])[9] << ", "
1560  << (m_pulseShapeFcal[iMod])[10] << ", " << (m_pulseShapeFcal[iMod])[11]
1561  << ", " << (m_pulseShapeFcal[iMod])[12] << ", "
1562  << (m_pulseShapeFcal[iMod])[13] << ", " << (m_pulseShapeFcal[iMod])[14]
1563  << ", " << (m_pulseShapeFcal[iMod])[15] << ", "
1564  << (m_pulseShapeFcal[iMod])[16] << ", " << (m_pulseShapeFcal[iMod])[17]
1565  << ", " << (m_pulseShapeFcal[iMod])[18] << ", "
1566  << (m_pulseShapeFcal[iMod])[19] << ", " << (m_pulseShapeFcal[iMod])[20]
1567  << ", " << (m_pulseShapeFcal[iMod])[21] << ", "
1568  << (m_pulseShapeFcal[iMod])[22] << ", "
1569  << (m_pulseShapeFcal[iMod])[23]);
1570  }
1571  ATH_MSG_INFO("auto corr FCAL: "
1572  << m_autoCorrFcal[0] << ", " << m_autoCorrFcal[1] << ", "
1573  << m_autoCorrFcal[2] << ", " << m_autoCorrFcal[3] << ", "
1574  << m_autoCorrFcal[4] << ", " << m_autoCorrFcal[5] << ", "
1575  << m_autoCorrFcal[6]);
1576 
1577  // now the relative gains
1578  pulsedataname =
1579  PathResolver::find_file("Fcal_ptweights_table7.data", "DATAPATH");
1580  if (pulsedataname.empty()) {
1581  ATH_MSG_ERROR("Could not locate Fcal_ptweights_table7.data file");
1582  return StatusCode::FAILURE;
1583  }
1584  pulsedatafile = pulsedataname.c_str();
1585  infile.open(pulsedatafile);
1586 
1587  if (!infile) {
1588  ATH_MSG_ERROR(" cannot open FCAL gains file ");
1589  return StatusCode::FAILURE;
1590  } else {
1591  ATH_MSG_DEBUG(" FCAL gains file opened ");
1592  }
1593 
1594  // first read the gain file for all cells (from John Rutherfoord)
1595 
1597  // file structure:
1598  const unsigned int colNum = 14;
1599  // number of cells per 'group' (sharing the same gain)
1600  const unsigned int maxCell = 4;
1601  std::vector<std::string> TTlabel;
1602  TTlabel.resize(colNum);
1603  std::vector<float> gain;
1604  gain.resize(colNum);
1605  int iline = 0;
1606  int ngain = 0;
1607 
1608  while (infile >> TTlabel[0] >> gain[0] >> TTlabel[1] >> gain[1] >>
1609  TTlabel[2] >> gain[2] >> TTlabel[3] >> gain[3] >> TTlabel[4] >>
1610  gain[4] >> TTlabel[5] >> gain[5] >> TTlabel[6] >> gain[6] >>
1611  TTlabel[7] >> gain[7] >> TTlabel[8] >> gain[8] >> TTlabel[9] >>
1612  gain[9] >> TTlabel[10] >> gain[10] >> TTlabel[11] >> gain[11] >>
1613  TTlabel[12] >> gain[12] >> TTlabel[13] >> gain[13]) {
1614 
1615  ATH_MSG_DEBUG(" TTlabel[0], gain[0]= " << TTlabel[0] << ", " << gain[0]);
1616  ATH_MSG_DEBUG(" [...] ");
1617  ATH_MSG_DEBUG(" TTlabel[13], gain[13]= " << TTlabel[13] << ", "
1618  << gain[13]);
1619 
1620  // int barrel_ec_fcal = 2;
1621  // int pos_neg = -2; // C side (neg z)
1622  int detZside = -1;
1623  if (iline < 32) {
1624  detZside = 1;
1625  } // A side (pos z)
1626  // if(iline < 32) {pos_neg = 2;} // A side (pos z)
1627  for (unsigned int icol = 0; icol < colNum; icol++) {
1628 
1629  int em_had = 0; // FCAL1
1630  int layer = 0;
1631  if (icol > 7) {
1632  em_had = 1; // FCAL2+FCAL3
1633  if (icol > 11) {
1634  layer = 1;
1635  }
1636  }
1637  int region = 3; // FCAL
1638 
1639  std::string TTlab = TTlabel[icol];
1640  // int Ieta = int(TTlab[0])-48;
1641  // int Lphi = int(TTlab[1])-64;
1642  int eta = int(TTlab[0]) - 49;
1643  int phi = int(TTlab[1]) - 65;
1644  int nPhi = 16;
1645  if (detZside < 0) {
1646  phi = (phi < nPhi / 2 ? nPhi / 2 - 1 - phi : 3 * nPhi / 2 - 1 - phi);
1647  }
1648 
1649  int group = 1;
1650  if (TTlab.size() > 3) {
1651  group = int(TTlab[3]) - 48;
1652  }
1653 
1654  // added Nov 2009 following introduction of TTCell map "FcalFix"
1655  // modified again Jun 2010 following introduction of TTCell map "FcalFix2"
1656  // (the C side is not symmetric wrt the A side) modified again Jan 2011 in
1657  // an attempt to correctly load the gains to the correct cells (not all
1658  // cells were being assigned gains)
1659  if (em_had) { // FCAL-had only
1660  if ((layer == 1 && detZside > 0) || (layer == 0 && detZside < 0)) {
1661  if (eta == 0 || eta == 2) {
1662  eta += 1;
1663  // group+=1; //- OLD CODE (pre Jan2011 change)
1664 
1665  } else {
1666  if (layer == 1) {
1667  group += 1;
1668  } else {
1669  group += 2;
1670  }
1671  }
1672  } else {
1673  if (eta == 1 || eta == 3) {
1674  eta -= 1;
1675  // group+=2; //- OLD CODE (pre Jan2011 change)
1676  if (layer == 1) {
1677  group += 1;
1678  } else {
1679  group += 2;
1680  }
1681  }
1682  }
1683  }
1684  //
1685  // ... create an offline TT+layer identifier from the labels read in.
1686  //
1687  Identifier ttId =
1688  m_lvl1Helper->layer_id(detZside, em_had, region, eta, phi, layer);
1689  ATH_MSG_DEBUG("ttId= " << m_lvl1Helper->show_to_string(ttId));
1690  //
1691  //... fill a vector with offline identifier of cells belonging to this
1692  // tower (with layer info)
1693  //
1694  std::vector<Identifier> cellIdVec = m_ttSvc->createCellIDvecLayer(ttId);
1695  //
1696  // .... loop on all LAr offline channels belonging to the trigger tower
1697  // (with layer info)
1698  //
1699  std::vector<unsigned int> hashVec;
1700  // number of connected cells in the current tower
1701  unsigned int nCell = 0;
1702  for (unsigned int ichan = 0; ichan < cellIdVec.size(); ichan++) {
1703  Identifier cellId = cellIdVec[ichan];
1704 
1705  int cellPhi = m_fcalHelper->phi(cellId);
1706  if (cellPhi >=
1707  0) { // protection skipping unconnected channels (they have
1708  // eta=phi=-999) - normally, they should not be in the list
1709  nCell++;
1710  //
1711  // .... convert to FCAL hash
1712  //
1713  IdentifierHash fcalHash = m_fcalHelper->channel_hash(cellId);
1714  //
1715  //... save hash indices
1716  //
1717  hashVec.push_back(fcalHash);
1718  } // end condition cellPhi>=0
1719 
1720  } // end of loop on channels in the tower
1721  ATH_MSG_DEBUG("nCell= " << nCell);
1722 
1723  //
1724  //... loop on the 4 cells of the current group and put their gain in the
1725  // gain vector (indexed by hashes)
1726  //
1727  for (unsigned int iCell = 0; iCell < maxCell; iCell++) {
1728  unsigned int index0 = (group - 1) * maxCell + iCell;
1729  if (index0 < nCell) { // unconnected channels have highest hash ids
1730  // (because highest eta values)
1731  unsigned int index = hashVec[index0];
1733  ngain++;
1734  ATH_MSG_DEBUG(" index, gain= " << index << ", " << gain[icol]);
1735  }
1736  }
1737 
1738  } // end of loop on columns
1739  iline++;
1740  } // end of loop on lines
1741 
1742  ATH_MSG_DEBUG(" number of lines found= " << iline);
1743  infile.close();
1744  ATH_MSG_INFO(" FCAL gains file closed, extracted " << ngain << " gains");
1745 
1746  return StatusCode::SUCCESS;
1747 }
1748 //===========================================================================
1749 int LArTTL1Maker::decodeInverse(int region, int eta) {
1750  //===========================================================================
1751  // Maps [ region , eta ] to [ Ieta]
1752  // ==========================================================================
1753  // Problem: this is NOT a bijection, because of the "barrel end" zone.
1754  // Convention: only the barrel part of the identifying fields is
1755  // returned
1756  //===========================================================================
1757 
1758  int Ieta = 0;
1759  if (region == 0) { // Barrel + EC-OW
1760  if (eta <= 14) {
1761  Ieta = eta + 1;
1762  } else {
1763  Ieta = eta - 13;
1764  }
1765  } else if (region == 1 || region == 2) { // EC-IW
1766  if (region == 1) {
1767  Ieta = eta + 12;
1768  } else {
1769  Ieta = 15;
1770  }
1771  } else if (region == 3) { // FCAL
1772  Ieta = eta + 1;
1773  }
1774  return Ieta;
1775 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
LArTTL1Maker::m_sinThetaEmb
std::vector< float > m_sinThetaEmb
auxiliary EMBarrel data: sin(theta)
Definition: LArTTL1Maker.h:173
LArTTL1Maker::m_xxxHitContainerName
std::array< SG::ReadHandleKey< LArHitContainer >, 4 > m_xxxHitContainerName
Definition: LArTTL1Maker.h:231
LArTTL1Maker::s_NBENERGIES
static const short s_NBENERGIES
number of energies at which saturation is described (em)
Definition: LArTTL1Maker.h:161
LArHitList.h
et
Extra patterns decribing particle interation process.
ATHRNG::RNGWrapper::SeedingOptionType
SeedingOptionType
Options for seeding option=0 is setSeed as in MC20 option=1 is setSeedLegacy as in MC16 option=2 is s...
Definition: RNGWrapper.h:97
LArTTL1Maker::m_noiseRmsHec
std::vector< float > m_noiseRmsHec
auxiliary HEC data: noise rms
Definition: LArTTL1Maker.h:201
LArTTL1Maker::s_PEAKPOS
static const short s_PEAKPOS
peak position
Definition: LArTTL1Maker.h:157
run.infile
string infile
Definition: run.py:13
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LArTTL1Maker::m_fSamplKey
SG::ReadCondHandleKey< ILArfSampl > m_fSamplKey
Sampling fractions retrieved from DB.
Definition: LArTTL1Maker.h:148
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:251
AtlasDetectorID::is_lar_fcal
bool is_lar_fcal(Identifier id) const
Definition: AtlasDetectorID.h:839
CaloLVL1_ID::is_fcal
bool is_fcal(const Identifier id) const
Test wether given tower or layer is part of the FCAL.
Definition: CaloLVL1_ID.h:710
LArTTL1Maker::readAuxiliary
StatusCode readAuxiliary()
method called at the begining of execute() to fill the hit map
Definition: LArTTL1Maker.cxx:1233
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
CaloIDHelper::channel_hash_max
size_type channel_hash_max() const
One more than the largest channel (cell) hash code.
LArTTL1Maker::m_EmTTL1ContainerName
SG::WriteHandleKey< LArTTL1Container > m_EmTTL1ContainerName
algorithm property: container name for the EM TTL1s
Definition: LArTTL1Maker.h:227
LArTTL1Maker::m_autoCorrHec
std::vector< std::vector< float > > m_autoCorrHec
auxiliary HEC data: auto-correlation matrix
Definition: LArTTL1Maker.h:203
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
index
Definition: index.py:1
LArTTL1Maker::computeSignal
std::vector< float > computeSignal(const Identifier towerId, const int Ieta, const int specialCase, std::vector< float > visEnergy, const int refTime) const
initialize hit map
Definition: LArTTL1Maker.cxx:861
ATHRNG::RNGWrapper::setSeedLegacy
void setSeedLegacy(const std::string &algName, size_t slot, uint64_t ev, uint64_t run, uint64_t offset, SeedingOptionType seeding, EventContext::ContextEvt_t evt=EventContext::INVALID_CONTEXT_EVT)
Set the random seed using a string (e.g.
Definition: RNGWrapper.cxx:104
LArTTL1Maker::decodeInverse
int decodeInverse(int region, int eta)
Definition: LArTTL1Maker.cxx:1749
defineDB.ichan
ichan
Definition: JetTagCalibration/share/defineDB.py:28
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
ATHRNG::RNGWrapper::SeedingDefault
@ SeedingDefault
Definition: RNGWrapper.h:101
skel.it
it
Definition: skel.GENtoEVGEN.py:407
CaloLVL1_ID::is_emec
bool is_emec(const Identifier id) const
Test wether given tower or layer is part of the EM end-cap.
Definition: CaloLVL1_ID.h:696
AthCommonMsg< Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
LArTTL1Maker::m_calibCoeffFcalHad
std::vector< float > m_calibCoeffFcalHad
auxiliary FCAL data: calibration coefficients
Definition: LArTTL1Maker.h:216
LArFCAL_Base_ID::channel_hash
IdentifierHash channel_hash(Identifier channelId) const
Convert a connected channel (cell) Identifier to a hash code.
CaloLVL1_ID::region
int region(const Identifier id) const
return region according to :
Definition: CaloLVL1_ID.h:647
LArTTL1Maker::s_NBSAMPLES
static const short s_NBSAMPLES
number of samples in TTL1s
Definition: LArTTL1Maker.h:153
LArTTL1Maker::initialize
virtual StatusCode initialize() override
Read ascii files for auxiliary data (puslse shapes, noise, etc...)
Definition: LArTTL1Maker.cxx:149
CaloLVL1_ID::is_barrel_end
bool is_barrel_end(const Identifier id) const
Test wether given tower or layer is part of the EM barrel END.
Definition: CaloLVL1_ID.h:690
LArTTL1Maker::m_calibCoeffEmec
std::vector< float > m_calibCoeffEmec
auxiliary EMEC data: calibration coeeficient
Definition: LArTTL1Maker.h:184
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
LArTTL1Maker::m_NoiseOnOff
bool m_NoiseOnOff
algorithm property: noise (in all sub-detectors) is on if true
Definition: LArTTL1Maker.h:234
SG::ReadHandleKey< LArHitContainer >
HWIdentifier
Definition: HWIdentifier.h:13
LArTTL1Maker::m_sinThetaHec
std::vector< float > m_sinThetaHec
auxiliary HEC data: sin(theta)
Definition: LArTTL1Maker.h:197
LArTTL1Maker::m_debugThresh
float m_debugThresh
algorithm property: debug threshold
Definition: LArTTL1Maker.h:242
CaloLVL1_ID::tower_end
id_iterator tower_end() const
end iterator over towers
Definition: CaloLVL1_ID.h:603
TrigVSI::AlgConsts::nPhi
constexpr int nPhi
Default bin number of phi for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:27
LArHitEMap::GetCell
const LArHitList & GetCell(const unsigned int index) const
Definition: LArHitEMap.h:43
LArTTL1Maker::m_noiseRmsFcal
std::vector< std::vector< float > > m_noiseRmsFcal
auxiliary FCAL data: noise rms
Definition: LArTTL1Maker.h:219
LArTTL1Maker::m_randomSeedOffset
Gaudi::Property< uint32_t > m_randomSeedOffset
Definition: LArTTL1Maker.h:124
atlasStyleMacro.icol
int icol
Definition: atlasStyleMacro.py:13
LArTTL1Maker::LArTTL1Maker
LArTTL1Maker(const std::string &name, ISvcLocator *pSvcLocator)
constructor
Definition: LArTTL1Maker.cxx:54
CaloCell_ID.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
CaloLVL1_ID::is_hec
bool is_hec(const Identifier id) const
Test wether given tower or layer is part of the HEC.
Definition: CaloLVL1_ID.h:703
LArTTL1Maker::m_hitMapKey
SG::ReadHandleKey< LArHitEMap > m_hitMapKey
hit map
Definition: LArTTL1Maker.h:224
LArTTL1Maker::m_truthHitsContainer
std::string m_truthHitsContainer
key for saving truth
Definition: LArTTL1Maker.h:247
CaloLVL1_ID::layer_id
Identifier layer_id(int pos_neg_z, int sampling, int region, int eta, int phi, int layer) const
build a layer identifier
Definition: CaloLVL1_ID.h:530
LArHitList::getData
const LARLIST & getData() const
Definition: LArHitList.h:25
LArTTL1Maker::execute
virtual StatusCode execute() override
Create LArTTL1 object save in TES (2 containers: 1 EM, 1 hadronic)
Definition: LArTTL1Maker.cxx:299
python.PyAthena.module
module
Definition: PyAthena.py:131
LArFCAL_Base_ID::phi
int phi(const Identifier id) const
phi [0,15]
LArTTL1Maker::m_pulseShapeFcal
std::vector< std::vector< float > > m_pulseShapeFcal
auxiliary FCAL data: pulse shapes
Definition: LArTTL1Maker.h:208
LArTTL1Maker::m_ttSvc
ToolHandle< CaloTriggerTowerService > m_ttSvc
Definition: LArTTL1Maker.h:135
LArTTL1Maker::computeNoise
std::vector< float > computeNoise(const Identifier towerId, const int Ieta, std::vector< float > &inputV, CLHEP::HepRandomEngine *rndmEngine)
Definition: LArTTL1Maker.cxx:1078
LArTTL1Maker::m_BeginRunPriority
int m_BeginRunPriority
Definition: LArTTL1Maker.h:133
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
lumiFormat.i
int i
Definition: lumiFormat.py:85
LArTTL1Maker::m_fcalHelper
const LArFCAL_ID * m_fcalHelper
pointer to the offline FCAL helper
Definition: LArTTL1Maker.h:143
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArTTL1Maker::m_cellRelGainFcal
std::vector< float > m_cellRelGainFcal
auxiliary FCAL data: relative gains
Definition: LArTTL1Maker.h:206
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ILArfSampl::FSAMPL
virtual const float & FSAMPL(const HWIdentifier &id) const =0
LArTTL1Maker::m_noiseRmsEmb
std::vector< float > m_noiseRmsEmb
auxiliary EMBarrel data: noise rms
Definition: LArTTL1Maker.h:177
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LArTTL1Maker::m_noEmCalibMode
bool m_noEmCalibMode
algorithm property: no calibration mode for EM towers
Definition: LArTTL1Maker.h:238
python.LArMinBiasAlgConfig.int
int
Definition: LArMinBiasAlgConfig.py:59
LArTTL1Maker::m_pulseShapeDerFcal
std::vector< std::vector< float > > m_pulseShapeDerFcal
auxiliary FCAL data: pulse shape derivatives
Definition: LArTTL1Maker.h:210
LArTTL1Maker::s_NBETABINS
static const short s_NBETABINS
number of eta bins
Definition: LArTTL1Maker.h:159
LArTTL1Maker::m_noHadCalibMode
bool m_noHadCalibMode
algorithm property: no calibration mode for had towers
Definition: LArTTL1Maker.h:240
CaloIdManager::getLVL1_ID
const CaloLVL1_ID * getLVL1_ID(void) const
Definition: CaloIdManager.cxx:75
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LArTTL1Maker::m_pulseShapeHec
std::vector< float > m_pulseShapeHec
auxiliary HEC data: pulse shape
Definition: LArTTL1Maker.h:191
AtlasDetectorID::is_lar_hec
bool is_lar_hec(Identifier id) const
Definition: AtlasDetectorID.h:829
LArTTL1Maker::m_calibCoeffFcal
std::vector< std::vector< float > > m_calibCoeffFcal
auxiliary FCAL data: calibration coefficients
Definition: LArTTL1Maker.h:212
CaloLVL1_ID::is_emb
bool is_emb(const Identifier id) const
Test wether given tower or layer is part of the EM barrel.
Definition: CaloLVL1_ID.h:684
LArTTL1Maker::s_NBDEPTHS
static const short s_NBDEPTHS
number of sampling (in depth)
Definition: LArTTL1Maker.h:151
LArTTL1Maker.h
PowhegPythia8EvtGen_jetjet.theEnergy
int theEnergy
Definition: PowhegPythia8EvtGen_jetjet.py:12
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
LArTTL1Maker::m_refEnergyEm
std::vector< float > m_refEnergyEm
auxiliary EM data: reference energies for saturation simulation
Definition: LArTTL1Maker.h:164
LArTTL1Maker::m_satEnergyHec
std::vector< float > m_satEnergyHec
auxiliary HEC data: saturation energy
Definition: LArTTL1Maker.h:199
Trk::index0
@ index0
Definition: BoundarySurfaceFace.h:47
AthAlgorithm
Definition: AthAlgorithm.h:47
LArTTL1Maker::m_pulseShapeEm
std::vector< std::vector< float > > m_pulseShapeEm
auxiliary EM data: pulse shapes
Definition: LArTTL1Maker.h:166
LArTTL1Maker::finalize
virtual StatusCode finalize() override
Definition: LArTTL1Maker.cxx:842
LArTTL1Maker::~LArTTL1Maker
virtual ~LArTTL1Maker()
destructor
Definition: LArTTL1Maker.cxx:147
LArHitList
Definition: LArHitList.h:9
PathResolver.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
LArTTL1Maker::m_lvl1Helper
const CaloLVL1_ID * m_lvl1Helper
pointer to the offline TT helper
Definition: LArTTL1Maker.h:137
LArTTL1Maker::m_OflHelper
const CaloCell_ID * m_OflHelper
pointer to the offline id helper
Definition: LArTTL1Maker.h:145
CaloLVL1_ID::eta
int eta(const Identifier id) const
return eta according to :
Definition: CaloLVL1_ID.h:653
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
LArTTL1Maker::m_calibCoeffEmb
std::vector< float > m_calibCoeffEmb
auxiliary EMBarrel data: calibration coefficient
Definition: LArTTL1Maker.h:175
LArTTL1Maker::m_emHelper
const LArEM_ID * m_emHelper
pointer to the offline EM helper
Definition: LArTTL1Maker.h:139
LArTTL1Maker::m_useTriggerTime
bool m_useTriggerTime
Alorithm property: use trigger time or not.
Definition: LArTTL1Maker.h:129
CaloCell_Base_ID::cell_id
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
RNGWrapper.h
LArTTL1Maker::m_PileUp
bool m_PileUp
algorithm property: pile up or not
Definition: LArTTL1Maker.h:236
LArTTL1.h
LArTTL1Maker::m_autoCorrEm
std::vector< float > m_autoCorrEm
auxiliary EM data: auto-correlation matrix
Definition: LArTTL1Maker.h:170
LArTTL1Maker::m_randomStreamName
Gaudi::Property< std::string > m_randomStreamName
Definition: LArTTL1Maker.h:123
LArID.h
ReadBchFromCool.nMod
nMod
Definition: ReadBchFromCool.py:436
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
LArTTL1Maker::m_RandomSvc
ServiceHandle< IAthRNGSvc > m_RandomSvc
Definition: LArTTL1Maker.h:122
DeMoScan.index
string index
Definition: DeMoScan.py:364
LArTTL1Maker::s_MAXSAMPLES
static const short s_MAXSAMPLES
max number of samples in pulse shape
Definition: LArTTL1Maker.h:155
LArTTL1Maker::m_useLegacyRandomSeeds
Gaudi::Property< bool > m_useLegacyRandomSeeds
Definition: LArTTL1Maker.h:125
CaloLVL1_ID.h
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
LArTTL1Maker::m_noiseRmsEmec
std::vector< float > m_noiseRmsEmec
auxiliary EMEC data: noise rms
Definition: LArTTL1Maker.h:186
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:350
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
LArEM_Base_ID::is_em_barrel
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArTTL1Maker::m_sinThetaEmec
std::vector< float > m_sinThetaEmec
auxiliary EMEC data: sin(theta)
Definition: LArTTL1Maker.h:182
LArHitContainer.h
CaloTriggerTowerService.h
LArTTL1Maker::m_chronoTest
bool m_chronoTest
algorithm property: switch chrono on
Definition: LArTTL1Maker.h:244
DeMoScan.first
bool first
Definition: DeMoScan.py:536
LArTTL1Maker::m_chronSvc
IChronoStatSvc * m_chronSvc
Definition: LArTTL1Maker.h:121
CaloLVL1_ID::tower_hash_max
size_type tower_hash_max(void) const
tower hash table max size
Definition: CaloLVL1_ID.h:560
LArTTL1Maker::m_hecHelper
const LArHEC_ID * m_hecHelper
pointer to the offline HEC helper
Definition: LArTTL1Maker.h:141
LArTTL1Maker::m_calibCoeffFcalEm
std::vector< float > m_calibCoeffFcalEm
auxiliary FCAL data: calibration coefficients
Definition: LArTTL1Maker.h:214
LArTTL1Maker::m_HadTTL1ContainerName
SG::WriteHandleKey< LArTTL1Container > m_HadTTL1ContainerName
algorithm property: container name for the HAD TTL1s
Definition: LArTTL1Maker.h:229
CaloLVL1_ID::tower_begin
id_iterator tower_begin() const
begin iterator over towers
Definition: CaloLVL1_ID.h:597
CaloLVL1_ID::sampling
int sampling(const Identifier id) const
return sampling according to :
Definition: CaloLVL1_ID.h:641
CaloIdManager.h
PlotCalibFromCool.ngain
ngain
Definition: PlotCalibFromCool.py:565
CaloLVL1_ID::tower_hash
IdentifierHash tower_hash(Identifier towerId) const
create hash id from tower id
Definition: CaloLVL1_ID.h:728
LArHitEMap::GetNbCells
int GetNbCells(void) const
Definition: LArHitEMap.cxx:64
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
hitTime
float hitTime(const AFP_SIDSimHit &hit)
Definition: AFP_SIDSimHit.h:39
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
TrigVSI::AlgConsts::nEta
constexpr int nEta
Default bin number of eta for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:26
CaloID_Exception.h
LArTTL1Maker::m_pulseShapeDerEm
std::vector< std::vector< float > > m_pulseShapeDerEm
auxiliary EM data: pulse shape derivative
Definition: LArTTL1Maker.h:168
CaloLVL1_ID::is_tile
bool is_tile(const Identifier id) const
Test wether given tower or layer is part of the Tile Calorimeter.
Definition: CaloLVL1_ID.h:672
LArTTL1Maker::handle
virtual void handle(const Incident &) override
Definition: LArTTL1Maker.cxx:287
AtlasDetectorID::is_lar_em
bool is_lar_em(Identifier id) const
Definition: AtlasDetectorID.h:818
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
LArTTL1
Liquid Argon TT L1 sum class.
Definition: LArTTL1.h:29
maxCell
#define maxCell
ATHRNG::RNGWrapper::MC16Seeding
@ MC16Seeding
Definition: RNGWrapper.h:99
LArTTL1Maker::m_pulseShapeDerHec
std::vector< float > m_pulseShapeDerHec
auxiliary HEC data: pulse shape derivative
Definition: LArTTL1Maker.h:193
ITriggerTime.h
interface to a tool that returns the time offset of the current trigger. Used by PileUpMergeSvc
LArTTL1Maker::m_triggerTimeTool
ToolHandle< ITriggerTime > m_triggerTimeTool
Alorithm property: name of the TriggerTimeTool.
Definition: LArTTL1Maker.h:131
ILArfSampl
Definition: ILArfSampl.h:14
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65
LArTTL1Maker::m_calibCoeffHec
std::vector< float > m_calibCoeffHec
auxiliary HEC data: calibration coefficients
Definition: LArTTL1Maker.h:195
Identifier
Definition: IdentifierFieldParser.cxx:14
LArTTL1Maker::m_autoCorrFcal
std::vector< float > m_autoCorrFcal
auxiliary FCAL data: auto-correlation matrix
Definition: LArTTL1Maker.h:221