ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
LArSCL1Maker Class Reference

The aim of this algorithm is the simulation of the LAr analogue Super-Cell sums. More...

#include <LArSCL1Maker.h>

Inheritance diagram for LArSCL1Maker:
Collaboration diagram for LArSCL1Maker:

Public Member Functions

 LArSCL1Maker (const std::string &name, ISvcLocator *pSvcLocator)
 constructor More...
 
 ~LArSCL1Maker ()
 destructor More...
 
StatusCode initialize ()
 Read ascii files for auxiliary data (puslse shapes, noise, etc...) More...
 
StatusCode execute (const EventContext &context) const
 Create LArSCL1 object save in TES (2 containers: 1 EM, 1 hadronic) More...
 
StatusCode finalize ()
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

template<class T >
const T * retrieve (const EventContext &context, SG::ReadCondHandleKey< T > handleKey) const
 
std::vector< float > computeSignal (const Identifier towerId, const int Ieta, const int specialCase, std::vector< float > visEnergy, const int refTime) const
 initialize hit map More...
 
std::vector< float > computeNoise (const Identifier towerId, const int Ieta, std::vector< float > &inputV)
 
void printConditions (const HWIdentifier &hwSC)
 Method to print SuperCell Conditions. More...
 
void ConvertHits2Samples (const EventContext &context, const HWIdentifier &hwSC, CaloGain::CaloGain igain, const std::vector< std::pair< float, float > > &TimeE, std::vector< float > &samples) const
 Method for converting Hits from samples (simplified version of the same method in LarPileUpTool) More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKeySC
 
SG::ReadCondHandleKey< ILArShapem_shapesKey
 Property: Pulse shape (conditions input). More...
 
SG::ReadCondHandleKey< ILArfSamplm_fracSKey
 Property: Fraction of Energy Sampled (conditions input). More...
 
SG::ReadCondHandleKey< ILArPedestalm_pedestalSCKey
 Property: Pedestal offset (conditions input). More...
 
SG::ReadCondHandleKey< ILArNoisem_noiseSCKey
 Property: Electronics Noise (conditions input). More...
 
SG::ReadCondHandleKey< LArAutoCorrNoisem_autoCorrNoiseSCKey
 Property: AutoCorr Noise (conditions input). More...
 
SG::ReadCondHandleKey< LArADC2MeVm_adc2mevSCKey
 Property: ADC2MeV conversion (conditions input). More...
 
IChronoStatSvc * m_chronSvc
 
Gaudi::Property< std::string > m_randomStreamName
 
ServiceHandle< IAthRNGSvcm_atRndmGenSvc {this, "RndmSvc", "AthRNGSvc", ""}
 
Gaudi::Property< uint32_t > m_randomSeedOffset {this, "RandomSeedOffset", 2, ""}
 
Gaudi::Property< bool > m_useLegacyRandomSeeds
 
bool m_useTriggerTime
 Alorithm property: use trigger time or not. More...
 
int m_BeginRunPriority
 pointer to the TriggerTimeTool More...
 
ToolHandle< ICaloSuperCellIDToolm_scidtool
 
const CaloCell_SuperCell_IDm_scHelper
 pointer to the offline TT helper More...
 
const CaloCell_IDm_OflHelper = nullptr
 pointer to the offline id helper
More...
 
const LArOnline_SuperCellIDm_OnlSCHelper
 pointer to the online LAr helper More...
 
ServiceHandle< IIncidentSvc > m_incSvc
 
std::vector< std::vector< float > > m_autoCorrHec
 auxiliary HEC data: auto-correlation matrix More...
 
SG::ReadHandleKey< LArHitEMapm_hitMapKey
 hit map More...
 
SG::ReadHandleKey< LArDigitContainerm_bkgDigitsKey {this, "BkgDigitKey", ""}
 Background Digit Overlay, default key is Bkg_LArDigitSCL2. More...
 
SG::WriteHandleKey< LArDigitContainerm_sLArDigitsContainerKey
 output Lar Digits SC container More...
 
std::vector< std::string > m_HitContainer
 list of hit containers More...
 
std::string m_SubDetectors
 algorithm property: sub-detectors to be simulated More...
 
bool m_NoiseOnOff
 algorithm property: noise (in all sub-detectors) is on if true
More...
 
bool m_PileUp
 algorithm property: pile up or not More...
 
bool m_noEmCalibMode
 algorithm property: no calibration mode for EM towers More...
 
bool m_noHadCalibMode
 algorithm property: no calibration mode for had towers More...
 
bool m_chronoTest
 algorithm property: switch chrono on More...
 
unsigned int m_nSamples
 output number of samples More...
 
unsigned int m_firstSample
 output first samples More...
 
std::string m_saveHitsContainer
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Static Private Attributes

static const short s_NBDEPTHS = 4
 number of sampling (in depth) More...
 
static const short s_NBSAMPLES = 7
 number of samples in TTL1s More...
 
static const short s_MAXSAMPLES = 24
 max number of samples in pulse shape More...
 
static const short s_PEAKPOS = 3
 peak position
More...
 
static const short s_NBETABINS = 15
 number of eta bins More...
 
static const short s_NBENERGIES = 12
 number of energies at which saturation is described (em) More...
 

Detailed Description

The aim of this algorithm is the simulation of the LAr analogue Super-Cell sums.

