ATLAS Offline Software
Loading...
Searching...
No Matches
LArHitEMapToDigitAlg Class Reference

#include <LArHitEMapToDigitAlg.h>

Inheritance diagram for LArHitEMapToDigitAlg:

Public Member Functions

virtual StatusCode initialize ()
virtual StatusCode execute (const EventContext &context) const
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Types

enum  CaloNum { EM =0 , HEC , FCAL , EMIW }
using staticVecDouble_t = boost::container::static_vector<double,s_MaxNSamples>
using staticVecFloat_t = boost::container::static_vector<float,s_MaxNSamples>

Protected Member Functions

template<class T>
const T * pointerFromKey (const EventContext &context, const SG::ReadCondHandleKey< T > &key) const
StatusCode MakeDigit (const EventContext &ctx, const Identifier &cellId, const HWIdentifier &ch_id, const IFCalDigitModifierTool::EventData &fcalData, LArDigit *&Digit, DataPool< LArDigit > &dataItemsPool, LArDigit *&Digit_DigiHSTruth, const std::vector< std::pair< float, float > > *TimeE, const LArDigit *rndm_digit, CLHEP::HepRandomEngine *engine, const std::vector< std::pair< float, float > > *TimeE_DigiHSTruth, const LArADC2MeV *adc2MeVs, const ILArfSampl *fSampl, const ILArPedestal *pedestal, const ILArNoise *noise, const LArAutoCorrNoise *autoCorrNoise, const LArBadChannelCont *bcCont, const ILArShape *shape) const
StatusCode ConvertHits2Samples (const Identifier &cellId, HWIdentifier ch_id, CaloGain::CaloGain igain, const std::vector< std::pair< float, float > > *TimeE, staticVecDouble_t &sampleList, const ILArShape *shape) const
CaloGain::CaloGain chooseGain (const staticVecDouble_t &samples, const HWIdentifier id, const CaloNum iCalo, const ILArPedestal *ped, const LArADC2MeV *ramp, const float SF) const
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Protected Attributes

SG::ReadCondHandleKey< ILArNoise > m_noiseKey {this,"NoiseKey","LArNoiseSym","SG Key of ILArNoise object"}
SG::ReadCondHandleKey< ILArfSampl > m_fSamplKey {this,"fSamplKey","LArfSamplSym","SG Key of LArfSampl object"}
SG::ReadCondHandleKey< ILArOFC > m_OFCKey {this, "OFCKey", "LArOFC", "SG Key of OFC conditions object"}
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey {this,"PedestalKey","LArPedestal","SG Key of LArPedestal object"}
SG::ReadCondHandleKey< ILArShape > m_shapeKey {this,"ShapeKey","LArShapeSym","SG Key of LArShape object"}
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey {this,"ADC2MeVKey","LArADC2MeV","SG Key of ADC2MeV conditions object"}
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
const LArOnOffIdMapping * m_cabling {}
SG::ReadCondHandleKey< LArAutoCorrNoise > m_autoCorrNoiseKey {this,"AutoCorrNoiseKey","LArAutoCorrNoise","SG Key of AutoCorrNoise conditions object"}
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey {this, "BadChanKey", "LArBadChannel", "SG key for LArBadChan object"}
SG::ReadCondHandleKey< LArBadFebCont > m_badFebKey {this, "BadFebKey", "LArBadFeb", "Key of BadFeb object in ConditionsStore"}
Gaudi::Property< std::vector< std::string > > m_problemsToMask {this,"ProblemsToMask",{},"Bad-Channel categories to mask entirly"}
LArBadChannelMask m_bcMask
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"}
SG::ReadHandleKey< LArHitEMap > m_hitMapKey {this,"LArHitEMapKey","LArHitEMap"}
SG::ReadHandleKey< LArHitEMap > m_hitMapKey_DigiHSTruth {this,"LArHitEMap_DigiHSTruthKey","LArHitEMap_DigiHSTruth"}
SG::ReadHandleKey< LArDigitContainer > m_inputDigitContainerKey
SG::WriteHandleKey< LArDigitContainer > m_DigitContainerName
SG::WriteHandleKey< LArDigitContainer > m_DigitContainerName_DigiHSTruth
Gaudi::Property< std::string > m_randomStreamName {this, "RandomStreamName", "LArDigitization", ""}
ServiceHandle< IAthRNGSvc > m_rndmGenSvc {this, "RndmSvc", "AthRNGSvc", ""}
Gaudi::Property< uint32_t > m_randomSeedOffset {this, "RandomSeedOffset", 2, ""}
Gaudi::Property< bool > m_useLegacyRandomSeeds
std::array< Gaudi::Property< double >, 4 > m_LowGainThresh
std::array< Gaudi::Property< double >, 4 > m_HighGainThresh
std::array< Gaudi::Property< std::pair< int, int > >, 4 > m_gainRange
Gaudi::Property< unsigned > m_maxADC {this,"maxADC",4096,"Maxium ADC value +1 (for overflow)"}
Gaudi::Property< int > m_NSamples
Gaudi::Property< bool > m_NoiseOnOff
Gaudi::Property< int > m_firstSample
Gaudi::Property< bool > m_usePhase
Gaudi::Property< bool > m_RndmEvtOverlay
Gaudi::Property< bool > m_isMcOverlay
Gaudi::Property< bool > m_doDigiTruth
Gaudi::Property< bool > m_NoiseInEMB
Gaudi::Property< bool > m_NoiseInEMEC
Gaudi::Property< bool > m_NoiseInHEC
Gaudi::Property< bool > m_NoiseInFCAL
Gaudi::Property< bool > m_pedestalNoise
Gaudi::Property< bool > m_roundingNoNoise
Gaudi::Property< bool > m_Windows
Gaudi::Property< float > m_WindowsEtaSize
Gaudi::Property< float > m_WindowsPhiSize
Gaudi::Property< float > m_WindowsPtCut
const CaloCell_ID * m_calocell_id {}
const LArEM_ID * m_larem_id {}
const LArHEC_ID * m_larhec_id {}
const LArFCAL_ID * m_larfcal_id {}
const LArOnlineID * m_laronline_id {}
ToolHandle< IFCalDigitModifierTool > m_fcalModifierTool

Static Protected Attributes

static constexpr int s_MaxNSamples = 32

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 66 of file LArHitEMapToDigitAlg.h.

Member Typedef Documentation

◆ staticVecDouble_t

using LArHitEMapToDigitAlg::staticVecDouble_t = boost::container::static_vector<double,s_MaxNSamples>
protected

Definition at line 80 of file LArHitEMapToDigitAlg.h.

◆ staticVecFloat_t

using LArHitEMapToDigitAlg::staticVecFloat_t = boost::container::static_vector<float,s_MaxNSamples>
protected

Definition at line 81 of file LArHitEMapToDigitAlg.h.

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ CaloNum

Member Function Documentation

◆ chooseGain()

CaloGain::CaloGain LArHitEMapToDigitAlg::chooseGain ( const staticVecDouble_t & samples,
const HWIdentifier id,
const CaloNum iCalo,
const ILArPedestal * ped,
const LArADC2MeV * ramp,
const float SF ) const
protected

Definition at line 800 of file LArHitEMapToDigitAlg.cxx.

801 {
802
803
804 const CaloGain::CaloGain gainChoosingGain=CaloGain::LARMEDIUMGAIN;
805 int sampleGainChoice{2};
806 if (m_firstSample < 0)
807 sampleGainChoice -= m_firstSample;
808
809 // fix the shift +1 if HEC and nSamples 4 and firstSample 0
810 if (iCalo == HEC && m_NSamples.value() == 4 && m_firstSample.value() == 0)
811 sampleGainChoice -= 1; // ihecshift
812
813 // We choose the gain in applying thresholds on the 3rd Sample (index "2")
814 // converted in ADC counts in the second-lowest gain (eg MEDIUM gain for run 1,2,3, HIGH gain for run 4)
815 // Indeed, thresholds in ADC counts are defined with respect to the MediumGain.
816 //
817 // 1300 3900
818 // ---------------|----------------|--------------> ADC counts in MediumGain
819 // HighGain <--- MediumGain ---> LowGain
820
821 float Pedestal = pedestal->pedestal(ch_id, gainChoosingGain);
822 if (Pedestal <= (1.0 + LArElecCalib::ERRORCODE)) {
823 ATH_MSG_DEBUG(" Pedestal not found for channel " << m_laronline_id->channel_name(ch_id) << " assume 1000 ");
824 Pedestal = 1000.;
825 }
826 const auto& polynom_adc2mev = adc2MeVs->ADC2MEV(ch_id, gainChoosingGain);
827 if (polynom_adc2mev.size() < 2) {
828 ATH_MSG_WARNING(" No ramp found for channel " << m_laronline_id->channel_name(ch_id) << ", gain " << gainChoosingGain << ", gain choice failed...");
830 }
831 const float pseudoADC3 = samples[sampleGainChoice] / (polynom_adc2mev[1]) / SF + Pedestal;
832
833 CaloGain::CaloGain igain = gainChoosingGain;
834 // if we are not yet already in the highest gain and we are below high-gain theshold, switch to high gain
835 if (gainChoosingGain > m_gainRange[iCalo].value().first && pseudoADC3 < m_HighGainThresh[iCalo]) {
837 }
838
839 else if (gainChoosingGain < m_gainRange[iCalo].value().second && pseudoADC3 > m_LowGainThresh[iCalo]) {
841 }
842
843 return igain;
844}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_WARNING(x,...)
std::array< Gaudi::Property< std::pair< int, int > >, 4 > m_gainRange
Gaudi::Property< int > m_firstSample
const LArOnlineID * m_laronline_id
std::array< Gaudi::Property< double >, 4 > m_LowGainThresh
std::array< Gaudi::Property< double >, 4 > m_HighGainThresh
Gaudi::Property< int > m_NSamples
@ LARMEDIUMGAIN
Definition CaloGain.h:18
@ INVALIDGAIN
Definition CaloGain.h:18
@ LARLOWGAIN
Definition CaloGain.h:18
@ LARHIGHGAIN
Definition CaloGain.h:18

