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 unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
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
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.
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, 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< ILArNoisem_noiseKey {this,"NoiseKey","LArNoiseSym","SG Key of ILArNoise object"}
SG::ReadCondHandleKey< ILArfSamplm_fSamplKey {this,"fSamplKey","LArfSamplSym","SG Key of LArfSampl object"}
SG::ReadCondHandleKey< ILArOFCm_OFCKey {this, "OFCKey", "LArOFC", "SG Key of OFC conditions object"}
SG::ReadCondHandleKey< ILArPedestalm_pedestalKey {this,"PedestalKey","LArPedestal","SG Key of LArPedestal object"}
SG::ReadCondHandleKey< ILArShapem_shapeKey {this,"ShapeKey","LArShapeSym","SG Key of LArShape object"}
SG::ReadCondHandleKey< LArADC2MeVm_adc2mevKey {this,"ADC2MeVKey","LArADC2MeV","SG Key of ADC2MeV conditions object"}
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
const LArOnOffIdMappingm_cabling {}
SG::ReadCondHandleKey< LArAutoCorrNoisem_autoCorrNoiseKey {this,"AutoCorrNoiseKey","LArAutoCorrNoise","SG Key of AutoCorrNoise conditions object"}
SG::ReadCondHandleKey< LArBadChannelContm_bcContKey {this, "BadChanKey", "LArBadChannel", "SG key for LArBadChan object"}
SG::ReadCondHandleKey< LArBadFebContm_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< CaloDetDescrManagerm_caloMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"}
SG::ReadHandleKey< LArHitEMapm_hitMapKey {this,"LArHitEMapKey","LArHitEMap"}
SG::ReadHandleKey< LArHitEMapm_hitMapKey_DigiHSTruth {this,"LArHitEMap_DigiHSTruthKey","LArHitEMap_DigiHSTruth"}
SG::ReadHandleKey< LArDigitContainerm_inputDigitContainerKey
SG::WriteHandleKey< LArDigitContainerm_DigitContainerName
SG::WriteHandleKey< LArDigitContainerm_DigitContainerName_DigiHSTruth
Gaudi::Property< std::string > m_randomStreamName {this, "RandomStreamName", "LArDigitization", ""}
ServiceHandle< IAthRNGSvcm_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_IDm_calocell_id {}
const LArEM_IDm_larem_id {}
const LArHEC_IDm_larhec_id {}
const LArFCAL_IDm_larfcal_id {}
const LArOnlineIDm_laronline_id {}

Static Protected Attributes

static constexpr int s_MaxNSamples = 32

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_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 63 of file LArHitEMapToDigitAlg.h.

Member Typedef Documentation

◆ staticVecDouble_t

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

Definition at line 77 of file LArHitEMapToDigitAlg.h.

◆ staticVecFloat_t

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

Definition at line 78 of file LArHitEMapToDigitAlg.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ CaloNum

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::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.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ 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 748 of file LArHitEMapToDigitAlg.cxx.

