|
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" );
84 larMCsym = *larMCsymHdl;
85 if ( larMCsym ==
nullptr ) {
87 return StatusCode::FAILURE;
93 EventIDRange rangeAutoCorr;
97 if ( !AutoCorrHdl.range( rangeAutoCorr ) ) {
98 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << AutoCorrHdl.key() );
101 std::vector<std::map<HWIdentifier, std::vector<float>>> terms(
m_nGains );
103 std::vector<HWIdentifier>::const_iterator
it, it_e;
106 it_e = larMCsym->
symIds().end();
114 for ( ;
it != it_e; ++
it ) {
123 std::vector<float> vTerms;
125 vTerms.resize(
size );
128 for (
int j = 0; j <
m_nSampl; j++ ) {
131 for (
int k = 0;
k <= j - 1;
k++ ) {
136 vTerms[j *
m_nSampl + j] = sqrt( std::fabs( 1. - ck ) );
140 for (
int k = 0;
k <= j - 1;
k++ ) {
147 unsigned int index3 = (
i - j ) - 1;
160 terms[
igain][
id] = std::vector<float>( 1, 0. );
168 std::unique_ptr<LArAutoCorrNoise> larAutoCorrNoise =
169 std::make_unique<LArAutoCorrNoise>( std::move( terms ), larMCsym );
172 ATH_CHECK( writeHandle.
record( rangeAutoCorr, larAutoCorrNoise.release() ) );
174 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
SG::ReadCondHandleKey< LArMCSym > m_LArMCSymObjKey
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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.
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.