◆ ConvertHits2Samples()

StatusCode LArHitEMapToDigitAlg::ConvertHits2Samples ( const Identifier & cellId,
HWIdentifier ch_id,
CaloGain::CaloGain igain,
const std::vector< std::pair< float, float > > * TimeE,
staticVecDouble_t & sampleList,
const ILArShape * shape ) const
protected

Definition at line 678 of file LArHitEMapToDigitAlg.cxx.

682{
683// Converts hits of a particular LAr cell into energy samples
684// declarations
685 int nsamples ;
686 int nsamples_der ;
687 int i ;
688 int j ;
689
690// ........ retrieve data (1/2) ................................
691//
692 ILArShape::ShapeRef_t Shape = shape->Shape(ch_id,igain);
693 ILArShape::ShapeRef_t ShapeDer = shape->ShapeDer(ch_id,igain);
694
695 nsamples = Shape.size();
696 nsamples_der = ShapeDer.size();
697
698 if (nsamples==0) {
699 ATH_MSG_INFO(" No samples for cell = " << cellId );
700 return StatusCode::FAILURE;
701 }
702
703#ifndef NDEBUG
704 ATH_MSG_DEBUG(" Cellid " << m_larem_id->show_to_string(cellId));
705 for (i=0;i<nsamples;i++)
706 {
707 msg() << MSG::DEBUG << Shape[i] << " ";
708 }
709 msg() << endmsg;
710 ATH_MSG_DEBUG("m_NSamples, m_usePhase " << m_NSamples << " " << m_usePhase);
711#endif
712
713
714for (const auto& [energy, time] : *TimeE) {
715 // fix the shift +1 if HEC and nSamples 4 and firstSample 0
716 // in case of data overlay this should NOT be done as the pulse shape read from the database is already shifted
717 // but this should still be done in case of MC overlay
718 int ihecshift=0;
719 if((!m_RndmEvtOverlay || m_isMcOverlay) && m_larem_id->is_lar_hec(cellId) && m_NSamples.value() == 4 && m_firstSample.value() == 0) ihecshift=1;
720
721
722 if (!m_usePhase) {
723
724 // Atlas like mode where we use 25ns binned pulse shape and derivative to deal with time offsets
725
726// shift between reference shape and this time
727 int ishift=(int)(rint(time*(1./25.)));
728 double dtime=time-25.*((double)(ishift));
729 for (i=0;i<m_NSamples.value();i++)
730 {
731 j = i - ishift + m_firstSample + ihecshift;
732#ifndef NDEBUG
733 msg() << MSG::DEBUG << " time/i/j " << time << " "<< i << " " << j;
734#endif
735 if (j >=0 && j < nsamples ) {
736 if (j<nsamples_der && std::abs(ShapeDer[j])<10. )
737 sampleList[i] += (Shape[j]- ShapeDer[j]*dtime)*energy ;
738 else sampleList[i] += Shape[j]*energy ;
739 }
740 }
741#ifndef NDEBUG
742 msg() << MSG::DEBUG << endmsg;
743#endif
744 }
745// Mode to use phase (tbin) to get pulse shape ( pulse shape with fine time binning should be available)
746
747 else {
748
749 // FIXME hardcode 8phases3ns configuration (cannot access parameters from ILArShape interface now)
750 int nTimeBins = 8;
751 float timeBinWidth = 25./24.*3.;
752
753// -50<t<-25 phase=-t-25, shift by one peak time (for s2 uses shape(3) with tbin)
754// for -25<t<0 phase = -t, no shift of peak time
755// for 0<t<25 phase=25-t, shift by one peak time (for s2 uses shape(1) with tbin)
756// 25<t<50 phase=50-t, shift by two
757// etc...
758
759 int ishift = (int)(time*(1./25.));
760 int tbin;
761 if (time>0) {
762 tbin = (int)(fmod(time,25)/timeBinWidth);
763 if (tbin>0) {
764 tbin=nTimeBins-tbin;
765 ishift +=1;
766 }
767 } else {
768 tbin = (int)(fmod(-time,25)/timeBinWidth);
769 }
770
771 double dtime = time - ( 25.*((float)(ishift)) - timeBinWidth*tbin);
772
773 Shape = shape->Shape(ch_id,igain,tbin);
774 ShapeDer = shape->ShapeDer(ch_id,igain,tbin);
775
776 nsamples = Shape.size();
777 nsamples_der = ShapeDer.size();
778
779
780 for (i=0;i<m_NSamples.value();i++)
781 {
782 j = i - ishift+m_firstSample + ihecshift;
783#ifndef NDEBUG
784 ATH_MSG_DEBUG(" time/i/j " << time << " "<< i << " " << j);
785#endif
786 if (j >=0 && j < nsamples ) {
787 if (j<nsamples_der && std::abs(ShapeDer[j])<10. )
788 sampleList[i] += (Shape[j]- ShapeDer[j]*dtime)*energy ;
789 else sampleList[i] += Shape[j]*energy ;
790 }
791 }
792
793 } // else if of m_usePhase
794 } // loop over hits
795
796 return StatusCode::SUCCESS;
797
798}
#define endmsg
#define ATH_MSG_INFO(x,...)
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
Definition ILArShape.h:26
virtual ShapeRef_t Shape(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0
virtual ShapeRef_t ShapeDer(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0
Gaudi::Property< bool > m_usePhase
Gaudi::Property< bool > m_isMcOverlay
Gaudi::Property< bool > m_RndmEvtOverlay
time(flags, cells_name, *args, **kw)
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ 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.

◆ evtStore()

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.

◆ execute()

StatusCode LArHitEMapToDigitAlg::execute ( const EventContext & context) const
virtual

Retrieve BadChannels

Definition at line 123 of file LArHitEMapToDigitAlg.cxx.

123 {
124
125 // load many conditions
127 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey, context};
128 const LArOnOffIdMapping* cabling=*cablingHdl;
129 // FCal signal degradation: per-event input of the tool, read once per event
130 IFCalDigitModifierTool::EventData fcalData;
131 if (!m_fcalModifierTool.empty()) ATH_CHECK(m_fcalModifierTool->prepareEvent(context, fcalData));
132 if(!cabling) {
133 ATH_MSG_ERROR("Failed to retrieve LAr Cabling map with key " << m_cablingKey.key() );
134 return StatusCode::FAILURE;
135 }
136
137 SG::ReadCondHandle<LArADC2MeV> adc2mevHdl(m_adc2mevKey, context);
138 const LArADC2MeV* adc2MeVs=*adc2mevHdl;
139
140 SG::ReadCondHandle<ILArfSampl> fSamplHdl(m_fSamplKey, context);
141 const ILArfSampl* fSampl=*fSamplHdl;
142
143 SG::ReadCondHandle<ILArPedestal> pedHdl(m_pedestalKey, context);
144 const ILArPedestal* pedestal=*pedHdl;
145
146 const ILArNoise* noise=nullptr;
148 SG::ReadCondHandle<ILArNoise> noiseHdl(m_noiseKey, context);
149 noise=*noiseHdl;
150 }
151
152 const LArAutoCorrNoise* autoCorrNoise=nullptr;
154 SG::ReadCondHandle<LArAutoCorrNoise> autoCorrNoiseHdl(m_autoCorrNoiseKey, context);
155 autoCorrNoise=*autoCorrNoiseHdl;
156 }
157
159 SG::ReadCondHandle<LArBadChannelCont> bch{m_bcContKey,context};
160 const LArBadChannelCont* bcCont{*bch};
161
162 SG::ReadCondHandle<ILArShape> shapeHdl(m_shapeKey, context);
163 const ILArShape* shape=*shapeHdl;
164
165 // Inputs
166 SG::ReadHandle<LArHitEMap> hitmap(m_hitMapKey,context);
167 const LArHitEMap* hitmapPtr = hitmap.cptr();
168 const LArHitEMap* hitmapPtr_DigiHSTruth = nullptr;
169 if ( m_doDigiTruth ) {
170 SG::ReadHandle<LArHitEMap> hitmap_DigitHSTruth(m_hitMapKey_DigiHSTruth,context);
171 hitmapPtr_DigiHSTruth = hitmap_DigitHSTruth.cptr();
172 }
173
174 const size_t nCells=hitmapPtr->GetNbCells();
175 // Prepare Output
176 //
177 // For the standard one lets use a DataPool
178 auto DigitContainer = std::make_unique<LArDigitContainer>(SG::VIEW_ELEMENTS);
179 DigitContainer->reserve(nCells);
180 DataPool<LArDigit> dataItemsPool(context);
181 dataItemsPool.reserve(nCells);
182 //
183 // HSTruth output might not be needed so avoid doing anything
184 // in that case
185 std::unique_ptr<LArDigitContainer> DigitContainer_DigiHSTruth = nullptr;
186 if (m_doDigiTruth){
187 DigitContainer_DigiHSTruth = std::make_unique<LArDigitContainer>();
188 DigitContainer_DigiHSTruth->reserve(nCells);
189 }
190 //
191 const std::vector<std::pair<float,float> >* TimeE;
192 const std::vector<std::pair<float,float> >* TimeE_DigiHSTruth = nullptr;
193
194 ATHRNG::RNGWrapper* rngWrapper = m_rndmGenSvc->getEngine(this, m_randomStreamName);
195 CLHEP::HepRandomEngine * engine = rngWrapper->getEngine(context);
197 rngWrapper->setSeedLegacy( m_randomStreamName, context, m_randomSeedOffset, seedingmode );
198
199 for (size_t it=0;it<nCells;++it)
200 {
201 const LArHitList& hitlist = hitmapPtr->GetCell(it);
202
203 if (!m_Windows || hitlist.inWindows()) {
204 TimeE = &(hitlist.getData());
205 if(m_doDigiTruth) {
206 const auto& hitlist_DigiHSTruth=hitmapPtr_DigiHSTruth->GetCell(it);
207 TimeE_DigiHSTruth = &(hitlist_DigiHSTruth.getData());
208 }
209
210 if (!TimeE->empty() || m_NoiseOnOff || m_RndmEvtOverlay) {
211 const Identifier cellID=m_calocell_id->cell_id(IdentifierHash(it));
212 HWIdentifier ch_id = cabling->createSignalChannelIDFromHash(IdentifierHash(it));
213 HWIdentifier febId = m_laronline_id->feb_Id(ch_id);
214 bool missing=!(badFebs->status(febId).good());
215 if (!missing) {
216 const LArDigit * digit = nullptr ;
217 if(m_RndmEvtOverlay) digit = hitmapPtr->GetDigit(it);
218 // MakeDigit called if in no overlay mode or
219 // if in overlay mode and random digit exists
220 if ((!m_RndmEvtOverlay) || (m_RndmEvtOverlay && digit)) {
221 LArDigit* Digit = nullptr;
222 LArDigit* Digit_DigiHSTruth = nullptr;
223 auto sc = MakeDigit(context, cellID, ch_id, fcalData, Digit,
224 dataItemsPool,
225 Digit_DigiHSTruth, TimeE, digit, engine,
226 TimeE_DigiHSTruth,
227 adc2MeVs,
228 fSampl,
229 pedestal,
230 noise,
231 autoCorrNoise,
232 bcCont,
233 shape);
234
235 if (sc.isFailure()){
236 ATH_MSG_ERROR("LArHitEMapToDigitAlg::execute failed in MakeDigit");
237 delete Digit_DigiHSTruth;
238 return sc;
239 }
240 DigitContainer->push_back(Digit);
241 if (DigitContainer_DigiHSTruth){
242 DigitContainer_DigiHSTruth->push_back(Digit_DigiHSTruth);
243 }
244 }
245 }
246 }
247 } // check window
248 } // end of loop over the cells
249
250
251 ATH_MSG_DEBUG(" number of created digits = " << DigitContainer->size());
252
253 SG::WriteHandle<LArDigitContainer> DigitContainerHandle( m_DigitContainerName, context);
254 ATH_CHECK(DigitContainerHandle.record( std::move(DigitContainer) ) );
255 if ( DigitContainer_DigiHSTruth ){
256 SG::WriteHandle<LArDigitContainer> DigitContainer_DigiHSTruthHandle( m_DigitContainerName_DigiHSTruth, context);
257 ATH_CHECK(DigitContainer_DigiHSTruthHandle.record( std::move(DigitContainer_DigiHSTruth) ) );
258 }
259
260
261 return StatusCode::SUCCESS;
262}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x,...)
LArBadXCont< LArBadFeb > LArBadFebCont
LArBadXCont< LArBadChannel > LArBadChannelCont
static Double_t sc
void setSeedLegacy(const std::string &algName, const EventContext &ctx, uint32_t offset, SeedingOptionType seeding, EventContext::ContextEvt_t evt=EventContext::INVALID_CONTEXT_EVT)
Set the random seed using a string (e.g.
SeedingOptionType
Options for seeding.
Definition RNGWrapper.h:77
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition RNGWrapper.h:108
LArBC_t status(const HWIdentifier channel) const
Query the status of a particular channel or FEB This is the main client access method.
Gaudi::Property< bool > m_doDigiTruth
SG::ReadHandleKey< LArHitEMap > m_hitMapKey
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
const CaloCell_ID * m_calocell_id
StatusCode MakeDigit(const EventContext &ctx, const Identifier &cellId, const HWIdentifier &ch_id, const IFCalDigitModifierTool::EventData &fcalData, LArDigit *&Digit, DataPool< LArDigit > &dataItemsPool, LArDigit *&Digit_DigiHSTruth, const std::vector< std::pair< float, float > > *TimeE, const LArDigit *rndm_digit, CLHEP::HepRandomEngine *engine, const std::vector< std::pair< float, float > > *TimeE_DigiHSTruth, const LArADC2MeV *adc2MeVs, const ILArfSampl *fSampl, const ILArPedestal *pedestal, const ILArNoise *noise, const LArAutoCorrNoise *autoCorrNoise, const LArBadChannelCont *bcCont, const ILArShape *shape) const
Gaudi::Property< bool > m_pedestalNoise
SG::ReadHandleKey< LArHitEMap > m_hitMapKey_DigiHSTruth
Gaudi::Property< uint32_t > m_randomSeedOffset
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
SG::WriteHandleKey< LArDigitContainer > m_DigitContainerName_DigiHSTruth
ToolHandle< IFCalDigitModifierTool > m_fcalModifierTool
Gaudi::Property< bool > m_useLegacyRandomSeeds
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
SG::ReadCondHandleKey< ILArNoise > m_noiseKey
Gaudi::Property< bool > m_Windows
Gaudi::Property< bool > m_NoiseOnOff
ServiceHandle< IAthRNGSvc > m_rndmGenSvc
SG::ReadCondHandleKey< LArAutoCorrNoise > m_autoCorrNoiseKey
const T * pointerFromKey(const EventContext &context, const SG::ReadCondHandleKey< T > &key) const
SG::ReadCondHandleKey< LArBadFebCont > m_badFebKey
SG::ReadCondHandleKey< ILArfSampl > m_fSamplKey
SG::WriteHandleKey< LArDigitContainer > m_DigitContainerName
SG::ReadCondHandleKey< ILArShape > m_shapeKey
Gaudi::Property< std::string > m_randomStreamName
size_t GetNbCells(void) const
Definition LArHitEMap.h:42
const LArHitList & GetCell(const unsigned int index) const
Definition LArHitEMap.h:43
const LArDigit * GetDigit(unsigned int index) const
Definition LArHitEMap.h:48
bool inWindows() const
Definition LArHitList.h:26
const LARLIST & getData() const
Definition LArHitList.h:25
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
setRawEt setRawPhi nCells

◆ 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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ initialize()

StatusCode LArHitEMapToDigitAlg::initialize ( )
virtual

Definition at line 25 of file LArHitEMapToDigitAlg.cxx.

26{
27
29 ATH_MSG_ERROR("Requested Nsamples " << m_NSamples << " larger than max "
30 << s_MaxNSamples);
31 return StatusCode::FAILURE;
32 }
35
36 ATH_CHECK(m_shapeKey.initialize());
37 ATH_CHECK(m_fSamplKey.initialize());
38 ATH_CHECK(m_OFCKey.initialize());
39 ATH_CHECK(m_pedestalKey.initialize());
41 ATH_CHECK(m_bcContKey.initialize());
42 ATH_CHECK(m_badFebKey.initialize());
43 ATH_CHECK(m_adc2mevKey.initialize());
44 ATH_CHECK(m_caloMgrKey.initialize());
45
46 ATH_CHECK(m_cablingKey.initialize());
47
48 // helpers
49 //retrieve ID helpers
50 ATH_CHECK(detStore()->retrieve(m_calocell_id,"CaloCell_ID"));
51
52
53 const CaloIdManager* caloIdMgr = nullptr;
54 StatusCode sc = detStore()->retrieve(caloIdMgr);
55 if (sc.isFailure()) {
56 ATH_MSG_ERROR(" Unable to retrieve CaloIdManager from DetectoreStore");
57 return StatusCode::FAILURE;
58 }
59 m_larem_id = caloIdMgr->getEM_ID();
60 m_larhec_id = caloIdMgr->getHEC_ID();
61 m_larfcal_id = caloIdMgr->getFCAL_ID();
62
63 ATH_CHECK(m_fcalModifierTool.retrieve(DisableTool{m_fcalModifierTool.empty()}));
64
65 if (!m_fcalModifierTool.empty() && m_RndmEvtOverlay) {
66
67 ATH_MSG_WARNING("FCalDigitModifierTool is not applied in overlay mode");
68
69 }
70
71 sc = detStore()->retrieve(m_laronline_id);
72 if (sc.isFailure()) {
73 ATH_MSG_ERROR(" Unable to retrieve LArOnlineId from DetectoreStore");
74 return StatusCode::FAILURE;
75 }
76 ATH_CHECK(m_bcMask.buildBitMask(m_problemsToMask,msg()));
77
78 // Services
79 ATH_CHECK(m_rndmGenSvc.retrieve());
80 ATH_CHECK(m_hitMapKey.initialize());
82
83 ATH_CHECK(m_DigitContainerName.initialize());
85
86 // Check consistency of gain-ranges and gain-switching thresholds:
87 std::array<std::pair<int,std::string>,4> iCaloToStr{{{EM,"EM"},{HEC,"HEC"},{FCAL,"FCAL"},{EMIW,"EMIW"}}};
88
89 for (int iCalo = EM; iCalo <= EMIW; ++iCalo) {
90 if ((m_gainRange[iCalo].value().first == CaloGain::LARHIGHGAIN) == (m_HighGainThresh[iCalo] != 0))
91 ATH_MSG_INFO("jobO consistency check: " << iCaloToStr[iCalo] << " has " << ((m_gainRange[iCalo].value().first == CaloGain::LARHIGHGAIN) ? "" : "no ")
92 << " HIGH gain and high Gain threshold=" << m_HighGainThresh[iCalo]);
93 else {
94 ATH_MSG_ERROR("jobO inconsistency! " << iCaloToStr[iCalo] << " has " << ((m_gainRange[iCalo].value().first == CaloGain::LARHIGHGAIN) ? "" : "no ")
95 << " HIGH gain but high Gain threshold=" << m_HighGainThresh[iCalo]);
96 return StatusCode::FAILURE;
97 }
98 if ((m_gainRange[iCalo].value().second == CaloGain::LARLOWGAIN) == (m_LowGainThresh[iCalo] <= m_maxADC))
99 ATH_MSG_INFO("jobO consistency check: Calo " << iCaloToStr[iCalo] << " has " << ((m_gainRange[iCalo].value().first == CaloGain::LARHIGHGAIN) ? "" : "no ")
100 << "LOW gain and high Gain threshold=" << m_LowGainThresh[iCalo] << " (maxADC=" << m_maxADC << ")");
101 else {
102 ATH_MSG_ERROR("jobO inconsistency! Calo " << iCaloToStr[iCalo] << " has " << ((m_gainRange[iCalo].value().first == CaloGain::LARHIGHGAIN) ? "" : "no ")
103 << "LOW gain but high Gain threshold=" << m_LowGainThresh[iCalo] << " (maxADC=" << m_maxADC << ")");
104 return StatusCode::FAILURE;
105 }
106
107 if (m_gainRange[iCalo].value().first == m_gainRange[iCalo].value().second) {
108 ATH_MSG_ERROR(" Calo " << iCaloToStr[iCalo] << " configured to have only one gain. This is not supported.");
109 return Status::FAILURE;
110 }
111 if (m_HighGainThresh[iCalo] >= m_LowGainThresh[iCalo] ) {
112 ATH_MSG_ERROR(" Calo " << iCaloToStr[iCalo] << " High gain threshold > low gain threshold! " << m_HighGainThresh[iCalo] << " >= " << m_LowGainThresh[iCalo]);
113 return Status::FAILURE;
114 }
115
116
117 } //end iCalo loop
118
119 return StatusCode::SUCCESS;
120}
const ServiceHandle< StoreGateSvc > & detStore() const
const LArHEC_ID * getHEC_ID(void) const
const LArFCAL_ID * getFCAL_ID(void) const
const LArEM_ID * getEM_ID(void) const
const LArHEC_ID * m_larhec_id
Gaudi::Property< std::vector< std::string > > m_problemsToMask
static constexpr int s_MaxNSamples
const LArFCAL_ID * m_larfcal_id
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
SG::ReadCondHandleKey< ILArOFC > m_OFCKey
Gaudi::Property< unsigned > m_maxADC
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ 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()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ MakeDigit()