749 {
750
751 int sampleGainChoice{2};
752 if (m_firstSample < 0)
753 sampleGainChoice -= m_firstSample;
754
755 // fix the shift +1 if HEC and nSamples 4 and firstSample 0
756 if (iCalo == HEC && m_NSamples.value() == 4 && m_firstSample.value() == 0)
757 sampleGainChoice -= 1; // ihecshift
758
759 CaloGain::CaloGain gainChoosingGain = static_cast<CaloGain::CaloGain>(m_gainRange[iCalo].value().second - 1);
760 // We choose the gain in applying thresholds on the 3rd Sample (index "2")
761 // converted in ADC counts in the second-lowest gain (eg MEDIUM gain for run 1,2,3, HIGH gain for run 4)
762 // Indeed, thresholds in ADC counts are defined with respect to the MediumGain.
763 //
764 // 1300 3900
765 // ---------------|----------------|--------------> ADC counts in MediumGain
766 // HighGain <--- MediumGain ---> LowGain
767
768 float Pedestal = pedestal->pedestal(ch_id, gainChoosingGain);
769 if (Pedestal <= (1.0 + LArElecCalib::ERRORCODE)) {
770 ATH_MSG_DEBUG(" Pedestal not found for channel " << m_laronline_id->channel_name(ch_id) << " assume 1000 ");
771 Pedestal = 1000.;
772 }
773 const auto& polynom_adc2mev = adc2MeVs->ADC2MEV(ch_id, gainChoosingGain);
774 if (polynom_adc2mev.size() < 2) {
775 ATH_MSG_WARNING(" No ramp found for channel " << m_laronline_id->channel_name(ch_id) << ", gain " << gainChoosingGain << ", no digit produced...");
777 }
778 const float pseudoADC3 = samples[sampleGainChoice] / (polynom_adc2mev[1]) / SF + Pedestal;
779
780 CaloGain::CaloGain igain = gainChoosingGain;
781 // if we are not yet already in the highest gain and we are below high-gain theshold, switch to high gain
782 if (gainChoosingGain > m_gainRange[iCalo].value().first && pseudoADC3 < m_HighGainThresh[iCalo]) {
784 }
785
786 else if (gainChoosingGain < m_gainRange[iCalo].value().second && pseudoADC3 > m_LowGainThresh[iCalo]) {
788 }
789
790 return igain;
791}
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(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
@ 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 630 of file LArHitEMapToDigitAlg.cxx.

634{
635// Converts hits of a particular LAr cell into energy samples
636// declarations
637 int nsamples ;
638 int nsamples_der ;
639 int i ;
640 int j ;
641
642// ........ retrieve data (1/2) ................................
643//
644 ILArShape::ShapeRef_t Shape = shape->Shape(ch_id,igain);
645 ILArShape::ShapeRef_t ShapeDer = shape->ShapeDer(ch_id,igain);
646
647 nsamples = Shape.size();
648 nsamples_der = ShapeDer.size();
649
650 if (nsamples==0) {
651 ATH_MSG_INFO(" No samples for cell = " << cellId );
652 return StatusCode::FAILURE;
653 }
654
655#ifndef NDEBUG
656 ATH_MSG_DEBUG(" Cellid " << m_larem_id->show_to_string(cellId));
657 for (i=0;i<nsamples;i++)
658 {
659 ATH_MSG_DEBUG(Shape[i] << " ");
660 }
661 ATH_MSG_DEBUG("m_NSamples, m_usePhase " << m_NSamples << " " << m_usePhase);
662#endif
663
664
665for (const auto& [energy, time] : *TimeE) {
666 // fix the shift +1 if HEC and nSamples 4 and firstSample 0
667 // in case of data overlay this should NOT be done as the pulse shape read from the database is already shifted
668 // but this should still be done in case of MC overlay
669 int ihecshift=0;
670 if((!m_RndmEvtOverlay || m_isMcOverlay) && m_larem_id->is_lar_hec(cellId) && m_NSamples.value() == 4 && m_firstSample.value() == 0) ihecshift=1;
671
672
673 if (!m_usePhase) {
674
675 // Atlas like mode where we use 25ns binned pulse shape and derivative to deal with time offsets
676
677// shift between reference shape and this time
678 int ishift=(int)(rint(time*(1./25.)));
679 double dtime=time-25.*((double)(ishift));
680 for (i=0;i<m_NSamples.value();i++)
681 {
682 j = i - ishift + m_firstSample + ihecshift;
683#ifndef NDEBUG
684 ATH_MSG_DEBUG(" time/i/j " << time << " "<< i << " " << j);
685#endif
686 if (j >=0 && j < nsamples ) {
687 if (j<nsamples_der && std::abs(ShapeDer[j])<10. )
688 sampleList[i] += (Shape[j]- ShapeDer[j]*dtime)*energy ;
689 else sampleList[i] += Shape[j]*energy ;
690 }
691 }
692 }
693// Mode to use phase (tbin) to get pulse shape ( pulse shape with fine time binning should be available)
694
695 else {
696
697 // FIXME hardcode 8phases3ns configuration (cannot access parameters from ILArShape interface now)
698 int nTimeBins = 8;
699 float timeBinWidth = 25./24.*3.;
700
701// -50<t<-25 phase=-t-25, shift by one peak time (for s2 uses shape(3) with tbin)
702// for -25<t<0 phase = -t, no shift of peak time
703// for 0<t<25 phase=25-t, shift by one peak time (for s2 uses shape(1) with tbin)
704// 25<t<50 phase=50-t, shift by two
705// etc...
706
707 int ishift = (int)(time*(1./25.));
708 int tbin;
709 if (time>0) {
710 tbin = (int)(fmod(time,25)/timeBinWidth);
711 if (tbin>0) {
712 tbin=nTimeBins-tbin;
713 ishift +=1;
714 }
715 } else {
716 tbin = (int)(fmod(-time,25)/timeBinWidth);
717 }
718
719 double dtime = time - ( 25.*((float)(ishift)) - timeBinWidth*tbin);
720
721 Shape = shape->Shape(ch_id,igain,tbin);
722 ShapeDer = shape->ShapeDer(ch_id,igain,tbin);
723
724 nsamples = Shape.size();
725 nsamples_der = ShapeDer.size();
726
727
728 for (i=0;i<m_NSamples.value();i++)
729 {
730 j = i - ishift+m_firstSample + ihecshift;
731#ifndef NDEBUG
732 ATH_MSG_DEBUG(" time/i/j " << time << " "<< i << " " << j);
733#endif
734 if (j >=0 && j < nsamples ) {
735 if (j<nsamples_der && std::abs(ShapeDer[j])<10. )
736 sampleList[i] += (Shape[j]- ShapeDer[j]*dtime)*energy ;
737 else sampleList[i] += Shape[j]*energy ;
738 }
739 }
740
741 } // else if of m_usePhase
742 } // loop over hits
743
744 return StatusCode::SUCCESS;
745
746}
#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 114 of file LArHitEMapToDigitAlg.cxx.

114 {
115
116 // load many conditions
118 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey, context};
119 const LArOnOffIdMapping* cabling=*cablingHdl;
120 if(!cabling) {
121 ATH_MSG_ERROR("Failed to retrieve LAr Cabling map with key " << m_cablingKey.key() );
122 return StatusCode::FAILURE;
123 }
124
125 SG::ReadCondHandle<LArADC2MeV> adc2mevHdl(m_adc2mevKey, context);
126 const LArADC2MeV* adc2MeVs=*adc2mevHdl;
127
128 SG::ReadCondHandle<ILArfSampl> fSamplHdl(m_fSamplKey, context);
129 const ILArfSampl* fSampl=*fSamplHdl;
130
131 SG::ReadCondHandle<ILArPedestal> pedHdl(m_pedestalKey, context);
132 const ILArPedestal* pedestal=*pedHdl;
133
134 const ILArNoise* noise=nullptr;
136 SG::ReadCondHandle<ILArNoise> noiseHdl(m_noiseKey, context);
137 noise=*noiseHdl;
138 }
139
140 const LArAutoCorrNoise* autoCorrNoise=nullptr;
142 SG::ReadCondHandle<LArAutoCorrNoise> autoCorrNoiseHdl(m_autoCorrNoiseKey, context);
143 autoCorrNoise=*autoCorrNoiseHdl;
144 }
145
147 SG::ReadCondHandle<LArBadChannelCont> bch{m_bcContKey,context};
148 const LArBadChannelCont* bcCont{*bch};
149
150 SG::ReadCondHandle<ILArShape> shapeHdl(m_shapeKey, context);
151 const ILArShape* shape=*shapeHdl;
152
153 // Inputs
154 SG::ReadHandle<LArHitEMap> hitmap(m_hitMapKey,context);
155 const LArHitEMap* hitmapPtr = hitmap.cptr();
156 const LArHitEMap* hitmapPtr_DigiHSTruth = nullptr;
157 if ( m_doDigiTruth ) {
158 SG::ReadHandle<LArHitEMap> hitmap_DigitHSTruth(m_hitMapKey_DigiHSTruth,context);
159 hitmapPtr_DigiHSTruth = hitmap_DigitHSTruth.cptr();
160 }
161
162 const size_t nCells=hitmapPtr->GetNbCells();
163 // Prepare Output
164 //
165 // For the standard one lets use a DataPool
166 auto DigitContainer = std::make_unique<LArDigitContainer>(SG::VIEW_ELEMENTS);
167 DigitContainer->reserve(nCells);
168 DataPool<LArDigit> dataItemsPool(context);
169 dataItemsPool.reserve(nCells);
170 //
171 // HSTruth output might not be needed so avoid doing anything
172 // in that case
173 std::unique_ptr<LArDigitContainer> DigitContainer_DigiHSTruth = nullptr;
174 if (m_doDigiTruth){
175 DigitContainer_DigiHSTruth = std::make_unique<LArDigitContainer>();
176 DigitContainer_DigiHSTruth->reserve(nCells);
177 }
178 //
179 const std::vector<std::pair<float,float> >* TimeE;
180 const std::vector<std::pair<float,float> >* TimeE_DigiHSTruth = nullptr;
181
182 ATHRNG::RNGWrapper* rngWrapper = m_rndmGenSvc->getEngine(this, m_randomStreamName);
183 CLHEP::HepRandomEngine * engine = rngWrapper->getEngine(context);
185 rngWrapper->setSeedLegacy( m_randomStreamName, context, m_randomSeedOffset, seedingmode );
186
187 for (size_t it=0;it<nCells;++it)
188 {
189 const LArHitList& hitlist = hitmapPtr->GetCell(it);
190
191 if (!m_Windows || hitlist.inWindows()) {
192 TimeE = &(hitlist.getData());
193 if(m_doDigiTruth) {
194 const auto& hitlist_DigiHSTruth=hitmapPtr_DigiHSTruth->GetCell(it);
195 TimeE_DigiHSTruth = &(hitlist_DigiHSTruth.getData());
196 }
197
198 if (!TimeE->empty() || m_NoiseOnOff || m_RndmEvtOverlay) {
199 const Identifier cellID=m_calocell_id->cell_id(IdentifierHash(it));
200 HWIdentifier ch_id = cabling->createSignalChannelIDFromHash(IdentifierHash(it));
201 HWIdentifier febId = m_laronline_id->feb_Id(ch_id);
202 bool missing=!(badFebs->status(febId).good());
203 if (!missing) {
204 const LArDigit * digit = nullptr ;
205 if(m_RndmEvtOverlay) digit = hitmapPtr->GetDigit(it);
206 // MakeDigit called if in no overlay mode or
207 // if in overlay mode and random digit exists
208 if ((!m_RndmEvtOverlay) || (m_RndmEvtOverlay && digit)) {
209 LArDigit* Digit = nullptr;
210 LArDigit* Digit_DigiHSTruth = nullptr;
211 auto sc = MakeDigit(context, cellID, ch_id, Digit,
212 dataItemsPool,
213 Digit_DigiHSTruth, TimeE, digit, engine,
214 TimeE_DigiHSTruth,
215 adc2MeVs,
216 fSampl,
217 pedestal,
218 noise,
219 autoCorrNoise,
220 bcCont,
221 shape);
222
223 if (sc.isFailure()){
224 ATH_MSG_ERROR("LArHitEMapToDigitAlg::execute failed in MakeDigit");
225 delete Digit_DigiHSTruth;
226 return sc;
227 }
228 DigitContainer->push_back(Digit);
229 if (DigitContainer_DigiHSTruth){
230 DigitContainer_DigiHSTruth->push_back(Digit_DigiHSTruth);
231 }
232 }
233 }
234 }
235 } // check window
236 } // end of loop over the cells
237
238
239 ATH_MSG_DEBUG(" number of created digits = " << DigitContainer->size());
240
241 SG::WriteHandle<LArDigitContainer> DigitContainerHandle( m_DigitContainerName, context);
242 ATH_CHECK(DigitContainerHandle.record( std::move(DigitContainer) ) );
243 if ( DigitContainer_DigiHSTruth ){
244 SG::WriteHandle<LArDigitContainer> DigitContainer_DigiHSTruthHandle( m_DigitContainerName_DigiHSTruth, context);
245 ATH_CHECK(DigitContainer_DigiHSTruthHandle.record( std::move(DigitContainer_DigiHSTruth) ) );
246 }
247
248
249 return StatusCode::SUCCESS;
250}
#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
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
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.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition RNGWrapper.h:134
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
Gaudi::Property< bool > m_pedestalNoise
SG::ReadHandleKey< LArHitEMap > m_hitMapKey_DigiHSTruth
StatusCode MakeDigit(const EventContext &ctx, const Identifier &cellId, const HWIdentifier &ch_id, 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< uint32_t > m_randomSeedOffset
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
SG::WriteHandleKey< LArDigitContainer > m_DigitContainerName_DigiHSTruth
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 & AthCommonReentrantAlgorithm< 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 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode LArHitEMapToDigitAlg::initialize ( )
virtual

Definition at line 24 of file LArHitEMapToDigitAlg.cxx.

25{
26
28 ATH_MSG_ERROR("Requested Nsamples " << m_NSamples << " larger than max "
29 << s_MaxNSamples);
30 return StatusCode::FAILURE;
31 }
34
35 ATH_CHECK(m_shapeKey.initialize());
36 ATH_CHECK(m_fSamplKey.initialize());
37 ATH_CHECK(m_OFCKey.initialize());
38 ATH_CHECK(m_pedestalKey.initialize());
40 ATH_CHECK(m_bcContKey.initialize());
41 ATH_CHECK(m_badFebKey.initialize());
42 ATH_CHECK(m_adc2mevKey.initialize());
43 ATH_CHECK(m_caloMgrKey.initialize());
44
45 ATH_CHECK(m_cablingKey.initialize());
46
47 // helpers
48 //retrieve ID helpers
49 ATH_CHECK(detStore()->retrieve(m_calocell_id,"CaloCell_ID"));
50
51
52 const CaloIdManager* caloIdMgr = nullptr;
53 StatusCode sc = detStore()->retrieve(caloIdMgr);
54 if (sc.isFailure()) {
55 ATH_MSG_ERROR(" Unable to retrieve CaloIdManager from DetectoreStore");
56 return StatusCode::FAILURE;
57 }
58 m_larem_id = caloIdMgr->getEM_ID();
59 m_larhec_id = caloIdMgr->getHEC_ID();
60 m_larfcal_id = caloIdMgr->getFCAL_ID();
61
62 sc = detStore()->retrieve(m_laronline_id);
63 if (sc.isFailure()) {
64 ATH_MSG_ERROR(" Unable to retrieve LArOnlineId from DetectoreStore");
65 return StatusCode::FAILURE;
66 }
67 ATH_CHECK(m_bcMask.buildBitMask(m_problemsToMask,msg()));
68
69 // Services
70 ATH_CHECK(m_rndmGenSvc.retrieve());
71 ATH_CHECK(m_hitMapKey.initialize());
73
74 ATH_CHECK(m_DigitContainerName.initialize());
76
77 // Check consistency of gain-ranges and gain-switching thresholds:
78 std::array<std::pair<int,std::string>,4> iCaloToStr{{{EM,"EM"},{HEC,"HEC"},{FCAL,"FCAL"},{EMIW,"EMIW"}}};
79
80 for (int iCalo = EM; iCalo <= EMIW; ++iCalo) {
81 if ((m_gainRange[iCalo].value().first == CaloGain::LARHIGHGAIN) == (m_HighGainThresh[iCalo] != 0))
82 ATH_MSG_INFO("jobO consistency check: " << iCaloToStr[iCalo] << " has " << ((m_gainRange[iCalo].value().first == CaloGain::LARHIGHGAIN) ? "" : "no ")
83 << " HIGH gain and high Gain threshold=" << m_HighGainThresh[iCalo]);
84 else {
85 ATH_MSG_ERROR("jobO inconsistency! " << iCaloToStr[iCalo] << " has" << ((m_gainRange[iCalo].value().first == CaloGain::LARHIGHGAIN) ? "" : "no ")
86 << " HIGH gain but high Gain threshold=" << m_HighGainThresh[iCalo]);
87 return StatusCode::FAILURE;
88 }
89 if ((m_gainRange[iCalo].value().second == CaloGain::LARLOWGAIN) == (m_LowGainThresh[iCalo] <= m_maxADC))
90 ATH_MSG_INFO("jobO consistency check: Calo " << iCaloToStr[iCalo] << " has" << ((m_gainRange[iCalo].value().first == CaloGain::LARHIGHGAIN) ? "" : "no ")
91 << " LOW gain and high Gain threshold=" << m_LowGainThresh[iCalo] << " (maxADC=" << m_maxADC << ")");
92 else {
93 ATH_MSG_ERROR("jobO inconsistency! Calo " << iCaloToStr[iCalo] << " has" << ((m_gainRange[iCalo].value().first == CaloGain::LARHIGHGAIN) ? "" : "no ")
94 << " LOW gain but high Gain threshold=" << m_LowGainThresh[iCalo] << " (maxADC=" << m_maxADC << ")");
95 return StatusCode::FAILURE;
96 }
97
98 if (m_gainRange[iCalo].value().first == m_gainRange[iCalo].value().second) {
99 ATH_MSG_ERROR(" Calo " << iCaloToStr[iCalo] << " configured to have only one gain. This is not supported.");
100 return Status::FAILURE;
101 }
102 if (m_HighGainThresh[iCalo] >= m_LowGainThresh[iCalo] ) {
103 ATH_MSG_ERROR(" Calo " << iCaloToStr[iCalo] << " High gain threshold > low gain threshold! " << m_HighGainThresh[iCalo] << " >= " << m_LowGainThresh[iCalo]);
104 return Status::FAILURE;
105 }
106
107
108 } //end iCalo loop
109
110 return StatusCode::SUCCESS;
111}
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()

