|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "CLHEP/Units/SystemOfUnits.h"
15 m_onlineHelper(nullptr),
16 m_AccuDigitContainerName(
"LArAccumulatedDigits"),
17 m_NtriggersPerStep(100),
36 sc =
detStore()->retrieve(scid,
"LArOnline_SuperCellID");
38 ATH_MSG_ERROR(
"Could not get LArOnline_SuperCellID helper !" );
57 return StatusCode::SUCCESS;
86 if(DigitContainer->
empty()) {
89 ATH_MSG_DEBUG(
"LArDigitContainer with key=" <<
key <<
" has size = " << DigitContainer->
size() );
95 auto larAccuDigitContainer = std::make_unique<LArAccumulatedDigitContainer>(
SG::VIEW_ELEMENTS);
105 bool hasInvalid=
false;
106 for(
auto s :
digit->samples()){
112 if(hasInvalid)
continue;
120 return StatusCode::FAILURE;
133 unsigned int sizeSamples =
digit->samples().size();
140 vAccum[hashid]=accuDigit;
148 cellAccumulated.
m_matrix.resize(sizeSamples,0);
153 for(
unsigned int j=0;j<sizeSamples;j++){
155 for(
unsigned int k=j;
k<sizeSamples;
k++)
181 larAccuDigitContainer->push_back(accuDigit);
194 ATH_MSG_INFO(
"Recorded succesfully LArAccumulatedDigitContainer with key " <<
SGkey );
198 return StatusCode::SUCCESS;
204 if ( !
m_isSC )
return StatusCode::SUCCESS;
207 if(
sc.m_onlineId &&
sc.m_nused != ntrigUsed){
208 ATH_MSG_WARNING(
"Not enough triggers for channel OnlineID " <<
sc.m_onlineId <<
" ntriggers " <<
sc.m_ntrigger );
212 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
Class of intermediate accumulations.
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
bool m_isSC
Tells you wether you run on SuperCells or Cells.
unsigned int m_nStepTrigger
Number of steps.
std::vector< uint64_t > m_samplesum
bool setAddSubStep(const CaloGain::CaloGain gain_value, const HWIdentifier chid, const std::vector< uint64_t > &sampleSum, const std::vector< uint64_t > &sampleSquare, const unsigned nTrigger)
Accumulate new values
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
LArDigitsAccumulator(const std::string &name, ISvcLocator *pSvcLocator)
std::vector< std::string > m_keylist
list of key for input digit container (=gain)
std::vector< uint64_t > m_matrix
std::string m_AccuDigitContainerName
LArAccumulatedDigitContainer name.
value_type get_compact() const
Get the compact id.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const LArOnlineID_Base * m_onlineHelper
Data class for ADC samples and autocorr preprocessed by the DSP.
unsigned int m_NtriggersPerStep
Number of triggers per step.
std::vector< LArAccumulatedDigit * > ACCUMDIGIT_VEC
Liquid Argon digit base class.
unsigned int m_event_counter
Event counter.
::StatusCode StatusCode
StatusCode definition for legacy code.
Helper for the Liquid Argon Calorimeter cell identifiers.
size_type channelHashMax(void) const
Define channel hash tables max size.
double m_DropPercentTrig
Percentage of the used triggers that we will skip over at the end, in order ot ensure that the accumu...
#define ATH_MSG_WARNING(x)
Container class for LArDigit.
std::vector< LArAccumulated > m_Accumulated
Vector (index=hash ID) of accumulation quantities.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.