StatusCode LArHitEMapToDigitAlg::MakeDigit ( const EventContext & ctx,
const Identifier & cellId,
const HWIdentifier & ch_id,
const IFCalDigitModifierTool::EventData & fcalData,
LArDigit *& Digit,
DataPool< LArDigit > & dataItemsPool,
LArDigit *& Digit_DigiHSTruth,
const std::vector< std::pair< float, float > > * TimeE,
const LArDigit * rndm_digit,
CLHEP::HepRandomEngine * engine,
const std::vector< std::pair< float, float > > * TimeE_DigiHSTruth,
const LArADC2MeV * adc2MeVs,
const ILArfSampl * fSampl,
const ILArPedestal * pedestal,
const ILArNoise * noise,
const LArAutoCorrNoise * autoCorrNoise,
const LArBadChannelCont * bcCont,
const ILArShape * shape ) const
protected

Definition at line 264 of file LArHitEMapToDigitAlg.cxx.

282 {
283
284 bool createDigit_DigiHSTruth = true;
285
286
287 int i;
288 short Adc;
289 short Adc_DigiHSTruth;
290
291 std::vector<short> AdcSample(m_NSamples);
292 std::vector<short> AdcSample_DigiHSTruth(m_NSamples);
293
294 float SF=1.;
295 float SigmaNoise;
296 staticVecFloat_t rndm_energy_samples(m_NSamples) ;
297
298 int iCalo = EM;
299 if (m_larem_id->is_lar_hec(cellId))
300 iCalo = HEC;
301 else if (m_larem_id->is_lar_fcal(cellId))
302 iCalo = FCAL;
303 else if (m_larem_id->is_em_endcap_inner(cellId))
304 iCalo = EMIW;
305
306 CaloGain::CaloGain initialGain=static_cast<CaloGain::CaloGain>(m_gainRange[iCalo].value().first);
308
309// ........ retrieve data (1/2) ................................
310//
311 SF=fSampl->FSAMPL(ch_id);
312
313//
314// ....... dump info ................................
315//
316#ifndef NDEBUG
317 ATH_MSG_DEBUG(" Cellid " << m_larem_id->show_to_string(cellId));
318 ATH_MSG_DEBUG(" SF: " << SF);
319#endif
320
321 staticVecDouble_t Samples;
322 staticVecDouble_t Samples_DigiHSTruth;
323 staticVecDouble_t Noise;
324 Samples.resize(m_NSamples,0);
325 if(m_doDigiTruth) Samples_DigiHSTruth.resize(m_NSamples,0);
326 Noise.resize(m_NSamples,0);
327
328//
329// ....... make the five samples
330//
331
332#ifndef NDEBUG
333 ATH_MSG_DEBUG(" number of hit for this cell " << TimeE->size());
334#endif
335
336//
337// convert Hits into energy samples and add result to Samples assuming LARHIGHGAIN for pulse shape
338//
339 bool isDead = m_bcMask.cellShouldBeMasked(bcCont,ch_id);
340
341
342 if (!isDead) {
343 if( this->ConvertHits2Samples(cellId,ch_id,initialGain,TimeE, Samples, shape).isFailure() ) {
344 return StatusCode::SUCCESS;
345 }
346 if(m_doDigiTruth && TimeE_DigiHSTruth){
347 if( this->ConvertHits2Samples(cellId,ch_id,initialGain,TimeE_DigiHSTruth, Samples_DigiHSTruth, shape).isFailure() ) {
348 return StatusCode::SUCCESS;
349 }
350 }
351 }
352
353//
354// .... add random event digit if needed
355//
356 float energy2adc ;
357 float rAdc ;
358 if(m_RndmEvtOverlay && rndmEvtDigit ) // no overlay if missing random digit
359 {
360 rndmGain= rndmEvtDigit->gain();
361 auto polynom_adc2mev =adc2MeVs->ADC2MEV(ch_id,rndmEvtDigit->gain());
362 if (polynom_adc2mev.size() > 1) {
363 float adc2energy = SF * polynom_adc2mev[1];
364 const std::vector<short> & rndm_digit_samples = rndmEvtDigit->samples() ;
365 float Pedestal = pedestal->pedestal(ch_id,rndmEvtDigit->gain());
366 if (Pedestal <= (1.0+LArElecCalib::ERRORCODE)) {
367 ATH_MSG_WARNING(" Pedestal not found in database for this channel offID " << cellId << " Use sample 0 for random");
368 Pedestal = rndm_digit_samples[0];
369 }
370 ATH_MSG_DEBUG(" Params for inverting LAr Digitization: pedestal " << Pedestal << " adc2energy " << adc2energy);
371
372// in case Medium or low gain, take into account ramp intercept in ADC->"energy" computation
373// this requires to take into account the sum of the optimal filter coefficients, as they don't compute with ADC shift
374 float adc0=0.;
375 if (!m_isMcOverlay && rndmEvtDigit->gain()>0) {
376 SG::ReadCondHandle<ILArOFC> larOFC(m_OFCKey, ctx);
377 if (larOFC.cptr() != nullptr) {
378 ILArOFC::OFCRef_t ofc_a = larOFC->OFC_a(ch_id,rndmEvtDigit->gain(),0);
379 float sumOfc=0.;
380 if (ofc_a.size()>0) {
381 for (unsigned int j=0;j<ofc_a.size();j++) sumOfc += ofc_a.at(j);
382 }
383 if (sumOfc>0) adc0 = polynom_adc2mev[0] * SF /sumOfc;
384 }
385 }
386
387 int nmax=m_NSamples;
388 if ((int)(rndm_digit_samples.size()) < m_NSamples) {
390 "Less digit Samples than requested in digitization for cell "
391 << ch_id.get_compact() << " Digit has " << rndm_digit_samples.size()
392 << " samples. Digitization request " << m_NSamples);
393 nmax = rndm_digit_samples.size();
394 }
395 for(i=0 ; i<nmax ; i++)
396 {
397 rAdc = (rndm_digit_samples[i] - Pedestal ) * adc2energy + adc0;
398 rndm_energy_samples[i] = rAdc ;
399 Samples[i] += rAdc ;
400 }
401 }
402 else {
403 ATH_MSG_ERROR(" No ramp found for this random cell " << m_larem_id->show_to_string(cellId) << " for gain " << rndmEvtDigit->gain());
404 if (adc2MeVs->nGains()<=(int)rndmEvtDigit->gain()) {
405 ATH_MSG_ERROR("Found ramp for only " << adc2MeVs->nGains() << " gains. Are you trying to overlay of Run 3 random with run 4 signal?");
406 }
407 return StatusCode::FAILURE;
408 }
409 }
410
411
412 CaloGain::CaloGain igain=chooseGain(Samples,ch_id,static_cast<CaloNum>(iCalo),pedestal,adc2MeVs,SF);
413 if (igain==CaloGain::INVALIDGAIN) {
414 return StatusCode::FAILURE;
415 }
416
417 // check that select gain is never lower (higher index number) than random gain in case of overlay
418 igain=std::max(rndmGain,igain);
419
420//
421// recompute Samples if igain != HIGHGAIN
422//
423 if (igain != initialGain ){
424 for (i=0;i<m_NSamples;i++) {
425 if(m_doDigiTruth) Samples_DigiHSTruth[i] = 0.;
426 if (m_RndmEvtOverlay) Samples[i]= rndm_energy_samples[i] ;
427 else Samples[i] = 0.;
428 }
429
430 if (!isDead) {
431 if( this->ConvertHits2Samples(cellId,ch_id,igain,TimeE, Samples, shape) == StatusCode::FAILURE ) {
432 return StatusCode::SUCCESS;
433 }
434 if(m_doDigiTruth){
435 if( this->ConvertHits2Samples(cellId,ch_id,igain,TimeE_DigiHSTruth, Samples_DigiHSTruth, shape) == StatusCode::FAILURE ) {
436 return StatusCode::SUCCESS;
437 }
438 }
439 }
440 }
441
442//
443// ........ add the noise ................................
444//
445
446 double Rndm[32]{};
447 int BvsEC=0;
448 if(iCalo==EM || iCalo==EMIW) BvsEC=std::abs(m_larem_id->barrel_ec(cellId));
449
450 // ===== Optional FCal signal degradation (HL-LHC ion build-up) =====
451
452 // Applied to energy samples, before noise and pedestal are added.
453
454 if (iCalo == FCAL && !m_fcalModifierTool.empty() && !m_RndmEvtOverlay) {
455
456 m_fcalModifierTool->modifySamples(fcalData, cellId,
457
458 std::span<double>(Samples.data(), Samples.size()));
459
460 if (m_doDigiTruth) {
461
462 m_fcalModifierTool->modifySamples(fcalData, cellId,
463
464 std::span<double>(Samples_DigiHSTruth.data(), Samples_DigiHSTruth.size()));
465
466 }
467
468 }
469
470 // ===================================================================
471
472
473 bool addedNoise=false;
474 if (m_NoiseOnOff &&
475 ((BvsEC == 1 && m_NoiseInEMB) || (BvsEC > 1 && m_NoiseInEMEC) ||
476 (iCalo == HEC && m_NoiseInHEC) || (iCalo == FCAL && m_NoiseInFCAL)))
477 // add the noise only in the wanted sub-detectors
478 {
479 if (!m_RndmEvtOverlay) {
480 if (!m_pedestalNoise) {
481 SigmaNoise = noise->noise(ch_id, igain);
482 } else {
483 float thisNoise = pedestal->pedestalRMS(ch_id, igain);
484 if (thisNoise >= (1.0 + LArElecCalib::ERRORCODE))
485 SigmaNoise = thisNoise;
486 else
487 SigmaNoise = 0.;
488 }
489 // Sqrt of noise covariance matrix
490 const std::vector<float>& CorGen =
491 autoCorrNoise->autoCorrSqrt(cellId, igain);
492 if (CorGen.size() < (unsigned)m_NSamples * m_NSamples) {
493 ATH_MSG_ERROR("Noise AutoCorr too small, need "
494 << m_NSamples * m_NSamples << " points for "
495 << m_NSamples << " samples.");
496 return StatusCode::FAILURE;
497 }
498
499 RandGaussZiggurat::shootArray(engine, m_NSamples, Rndm, 0., 1.);
500
501 int index;
502 for (int i = 0; i < m_NSamples; i++) {
503 Noise[i] = 0.;
504 for (int j = 0; j <= i; j++) {
505 index = i * m_NSamples + j;
506 Noise[i] += Rndm[j] * CorGen[index];
507 }
508 Noise[i] = Noise[i] * SigmaNoise;
509 }
510 addedNoise = true;
511 } else {
512 // overlay case a priori don't add any noise
513 for (int i = 0; i < m_NSamples; i++)
514 Noise[i] = 0.;
515 // if gain from zerobias events is < gain from mixed events => add extra
516 // noise to account for gain vs noise dependance
517 // done in a simple way without taking into account the time
518 // correlation of this extra noise properly
519 if (rndmEvtDigit) {
520 // if gain of cell is different from ZB event gain
521 if (igain > rndmEvtDigit->gain()) {
522 double SigmaNoiseZB = 0.; // noise in ZB event for gain of ZB event
523 double SigmaNoise = 0.; // noise expected for new gain value
524 double SigmaExtraNoise = 0.; // quadratic difference of noise values
525 if (!m_pedestalNoise) {
526 SigmaNoiseZB = noise->noise(ch_id, rndmEvtDigit->gain());
527 SigmaNoise = noise->noise(ch_id, igain);
528 } else {
529 float thisNoise = pedestal->pedestalRMS(ch_id, rndmEvtDigit->gain());
530 if (thisNoise >= (1.0 + LArElecCalib::ERRORCODE))
531 SigmaNoiseZB = thisNoise;
532 else
533 SigmaNoiseZB = 0.;
534 thisNoise = pedestal->pedestalRMS(ch_id, igain);
535 if (thisNoise >= (1.0 + LArElecCalib::ERRORCODE))
536 SigmaNoise = thisNoise;
537 else
538 SigmaNoise = 0.;
539 }
540 // Convert SigmaNoiseZB in noise in ADC counts for igain conversion
541 auto polynom_adc2mevZB =
542 adc2MeVs->ADC2MEV(cellId, rndmEvtDigit->gain());
543 auto polynom_adc2mev = adc2MeVs->ADC2MEV(cellId, igain);
544 if (polynom_adc2mevZB.size() > 1 && polynom_adc2mev.size() > 1) {
545 if (polynom_adc2mev[1] > 0.) {
546 SigmaNoiseZB = SigmaNoiseZB * (polynom_adc2mevZB[1]) /
547 (polynom_adc2mev[1]);
548 if (SigmaNoise > SigmaNoiseZB)
549 SigmaExtraNoise = sqrt(SigmaNoise * SigmaNoise -
550 SigmaNoiseZB * SigmaNoiseZB);
551 }
552 } // check that AC2MeV factors are there
553 RandGaussZiggurat::shootArray(engine, m_NSamples, Rndm, 0.,
554 1.); // generate noise
555 for (int i = 0; i < m_NSamples; i++)
556 Noise[i] = SigmaExtraNoise * Rndm[i];
557 addedNoise = true;
558 } // different gains
559 } // rndm Digit is there
560 } // rndm Overlay test
561 } // add noise ?
562 //
563// ......... convert into adc counts ................................
564//
565 float Pedestal = pedestal->pedestal(ch_id,igain);
566 if (Pedestal <= (1.0+LArElecCalib::ERRORCODE)) {
567 ATH_MSG_WARNING(" pedestal not found for cellId " << cellId << " assume 1000" );
568 Pedestal=1000.;
569 }
570 const auto polynom_adc2mev = adc2MeVs->ADC2MEV(cellId,igain);
571 if (polynom_adc2mev.size() < 2) {
572 ATH_MSG_WARNING(" No ramp found for requested gain " << igain << " for cell " << m_larem_id->show_to_string(cellId) << " no digit made...");
573 return StatusCode::SUCCESS;
574 }
575
576 energy2adc=1./(polynom_adc2mev[1])/SF;
577
578// in case Medium or low gain, take into account ramp intercept in energy->ADC computation
579// this requires to take into account the sum of the optimal filter coefficients, as they don't compute with ADC shift
580 if(!m_isMcOverlay && m_RndmEvtOverlay && igain>0)
581 {
582 SG::ReadCondHandle<ILArOFC> larOFC(m_OFCKey, ctx);
583 if (larOFC.cptr() != nullptr) {
584 float sumOfc=0.;
585 ILArOFC::OFCRef_t ofc_a = larOFC->OFC_a(ch_id,igain,0);
586 if (ofc_a.size()>0) {
587 for (unsigned int j=0;j<ofc_a.size();j++) sumOfc+= ofc_a.at(j);
588 }
589 if ((polynom_adc2mev[1])>0 && sumOfc>0) Pedestal = Pedestal - (polynom_adc2mev[0])/(polynom_adc2mev[1])/sumOfc;
590 ATH_MSG_DEBUG(" Params for final LAr Digitization gain: " << igain << " pedestal: " << Pedestal << " energy2adc: " << energy2adc);
591 }
592 }
593 for(i=0;i<m_NSamples;i++)
594 {
595 double xAdc;
596 double xAdc_DigiHSTruth = 0;
597
598 if ( addedNoise ){
599 xAdc = Samples[i]*energy2adc + Noise[i] + Pedestal + 0.5;
600 if(m_doDigiTruth) {
601 xAdc_DigiHSTruth = Samples_DigiHSTruth[i]*energy2adc + Noise[i] + Pedestal + 0.5;
602 }
603 }
604
605 else {
606 if (m_roundingNoNoise) {
607 float flatRndm = RandFlat::shoot(engine);
608 xAdc = Samples[i]*energy2adc + Pedestal + flatRndm;
609 if(m_doDigiTruth) {
610 xAdc_DigiHSTruth = Samples_DigiHSTruth[i]*energy2adc + Pedestal + flatRndm;
611 }
612
613 }
614 else{
615 xAdc = Samples[i]*energy2adc + Pedestal + 0.5;
616 if(m_doDigiTruth) {
617 xAdc_DigiHSTruth = Samples_DigiHSTruth[i]*energy2adc + Pedestal + 0.5;
618 }
619 }
620
621 }
622
623//
624// ........ truncate at maximum value + 1
625// add possibility to saturate at 0 for negative signals
626//
627 if (xAdc <0) {
628 ATH_MSG_WARNING("Found below-zero digit " << xAdc);
629 Adc=0;
630 }
631 else if (xAdc >= m_maxADC) {
632 ATH_MSG_WARNING("Found saturating digit " << i << ": " << xAdc << " chid="<< ch_id.get_identifier32().get_compact() << ", gain=" << igain <<
633 ", energy2adc=" << energy2adc << ", E[0]= " << (TimeE->size()>0 ? std::format("{}",TimeE->at(0).first) : "No value"));
634 Adc=m_maxADC;
635 }
636 else
637 Adc = (short) xAdc;
638
639 AdcSample[i]=Adc;
640
641 if(m_doDigiTruth){
642 if (xAdc_DigiHSTruth <0) Adc_DigiHSTruth=0;
643 else if (xAdc_DigiHSTruth >= m_maxADC) Adc_DigiHSTruth=m_maxADC;
644 else Adc_DigiHSTruth = (short) xAdc_DigiHSTruth;
645 AdcSample_DigiHSTruth[i] = Adc_DigiHSTruth;
646 }
647
648#ifndef NDEBUG
649 ATH_MSG_DEBUG(" Sample " << i << " Energy= " << Samples[i] << " Adc=" << Adc);
650#endif
651
652 }
653
654//
655// ...... create the LArDigit .............
656//
657 Digit = dataItemsPool.nextElementPtr();
658 (*Digit)=LArDigit(ch_id,igain,std::move(AdcSample));
659
660 if (m_doDigiTruth && createDigit_DigiHSTruth) {
661 createDigit_DigiHSTruth = false;
662 Digit_DigiHSTruth = nullptr;
663
664 for (int i = 0; i < m_NSamples; i++) {
665 if (Samples_DigiHSTruth[i] != 0)
666 createDigit_DigiHSTruth = true;
667 }
668
669 Digit_DigiHSTruth =
670 new LArDigit(ch_id, igain, std::move(AdcSample_DigiHSTruth));
671 }
672
673 return StatusCode::SUCCESS;
674}
const int nmax(200)
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
LArVectorProxy OFCRef_t
This class defines the interface for accessing Optimal Filtering coefficients for each channel provid...
Definition ILArOFC.h:26
virtual float pedestal(const HWIdentifier &id, int gain) const =0
virtual float pedestalRMS(const HWIdentifier &id, int gain) const =0
access to RMS of Pedestal index by Identifier, and gain setting
virtual const float & FSAMPL(const HWIdentifier &id) const =0
value_type get_compact() const
Get the compact id.
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
int nGains() const
Definition LArADC2MeV.h:55
const LArVectorProxy ADC2MEV(const HWIdentifier &id, int gain) const
Definition LArADC2MeV.h:32
const std::vector< float > & autoCorrSqrt(const HWIdentifier &id, int gain) const
Gaudi::Property< bool > m_NoiseInEMEC
StatusCode ConvertHits2Samples(const Identifier &cellId, HWIdentifier ch_id, CaloGain::CaloGain igain, const std::vector< std::pair< float, float > > *TimeE, staticVecDouble_t &sampleList, const ILArShape *shape) const
Gaudi::Property< bool > m_roundingNoNoise
Gaudi::Property< bool > m_NoiseInEMB
Gaudi::Property< bool > m_NoiseInHEC
boost::container::static_vector< double, s_MaxNSamples > staticVecDouble_t
CaloGain::CaloGain chooseGain(const staticVecDouble_t &samples, const HWIdentifier id, const CaloNum iCalo, const ILArPedestal *ped, const LArADC2MeV *ramp, const float SF) const
boost::container::static_vector< float, s_MaxNSamples > staticVecFloat_t
Gaudi::Property< bool > m_NoiseInFCAL
value_type at(size_t i) const
Vector indexing with bounds check.
str index
Definition DeMoScan.py:362
const float SF[NF]
Cross sections for Fluor.

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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.

