|
ATLAS Offline Software
|
#include <LArHitEMapToDigitAlg.h>
|
| LArHitEMapToDigitAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute (const EventContext &context) const |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
virtual bool | filterPassed (const EventContext &ctx) const |
|
virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
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=nullptr) const |
|
StatusCode | ConvertHits2Samples (const EventContext &ctx, const Identifier &cellId, HWIdentifier ch_id, CaloGain::CaloGain igain, const std::vector< std::pair< float, float > > *TimeE, staticVecDouble_t &sampleList) const |
|
void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution More...
|
|
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > | renounce (T &h) |
|
void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
| Add StoreName to extra input/output deps as needed. More...
|
|
|
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 |
|
double | m_LowGainThresh [4] {} |
|
double | m_HighGainThresh [4] {} |
|
Gaudi::Property< double > | m_EnergyThresh |
|
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 {} |
|
Definition at line 59 of file LArHitEMapToDigitAlg.h.
◆ staticVecDouble_t
◆ staticVecFloat_t
◆ StoreGateSvc_t
◆ CaloNum
◆ LArHitEMapToDigitAlg()
LArHitEMapToDigitAlg::LArHitEMapToDigitAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ cardinality()
unsigned int AthReentrantAlgorithm::cardinality |
( |
| ) |
const |
|
overridevirtualinherited |
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 55 of file AthReentrantAlgorithm.cxx.
◆ ConvertHits2Samples()
Definition at line 646 of file LArHitEMapToDigitAlg.cxx.
670 nsamples_der = ShapeDer.size();
674 return StatusCode::FAILURE;
685 std::vector<std::pair<float,float> >::const_iterator
first = TimeE->begin();
686 std::vector<std::pair<float,float> >::const_iterator last = TimeE->end();
688 while (
first != last)
691 time = (*first).second;
709 int ishift=(
int)(rint(
time*(1./25.)));
718 if (j<nsamples_der && std::abs(ShapeDer[j])<10. )
719 sampleList[
i] += (Shape[j]- ShapeDer[j]*dtime)*
energy ;
720 else sampleList[
i] += Shape[j]*
energy ;
730 float timeBinWidth = 25./24.*3.;
738 int ishift = (
int)(
time*(1./25.));
741 tbin = (
int)(fmod(
time,25)/timeBinWidth);
747 tbin = (
int)(fmod(-
time,25)/timeBinWidth);
750 double dtime =
time - ( 25.*((
float)(ishift)) - timeBinWidth*tbin);
756 nsamples_der = ShapeDer.size();
766 if (j<nsamples_der && std::abs(ShapeDer[j])<10. )
767 sampleList[
i] += (Shape[j]- ShapeDer[j]*dtime)*
energy ;
768 else sampleList[
i] += Shape[j]*
energy ;
777 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode LArHitEMapToDigitAlg::execute |
( |
const EventContext & |
context | ) |
const |
|
virtual |
Definition at line 102 of file LArHitEMapToDigitAlg.cxx.
110 return StatusCode::FAILURE;
116 const LArHitEMap* hitmapPtr_DigiHSTruth =
nullptr;
119 hitmapPtr_DigiHSTruth = hitmap_DigitHSTruth.cptr();
130 DigitContainer->reserve(it_end);
132 dataItemsPool.reserve(it_end);
136 std::unique_ptr<LArDigitContainer> DigitContainer_DigiHSTruth =
nullptr;
138 DigitContainer_DigiHSTruth = std::make_unique<LArDigitContainer>();
139 DigitContainer_DigiHSTruth->
reserve(it_end);
142 const std::vector<std::pair<float,float> >* TimeE;
143 const std::vector<std::pair<float,float> >* TimeE_DigiHSTruth =
nullptr;
146 CLHEP::HepRandomEngine * engine = rngWrapper->
getEngine(context);
150 for( ;
it!=it_end;++
it)
157 const auto& hitlist_DigiHSTruth=hitmapPtr_DigiHSTruth->
GetCell(
it);
158 TimeE_DigiHSTruth = &(hitlist_DigiHSTruth.getData());
165 bool missing=!(badFebs->
status(febId).good());
173 LArDigit* Digit_DigiHSTruth =
nullptr;
176 Digit_DigiHSTruth, TimeE,
digit, engine,
178 DigitContainer->push_back(Digit);
179 if (DigitContainer_DigiHSTruth){
180 DigitContainer_DigiHSTruth->
push_back(Digit_DigiHSTruth);
189 ATH_MSG_DEBUG(
" number of created digits = " << DigitContainer->size());
192 ATH_CHECK(DigitContainerHandle.record( std::move(DigitContainer) ) );
193 if ( DigitContainer_DigiHSTruth ){
195 ATH_CHECK(DigitContainer_DigiHSTruthHandle.record( std::move(DigitContainer_DigiHSTruth) ) );
199 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 79 of file AthReentrantAlgorithm.cxx.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ initialize()
StatusCode LArHitEMapToDigitAlg::initialize |
( |
| ) |
|
|
virtual |
Definition at line 46 of file LArHitEMapToDigitAlg.cxx.
52 return StatusCode::FAILURE;
77 ATH_MSG_ERROR(
" Unable to retrieve CaloIdManager from DetectoreStore");
78 return StatusCode::FAILURE;
86 ATH_MSG_ERROR(
" Unable to retrieve LArOnlineId from DetectoreStore");
87 return StatusCode::FAILURE;
98 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isClonable()
bool AthReentrantAlgorithm::isClonable |
( |
| ) |
const |
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, InDet::SiSPGNNTrackMaker, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ 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 = nullptr |
|
) |
| const |
|
protected |
Retrieve BadChannels
Definition at line 202 of file LArHitEMapToDigitAlg.cxx.
213 bool createDigit_DigiHSTruth =
true;
215 int sampleGainChoice{2};
220 short Adc_DigiHSTruth;
224 std::vector<short> AdcSample_DigiHSTruth(
m_NSamples);
251 autoCorrNoise=*autoCorrNoiseHdl;
295 ATH_MSG_DEBUG(
" number of hit for this cell " << TimeE->size());
305 if( this->
ConvertHits2Samples(ctx, cellId,ch_id,initialGain,TimeE, Samples).isFailure() ) {
306 return StatusCode::SUCCESS;
309 if( this->
ConvertHits2Samples(ctx, cellId,ch_id,initialGain,TimeE_DigiHSTruth, Samples_DigiHSTruth).isFailure() ) {
310 return StatusCode::SUCCESS;
322 rndmGain= rndmEvtDigit->gain();
323 auto polynom_adc2mev =adc2MeVs->
ADC2MEV(cellId,rndmEvtDigit->gain());
324 if (polynom_adc2mev.size() > 1) {
325 float adc2energy =
SF * polynom_adc2mev[1];
326 const std::vector<short> & rndm_digit_samples = rndmEvtDigit->samples() ;
327 float Pedestal = pedestal->
pedestal(ch_id,rndmEvtDigit->gain());
329 ATH_MSG_WARNING(
" Pedestal not found in database for this channel offID " << cellId <<
" Use sample 0 for random");
330 Pedestal = rndm_digit_samples[0];
332 ATH_MSG_DEBUG(
" Params for inverting LAr Digitization: pedestal " << Pedestal <<
" adc2energy " << adc2energy);
339 if (larOFC.cptr() !=
nullptr) {
342 if (ofc_a.size()>0) {
343 for (
unsigned int j=0;j<ofc_a.size();j++) sumOfc += ofc_a.
at(j);
345 if (sumOfc>0) adc0 = polynom_adc2mev[0] *
SF /sumOfc;
350 if ((
int)(rndm_digit_samples.size()) <
m_NSamples) {
352 "Less digit Samples than requested in digitization for cell "
353 << ch_id.
get_compact() <<
" Digit has " << rndm_digit_samples.size()
354 <<
" samples. Digitization request " <<
m_NSamples);
355 nmax = rndm_digit_samples.size();
359 rAdc = (rndm_digit_samples[
i] - Pedestal ) * adc2energy + adc0;
360 rndm_energy_samples[
i] = rAdc ;
377 float samp2=Samples[sampleGainChoice-ihecshift]*MeV2GeV;
381 float Samp2_DigiHSTruth=Samples_DigiHSTruth[sampleGainChoice-ihecshift]*MeV2GeV;
382 if ( Samp2_DigiHSTruth <=
m_EnergyThresh ) createDigit_DigiHSTruth =
false;
395 ATH_MSG_DEBUG(
" Pedestal not found for medium gain ,cellID " << cellId <<
" assume 1000 ");
399 if ( polynom_adc2mev.size() < 2) {
401 return StatusCode::SUCCESS;
403 pseudoADC3 = Samples[sampleGainChoice-ihecshift]/(polynom_adc2mev[1])/
SF + Pedestal ;
422 if (
igain != initialGain ){
426 else Samples[
i] = 0.;
431 return StatusCode::SUCCESS;
434 if( this->
ConvertHits2Samples(ctx, cellId,ch_id,
igain,TimeE_DigiHSTruth, Samples_DigiHSTruth) == StatusCode::FAILURE ) {
435 return StatusCode::SUCCESS;
449 bool addedNoise=
false;
466 const std::vector<float>& CorGen =
472 return StatusCode::FAILURE;
475 RandGaussZiggurat::shootArray(engine,
m_NSamples, Rndm, 0., 1.);
480 for (
int j = 0; j <=
i; j++) {
482 Noise[
i] += Rndm[j] * CorGen[
index];
484 Noise[
i] = Noise[
i] * SigmaNoise;
497 if (
igain > rndmEvtDigit->gain()) {
498 double SigmaNoiseZB = 0.;
499 double SigmaNoise = 0.;
500 double SigmaExtraNoise = 0.;
502 SigmaNoiseZB =
noise->noise(ch_id, rndmEvtDigit->gain());
507 SigmaNoiseZB =
noise;
517 auto polynom_adc2mevZB =
518 adc2MeVs->
ADC2MEV(cellId, rndmEvtDigit->gain());
519 auto polynom_adc2mev = adc2MeVs->
ADC2MEV(cellId,
igain);
520 if (polynom_adc2mevZB.size() > 1 && polynom_adc2mev.size() > 1) {
521 if (polynom_adc2mev[1] > 0.) {
522 SigmaNoiseZB = SigmaNoiseZB * (polynom_adc2mevZB[1]) /
523 (polynom_adc2mev[1]);
524 if (SigmaNoise > SigmaNoiseZB)
525 SigmaExtraNoise = sqrt(SigmaNoise * SigmaNoise -
526 SigmaNoiseZB * SigmaNoiseZB);
529 RandGaussZiggurat::shootArray(engine,
m_NSamples, Rndm, 0.,
532 Noise[
i] = SigmaExtraNoise * Rndm[
i];
543 ATH_MSG_WARNING(
" pedestal not found for cellId " << cellId <<
" assume 1000" );
547 if (polynom_adc2mev.size() < 2) {
549 return StatusCode::SUCCESS;
552 energy2adc=1./(polynom_adc2mev[1])/
SF;
559 if (larOFC.cptr() !=
nullptr) {
562 if (ofc_a.size()>0) {
563 for (
unsigned int j=0;j<ofc_a.size();j++) sumOfc+= ofc_a.
at(j);
565 if ((polynom_adc2mev[1])>0 && sumOfc>0) Pedestal = Pedestal - (polynom_adc2mev[0])/(polynom_adc2mev[1])/sumOfc;
566 ATH_MSG_DEBUG(
" Params for final LAr Digitization gain: " <<
igain <<
" pedestal: " << Pedestal <<
" energy2adc: " << energy2adc);
572 double xAdc_DigiHSTruth = 0;
575 xAdc = Samples[
i]*energy2adc + Noise[
i] + Pedestal + 0.5;
577 xAdc_DigiHSTruth = Samples_DigiHSTruth[
i]*energy2adc + Noise[
i] + Pedestal + 0.5;
583 float flatRndm = RandFlat::shoot(engine);
584 xAdc = Samples[
i]*energy2adc + Pedestal + flatRndm;
586 xAdc_DigiHSTruth = Samples_DigiHSTruth[
i]*energy2adc + Pedestal + flatRndm;
591 xAdc = Samples[
i]*energy2adc + Pedestal + 0.5;
593 xAdc_DigiHSTruth = Samples_DigiHSTruth[
i]*energy2adc + Pedestal + 0.5;
605 else Adc = (
short) xAdc;
610 if (xAdc_DigiHSTruth <0) Adc_DigiHSTruth=0;
611 else if (xAdc_DigiHSTruth >=
MAXADC) Adc_DigiHSTruth=
MAXADC;
612 else Adc_DigiHSTruth = (
short) xAdc_DigiHSTruth;
613 AdcSample_DigiHSTruth[
i] = Adc_DigiHSTruth;
617 ATH_MSG_DEBUG(
" Sample " <<
i <<
" Energy= " << Samples[
i] <<
" Adc=" << Adc);
629 createDigit_DigiHSTruth =
false;
630 Digit_DigiHSTruth =
nullptr;
633 if (Samples_DigiHSTruth[
i] != 0)
634 createDigit_DigiHSTruth =
true;
638 new LArDigit(ch_id,
igain, std::move(AdcSample_DigiHSTruth));
641 return StatusCode::SUCCESS;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounce()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ sysExecute()
StatusCode AthReentrantAlgorithm::sysExecute |
( |
const EventContext & |
ctx | ) |
|
|
overridevirtualinherited |
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 67 of file AthReentrantAlgorithm.cxx.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ sysInitialize()
StatusCode AthReentrantAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 96 of file AthReentrantAlgorithm.cxx.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_adc2mevKey
◆ m_autoCorrNoiseKey
◆ m_badFebKey
◆ m_bcContKey
◆ m_bcMask
◆ m_cabling
◆ m_cablingKey
◆ m_calocell_id
◆ m_caloMgrKey
◆ m_detStore
◆ m_DigitContainerName
Initial value:{this, "DigitContainer", "LArDigitContainer_MC",
"Name of output digit container"}
Definition at line 118 of file LArHitEMapToDigitAlg.h.
◆ m_DigitContainerName_DigiHSTruth
Initial value:{this, "DigitContainer_DigiHSTruth",
"LArDigitContainer_DigiHSTruth", "Name of output signal digit container"}
Definition at line 120 of file LArHitEMapToDigitAlg.h.
◆ 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 148 of file LArHitEMapToDigitAlg.h.
◆ m_EnergyThresh
Gaudi::Property<double> LArHitEMapToDigitAlg::m_EnergyThresh |
|
protected |
Initial value:{this, "EnergyThresh", -99.,
"Hit energy threshold (default=-99)"}
Definition at line 134 of file LArHitEMapToDigitAlg.h.
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects |
|
privateinherited |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 153 of file AthReentrantAlgorithm.h.
◆ m_firstSample
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 140 of file LArHitEMapToDigitAlg.h.
◆ m_fSamplKey
◆ m_HighGainThresh
double LArHitEMapToDigitAlg::m_HighGainThresh[4] {} |
|
protected |
◆ m_hitMapKey
◆ m_hitMapKey_DigiHSTruth
SG::ReadHandleKey<LArHitEMap> LArHitEMapToDigitAlg::m_hitMapKey_DigiHSTruth {this,"LArHitEMap_DigiHSTruthKey","LArHitEMap_DigiHSTruth"} |
|
protected |
◆ m_inputDigitContainerKey
Initial value:{this, "InputDigitContainer", "",
"Name of input digit container"}
Definition at line 115 of file LArHitEMapToDigitAlg.h.
◆ 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 146 of file LArHitEMapToDigitAlg.h.
◆ m_larem_id
◆ m_larfcal_id
◆ m_larhec_id
◆ m_laronline_id
◆ m_LowGainThresh
double LArHitEMapToDigitAlg::m_LowGainThresh[4] {} |
|
protected |
◆ m_NoiseInEMB
Gaudi::Property<bool> LArHitEMapToDigitAlg::m_NoiseInEMB |
|
protected |
Initial value:{this, "NoiseInEMB", true,
"put noise in EMB (default=true)"}
Definition at line 151 of file LArHitEMapToDigitAlg.h.
◆ m_NoiseInEMEC
Gaudi::Property<bool> LArHitEMapToDigitAlg::m_NoiseInEMEC |
|
protected |
Initial value:{this, "NoiseInEMEC", true,
"put noise in EMEC (default=true)"}
Definition at line 153 of file LArHitEMapToDigitAlg.h.
◆ m_NoiseInFCAL
Gaudi::Property<bool> LArHitEMapToDigitAlg::m_NoiseInFCAL |
|
protected |
Initial value:{this, "NoiseInFCAL", true,
"put noise in FCAL (default=true)"}
Definition at line 157 of file LArHitEMapToDigitAlg.h.
◆ m_NoiseInHEC
Gaudi::Property<bool> LArHitEMapToDigitAlg::m_NoiseInHEC |
|
protected |
Initial value:{this, "NoiseInHEC", true,
"put noise in HEC (default=true)"}
Definition at line 155 of file LArHitEMapToDigitAlg.h.
◆ m_noiseKey
◆ m_NoiseOnOff
Gaudi::Property<bool> LArHitEMapToDigitAlg::m_NoiseOnOff |
|
protected |
Initial value:{this, "NoiseOnOff", true,
"put electronic noise (default=true)"}
Definition at line 138 of file LArHitEMapToDigitAlg.h.
◆ m_NSamples
Gaudi::Property<int> LArHitEMapToDigitAlg::m_NSamples |
|
protected |
Initial value:{this, "Nsamples", 5,
"Number of ADC samples (default=5)"}
Definition at line 136 of file LArHitEMapToDigitAlg.h.
◆ m_OFCKey
◆ m_pedestalKey
◆ 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 159 of file LArHitEMapToDigitAlg.h.
◆ m_problemsToMask
Gaudi::Property<std::vector<std::string> > LArHitEMapToDigitAlg::m_problemsToMask {this,"ProblemsToMask",{},"Bad-Channel categories to mask entirly"} |
|
protected |
◆ m_randomSeedOffset
Gaudi::Property<uint32_t> LArHitEMapToDigitAlg::m_randomSeedOffset {this, "RandomSeedOffset", 2, ""} |
|
protected |
◆ m_randomStreamName
Gaudi::Property<std::string> LArHitEMapToDigitAlg::m_randomStreamName {this, "RandomStreamName", "LArDigitization", ""} |
|
protected |
◆ 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 144 of file LArHitEMapToDigitAlg.h.
◆ m_rndmGenSvc
◆ 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 161 of file LArHitEMapToDigitAlg.h.
◆ m_shapeKey
◆ m_useLegacyRandomSeeds
Gaudi::Property<bool> LArHitEMapToDigitAlg::m_useLegacyRandomSeeds |
|
protected |
Initial value:{this, "UseLegacyRandomSeeds", false,
"Use MC16-style random number seeding"}
Definition at line 127 of file LArHitEMapToDigitAlg.h.
◆ m_usePhase
Gaudi::Property<bool> LArHitEMapToDigitAlg::m_usePhase |
|
protected |
Initial value:{this, "UsePhase", false,
"use 1ns binned pulse shape (default=false)"}
Definition at line 142 of file LArHitEMapToDigitAlg.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ 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 163 of file LArHitEMapToDigitAlg.h.
◆ 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 165 of file LArHitEMapToDigitAlg.h.
◆ 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 167 of file LArHitEMapToDigitAlg.h.
◆ 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 169 of file LArHitEMapToDigitAlg.h.
◆ s_MaxNSamples
constexpr int LArHitEMapToDigitAlg::s_MaxNSamples = 8 |
|
staticconstexprprotected |
The documentation for this class was generated from the following files:
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
SG::ReadCondHandleKey< ILArOFC > m_OFCKey
def retrieve(aClass, aKey=None)
virtual float pedestal(const HWIdentifier &id, int gain) const =0
const LArVectorProxy ADC2MEV(const HWIdentifier &id, int gain) const
SeedingOptionType
Options for seeding option=0 is setSeed as in MC20 option=1 is setSeedLegacy as in MC16 option=2 is s...
SG::ReadCondHandleKey< ILArShape > m_shapeKey
Gaudi::Property< bool > m_NoiseInEMEC
Gaudi::Property< bool > m_NoiseInFCAL
bool is_lar_fcal(Identifier id) const
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
SG::ReadCondHandleKey< LArAutoCorrNoise > m_autoCorrNoiseKey
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
static constexpr int s_MaxNSamples
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.
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
SG::ReadCondHandleKey< LArBadFebCont > m_badFebKey
const LArEM_ID * getEM_ID(void) const
Gaudi::Property< uint32_t > m_randomSeedOffset
Gaudi::Property< bool > m_NoiseOnOff
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)
virtual ShapeRef_t ShapeDer(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0
SG::ReadHandleKey< LArHitEMap > m_hitMapKey_DigiHSTruth
const float SF[NF]
Cross sections for Fluor.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
const LArFCAL_ID * m_larfcal_id
const LArOnlineID * m_laronline_id
std::vector< SG::VarHandleKeyArray * > m_vhka
StatusCode buildBitMask(const std::vector< std::string > &problemsToMask, MsgStream &msg)
value_type get_compact() const
Get the compact id.
Gaudi::Property< bool > m_RndmEvtOverlay
ServiceHandle< IAthRNGSvc > m_rndmGenSvc
const std::string & key() const
Return the StoreGate ID for the referenced object.
const std::vector< float > & autoCorrSqrt(const HWIdentifier &id, int gain) const
bool cellShouldBeMasked(const LArBadChannelCont *bcCont, const HWIdentifier &hardwareId) const
LArBC_t status(const HWIdentifier channel) const
Query the status of a particular channel or FEB This is the main client access method.
SG::ReadCondHandleKey< ILArNoise > m_noiseKey
const LArHitList & GetCell(const unsigned int index) const
SG::ReadCondHandleKey< ILArfSampl > m_fSamplKey
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
Gaudi::Property< bool > m_Windows
const LARLIST & getData() const
Gaudi::Property< bool > m_NoiseInEMB
const LArHEC_ID * getHEC_ID(void) const
AthReentrantAlgorithm()
Default constructor:
This class initializes the Calo (LAr and Tile) offline identifiers.
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
value_type at(size_t i) const
Vector indexing with bounds check.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
Liquid Argon digit base class.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< bool > m_roundingNoNoise
virtual const float & FSAMPL(const HWIdentifier &id) const =0
const LArFCAL_ID * getFCAL_ID(void) const
boost::container::static_vector< float, s_MaxNSamples > staticVecFloat_t
double m_HighGainThresh[4]
LArBadChannelMask m_bcMask
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=nullptr) const
Gaudi::Property< int > m_NSamples
bool is_lar_hec(Identifier id) const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
StatusCode ConvertHits2Samples(const EventContext &ctx, const Identifier &cellId, HWIdentifier ch_id, CaloGain::CaloGain igain, const std::vector< std::pair< float, float > > *TimeE, staticVecDouble_t &sampleList) const
const LArDigit * GetDigit(unsigned int index) const
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
double m_LowGainThresh[4]
Gaudi::Property< bool > m_usePhase
boost::container::static_vector< double, s_MaxNSamples > staticVecDouble_t
Gaudi::Property< bool > m_NoiseInHEC
const LArEM_ID * m_larem_id
A wrapper class for event-slot-local random engines.
int barrel_ec(const Identifier id) const
return barrel_ec according to :
virtual StatusCode sysInitialize() override
Override sysInitialize.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
const LArHEC_ID * m_larhec_id
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
bool is_em_endcap_inner(const Identifier id) const
test if the id belongs to the EM Endcap inner wheel
Gaudi::Property< std::vector< std::string > > m_problemsToMask
Gaudi::Property< bool > m_isMcOverlay
Gaudi::Property< bool > m_pedestalNoise
SG::WriteHandleKey< LArDigitContainer > m_DigitContainerName_DigiHSTruth
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
SG::WriteHandleKey< LArDigitContainer > m_DigitContainerName
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Gaudi::Property< double > m_EnergyThresh
const CaloCell_ID * m_calocell_id
int GetNbCells(void) const
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
virtual float pedestalRMS(const HWIdentifier &id, int gain) const =0
access to RMS of Pedestal index by Identifier, and gain setting
bool is_lar_em(Identifier id) const
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Gaudi::Property< std::string > m_randomStreamName
SG::ReadHandleKey< LArHitEMap > m_hitMapKey
Gaudi::Property< int > m_firstSample
Gaudi::Property< bool > m_doDigiTruth
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Proxy for accessing a range of float values like a vector.
Gaudi::Property< bool > m_useLegacyRandomSeeds
virtual ShapeRef_t Shape(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0