It includes correct allocation of cells to Super-Cell, pulse profile as a function of time, saturation, appropriate noise addition, pile-up.
The resulting signals are an input to the Preprocessor (which in turn performs digitization, filtering, bunch crossing id., noise suppression,...)
Since it needs hits, the simulation only takes "simul" datasets as input, NOT digitized datasets.

Warning
although the output is not digitized, LArSCL1Maker is part of the digitization simulation.
Author
Denis O. Damazio (BNL)

Definition at line 60 of file LArSCL1Maker.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LArSCL1Maker()

LArSCL1Maker::LArSCL1Maker ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

constructor

Definition at line 59 of file LArSCL1Maker.cxx.

60  : AthReentrantAlgorithm(name, pSvcLocator)
61  //, p_triggerTimeTool()
62  ,
63  m_scidtool("CaloSuperCellIDTool"),
64  m_scHelper(nullptr),
65  m_OnlSCHelper(nullptr),
66  m_incSvc("IncidentSvc", name) {
67  //
68  // ........ default values of private data
69  //
70 
71  m_chronSvc = nullptr;
72  m_useTriggerTime = false;
73  // m_triggerTimeToolName = "CosmicTriggerTimeTool";
74 
75  m_BeginRunPriority = 100;
76 
77  // m_ttSvc = 0;
78  m_scHelper = nullptr;
79 
80  m_NoiseOnOff = true;
81  m_PileUp = false;
82  m_noEmCalibMode = false;
83  m_noHadCalibMode = false;
84  m_chronoTest = false;
85 
86  //
87  // ........ declare the private data as properties
88  //
89 
90  declareProperty("SubDetectors", m_SubDetectors = "LAr_All");
91 
92  declareProperty("NoiseOnOff", m_NoiseOnOff);
93 
94  declareProperty("PileUp", m_PileUp);
95  declareProperty("UseTriggerTime", m_useTriggerTime);
96  // declareProperty("TriggerTimeTool",p_triggerTimeTool);
97 
98  declareProperty("FirstSample", m_firstSample = -1);
99  declareProperty("NSamples", m_nSamples = 7);
100 
101  declareProperty("ChronoTest", m_chronoTest);
102 
103  declareProperty("TruthHitsContainer", m_saveHitsContainer = "",
104  "Specify to save hits");
105  //
106  return;
107 }

◆ ~LArSCL1Maker()

LArSCL1Maker::~LArSCL1Maker ( )

destructor

SCL1 Maker destructor

Definition at line 109 of file LArSCL1Maker.cxx.

109  {
112  return;
113 }

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ computeNoise()

std::vector<float> LArSCL1Maker::computeNoise ( const Identifier  towerId,
const int  Ieta,
std::vector< float > &  inputV 
)
private

◆ computeSignal()

std::vector<float> LArSCL1Maker::computeSignal ( const Identifier  towerId,
const int  Ieta,
const int  specialCase,
std::vector< float >  visEnergy,
const int  refTime 
) const
private

initialize hit map

◆ ConvertHits2Samples()

void LArSCL1Maker::ConvertHits2Samples ( const EventContext &  context,
const HWIdentifier hwSC,
CaloGain::CaloGain  igain,
const std::vector< std::pair< float, float > > &  TimeE,
std::vector< float > &  samples 
) const
private

Method for converting Hits from samples (simplified version of the same method in LarPileUpTool)

Definition at line 473 of file LArSCL1Maker.cxx.