◆ pointerFromKey()

template<class T>
const T * LArHitEMapToDigitAlg::pointerFromKey ( const EventContext & context,
const SG::ReadCondHandleKey< T > & key ) const
protected

Definition at line 227 of file LArHitEMapToDigitAlg.h.

227 {
228 SG::ReadCondHandle<T> aHandle(key, context);
229 const T* object = *aHandle;
230 if (object == nullptr) ATH_MSG_ERROR("Object could not be fetched with key " << aHandle.key() );
231 return object;
232}
unsigned long long T

◆ 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 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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)

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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 AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ 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 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_adc2mevKey

SG::ReadCondHandleKey<LArADC2MeV> LArHitEMapToDigitAlg::m_adc2mevKey {this,"ADC2MeVKey","LArADC2MeV","SG Key of ADC2MeV conditions object"}
protected

Definition at line 118 of file LArHitEMapToDigitAlg.h.

118{this,"ADC2MeVKey","LArADC2MeV","SG Key of ADC2MeV conditions object"};

◆ m_autoCorrNoiseKey

SG::ReadCondHandleKey<LArAutoCorrNoise> LArHitEMapToDigitAlg::m_autoCorrNoiseKey {this,"AutoCorrNoiseKey","LArAutoCorrNoise","SG Key of AutoCorrNoise conditions object"}
protected