◆ MakeDigit()

StatusCode LArHitEMapToDigitAlg::MakeDigit ( const EventContext & ctx,
const Identifier & cellId,
const HWIdentifier & ch_id,
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 252 of file LArHitEMapToDigitAlg.cxx.

269 {
270
271 bool createDigit_DigiHSTruth = true;
272
273
274 int i;
275 short Adc;
276 short Adc_DigiHSTruth;
277
278 std::vector<short> AdcSample(m_NSamples);
279 std::vector<short> AdcSample_DigiHSTruth(m_NSamples);
280
281 float SF=1.;
282 float SigmaNoise;
283 staticVecFloat_t rndm_energy_samples(m_NSamples) ;
284
285 int iCalo = EM;
286 if (m_larem_id->is_lar_hec(cellId))
287 iCalo = HEC;
288 else if (m_larem_id->is_lar_fcal(cellId))
289 iCalo = FCAL;
290 else if (m_larem_id->is_em_endcap_inner(cellId))
291 iCalo = EMIW;
292
293 CaloGain::CaloGain initialGain=static_cast<CaloGain::CaloGain>(m_gainRange[iCalo].value().first);
295
296// ........ retrieve data (1/2) ................................
297//
298 SF=fSampl->FSAMPL(ch_id);
299
300//
301// ....... dump info ................................
302//
303#ifndef NDEBUG
304 ATH_MSG_DEBUG(" Cellid " << m_larem_id->show_to_string(cellId));
305 ATH_MSG_DEBUG(" SF: " << SF);
306#endif
307
308 staticVecDouble_t Samples;
309 staticVecDouble_t Samples_DigiHSTruth;
310 staticVecDouble_t Noise;
311 Samples.resize(m_NSamples,0);
312 if(m_doDigiTruth) Samples_DigiHSTruth.resize(m_NSamples,0);
313 Noise.resize(m_NSamples,0);
314
315//
316// ....... make the five samples
317//
318
319#ifndef NDEBUG
320 ATH_MSG_DEBUG(" number of hit for this cell " << TimeE->size());
321#endif
322
323//
324// convert Hits into energy samples and add result to Samples assuming LARHIGHGAIN for pulse shape
325//
326 bool isDead = m_bcMask.cellShouldBeMasked(bcCont,ch_id);
327
328
329 if (!isDead) {
330 if( this->ConvertHits2Samples(cellId,ch_id,initialGain,TimeE, Samples, shape).isFailure() ) {
331 return StatusCode::SUCCESS;
332 }
333 if(m_doDigiTruth && TimeE_DigiHSTruth){
334 if( this->ConvertHits2Samples(cellId,ch_id,initialGain,TimeE_DigiHSTruth, Samples_DigiHSTruth, shape).isFailure() ) {
335 return StatusCode::SUCCESS;
336 }
337 }
338 }
339
340//
341// .... add random event digit if needed
342//
343 float energy2adc ;
344 float rAdc ;
345 if(m_RndmEvtOverlay && rndmEvtDigit ) // no overlay if missing random digit
346 {
347 rndmGain= rndmEvtDigit->gain();
348 auto polynom_adc2mev =adc2MeVs->ADC2MEV(ch_id,rndmEvtDigit->gain());
349 if (polynom_adc2mev.size() > 1) {
350 float adc2energy = SF * polynom_adc2mev[1];
351 const std::vector<short> & rndm_digit_samples = rndmEvtDigit->samples() ;
352 float Pedestal = pedestal->pedestal(ch_id,rndmEvtDigit->gain());
353 if (Pedestal <= (1.0+LArElecCalib::ERRORCODE)) {
354 ATH_MSG_WARNING(" Pedestal not found in database for this channel offID " << cellId << " Use sample 0 for random");
355 Pedestal = rndm_digit_samples[0];
356 }
357 ATH_MSG_DEBUG(" Params for inverting LAr Digitization: pedestal " << Pedestal << " adc2energy " << adc2energy);
358
359// in case Medium or low gain, take into account ramp intercept in ADC->"energy" computation
360// this requires to take into account the sum of the optimal filter coefficients, as they don't compute with ADC shift
361 float adc0=0.;
362 if (!m_isMcOverlay && rndmEvtDigit->gain()>0) {
363 SG::ReadCondHandle<ILArOFC> larOFC(m_OFCKey, ctx);
364 if (larOFC.cptr() != nullptr) {
365 ILArOFC::OFCRef_t ofc_a = larOFC->OFC_a(ch_id,rndmEvtDigit->gain(),0);
366 float sumOfc=0.;
367 if (ofc_a.size()>0) {
368 for (unsigned int j=0;j<ofc_a.size();j++) sumOfc += ofc_a.at(j);
369 }
370 if (sumOfc>0) adc0 = polynom_adc2mev[0] * SF /sumOfc;
371 }
372 }
373
374 int nmax=m_NSamples;
375 if ((int)(rndm_digit_samples.size()) < m_NSamples) {
377 "Less digit Samples than requested in digitization for cell "
378 << ch_id.get_compact() << " Digit has " << rndm_digit_samples.size()
379 << " samples. Digitization request " << m_NSamples);
380 nmax = rndm_digit_samples.size();
381 }
382 for(i=0 ; i<nmax ; i++)
383 {
384 rAdc = (rndm_digit_samples[i] - Pedestal ) * adc2energy + adc0;
385 rndm_energy_samples[i] = rAdc ;
386 Samples[i] += rAdc ;
387 }
388 }
389 else {
390 ATH_MSG_WARNING(" No ramp found for this random cell " << m_larem_id->show_to_string(cellId) << " for gain " << rndmEvtDigit->gain());
391 }
392 }
393
394
395 CaloGain::CaloGain igain=chooseGain(Samples,ch_id,static_cast<CaloNum>(iCalo),pedestal,adc2MeVs,SF);
396 if (igain==CaloGain::INVALIDGAIN) {
397 return StatusCode::FAILURE;
398 }
399
400 // check that select gain is never lower (higher index number) than random gain in case of overlay
401 igain=std::max(rndmGain,igain);
402
403//
404// recompute Samples if igain != HIGHGAIN
405//
406 if (igain != initialGain ){
407 for (i=0;i<m_NSamples;i++) {
408 if(m_doDigiTruth) Samples_DigiHSTruth[i] = 0.;
409 if (m_RndmEvtOverlay) Samples[i]= rndm_energy_samples[i] ;
410 else Samples[i] = 0.;
411 }
412
413 if (!isDead) {
414 if( this->ConvertHits2Samples(cellId,ch_id,igain,TimeE, Samples, shape) == StatusCode::FAILURE ) {
415 return StatusCode::SUCCESS;
416 }
417 if(m_doDigiTruth){
418 if( this->ConvertHits2Samples(cellId,ch_id,igain,TimeE_DigiHSTruth, Samples_DigiHSTruth, shape) == StatusCode::FAILURE ) {
419 return StatusCode::SUCCESS;
420 }
421 }
422 }
423 }
424
425//
426// ........ add the noise ................................
427//
428
429 double Rndm[32]{};
430 int BvsEC=0;
431 if(iCalo==EM || iCalo==EMIW) BvsEC=std::abs(m_larem_id->barrel_ec(cellId));
432
433 bool addedNoise=false;
434 if (m_NoiseOnOff &&
435 ((BvsEC == 1 && m_NoiseInEMB) || (BvsEC > 1 && m_NoiseInEMEC) ||
436 (iCalo == HEC && m_NoiseInHEC) || (iCalo == FCAL && m_NoiseInFCAL)))
437 // add the noise only in the wanted sub-detectors
438 {
439 if (!m_RndmEvtOverlay) {
440 if (!m_pedestalNoise) {
441 SigmaNoise = noise->noise(ch_id, igain);
442 } else {
443 float thisNoise = pedestal->pedestalRMS(ch_id, igain);
444 if (thisNoise >= (1.0 + LArElecCalib::ERRORCODE))
445 SigmaNoise = thisNoise;
446 else
447 SigmaNoise = 0.;
448 }
449 // Sqrt of noise covariance matrix
450 const std::vector<float>& CorGen =
451 autoCorrNoise->autoCorrSqrt(cellId, igain);
452 if (CorGen.size() < (unsigned)m_NSamples * m_NSamples) {
453 ATH_MSG_ERROR("Noise AutoCorr too small, need "
454 << m_NSamples * m_NSamples << " points for "
455 << m_NSamples << " samples.");
456 return StatusCode::FAILURE;
457 }
458
459 RandGaussZiggurat::shootArray(engine, m_NSamples, Rndm, 0., 1.);
460
461 int index;
462 for (int i = 0; i < m_NSamples; i++) {
463 Noise[i] = 0.;
464 for (int j = 0; j <= i; j++) {
465 index = i * m_NSamples + j;
466 Noise[i] += Rndm[j] * CorGen[index];
467 }
468 Noise[i] = Noise[i] * SigmaNoise;
469 }
470 addedNoise = true;
471 } else {
472 // overlay case a priori don't add any noise
473 for (int i = 0; i < m_NSamples; i++)
474 Noise[i] = 0.;
475 // if gain from zerobias events is < gain from mixed events => add extra
476 // noise to account for gain vs noise dependance
477 // done in a simple way without taking into account the time
478 // correlation of this extra noise properly
479 if (rndmEvtDigit) {
480 // if gain of cell is different from ZB event gain
481 if (igain > rndmEvtDigit->gain()) {
482 double SigmaNoiseZB = 0.; // noise in ZB event for gain of ZB event
483 double SigmaNoise = 0.; // noise expected for new gain value
484 double SigmaExtraNoise = 0.; // quadratic difference of noise values
485 if (!m_pedestalNoise) {
486 SigmaNoiseZB = noise->noise(ch_id, rndmEvtDigit->gain());
487 SigmaNoise = noise->noise(ch_id, igain);
488 } else {
489 float thisNoise = pedestal->pedestalRMS(ch_id, rndmEvtDigit->gain());
490 if (thisNoise >= (1.0 + LArElecCalib::ERRORCODE))
491 SigmaNoiseZB = thisNoise;
492 else
493 SigmaNoiseZB = 0.;
494 thisNoise = pedestal->pedestalRMS(ch_id, igain);
495 if (thisNoise >= (1.0 + LArElecCalib::ERRORCODE))
496 SigmaNoise = thisNoise;
497 else
498 SigmaNoise = 0.;
499 }
500 // Convert SigmaNoiseZB in noise in ADC counts for igain conversion
501 auto polynom_adc2mevZB =
502 adc2MeVs->ADC2MEV(cellId, rndmEvtDigit->gain());
503 auto polynom_adc2mev = adc2MeVs->ADC2MEV(cellId, igain);
504 if (polynom_adc2mevZB.size() > 1 && polynom_adc2mev.size() > 1) {
505 if (polynom_adc2mev[1] > 0.) {
506 SigmaNoiseZB = SigmaNoiseZB * (polynom_adc2mevZB[1]) /
507 (polynom_adc2mev[1]);
508 if (SigmaNoise > SigmaNoiseZB)
509 SigmaExtraNoise = sqrt(SigmaNoise * SigmaNoise -
510 SigmaNoiseZB * SigmaNoiseZB);
511 }
512 } // check that AC2MeV factors are there
513 RandGaussZiggurat::shootArray(engine, m_NSamples, Rndm, 0.,
514 1.); // generate noise
515 for (int i = 0; i < m_NSamples; i++)
516 Noise[i] = SigmaExtraNoise * Rndm[i];
517 addedNoise = true;
518 } // different gains
519 } // rndm Digit is there
520 } // rndm Overlay test
521 } // add noise ?
522 //
523// ......... convert into adc counts ................................
524//
525 float Pedestal = pedestal->pedestal(ch_id,igain);
526 if (Pedestal <= (1.0+LArElecCalib::ERRORCODE)) {
527 ATH_MSG_WARNING(" pedestal not found for cellId " << cellId << " assume 1000" );
528 Pedestal=1000.;
529 }
530 const auto polynom_adc2mev = adc2MeVs->ADC2MEV(cellId,igain);
531 if (polynom_adc2mev.size() < 2) {
532 ATH_MSG_WARNING(" No ramp found for requested gain " << igain << " for cell " << m_larem_id->show_to_string(cellId) << " no digit made...");
533 return StatusCode::SUCCESS;
534 }
535
536 energy2adc=1./(polynom_adc2mev[1])/SF;
537
538// in case Medium or low gain, take into account ramp intercept in energy->ADC computation
539// this requires to take into account the sum of the optimal filter coefficients, as they don't compute with ADC shift
540 if(!m_isMcOverlay && m_RndmEvtOverlay && igain>0)
541 {
542 SG::ReadCondHandle<ILArOFC> larOFC(m_OFCKey, ctx);
543 if (larOFC.cptr() != nullptr) {
544 float sumOfc=0.;
545 ILArOFC::OFCRef_t ofc_a = larOFC->OFC_a(ch_id,igain,0);
546 if (ofc_a.size()>0) {
547 for (unsigned int j=0;j<ofc_a.size();j++) sumOfc+= ofc_a.at(j);
548 }
549 if ((polynom_adc2mev[1])>0 && sumOfc>0) Pedestal = Pedestal - (polynom_adc2mev[0])/(polynom_adc2mev[1])/sumOfc;
550 ATH_MSG_DEBUG(" Params for final LAr Digitization gain: " << igain << " pedestal: " << Pedestal << " energy2adc: " << energy2adc);
551 }
552 }
553 for(i=0;i<m_NSamples;i++)
554 {
555 double xAdc;
556 double xAdc_DigiHSTruth = 0;
557
558 if ( addedNoise ){
559 xAdc = Samples[i]*energy2adc + Noise[i] + Pedestal + 0.5;
560 if(m_doDigiTruth) {
561 xAdc_DigiHSTruth = Samples_DigiHSTruth[i]*energy2adc + Noise[i] + Pedestal + 0.5;
562 }
563 }
564
565 else {
566 if (m_roundingNoNoise) {
567 float flatRndm = RandFlat::shoot(engine);
568 xAdc = Samples[i]*energy2adc + Pedestal + flatRndm;
569 if(m_doDigiTruth) {
570 xAdc_DigiHSTruth = Samples_DigiHSTruth[i]*energy2adc + Pedestal + flatRndm;
571 }
572
573 }
574 else{
575 xAdc = Samples[i]*energy2adc + Pedestal + 0.5;
576 if(m_doDigiTruth) {
577 xAdc_DigiHSTruth = Samples_DigiHSTruth[i]*energy2adc + Pedestal + 0.5;
578 }
579 }
580
581 }
582
583//
584// ........ truncate at maximum value + 1
585// add possibility to saturate at 0 for negative signals
586//
587 if (xAdc <0) Adc=0;
588 else if (xAdc >= m_maxADC) Adc=m_maxADC;
589 else Adc = (short) xAdc;
590
591 AdcSample[i]=Adc;
592
593 if(m_doDigiTruth){
594 if (xAdc_DigiHSTruth <0) Adc_DigiHSTruth=0;
595 else if (xAdc_DigiHSTruth >= m_maxADC) Adc_DigiHSTruth=m_maxADC;
596 else Adc_DigiHSTruth = (short) xAdc_DigiHSTruth;
597 AdcSample_DigiHSTruth[i] = Adc_DigiHSTruth;
598 }
599
600#ifndef NDEBUG
601 ATH_MSG_DEBUG(" Sample " << i << " Energy= " << Samples[i] << " Adc=" << Adc);
602#endif
603
604 }
605
606//
607// ...... create the LArDigit .............
608//
609 Digit = dataItemsPool.nextElementPtr();
610 (*Digit)=LArDigit(ch_id,igain,std::move(AdcSample));
611
612 if (m_doDigiTruth && createDigit_DigiHSTruth) {
613 createDigit_DigiHSTruth = false;
614 Digit_DigiHSTruth = nullptr;
615
616 for (int i = 0; i < m_NSamples; i++) {
617 if (Samples_DigiHSTruth[i] != 0)
618 createDigit_DigiHSTruth = true;
619 }
620
621 Digit_DigiHSTruth =
622 new LArDigit(ch_id, igain, std::move(AdcSample_DigiHSTruth));
623 }
624
625 return StatusCode::SUCCESS;
626}
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.
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 219 of file LArHitEMapToDigitAlg.h.