477  {
478  // Converts hits of a particular LAr cell into energy samples
479  // declarations
480 
481  int nsamples;
482  int nsamples_der;
483  int i;
484  int j;
485  float energy;
486  float time;
487 
488  // ........ retrieve data (1/2) ................................
489  //
490  const auto* shapes = this->retrieve(context, m_shapesKey);
491  ILArShape::ShapeRef_t Shape = shapes->Shape(hwSC, igain);
492  ILArShape::ShapeRef_t ShapeDer = shapes->ShapeDer(hwSC, igain);
493 
494  nsamples = Shape.size();
495  nsamples_der = ShapeDer.size();
496 
497  if (nsamples == 0) {
498  std::cout << " No samples for cell = " << hwSC << std::endl;
499  return;
500  }
501 
502  std::vector<std::pair<float, float> >::const_iterator first = TimeE.begin();
503  std::vector<std::pair<float, float> >::const_iterator last = TimeE.end();
504  samples.clear();
505  samples.assign(m_nSamples, 0);
506  // m_firstSample=0;
507 
508  while (first != last) {
509  energy = (*first).first;
510  time = (*first).second;
511 
512  // Atlas like mode where we use 25ns binned pulse shape and derivative to
513  // deal with time offsets
514  // shift between reference shape and this time
515  int ishift = (int)(rint(time * (1. / 25)));
516  double dtime = time - 25. * ((double)(ishift));
517 
518  for (i = 0; i < (int)m_nSamples; i++) {
519  j = i - ishift + m_firstSample;
520  if (j >= 0 && j < nsamples) {
521  if (j < nsamples_der && std::fabs(ShapeDer[j]) < 10.)
522  samples[i] += (Shape[j] - ShapeDer[j] * dtime) * energy;
523  else
524  samples[i] += Shape[j] * energy;
525  }
526  }
527 
528  ++first;
529  } // loop over hits
530 
531  return;
532 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode LArSCL1Maker::execute ( const EventContext &  context) const

Create LArSCL1 object save in TES (2 containers: 1 EM, 1 hadronic)

Definition at line 222 of file LArSCL1Maker.cxx.

222  {
223 
224  ATH_MSG_DEBUG("Begining of execution");
225 
226  //
227  // ....... fill the LArHitEMap
228  //
229  SG::ReadHandle<LArHitEMap> hitmap(m_hitMapKey, context);
230  const LArHitEMap* hitmapPtr = hitmap.cptr();
231 
232  bool addBkg(false);
233  const LArDigitContainer* bkgDigitsPtr = nullptr;
234  std::map<HWIdentifier, size_t> IDtoIndexMap;
235  if (!m_bkgDigitsKey.empty()) {
236  addBkg = true;
238  bkgDigitsPtr = bkgDigits.cptr();
239  unsigned int digitCount(0);
240  for (const auto* const bkgDigit : *bkgDigitsPtr) {
241  IDtoIndexMap.insert({bkgDigit->channelID(), digitCount});
242  digitCount++;
243  }
244  // check size compatibility with first LArDigit
245  if ((unsigned int)bkgDigitsPtr->at(0)->nsamples() != m_nSamples) {
246  addBkg = false; // don't add background
247  ATH_MSG_INFO(
248  "Uncompatible background and signal LArDigit size : Overlay "
249  "requested but will not be performed");
250  }
251  } // end of check if the Key is empty
252  //
253  // .....get the trigger time if requested
254  //
255  // double trigtime=0;
256  /*
257  if (m_useTriggerTime && !p_triggerTimeTool.empty()) {
258  trigtime = p_triggerTimeTool->time();
259  }
260  ATH_MSG_DEBUG("Trigger time used : " << trigtime);
261  */
262 
263  const auto* fracS = this->retrieve(context, m_fracSKey);
264  const auto* pedestal = this->retrieve(context, m_pedestalSCKey);
265  const auto* larnoise = this->retrieve(context, m_noiseSCKey);
266  const auto* autoCorrNoise = this->retrieve(context, m_autoCorrNoiseSCKey);
267  const auto* adc2mev = this->retrieve(context, m_adc2mevSCKey);
268 
270  context);
271  auto scContainer = std::make_unique<LArDigitContainer>();
272 
273  unsigned int nbSC = (unsigned int)m_scHelper->calo_cell_hash_max();
274  scContainer->reserve(nbSC);
275 
276  // .... get SC cabling map
277  //
278  const LArOnOffIdMapping* cabling = this->retrieve(context, m_cablingKeySC);
279  if (!cabling) {
280  ATH_MSG_ERROR("Do not have SC cabling map !!!");
281  return StatusCode::FAILURE;
282  }
283 
284  /* Disable HIT recording for the moment
285  CaloCellContainer *scHitContainer = 0;
286  if(m_saveHitsContainer.size()>0) {
287  scHitContainer = new CaloCellContainer;
288  ATH_CHECK( evtStore()->record(scHitContainer, m_saveHitsContainer) );
289  }
290  */
291 
292  //
293  // ... initialise vectors for sums of energy in each TT
294  //
295  ATH_MSG_DEBUG("Max number of LAr Super-Cell= " << nbSC);
296 
297  std::vector<std::vector<float> >
298  sumEnergy; // inner index = time slot (from 0 to visEvecSize-1)
299  std::vector<std::vector<float> >
300  sumTime; // inner index = time slot (from 0 to visEvecSize-1)
301  sumEnergy.resize(nbSC);
302  sumTime.resize(nbSC);
303  std::vector<float> scSumE;
304  int scSumEvecSize = 5;
305 
306  scSumE.reserve(scSumEvecSize);
307  std::vector<std::vector<float> > scFloatContainerTmp;
308 
309  int it = 0;
310  int it_end = hitmapPtr->GetNbCells();
311  scContainer->reserve(nbSC); // container ordered by hash
312  const std::vector<float> base_vec(0);
313  scFloatContainerTmp.assign(nbSC, base_vec); // container ordered by hash
314  std::vector<bool> alreadyThere;
315  alreadyThere.resize(nbSC);
316  alreadyThere.assign(nbSC, false);
317 
318  std::vector<float> truthE;
319  truthE.resize(nbSC);
320  truthE.assign(nbSC, 0);
321 
322  std::vector<HWIdentifier> hwid;
323  hwid.resize(nbSC);
324  hwid.assign(nbSC, HWIdentifier(0));
325 
326  for (unsigned int i = 0; i < m_OnlSCHelper->channelHashMax(); ++i)
328 
329  // m_nSamples=5;
330  std::vector<float> samples;
331  samples.resize(m_nSamples);
332  std::vector<short> samplesInt;
333  samplesInt.reserve(m_nSamples);
335 
336  for (; it != it_end; ++it) {
337  const LArHitList& hitlist = hitmapPtr->GetCell(it);
338  const std::vector<std::pair<float, float> >& timeE = hitlist.getData();
339  if (!timeE.empty()) {
341  Identifier scId = m_scidtool->offlineToSuperCellID(cellId);
342  IdentifierHash scHash = m_scHelper->calo_cell_hash(scId);
343  if (scHash.value() == 999999)
344  continue;
345  HWIdentifier hwSC = cabling->createSignalChannelID(scId);
346  IdentifierHash scHWHash = m_OnlSCHelper->channel_Hash(hwSC);
347 
348  hwid[scHWHash] = hwSC;
349 
350  float factor = 1.0;
351  if ((adc2mev->ADC2MEV(hwSC, scGain)).size() < 2) {
352  continue;
353  }
354  factor = (adc2mev->ADC2MEV(hwSC, scGain))[1];
355  factor = 1.0 / fracS->FSAMPL(hwSC) / factor;
356 
357  ConvertHits2Samples(context, hwSC, scGain, timeE, samples);
358 
359  std::vector<float>& vec = scFloatContainerTmp.at(scHWHash);
360  if (!alreadyThere[scHWHash]) {
361  alreadyThere[scHWHash] = true;
362  for (unsigned int i = 0; i < samples.size(); i++) {
363  vec.push_back(factor * samples[i]);
364  }
365  } else {
366  for (unsigned int i = 0; i < samples.size(); i++) {
367  vec[i] += (factor * samples[i]);
368  }
369  }
370  }
371  } // it end
372 
373  it = 0;
374  it_end = nbSC;
375  short MAXADC = 4096; // 12 bits ADC?
376  std::vector<float> noise(m_nSamples);
377  double Rndm[32];
378  std::vector<float> zeroSamp;
379  zeroSamp.assign(m_nSamples, 0); // for empty channels
380  ATHRNG::RNGWrapper* rngWrapper =
381  m_atRndmGenSvc->getEngine(this, m_randomStreamName);
386  seedingmode);
387  CLHEP::HepRandomEngine* rndmEngine = rngWrapper->getEngine(context);
388  for (; it != it_end; ++it) {
389  std::vector<float>* vecPtr = &zeroSamp;
390  if (alreadyThere[it])
391  vecPtr = &(scFloatContainerTmp.at(it));
392  std::vector<float>& vec = *vecPtr;
393 
394  const HWIdentifier id = hwid[it];
395  if (id == 0) {
396  continue;
397  }
398 
399  // Do I have Overlay
400  size_t backGroundIdx = 999999;
401  if (addBkg && (IDtoIndexMap.find(id) != IDtoIndexMap.end()))
402  backGroundIdx = IDtoIndexMap.find(id)->second;
403 
404  // reset noise
405  noise.assign(m_nSamples, 0);
406 
407  // noise definition
408  if (m_NoiseOnOff && (backGroundIdx == 999999)) {
409  float SigmaNoise = (larnoise->noise(id, 0));
410  int index;
411  const std::vector<float>& CorrGen = (autoCorrNoise->autoCorrSqrt(id, 0));
412 
413  RandGaussZiggurat::shootArray(rndmEngine, static_cast<int>(m_nSamples),
414  Rndm, 0., 1.);
415 
416  for (int i = 0; i < (int)m_nSamples; i++) {
417  noise[i] = 0.;
418  for (int j = 0; j <= i; j++) {
419  index = i * m_nSamples + j;
420  noise[i] += Rndm[j] * (CorrGen)[index];
421  }
422  noise[i] = noise[i] * SigmaNoise;
423  }
424  }
425 
426  if (backGroundIdx < 999999) { // bkgDigits exist and have compatible sizes
427  // assuming compatible sizes, see above
428  const std::vector<short>& bkgSamples =
429  bkgDigitsPtr->at(backGroundIdx)->samples();
430  samplesInt.assign(bkgSamples.begin(), bkgSamples.end());
431  } else {
432  int ped = pedestal->pedestal(id, 0); // DB pedestal
433  samplesInt.assign(m_nSamples, ped);
434  }
435  for (unsigned int i = 0; i < vec.size(); i++) {
436  samplesInt[i] += rint(vec[i] + noise[i]);
437  if (samplesInt[i] >= MAXADC)
438  samplesInt[i] = MAXADC - 1;
439  if (samplesInt[i] < 0)
440  samplesInt[i] = 0;
441  }
442  LArDigit* dig = new LArDigit(id, scGain, samplesInt);
443  scContainer->push_back(dig);
444  }
445  // record final output container
446  ATH_CHECK(scContainerHandle.record(std::move(scContainer)));
447 
448  if (addBkg)
449  IDtoIndexMap.clear(); // clear event
450 
451  if (m_chronoTest) {
452  m_chronSvc->chronoStop("LArSCL1Mk hit loop ");
453  m_chronSvc->chronoPrint("LArSCL1Mk hit loop ");
454  m_chronSvc->chronoStart("LArSCL1Mk SC loop ");
455  }
456 
457  return StatusCode::SUCCESS;
458 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ finalize()