Definition at line 123 of file LArHitEMapToDigitAlg.h.

123{this,"AutoCorrNoiseKey","LArAutoCorrNoise","SG Key of AutoCorrNoise conditions object"};

◆ m_badFebKey

SG::ReadCondHandleKey<LArBadFebCont> LArHitEMapToDigitAlg::m_badFebKey {this, "BadFebKey", "LArBadFeb", "Key of BadFeb object in ConditionsStore"}
protected

Definition at line 126 of file LArHitEMapToDigitAlg.h.

126{this, "BadFebKey", "LArBadFeb", "Key of BadFeb object in ConditionsStore"};

◆ m_bcContKey

SG::ReadCondHandleKey<LArBadChannelCont> LArHitEMapToDigitAlg::m_bcContKey {this, "BadChanKey", "LArBadChannel", "SG key for LArBadChan object"}
protected

Definition at line 125 of file LArHitEMapToDigitAlg.h.

125{this, "BadChanKey", "LArBadChannel", "SG key for LArBadChan object"};

◆ m_bcMask

LArBadChannelMask LArHitEMapToDigitAlg::m_bcMask
protected

Definition at line 128 of file LArHitEMapToDigitAlg.h.

◆ m_cabling

const LArOnOffIdMapping* LArHitEMapToDigitAlg::m_cabling {}
protected

