 |
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "GaudiKernel/EventIDRange.h"
16 , m_LArOnOffIdMappingObjKey(
"LArOnOffIdMap" )
17 , m_LArMCSymObjKey(
"LArMCSym" )
18 , m_LArAutoCorrObjKey(
"LArAutoCorrSym" )
19 , m_LArAutoCorrNoiseObjKey(
"LArAutoCorrNoise" )
20 , m_isSuperCell( false )
49 return StatusCode::SUCCESS;
59 return StatusCode::SUCCESS;
67 larOnlineID = scidhelper;
71 larOnlineID = idhelper;
76 larOnOffIdMapping = *larOnOffIdMappingHdl;
77 if ( larOnOffIdMapping ==
nullptr ) {
78 ATH_MSG_ERROR(
"Failed to retrieve LArOnOffIdMapping object" );
79 return StatusCode::FAILURE;
85 larMCsym = *larMCsymHdl;
86 if ( larMCsym ==
nullptr ) {
88 return StatusCode::FAILURE;
94 EventIDRange rangeAutoCorr;
98 if ( !AutoCorrHdl.range( rangeAutoCorr ) ) {
99 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << AutoCorrHdl.key() );
102 std::vector<std::map<HWIdentifier, std::vector<float>>> terms(
m_nGains );
104 std::vector<HWIdentifier>::const_iterator
it, it_e;
107 it_e = larMCsym->
symIds().end();
115 for ( ;
it != it_e; ++
it ) {
124 std::vector<float> vTerms;
126 vTerms.resize(
size );
129 for (
int j = 0; j <
m_nSampl; j++ ) {
132 for (
int k = 0;
k <= j - 1;
k++ ) {
137 vTerms[j *
m_nSampl + j] = sqrt( std::fabs( 1. - ck ) );
141 for (
int k = 0;
k <= j - 1;
k++ ) {
148 unsigned int index3 = (
i - j ) - 1;
155 terms[
igain][
id] = std::move(vTerms);
161 terms[
igain][
id] = std::vector<float>( 1, 0. );
169 std::unique_ptr<LArAutoCorrNoise> larAutoCorrNoise =
170 std::make_unique<LArAutoCorrNoise>( std::move( terms ), larMCsym );
173 ATH_CHECK( writeHandle.
record( rangeAutoCorr, larAutoCorrNoise.release() ) );
175 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
SG::ReadCondHandleKey< LArMCSym > m_LArMCSymObjKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_LArOnOffIdMappingObjKey
virtual StatusCode initialize() override
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
id_iterator channel_end() const
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
This class defines the interface for accessing AutoCorrelation parameters for each channel @stereotyp...
Helper class to handle z-phi symmetry of calibration constants in MC.
const DataObjID & fullKey() const
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Helper for the Liquid Argon Calorimeter cell identifiers.
StatusCode initialize(bool used=true)
SG::ReadCondHandleKey< ILArAutoCorr > m_LArAutoCorrObjKey
SG::WriteCondHandleKey< LArAutoCorrNoise > m_LArAutoCorrNoiseObjKey
LArAutoCorrNoiseCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
const std::vector< HWIdentifier > & symIds() const
Return the list of symmetric hashes.
virtual StatusCode execute() override
virtual ~LArAutoCorrNoiseCondAlg() override
id_iterator channel_begin() const
Returns an iterator pointing to a channel identifier collection.
bool isOnlineConnected(const HWIdentifier &sid) const
Test whether a HWIdentifier is connected of not (inline)
Proxy for accessing a range of float values like a vector.