ATLAS Offline Software
Loading...
Searching...
No Matches
LArSCL1Maker.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef LARL1SIM_LARSCL1MAKER_H
6#define LARL1SIM_LARSCL1MAKER_H
7// +======================================================================+
8// + +
9// + Author ........: Denis O. Damazio +
10// + Institut ......: BNL +
11// + Creation date .: 18/11/2013 +
12// + +
13// +======================================================================+
14//
15// ....... include
16//
17
20#include "Gaudi/Property.h"
21#include "GaudiKernel/ServiceHandle.h"
22//
32//
37
38class ITriggerTime;
40class CaloCell_ID;
42
59
61 //
62 // >>>>>>>> public methods
63 //
64 public:
66 LArSCL1Maker(const std::string& name, ISvcLocator* pSvcLocator);
67
70 //
71 // ..... Gaudi algorithm hooks
72 //
74 StatusCode initialize();
78 StatusCode execute(const EventContext& context) const;
79
80 StatusCode finalize();
81
82 private:
84 this, "ScCablingKey", "LArOnOffIdMapSC",
85 "SG Key of SC LArOnOffIdMapping object"};
86
88 this, "ShapeKey", "LArShapeSC", "SG Key of Shape conditions object"};
89
92 this, "FracSKey", "LArfSamplSC", "SG Key of fSamplS conditions object"};
93
96 this, "PedestalKey", "LArPedestalSC", "SGKey of LArPedestal object"};
97
100 this, "LArNoiseKey", "LArNoiseSC", "SGKey of LArNoise object"};
101
104 this, "LArAutoCorrKey", "LArAutoCorrNoiseSC",
105 "SGKey of LArAutoCorrNoise object"};
106
109 this, "LArADC2MeVKey", "LArADC2MeVSC", "SGKey of LArADC2MeV object"};
110
111 template <class T>
112 const T* retrieve(const EventContext& context,
113 const SG::ReadCondHandleKey<T>& handleKey) const {
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 }
121
122 //
123 // >>>>>>>> private algorithm parts
124 //
127
128 std::vector<float> computeSignal(const Identifier towerId, const int Ieta,
129 const int specialCase,
130 std::vector<float> visEnergy,
131 const int refTime) const;
132
133 std::vector<float> computeNoise(const Identifier towerId, const int Ieta,
134 std::vector<float>& inputV);
135
137 void printConditions(const HWIdentifier& hwSC);
138
141 void ConvertHits2Samples(const EventContext& context,
142 const HWIdentifier& hwSC, CaloGain::CaloGain igain,
143 const std::vector<std::pair<float, float> >& TimeE,
144 std::vector<float>& samples) const;
145
146 //
147 // >>>>>>>> private data parts
148 //
149
150 IChronoStatSvc* m_chronSvc;
151 Gaudi::Property<std::string> m_randomStreamName{this, "RandomStreamName",
152 "LArSCL1Maker", ""};
153 ServiceHandle<IAthRNGSvc> m_atRndmGenSvc{this, "RndmSvc", "AthRNGSvc", ""};
154 Gaudi::Property<uint32_t> m_randomSeedOffset{this, "RandomSeedOffset", 2, ""};
155 Gaudi::Property<bool> m_useLegacyRandomSeeds{
156 this, "UseLegacyRandomSeeds", false,
157 "Use MC16-style random number seeding"};
158
162 // ToolHandle<ITriggerTime> p_triggerTimeTool;
163
165
166 ToolHandle<ICaloSuperCellIDTool> m_scidtool;
170 const CaloCell_ID* m_OflHelper = nullptr;
173
175
177 static const short s_NBDEPTHS = 4;
179 static const short s_NBSAMPLES = 7;
181 static const short s_MAXSAMPLES = 24;
183 static const short s_PEAKPOS = 3;
185 static const short s_NBETABINS = 15;
187 static const short s_NBENERGIES = 12;
188
190 std::vector<std::vector<float> > m_autoCorrHec;
191
194 "LArHitEMap"};
195
199 this, "SCL1ContainerName", "LArDigitSCL1", "Output LArDigit container"};
200
202 std::vector<std::string> m_HitContainer;
203
205 std::string m_SubDetectors;
206
207#ifdef DONTDO
209 std::string m_EmBarrelHitContainerName;
211 std::string m_EmEndCapHitContainerName;
213 std::string m_HecHitContainerName;
215 std::string m_ForWardHitContainerName;
216#endif
217
228
230 unsigned int m_nSamples;
232 unsigned int m_firstSample;
233
235};
236
237#endif
#define ATH_MSG_ERROR(x)
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
Helper class for offline supercell identifiers.
interface to a tool that returns the time offset of the current trigger.
unsigned int m_firstSample
output first samples
std::vector< std::vector< float > > m_autoCorrHec
auxiliary HEC data: auto-correlation matrix
SG::ReadCondHandleKey< ILArPedestal > m_pedestalSCKey
Property: Pedestal offset (conditions input).
bool m_noEmCalibMode
algorithm property: no calibration mode for EM towers
std::vector< float > computeNoise(const Identifier towerId, const int Ieta, std::vector< float > &inputV)
SG::ReadCondHandleKey< ILArNoise > m_noiseSCKey
Property: Electronics Noise (conditions input).
bool m_NoiseOnOff
algorithm property: noise (in all sub-detectors) is on if true
SG::WriteHandleKey< LArDigitContainer > m_sLArDigitsContainerKey
output Lar Digits SC container
static const short s_NBSAMPLES
number of samples in TTL1s
SG::ReadCondHandleKey< ILArShape > m_shapesKey
Property: Pulse shape (conditions input).
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevSCKey
Property: ADC2MeV conversion (conditions input).
int m_BeginRunPriority
pointer to the TriggerTimeTool
static const short s_NBETABINS
number of eta bins
std::vector< std::string > m_HitContainer
list of hit containers
StatusCode initialize()
Read ascii files for auxiliary data (puslse shapes, noise, etc...)
const T * retrieve(const EventContext &context, const SG::ReadCondHandleKey< T > &handleKey) const
const CaloCell_SuperCell_ID * m_scHelper
pointer to the offline TT helper
bool m_useTriggerTime
Alorithm property: use trigger time or not.
Gaudi::Property< uint32_t > m_randomSeedOffset
Gaudi::Property< std::string > m_randomStreamName
static const short s_MAXSAMPLES
max number of samples in pulse shape
static const short s_NBENERGIES
number of energies at which saturation is described (em)
IChronoStatSvc * m_chronSvc
ServiceHandle< IAthRNGSvc > m_atRndmGenSvc
bool m_chronoTest
algorithm property: switch chrono on
SG::ReadHandleKey< LArDigitContainer > m_bkgDigitsKey
Background Digit Overlay, default key is Bkg_LArDigitSCL2.
std::vector< float > computeSignal(const Identifier towerId, const int Ieta, const int specialCase, std::vector< float > visEnergy, const int refTime) const
initialize hit map
static const short s_NBDEPTHS
number of sampling (in depth)
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)
bool m_PileUp
algorithm property: pile up or not
std::string m_saveHitsContainer
std::string m_SubDetectors
algorithm property: sub-detectors to be simulated
ToolHandle< ICaloSuperCellIDTool > m_scidtool
ServiceHandle< IIncidentSvc > m_incSvc
SG::ReadCondHandleKey< LArAutoCorrNoise > m_autoCorrNoiseSCKey
Property: AutoCorr Noise (conditions input).
Gaudi::Property< bool > m_useLegacyRandomSeeds
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKeySC
LArSCL1Maker(const std::string &name, ISvcLocator *pSvcLocator)
constructor
StatusCode execute(const EventContext &context) const
Create LArSCL1 object save in TES (2 containers: 1 EM, 1 hadronic)
SG::ReadCondHandleKey< ILArfSampl > m_fracSKey
Property: Fraction of Energy Sampled (conditions input).
const LArOnline_SuperCellID * m_OnlSCHelper
pointer to the online LAr helper
StatusCode finalize()
~LArSCL1Maker()
destructor
SG::ReadHandleKey< LArHitEMap > m_hitMapKey
hit map
unsigned int m_nSamples
output number of samples
const CaloCell_ID * m_OflHelper
pointer to the offline id helper
void printConditions(const HWIdentifier &hwSC)
Method to print SuperCell Conditions.
bool m_noHadCalibMode
algorithm property: no calibration mode for had towers
static const short s_PEAKPOS
peak position
const std::string & key() const
const_pointer_type cptr()
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.