30 "Prefix to add to aux data items.");
32 "If true, don't complain if input objects are missing.");
34 "Getter instance for the input egamma objects.");
45 CHECK( AthAlgorithm::initialize() );
49 return StatusCode::SUCCESS;
58 StatusCode
sc = StatusCode::SUCCESS;
60#define DECOR(TYPE,N) xAOD::Egamma::Decorator<TYPE> N (m_auxPrefix + #N)
61 DECOR(
float, maxEcell_time);
62 DECOR(
float, maxEcell_energy);
63 DECOR(
int, maxEcell_gain);
64 DECOR(
unsigned int, maxEcell_onlId);
65 DECOR(
float, maxEcell_x);
66 DECOR(
float, maxEcell_y);
67 DECOR(
float, maxEcell_z);
75 return StatusCode::FAILURE;
81 maxEcell_time(*eg) = -9898.9;
82 maxEcell_energy(*eg) = -9898.9;
83 maxEcell_gain(*eg) = -1;
84 maxEcell_onlId(*eg) = 0;
86 maxEcell_x(*eg) = -9898.9;
87 maxEcell_y(*eg) = -9898.9;
88 maxEcell_z(*eg) = -9898.9;
96 for (
const CaloCell* cell : *cluster) {
97 int sampling = cell->caloDDE()->getSampling();
98 if (sampling== CaloCell_ID::EMB2 || sampling== CaloCell_ID::EME2) {
99 if ( (cell->provenance() & 0x2000) ) {
100 if (cell->energy() > emax) {
111 maxEcell_time(*eg) = cell_maxE->
time();
112 maxEcell_energy(*eg) = cell_maxE->
energy();
113 maxEcell_gain(*eg) = (int) cell_maxE->
gain();
114 maxEcell_onlId(*eg) = (
unsigned int) (cabling->createSignalChannelID(caloDDEl->
identify())).get_compact();
116 maxEcell_x(*eg) = caloDDEl->
x();
117 maxEcell_y(*eg) = caloDDEl->
y();
118 maxEcell_z(*eg) = caloDDEl->
z();
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Data object for each calorimeter readout cell.
float time() const
get time (data member)
double energy() const
get energy (data member)
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
CaloGain::CaloGain gain() const
get gain (data member )
This class groups all DetDescr information related to a CaloCell.
Identifier identify() const override final
cell identifier
virtual StatusCode initialize()
Standard Gaudi initialize method.
bool m_allowMissing
Property: If true, don't complain if input objects are missing.
virtual StatusCode execute()
Standard Gaudi execute method.
egammaMaxECellAlg(const std::string &name, ISvcLocator *svcloc)
Standard Gaudi algorithm constructor.
std::string m_auxPrefix
Property: Prefix to add to aux data items.
ToolHandle< ICollectionGetterTool > m_getter
Property: Getter for input egamma objects.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
Find max E cell in middle layer for an egamma object EM Cluster and store in UserData.
Block filler tool for noisy FEB information.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Egamma_v1 Egamma
Definition of the current "egamma version".