219 {
220 SG::ReadCondHandle<T> aHandle(key, context);
221 const T* object = *aHandle;
222 if (object == nullptr) ATH_MSG_ERROR("Object could not be fetched with key " << aHandle.key() );
223 return object;
224}
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 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

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

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< 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.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< 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 HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
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 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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_adc2mevKey

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

Definition at line 114 of file LArHitEMapToDigitAlg.h.

114{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 118 of file LArHitEMapToDigitAlg.h.

118{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 121 of file LArHitEMapToDigitAlg.h.

121{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 120 of file LArHitEMapToDigitAlg.h.

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

◆ m_bcMask

LArBadChannelMask LArHitEMapToDigitAlg::m_bcMask
protected

Definition at line 123 of file LArHitEMapToDigitAlg.h.

◆ m_cabling

const LArOnOffIdMapping* LArHitEMapToDigitAlg::m_cabling {}
protected

Definition at line 116 of file LArHitEMapToDigitAlg.h.

116{}; //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 115 of file LArHitEMapToDigitAlg.h.

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

◆ m_calocell_id

const CaloCell_ID* LArHitEMapToDigitAlg::m_calocell_id {}
protected

Definition at line 210 of file LArHitEMapToDigitAlg.h.

210{};

◆ m_caloMgrKey

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

Definition at line 125 of file LArHitEMapToDigitAlg.h.

125{this,"CaloDetDescrManager", "CaloDetDescrManager"};

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

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

Definition at line 133 of file LArHitEMapToDigitAlg.h.

133 {this, "DigitContainer", "LArDigitContainer_MC",
134 "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 135 of file LArHitEMapToDigitAlg.h.

135 {this, "DigitContainer_DigiHSTruth",
136 "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 185 of file LArHitEMapToDigitAlg.h.

185 {this, "DoDigiTruthReconstruction", false,
186 "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 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

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

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ 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 177 of file LArHitEMapToDigitAlg.h.

177 {this, "firstSample", 0,
178 "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 110 of file LArHitEMapToDigitAlg.h.

110{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"},
}}
@ LARMEDIUMGAIN
Definition CaloGain.h:18

Definition at line 163 of file LArHitEMapToDigitAlg.h.

163 {{
164 {this,"GainRangeEM",{CaloGain::LARHIGHGAIN,CaloGain::LARLOWGAIN},"Range of gains"},
165 {this,"GainRangeHEC",{CaloGain::LARMEDIUMGAIN,CaloGain::LARLOWGAIN},"Range of gains"},
166 {this,"GainRangeFCAL",{CaloGain::LARHIGHGAIN,CaloGain::LARLOWGAIN},"Range of gains"},
167 {this,"GainRangeEMECIW",{CaloGain::LARHIGHGAIN,CaloGain::LARLOWGAIN},"Range of gains"},
168 }};

◆ 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 154 of file LArHitEMapToDigitAlg.h.

154 {{
155 {this,"HighGainThreshEM",1300,"ADC counts in medium gain"},
156 {this,"HighGainThreshHEC",0,"ADC counts in medium gain"},
157 {this,"HighGainThreshFCAL",1100,"ADC counts in medium gain"},
158 {this,"HighGainThreshEMECIW",1300,"ADC counts in medium gain"}
159 }};

◆ m_hitMapKey

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

Definition at line 128 of file LArHitEMapToDigitAlg.h.

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

◆ m_hitMapKey_DigiHSTruth

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

Definition at line 129 of file LArHitEMapToDigitAlg.h.

129{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 130 of file LArHitEMapToDigitAlg.h.

130 {this, "InputDigitContainer", "",
131 "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 183 of file LArHitEMapToDigitAlg.h.

183 {this, "isMcOverlay", false,
184 "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 211 of file LArHitEMapToDigitAlg.h.

211{};

◆ m_larfcal_id

const LArFCAL_ID* LArHitEMapToDigitAlg::m_larfcal_id {}
protected

Definition at line 213 of file LArHitEMapToDigitAlg.h.

213{};

◆ m_larhec_id

const LArHEC_ID* LArHitEMapToDigitAlg::m_larhec_id {}
protected

Definition at line 212 of file LArHitEMapToDigitAlg.h.

212{};

◆ m_laronline_id

const LArOnlineID* LArHitEMapToDigitAlg::m_laronline_id {}
protected

Definition at line 214 of file LArHitEMapToDigitAlg.h.

214{};

◆ 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 146 of file LArHitEMapToDigitAlg.h.

146 {{
147 {this,"LowGainThreshEM",3900,"ADC counts in medium gain"},
148 {this,"LowGainThreshHEC",2500,"ADC counts in medium gain"},
149 {this,"LowGainThreshFCAL",2000,"ADC counts in medium gain"},
150 {this,"LowGainThreshEMECIW",3900,"ADC counts in medium gain"}
151 }};

◆ m_maxADC

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

Definition at line 170 of file LArHitEMapToDigitAlg.h.

170{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 188 of file LArHitEMapToDigitAlg.h.

188 {this, "NoiseInEMB", true,
189 "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 190 of file LArHitEMapToDigitAlg.h.

190 {this, "NoiseInEMEC", true,
191 "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 194 of file LArHitEMapToDigitAlg.h.

194 {this, "NoiseInFCAL", true,
195 "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 192 of file LArHitEMapToDigitAlg.h.

192 {this, "NoiseInHEC", true,
193 "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 109 of file LArHitEMapToDigitAlg.h.

109{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 175 of file LArHitEMapToDigitAlg.h.

175 {this, "NoiseOnOff", true,
176 "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 173 of file LArHitEMapToDigitAlg.h.

173 {this, "Nsamples", 5,
174 "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 111 of file LArHitEMapToDigitAlg.h.

111{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 112 of file LArHitEMapToDigitAlg.h.

112{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 196 of file LArHitEMapToDigitAlg.h.

196 {this, "PedestalNoise", false,
197 "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 122 of file LArHitEMapToDigitAlg.h.

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

◆ m_randomSeedOffset

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

Definition at line 141 of file LArHitEMapToDigitAlg.h.

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

◆ m_randomStreamName

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

Definition at line 137 of file LArHitEMapToDigitAlg.h.

137{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 181 of file LArHitEMapToDigitAlg.h.

181 {this, "RndmEvtOverlay", false,
182 "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 140 of file LArHitEMapToDigitAlg.h.

140{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 198 of file LArHitEMapToDigitAlg.h.

198 {this, "RoundingNoNoise", true,
199 "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 113 of file LArHitEMapToDigitAlg.h.

113{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 142 of file LArHitEMapToDigitAlg.h.

142 {this, "UseLegacyRandomSeeds", false,
143 "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 179 of file LArHitEMapToDigitAlg.h.

179 {this, "UsePhase", false,
180 "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 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.

◆ 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 200 of file LArHitEMapToDigitAlg.h.

200 {this, "Windows", false,
201 "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 202 of file LArHitEMapToDigitAlg.h.

202 {this, "WindowsEtaSize", 0.4,
203 "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 204 of file LArHitEMapToDigitAlg.h.

204 {this, "WindowsPhiSize", 0.5,
205 "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 206 of file LArHitEMapToDigitAlg.h.

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

◆ s_MaxNSamples

int LArHitEMapToDigitAlg::s_MaxNSamples = 32
staticconstexprprotected

Definition at line 75 of file LArHitEMapToDigitAlg.h.


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