28 return StatusCode::SUCCESS;
35 if ( output.isValid() ) {
37 return StatusCode::SUCCESS;
41 CHECK(
detStore()->retrieve (calo_id_manager,
"CaloIdManager") );
46 auto out = std::make_unique<CaloNoiseSigmaDiff>(hash_max,0.0);
51 for(
int i=0;i<hash_max;++i){
53 if (calo_cell_id->
is_tile(
h) )
continue;
56 float sigma_diff = nn1*nn1-nn0*nn0;
57 if ( sigma_diff < 0.0 ) { out->at(i)=0;
continue;}
58 out->at(i)=std::sqrt(sigma_diff);
61 output.addDependency(noiseCDO);
62 ATH_CHECK(output.record( std::move(out) ) );
63 ATH_MSG_INFO(
"recorded new " << output.key() <<
" with range " << output.getRange() );
64 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define CHECK(...)
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
Header file for AthHistogramAlgorithm.
An algorithm that can be simultaneously executed in multiple threads.
size_type calo_cell_hash_max() const
cell 'global' hash table max size
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
Helper class for offline cell identifiers.
This class initializes the Calo (LAr and Tile) offline identifiers.
const CaloCell_ID * getCaloCell_ID(void) const
Access to IdHelper.
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Property: CaloNoise (conditions input).
SG::WriteCondHandleKey< CaloNoiseSigmaDiff > m_noiseSigmaDiff
CaloNoiseSigmaDiffCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
NAME : CaloNoiseSigmaDiffCondAlg.cxx PACKAGE : Calorimeter/CaloRec.
virtual StatusCode initialize() override
Gaudi initialize method.
virtual StatusCode execute(const EventContext &ctx) const override
Execute the algorithm.
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
This is a "hash" representation of an Identifier.
const_pointer_type cptr()