Definition at line 121 of file LArHitEMapToDigitAlg.h.

121{}; //Set in perpareEvent, used also in mergeEvent

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArHitEMapToDigitAlg::m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
protected

Definition at line 119 of file LArHitEMapToDigitAlg.h.

119{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};

◆ m_calocell_id

const CaloCell_ID* LArHitEMapToDigitAlg::m_calocell_id {}
protected

Definition at line 215 of file LArHitEMapToDigitAlg.h.

215{};

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> LArHitEMapToDigitAlg::m_caloMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"}
protected

Definition at line 130 of file LArHitEMapToDigitAlg.h.

130{this,"CaloDetDescrManager", "CaloDetDescrManager"};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_DigitContainerName

SG::WriteHandleKey<LArDigitContainer> LArHitEMapToDigitAlg::m_DigitContainerName
protected
Initial value:
{this, "DigitContainer", "LArDigitContainer_MC",
"Name of output digit container"}

Definition at line 138 of file LArHitEMapToDigitAlg.h.

138 {this, "DigitContainer", "LArDigitContainer_MC",
139 "Name of output digit container"}; // output digit container name list

◆ m_DigitContainerName_DigiHSTruth

SG::WriteHandleKey<LArDigitContainer> LArHitEMapToDigitAlg::m_DigitContainerName_DigiHSTruth
protected
Initial value:
{this, "DigitContainer_DigiHSTruth",
"LArDigitContainer_DigiHSTruth", "Name of output signal digit container"}