StatusCode LArSCL1Maker::finalize ( )

Definition at line 460 of file LArSCL1Maker.cxx.

460  {
461 
462  ATH_MSG_INFO(" LArSCL1Maker finalize completed successfully");
463  m_chronSvc->chronoPrint("LArSCL1Mk hit loop ");
464  m_chronSvc->chronoPrint("LArSCL1Mk TT loop ");
465 
466  return StatusCode::SUCCESS;
467 }

◆ initialize()

StatusCode LArSCL1Maker::initialize ( )

Read ascii files for auxiliary data (puslse shapes, noise, etc...)

Definition at line 115 of file LArSCL1Maker.cxx.

115  {
116  // +======================================================================+
117  // + +
118  // + Author ........: Denis O. Damazio +
119  // + Creation date .: 18/11/2013 +
120  // + +
121  // +======================================================================+
122  //
123  // ......... declaration
124  //
125  m_chronSvc = chronoSvc();
126 
127  ATH_MSG_INFO("***********************************************");
128  ATH_MSG_INFO("* Steering options for LArSCL1Maker algorithm *");
129  ATH_MSG_INFO("***********************************************");
130 
131  //
132  // ......... print the noise flag
133  //
134  if (m_NoiseOnOff) {
135  ATH_MSG_INFO(
136  "Electronic noise will be added in each SC for selected "
137  "sub-detectors.");
138  } else {
139  ATH_MSG_INFO("No electronic noise added.");
140  }
141 
142  //
143  // ......... print the pile-up flag
144  //
145  if (m_PileUp) {
146  ATH_MSG_INFO("take events from PileUp service");
147  } else {
148  ATH_MSG_INFO("no pile up");
149  }
150 
151  //
152  // ......... print the trigger time flag
153  //
154  // if (m_useTriggerTime) { ATH_MSG_INFO("use Trigger Time service " <<
155  // p_triggerTimeTool.name()); } else { ATH_MSG_INFO("no Trigger Time used");
156  // }
157 
158  //
159  // .........retrieve tool computing trigger time if requested
160  //
161  if (m_useTriggerTime && m_PileUp) {
162  ATH_MSG_INFO(
163  " In case of pileup, the trigger time subtraction is done in "
164  "PileUpSvc ");
165  ATH_MSG_INFO(" => LArSCL1Maker will not apply Trigger Time ");
166  m_useTriggerTime = false;
167  }
168 
169  /*
170  if (m_useTriggerTime) {
171  if( p_triggerTimeTool.retrieve().isFailure() ) {
172  ATH_MSG_ERROR("Unable to retrieve trigger time tool. Disabling Trigger
173  time"); m_useTriggerTime=false;
174  }
175  }
176  */
177 
178  //
179  // ..... need LAr and CaloIdManager to retrieve all needed helpers
180  //
181 
182  const CaloIdManager* caloMgr;
183 
184  CHECK(detStore()->retrieve(caloMgr));
186  CHECK(detStore()->retrieve(m_OflHelper, "CaloCell_ID"));
187 
188  //
189  //..... need of course the LVL1 helper
190  //
192  if (!m_scHelper) {
193  ATH_MSG_ERROR("Could not access CaloCell_SuperCell_ID helper");
194  return StatusCode::FAILURE;
195  } else {
196  ATH_MSG_DEBUG("Successfully accessed CaloCell_SuperCell_ID helper");
197  }
198 
199  // ..... need cabling services, to get channels associated to each SC
200  //
201 
209  CHECK(m_scidtool.retrieve());
213 
214  // Incident Service:
215  ATH_MSG_DEBUG("Initialization completed successfully");
216 
217  CHECK(m_atRndmGenSvc.retrieve());
218 
219  return StatusCode::SUCCESS;
220 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ printConditions()

void LArSCL1Maker::printConditions ( const HWIdentifier hwSC)
private

Method to print SuperCell Conditions.

Definition at line 469 of file LArSCL1Maker.cxx.

469  {
470  // will keep it for future implementation
471 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ retrieve()

template<class T >
const T* LArSCL1Maker::retrieve ( const EventContext &  context,
SG::ReadCondHandleKey< T >  handleKey 
) const
inlineprivate

Definition at line 112 of file LArSCL1Maker.h.

113  {
114  SG::ReadCondHandle<T> handle(handleKey, context);
115  if (not handle.isValid()) {
116  ATH_MSG_ERROR("could not retrieve : " << handle.key());
117  return nullptr;
118  } else
119  return handle.cptr();
120  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_adc2mevSCKey

SG::ReadCondHandleKey<LArADC2MeV> LArSCL1Maker::m_adc2mevSCKey
private
Initial value:
{
this, "LArADC2MeVKey", "LArADC2MeVSC", "SGKey of LArADC2MeV object"}

Property: ADC2MeV conversion (conditions input).

Definition at line 108 of file LArSCL1Maker.h.

◆ m_atRndmGenSvc

ServiceHandle<IAthRNGSvc> LArSCL1Maker::m_atRndmGenSvc {this, "RndmSvc", "AthRNGSvc", ""}
private

Definition at line 153 of file LArSCL1Maker.h.

◆ m_autoCorrHec

std::vector<std::vector<float> > LArSCL1Maker::m_autoCorrHec
private

auxiliary HEC data: auto-correlation matrix

Definition at line 190 of file LArSCL1Maker.h.

◆ m_autoCorrNoiseSCKey

SG::ReadCondHandleKey<LArAutoCorrNoise> LArSCL1Maker::m_autoCorrNoiseSCKey
private
Initial value:
{
this, "LArAutoCorrKey", "LArAutoCorrNoiseSC",
"SGKey of LArAutoCorrNoise object"}

Property: AutoCorr Noise (conditions input).

Definition at line 103 of file LArSCL1Maker.h.

◆ m_BeginRunPriority

int LArSCL1Maker::m_BeginRunPriority
private

pointer to the TriggerTimeTool

Definition at line 164 of file LArSCL1Maker.h.

◆ m_bkgDigitsKey

SG::ReadHandleKey<LArDigitContainer> LArSCL1Maker::m_bkgDigitsKey {this, "BkgDigitKey", ""}
private

Background Digit Overlay, default key is Bkg_LArDigitSCL2.

Definition at line 196 of file LArSCL1Maker.h.

◆ m_cablingKeySC

SG::ReadCondHandleKey<LArOnOffIdMapping> LArSCL1Maker::m_cablingKeySC
private
Initial value:
{
this, "ScCablingKey", "LArOnOffIdMapSC",
"SG Key of SC LArOnOffIdMapping object"}

Definition at line 83 of file LArSCL1Maker.h.

◆ m_chronoTest

bool LArSCL1Maker::m_chronoTest
private

algorithm property: switch chrono on

Definition at line 227 of file LArSCL1Maker.h.

◆ m_chronSvc

IChronoStatSvc* LArSCL1Maker::m_chronSvc
private

Definition at line 150 of file LArSCL1Maker.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_firstSample

unsigned int LArSCL1Maker::m_firstSample
private

output first samples

Definition at line 232 of file LArSCL1Maker.h.

◆ m_fracSKey

SG::ReadCondHandleKey<ILArfSampl> LArSCL1Maker::m_fracSKey
private
Initial value:
{
this, "FracSKey", "LArfSamplSC", "SG Key of fSamplS conditions object"}

Property: Fraction of Energy Sampled (conditions input).

Definition at line 91 of file LArSCL1Maker.h.

◆ m_HitContainer

std::vector<std::string> LArSCL1Maker::m_HitContainer
private

list of hit containers

Definition at line 202 of file LArSCL1Maker.h.

◆ m_hitMapKey

SG::ReadHandleKey<LArHitEMap> LArSCL1Maker::m_hitMapKey
private
Initial value:
{this, "LArHitEMapKey",
"LArHitEMap"}

hit map

Definition at line 193 of file LArSCL1Maker.h.

◆ m_incSvc

ServiceHandle<IIncidentSvc> LArSCL1Maker::m_incSvc
private

Definition at line 174 of file LArSCL1Maker.h.

◆ m_noEmCalibMode

bool LArSCL1Maker::m_noEmCalibMode
private

algorithm property: no calibration mode for EM towers

Definition at line 223 of file LArSCL1Maker.h.

◆ m_noHadCalibMode

bool LArSCL1Maker::m_noHadCalibMode
private

algorithm property: no calibration mode for had towers

Definition at line 225 of file LArSCL1Maker.h.

◆ m_NoiseOnOff

bool LArSCL1Maker::m_NoiseOnOff
private

algorithm property: noise (in all sub-detectors) is on if true

Definition at line 219 of file LArSCL1Maker.h.

◆ m_noiseSCKey

SG::ReadCondHandleKey<ILArNoise> LArSCL1Maker::m_noiseSCKey
private
Initial value:
{
this, "LArNoiseKey", "LArNoiseSC", "SGKey of LArNoise object"}

Property: Electronics Noise (conditions input).

Definition at line 99 of file LArSCL1Maker.h.

◆ m_nSamples

unsigned int LArSCL1Maker::m_nSamples
private

output number of samples

Definition at line 230 of file LArSCL1Maker.h.

◆ m_OflHelper

const CaloCell_ID* LArSCL1Maker::m_OflHelper = nullptr
private

pointer to the offline id helper

Definition at line 170 of file LArSCL1Maker.h.

◆ m_OnlSCHelper

const LArOnline_SuperCellID* LArSCL1Maker::m_OnlSCHelper
private

pointer to the online LAr helper

Definition at line 172 of file LArSCL1Maker.h.

◆ m_pedestalSCKey

SG::ReadCondHandleKey<ILArPedestal> LArSCL1Maker::m_pedestalSCKey
private
Initial value:
{
this, "PedestalKey", "LArPedestalSC", "SGKey of LArPedestal object"}

Property: Pedestal offset (conditions input).

Definition at line 95 of file LArSCL1Maker.h.

◆ m_PileUp

bool LArSCL1Maker::m_PileUp
private

algorithm property: pile up or not

Definition at line 221 of file LArSCL1Maker.h.

◆ m_randomSeedOffset

Gaudi::Property<uint32_t> LArSCL1Maker::m_randomSeedOffset {this, "RandomSeedOffset", 2, ""}
private

Definition at line 154 of file LArSCL1Maker.h.

◆ m_randomStreamName

Gaudi::Property<std::string> LArSCL1Maker::m_randomStreamName
private
Initial value:
{this, "RandomStreamName",
"LArSCL1Maker", ""}

Definition at line 151 of file LArSCL1Maker.h.

◆ m_saveHitsContainer

std::string LArSCL1Maker::m_saveHitsContainer
private

Definition at line 234 of file LArSCL1Maker.h.

◆ m_scHelper

const CaloCell_SuperCell_ID* LArSCL1Maker::m_scHelper
private

pointer to the offline TT helper

Definition at line 168 of file LArSCL1Maker.h.

◆ m_scidtool

ToolHandle<ICaloSuperCellIDTool> LArSCL1Maker::m_scidtool
private

Definition at line 166 of file LArSCL1Maker.h.

◆ m_shapesKey

SG::ReadCondHandleKey<ILArShape> LArSCL1Maker::m_shapesKey
private
Initial value:
{
this, "ShapeKey", "LArShapeSC", "SG Key of Shape conditions object"}

Property: Pulse shape (conditions input).

Definition at line 87 of file LArSCL1Maker.h.

◆ m_sLArDigitsContainerKey

SG::WriteHandleKey<LArDigitContainer> LArSCL1Maker::m_sLArDigitsContainerKey
private
Initial value:
{
this, "SCL1ContainerName", "LArDigitSCL1", "Output LArDigit container"}

output Lar Digits SC container

Definition at line 198 of file LArSCL1Maker.h.

◆ m_SubDetectors

std::string LArSCL1Maker::m_SubDetectors
private

algorithm property: sub-detectors to be simulated

Definition at line 205 of file LArSCL1Maker.h.

◆ m_useLegacyRandomSeeds

Gaudi::Property<bool> LArSCL1Maker::m_useLegacyRandomSeeds
private
Initial value:
{
this, "UseLegacyRandomSeeds", false,
"Use MC16-style random number seeding"}

Definition at line 155 of file LArSCL1Maker.h.

◆ m_useTriggerTime

bool LArSCL1Maker::m_useTriggerTime
private

Alorithm property: use trigger time or not.

Definition at line 160 of file LArSCL1Maker.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ s_MAXSAMPLES

const short LArSCL1Maker::s_MAXSAMPLES = 24
staticprivate

max number of samples in pulse shape

Definition at line 181 of file LArSCL1Maker.h.

◆ s_NBDEPTHS

const short LArSCL1Maker::s_NBDEPTHS = 4
staticprivate

number of sampling (in depth)

Definition at line 177 of file LArSCL1Maker.h.

◆ s_NBENERGIES

const short LArSCL1Maker::s_NBENERGIES = 12
staticprivate

number of energies at which saturation is described (em)

Definition at line 187 of file LArSCL1Maker.h.

◆ s_NBETABINS

const short LArSCL1Maker::s_NBETABINS = 15
staticprivate

number of eta bins

Definition at line 185 of file LArSCL1Maker.h.

◆ s_NBSAMPLES

const short LArSCL1Maker::s_NBSAMPLES = 7
staticprivate

number of samples in TTL1s

Definition at line 179 of file LArSCL1Maker.h.

◆ s_PEAKPOS

const short LArSCL1Maker::s_PEAKPOS = 3
staticprivate

peak position

Definition at line 183 of file LArSCL1Maker.h.


The documentation for this class was generated from the following files:
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
LArSCL1Maker::m_nSamples
unsigned int m_nSamples
output number of samples
Definition: LArSCL1Maker.h:230
LArSCL1Maker::m_useTriggerTime
bool m_useTriggerTime
Alorithm property: use trigger time or not.
Definition: LArSCL1Maker.h:160
LArOnlineID_Base::channel_Hash
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
Definition: LArOnlineID_Base.cxx:1636
CaloCell_Base_ID::calo_cell_hash
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LArSCL1Maker::m_NoiseOnOff
bool m_NoiseOnOff
algorithm property: noise (in all sub-detectors) is on if true
Definition: LArSCL1Maker.h:219
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
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
AthCommonDataStore::renounce
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Definition: AthCommonDataStore.h:380
ATHRNG::RNGWrapper::SeedingDefault
@ SeedingDefault
Definition: RNGWrapper.h:101
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
skel.it
it
Definition: skel.GENtoEVGEN.py:423
LArSCL1Maker::m_OnlSCHelper
const LArOnline_SuperCellID * m_OnlSCHelper
pointer to the online LAr helper
Definition: LArSCL1Maker.h:172
LArSCL1Maker::m_noHadCalibMode
bool m_noHadCalibMode
algorithm property: no calibration mode for had towers
Definition: LArSCL1Maker.h:225
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LArSCL1Maker::m_bkgDigitsKey
SG::ReadHandleKey< LArDigitContainer > m_bkgDigitsKey
Background Digit Overlay, default key is Bkg_LArDigitSCL2.
Definition: LArSCL1Maker.h:196
LArSCL1Maker::m_saveHitsContainer
std::string m_saveHitsContainer
Definition: LArSCL1Maker.h:234
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
LArSCL1Maker::m_scHelper
const CaloCell_SuperCell_ID * m_scHelper
pointer to the offline TT helper
Definition: LArSCL1Maker.h:168
HWIdentifier
Definition: HWIdentifier.h:13
LArSCL1Maker::m_noEmCalibMode
bool m_noEmCalibMode
algorithm property: no calibration mode for EM towers
Definition: LArSCL1Maker.h:223
LArSCL1Maker::m_PileUp
bool m_PileUp
algorithm property: pile up or not
Definition: LArSCL1Maker.h:221
LArHitEMap::GetCell
const LArHitList & GetCell(const unsigned int index) const
Definition: LArHitEMap.h:43
LArSCL1Maker::retrieve
const T * retrieve(const EventContext &context, SG::ReadCondHandleKey< T > handleKey) const
Definition: LArSCL1Maker.h:112
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
LArHitEMap
Definition: LArHitEMap.h:22
LArSCL1Maker::m_autoCorrNoiseSCKey
SG::ReadCondHandleKey< LArAutoCorrNoise > m_autoCorrNoiseSCKey
Property: AutoCorr Noise (conditions input).
Definition: LArSCL1Maker.h:103
LArSCL1Maker::m_randomStreamName
Gaudi::Property< std::string > m_randomStreamName
Definition: LArSCL1Maker.h:151
LArHitList::getData
const LARLIST & getData() const
Definition: LArHitList.h:25
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
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
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
LArDigit
Liquid Argon digit base class.
Definition: LArDigit.h:25
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArSCL1Maker::m_noiseSCKey
SG::ReadCondHandleKey< ILArNoise > m_noiseSCKey
Property: Electronics Noise (conditions input).
Definition: LArSCL1Maker.h:99
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
01SubmitToGrid.samples
samples
Definition: 01SubmitToGrid.py:58
LArSCL1Maker::m_pedestalSCKey
SG::ReadCondHandleKey< ILArPedestal > m_pedestalSCKey
Property: Pedestal offset (conditions input).
Definition: LArSCL1Maker.h:95
LArSCL1Maker::ConvertHits2Samples
void ConvertHits2Samples(const EventContext &context, const HWIdentifier &hwSC, CaloGain::CaloGain igain, const std::vector< std::pair< float, float > > &TimeE, std::vector< float > &samples) const
Method for converting Hits from samples (simplified version of the same method in LarPileUpTool)
Definition: LArSCL1Maker.cxx:473
LArOnlineID_Base::channel_Id
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
Definition: LArOnlineID_Base.cxx:1569
LArSCL1Maker::m_fracSKey
SG::ReadCondHandleKey< ILArfSampl > m_fracSKey
Property: Fraction of Energy Sampled (conditions input).
Definition: LArSCL1Maker.h:91
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
LArSCL1Maker::m_incSvc
ServiceHandle< IIncidentSvc > m_incSvc
Definition: LArSCL1Maker.h:174
WriteCellNoiseToCool.igain
igain
Definition: WriteCellNoiseToCool.py:338
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
LArSCL1Maker::m_BeginRunPriority
int m_BeginRunPriority
pointer to the TriggerTimeTool
Definition: LArSCL1Maker.h:164
LArSCL1Maker::m_chronSvc
IChronoStatSvc * m_chronSvc
Definition: LArSCL1Maker.h:150
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
LArSCL1Maker::m_chronoTest
bool m_chronoTest
algorithm property: switch chrono on
Definition: LArSCL1Maker.h:227
LArHitList
Definition: LArHitList.h:9
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
LArOnlineID_Base::channelHashMax
size_type channelHashMax(void) const
Define channel hash tables max size.
Definition: LArOnlineID_Base.cxx:1901
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
LArSCL1Maker::m_atRndmGenSvc
ServiceHandle< IAthRNGSvc > m_atRndmGenSvc
Definition: LArSCL1Maker.h:153
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloGain::LARHIGHGAIN
@ LARHIGHGAIN
Definition: CaloGain.h:18
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,...
LArSCL1Maker::m_cablingKeySC
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKeySC
Definition: LArSCL1Maker.h:83
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
LArSCL1Maker::m_scidtool
ToolHandle< ICaloSuperCellIDTool > m_scidtool
Definition: LArSCL1Maker.h:166
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
Example_ReadSampleNoise.ped
ped
Definition: Example_ReadSampleNoise.py:45
ReadOfcFromCool.nsamples
nsamples
Definition: ReadOfcFromCool.py:115
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
DeMoScan.index
string index
Definition: DeMoScan.py:362
a
TList * a
Definition: liststreamerinfos.cxx:10
h
MAXADC
#define MAXADC
Definition: LArHitEMapToDigitAlg.h:57
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArSCL1Maker::m_useLegacyRandomSeeds
Gaudi::Property< bool > m_useLegacyRandomSeeds
Definition: LArSCL1Maker.h:155
LArSCL1Maker::m_firstSample
unsigned int m_firstSample
output first samples
Definition: LArSCL1Maker.h:232
IdentifierHash::value
unsigned int value(void) const
DeMoScan.first
bool first
Definition: DeMoScan.py:534
LArSCL1Maker::m_randomSeedOffset
Gaudi::Property< uint32_t > m_randomSeedOffset
Definition: LArSCL1Maker.h:154
CaloIdManager::getCaloCell_SuperCell_ID
const CaloCell_SuperCell_ID * getCaloCell_SuperCell_ID(void) const
Definition: CaloIdManager.cxx:110
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
LArDigitContainer
Container class for LArDigit.
Definition: LArDigitContainer.h:24
LArSCL1Maker::m_SubDetectors
std::string m_SubDetectors
algorithm property: sub-detectors to be simulated
Definition: LArSCL1Maker.h:205
LArSCL1Maker::m_shapesKey
SG::ReadCondHandleKey< ILArShape > m_shapesKey
Property: Pulse shape (conditions input).
Definition: LArSCL1Maker.h:87
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LArSCL1Maker::m_sLArDigitsContainerKey
SG::WriteHandleKey< LArDigitContainer > m_sLArDigitsContainerKey
output Lar Digits SC container
Definition: LArSCL1Maker.h:198
LArHitEMap::GetNbCells
int GetNbCells(void) const
Definition: LArHitEMap.cxx:65
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
LArSCL1Maker::m_hitMapKey
SG::ReadHandleKey< LArHitEMap > m_hitMapKey
hit map
Definition: LArSCL1Maker.h:193
IdentifierHash
Definition: IdentifierHash.h:38
LArSCL1Maker::m_OflHelper
const CaloCell_ID * m_OflHelper
pointer to the offline id helper
Definition: LArSCL1Maker.h:170
LArSCL1Maker::m_adc2mevSCKey
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevSCKey
Property: ADC2MeV conversion (conditions input).
Definition: LArSCL1Maker.h:108
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
ATHRNG::RNGWrapper::MC16Seeding
@ MC16Seeding
Definition: RNGWrapper.h:99
WriteCellNoiseToCool.noise
noise
Definition: WriteCellNoiseToCool.py:380
fitman.k
k
Definition: fitman.py:528
LArVectorProxy
Proxy for accessing a range of float values like a vector.
Definition: LArVectorProxy.h:38
CaloCell_Base_ID::calo_cell_hash_max
size_type calo_cell_hash_max(void) const
cell 'global' hash table max size
ServiceHandle< ICondSvc >
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20