Definition at line 140 of file LArHitEMapToDigitAlg.h.

140 {this, "DigitContainer_DigiHSTruth",
141 "LArDigitContainer_DigiHSTruth", "Name of output signal digit container"}; // output digit container name list

◆ m_doDigiTruth

Gaudi::Property<bool> LArHitEMapToDigitAlg::m_doDigiTruth
protected
Initial value:
{this, "DoDigiTruthReconstruction", false,
"Also create information about reconstructed digits for HS hits"}

Definition at line 190 of file LArHitEMapToDigitAlg.h.

190 {this, "DoDigiTruthReconstruction", false,
191 "Also create information about reconstructed digits for HS hits"};

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_fcalModifierTool

ToolHandle<IFCalDigitModifierTool> LArHitEMapToDigitAlg::m_fcalModifierTool
protected
Initial value:
{this, "FCalDigitModifierTool", "",
"Optional tool modelling FCal signal degradation"}

Definition at line 222 of file LArHitEMapToDigitAlg.h.

222 {this, "FCalDigitModifierTool", "",
223 "Optional tool modelling FCal signal degradation"};

◆ m_firstSample

Gaudi::Property<int> LArHitEMapToDigitAlg::m_firstSample
protected
Initial value:
{this, "firstSample", 0,
"First sample to use for the shape for in-time signal"}

Definition at line 182 of file LArHitEMapToDigitAlg.h.

182 {this, "firstSample", 0,
183 "First sample to use for the shape for in-time signal"}; // first sample to use for pulse shape for in time energy deposit (use a negative value to include preceeding digits)

◆ m_fSamplKey

SG::ReadCondHandleKey<ILArfSampl> LArHitEMapToDigitAlg::m_fSamplKey {this,"fSamplKey","LArfSamplSym","SG Key of LArfSampl object"}
protected

Definition at line 114 of file LArHitEMapToDigitAlg.h.

114{this,"fSamplKey","LArfSamplSym","SG Key of LArfSampl object"};

◆ m_gainRange

std::array<Gaudi::Property<std::pair<int,int> >,4> LArHitEMapToDigitAlg::m_gainRange
protected
Initial value:
{{
{this,"GainRangeEM",{CaloGain::LARHIGHGAIN,CaloGain::LARLOWGAIN},"Range of gains"},
{this,"GainRangeHEC",{CaloGain::LARMEDIUMGAIN,CaloGain::LARLOWGAIN},"Range of gains"},
{this,"GainRangeFCAL",{CaloGain::LARHIGHGAIN,CaloGain::LARLOWGAIN},"Range of gains"},
{this,"GainRangeEMECIW",{CaloGain::LARHIGHGAIN,CaloGain::LARLOWGAIN},"Range of gains"},
}}

Definition at line 168 of file LArHitEMapToDigitAlg.h.

168 {{
169 {this,"GainRangeEM",{CaloGain::LARHIGHGAIN,CaloGain::LARLOWGAIN},"Range of gains"},
170 {this,"GainRangeHEC",{CaloGain::LARMEDIUMGAIN,CaloGain::LARLOWGAIN},"Range of gains"},
171 {this,"GainRangeFCAL",{CaloGain::LARHIGHGAIN,CaloGain::LARLOWGAIN},"Range of gains"},
172 {this,"GainRangeEMECIW",{CaloGain::LARHIGHGAIN,CaloGain::LARLOWGAIN},"Range of gains"},
173 }};

◆ m_HighGainThresh

std::array<Gaudi::Property<double>,4> LArHitEMapToDigitAlg::m_HighGainThresh
protected
Initial value:
{{
{this,"HighGainThreshEM",1300,"ADC counts in medium gain"},
{this,"HighGainThreshHEC",0,"ADC counts in medium gain"},
{this,"HighGainThreshFCAL",1100,"ADC counts in medium gain"},
{this,"HighGainThreshEMECIW",1300,"ADC counts in medium gain"}
}}

Definition at line 159 of file LArHitEMapToDigitAlg.h.

159 {{
160 {this,"HighGainThreshEM",1300,"ADC counts in medium gain"},
161 {this,"HighGainThreshHEC",0,"ADC counts in medium gain"},
162 {this,"HighGainThreshFCAL",1100,"ADC counts in medium gain"},
163 {this,"HighGainThreshEMECIW",1300,"ADC counts in medium gain"}
164 }};

◆ m_hitMapKey

SG::ReadHandleKey<LArHitEMap> LArHitEMapToDigitAlg::m_hitMapKey {this,"LArHitEMapKey","LArHitEMap"}
protected

Definition at line 133 of file LArHitEMapToDigitAlg.h.

133{this,"LArHitEMapKey","LArHitEMap"};

◆ m_hitMapKey_DigiHSTruth

SG::ReadHandleKey<LArHitEMap> LArHitEMapToDigitAlg::m_hitMapKey_DigiHSTruth {this,"LArHitEMap_DigiHSTruthKey","LArHitEMap_DigiHSTruth"}
protected

Definition at line 134 of file LArHitEMapToDigitAlg.h.

134{this,"LArHitEMap_DigiHSTruthKey","LArHitEMap_DigiHSTruth"};

◆ m_inputDigitContainerKey

SG::ReadHandleKey<LArDigitContainer> LArHitEMapToDigitAlg::m_inputDigitContainerKey
protected
Initial value:
{this, "InputDigitContainer", "",
"Name of input digit container"}

Definition at line 135 of file LArHitEMapToDigitAlg.h.

135 {this, "InputDigitContainer", "",
136 "Name of input digit container"}; // input digit container name

◆ m_isMcOverlay

Gaudi::Property<bool> LArHitEMapToDigitAlg::m_isMcOverlay
protected
Initial value:
{this, "isMcOverlay", false,
"Is input Overlay from MC or data (default=false, from data)"}

Definition at line 188 of file LArHitEMapToDigitAlg.h.

188 {this, "isMcOverlay", false,
189 "Is input Overlay from MC or data (default=false, from data)"}; // true if input RDO for overlay are from MC, false if from data

◆ m_larem_id

const LArEM_ID* LArHitEMapToDigitAlg::m_larem_id {}
protected

Definition at line 216 of file LArHitEMapToDigitAlg.h.

216{};

◆ m_larfcal_id

const LArFCAL_ID* LArHitEMapToDigitAlg::m_larfcal_id {}
protected

Definition at line 218 of file LArHitEMapToDigitAlg.h.

218{};

◆ m_larhec_id

const LArHEC_ID* LArHitEMapToDigitAlg::m_larhec_id {}
protected

Definition at line 217 of file LArHitEMapToDigitAlg.h.

217{};

◆ m_laronline_id

const LArOnlineID* LArHitEMapToDigitAlg::m_laronline_id {}
protected

Definition at line 219 of file LArHitEMapToDigitAlg.h.

219{};

◆ m_LowGainThresh

std::array<Gaudi::Property<double>,4> LArHitEMapToDigitAlg::m_LowGainThresh
protected
Initial value:
{{
{this,"LowGainThreshEM",3900,"ADC counts in medium gain"},
{this,"LowGainThreshHEC",2500,"ADC counts in medium gain"},
{this,"LowGainThreshFCAL",2000,"ADC counts in medium gain"},
{this,"LowGainThreshEMECIW",3900,"ADC counts in medium gain"}
}}

Definition at line 151 of file LArHitEMapToDigitAlg.h.

151 {{
152 {this,"LowGainThreshEM",3900,"ADC counts in medium gain"},
153 {this,"LowGainThreshHEC",2500,"ADC counts in medium gain"},
154 {this,"LowGainThreshFCAL",2000,"ADC counts in medium gain"},
155 {this,"LowGainThreshEMECIW",3900,"ADC counts in medium gain"}
156 }};

◆ m_maxADC

Gaudi::Property<unsigned> LArHitEMapToDigitAlg::m_maxADC {this,"maxADC",4096,"Maxium ADC value +1 (for overflow)"}
protected

Definition at line 175 of file LArHitEMapToDigitAlg.h.

175{this,"maxADC",4096,"Maxium ADC value +1 (for overflow)"};

◆ m_NoiseInEMB

Gaudi::Property<bool> LArHitEMapToDigitAlg::m_NoiseInEMB
protected
Initial value:
{this, "NoiseInEMB", true,
"put noise in EMB (default=true)"}

Definition at line 193 of file LArHitEMapToDigitAlg.h.

193 {this, "NoiseInEMB", true,
194 "put noise in EMB (default=true)"}; // noise in Barrel is off if false

◆ m_NoiseInEMEC

Gaudi::Property<bool> LArHitEMapToDigitAlg::m_NoiseInEMEC
protected
Initial value:
{this, "NoiseInEMEC", true,
"put noise in EMEC (default=true)"}

Definition at line 195 of file LArHitEMapToDigitAlg.h.

195 {this, "NoiseInEMEC", true,
196 "put noise in EMEC (default=true)"}; // noise in EndCap is off if false

◆ m_NoiseInFCAL

Gaudi::Property<bool> LArHitEMapToDigitAlg::m_NoiseInFCAL
protected
Initial value:
{this, "NoiseInFCAL", true,
"put noise in FCAL (default=true)"}

Definition at line 199 of file LArHitEMapToDigitAlg.h.

199 {this, "NoiseInFCAL", true,
200 "put noise in FCAL (default=true)"}; // noise in FCAL is off if false

◆ m_NoiseInHEC

Gaudi::Property<bool> LArHitEMapToDigitAlg::m_NoiseInHEC
protected
Initial value:
{this, "NoiseInHEC", true,
"put noise in HEC (default=true)"}

Definition at line 197 of file LArHitEMapToDigitAlg.h.

197 {this, "NoiseInHEC", true,
198 "put noise in HEC (default=true)"}; // noise in HEC is off if false

◆ m_noiseKey

SG::ReadCondHandleKey<ILArNoise> LArHitEMapToDigitAlg::m_noiseKey {this,"NoiseKey","LArNoiseSym","SG Key of ILArNoise object"}
protected

Definition at line 113 of file LArHitEMapToDigitAlg.h.

113{this,"NoiseKey","LArNoiseSym","SG Key of ILArNoise object"};

◆ m_NoiseOnOff

Gaudi::Property<bool> LArHitEMapToDigitAlg::m_NoiseOnOff
protected
Initial value:
{this, "NoiseOnOff", true,
"put electronic noise (default=true)"}

Definition at line 180 of file LArHitEMapToDigitAlg.h.

180 {this, "NoiseOnOff", true,
181 "put electronic noise (default=true)"}; // noise (in all sub-detectors) is on if true

◆ m_NSamples

Gaudi::Property<int> LArHitEMapToDigitAlg::m_NSamples
protected
Initial value:
{this, "Nsamples", 5,
"Number of ADC samples (default=5)"}

Definition at line 178 of file LArHitEMapToDigitAlg.h.

178 {this, "Nsamples", 5,
179 "Number of ADC samples (default=5)"}; // number of samples in Digit

◆ m_OFCKey

SG::ReadCondHandleKey<ILArOFC> LArHitEMapToDigitAlg::m_OFCKey {this, "OFCKey", "LArOFC", "SG Key of OFC conditions object"}
protected

Definition at line 115 of file LArHitEMapToDigitAlg.h.

115{this, "OFCKey", "LArOFC", "SG Key of OFC conditions object"};

◆ m_pedestalKey

SG::ReadCondHandleKey<ILArPedestal> LArHitEMapToDigitAlg::m_pedestalKey {this,"PedestalKey","LArPedestal","SG Key of LArPedestal object"}
protected

Definition at line 116 of file LArHitEMapToDigitAlg.h.

116{this,"PedestalKey","LArPedestal","SG Key of LArPedestal object"};

◆ m_pedestalNoise

Gaudi::Property<bool> LArHitEMapToDigitAlg::m_pedestalNoise
protected
Initial value:
{this, "PedestalNoise", false,
"Use noise from Pedestal structure instead of LArNoise (default=false)"}

Definition at line 201 of file LArHitEMapToDigitAlg.h.

201 {this, "PedestalNoise", false,
202 "Use noise from Pedestal structure instead of LArNoise (default=false)"};

◆ m_problemsToMask

Gaudi::Property<std::vector<std::string> > LArHitEMapToDigitAlg::m_problemsToMask {this,"ProblemsToMask",{},"Bad-Channel categories to mask entirly"}
protected

Definition at line 127 of file LArHitEMapToDigitAlg.h.

127{this,"ProblemsToMask",{},"Bad-Channel categories to mask entirly"};

◆ m_randomSeedOffset

Gaudi::Property<uint32_t> LArHitEMapToDigitAlg::m_randomSeedOffset {this, "RandomSeedOffset", 2, ""}
protected

Definition at line 146 of file LArHitEMapToDigitAlg.h.

146{this, "RandomSeedOffset", 2, ""}; //

◆ m_randomStreamName

Gaudi::Property<std::string> LArHitEMapToDigitAlg::m_randomStreamName {this, "RandomStreamName", "LArDigitization", ""}
protected

Definition at line 142 of file LArHitEMapToDigitAlg.h.

142{this, "RandomStreamName", "LArDigitization", ""};

◆ m_RndmEvtOverlay

Gaudi::Property<bool> LArHitEMapToDigitAlg::m_RndmEvtOverlay
protected
Initial value:
{this, "RndmEvtOverlay", false,
"Pileup and/or noise added by overlaying random events (default=false)"}

Definition at line 186 of file LArHitEMapToDigitAlg.h.

186 {this, "RndmEvtOverlay", false,
187 "Pileup and/or noise added by overlaying random events (default=false)"}; // Pileup and noise added by overlaying random events

◆ m_rndmGenSvc

ServiceHandle<IAthRNGSvc> LArHitEMapToDigitAlg::m_rndmGenSvc {this, "RndmSvc", "AthRNGSvc", ""}
protected

Definition at line 145 of file LArHitEMapToDigitAlg.h.

145{this, "RndmSvc", "AthRNGSvc", ""};

◆ m_roundingNoNoise

Gaudi::Property<bool> LArHitEMapToDigitAlg::m_roundingNoNoise
protected
Initial value:
{this, "RoundingNoNoise", true,
"if true add random number [0:1[ in no noise case before rounding ADC to integer, if false add only 0.5 average"}

Definition at line 203 of file LArHitEMapToDigitAlg.h.

203 {this, "RoundingNoNoise", true,
204 "if true add random number [0:1[ in no noise case before rounding ADC to integer, if false add only 0.5 average"}; // flag used in NoNoise case: if true add random number [0;1[ in ADC count, if false add only average of 0.5

◆ m_shapeKey

SG::ReadCondHandleKey<ILArShape> LArHitEMapToDigitAlg::m_shapeKey {this,"ShapeKey","LArShapeSym","SG Key of LArShape object"}
protected

Definition at line 117 of file LArHitEMapToDigitAlg.h.

117{this,"ShapeKey","LArShapeSym","SG Key of LArShape object"};

◆ m_useLegacyRandomSeeds

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

Definition at line 147 of file LArHitEMapToDigitAlg.h.

147 {this, "UseLegacyRandomSeeds", false,
148 "Use MC16-style random number seeding"};

◆ m_usePhase

Gaudi::Property<bool> LArHitEMapToDigitAlg::m_usePhase
protected
Initial value:
{this, "UsePhase", false,
"use 1ns binned pulse shape (default=false)"}

Definition at line 184 of file LArHitEMapToDigitAlg.h.

184 {this, "UsePhase", false,
185 "use 1ns binned pulse shape (default=false)"}; // use tbin phase to get shape (default = false for Atlas)

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.

◆ m_Windows

Gaudi::Property<bool> LArHitEMapToDigitAlg::m_Windows
protected
Initial value:
{this, "Windows", false,
"Window mode (produce digits only around true e/photon) (default=false)"}

Definition at line 205 of file LArHitEMapToDigitAlg.h.

205 {this, "Windows", false,
206 "Window mode (produce digits only around true e/photon) (default=false)"};

◆ m_WindowsEtaSize

Gaudi::Property<float> LArHitEMapToDigitAlg::m_WindowsEtaSize
protected
Initial value:
{this, "WindowsEtaSize", 0.4,
"Eta size of window (default=0.4)"}

Definition at line 207 of file LArHitEMapToDigitAlg.h.

207 {this, "WindowsEtaSize", 0.4,
208 "Eta size of window (default=0.4)"};

◆ m_WindowsPhiSize

Gaudi::Property<float> LArHitEMapToDigitAlg::m_WindowsPhiSize
protected
Initial value:
{this, "WindowsPhiSize", 0.5,
"Phi size of window (default=0.5)"}

Definition at line 209 of file LArHitEMapToDigitAlg.h.

209 {this, "WindowsPhiSize", 0.5,
210 "Phi size of window (default=0.5)"};

◆ m_WindowsPtCut

Gaudi::Property<float> LArHitEMapToDigitAlg::m_WindowsPtCut
protected
Initial value:
{this, "WindowsPtCut", 5000.,
"Pt cut on e/photons for window mode (Default=5GeV)"}

Definition at line 211 of file LArHitEMapToDigitAlg.h.

211 {this, "WindowsPtCut", 5000.,
212 "Pt cut on e/photons for window mode (Default=5GeV)"};

◆ s_MaxNSamples

int LArHitEMapToDigitAlg::s_MaxNSamples = 32
staticconstexprprotected

Definition at line 78 of file LArHitEMapToDigitAlg.h.


The documentation for this class was generated from the following files: