14 const std::string &cellCKey,
bool UseWeightForMaxCell) :
33 it_cell_e = cellLinks->
end();
37 std::pair<const CaloCell*,double> maxcell{
nullptr,0};
38 for(; it_cell != it_cell_e; ++it_cell) {
41 if (!cell->caloDDE()) {
43 << cell->eta() <<
" phi = " << cell->phi());
46 int layer = cell->caloDDE()->getSampling();
47 if (layer == CaloSampling::EMB2 || layer == CaloSampling::EME2) {
48 double w = it_cell.
weight();
49 double eCell = cell->energy();
50 if (UseWeightForMaxCell) eCell *= w;
61 etaCell = maxcell.first->caloDDE()->eta_raw();
62 phiCell = maxcell.first->caloDDE()->phi_raw();
65 double etaAmax = clus->
etamax(sam);
66 double phiAmax = clus->
phimax(sam);
69 <<
" maximum layer 2 energy cell, E = " << maxcell.first->energy()
70 <<
" check E = " << vemax
71 <<
" w = " << maxcell.second <<
"\n"
72 <<
" in calo frame, eta = " <<
etaCell <<
" phi = " <<
phiCell <<
"\n"
73 <<
" in ATLAS frame, eta = " << etaAmax <<
" phi = " << phiAmax);
76 ATH_MSG_WARNING(
"No layer 2 cell with positive energy ! Should never happen");
77 sc = StatusCode::FAILURE;
79 sc = StatusCode::SUCCESS;
#define ATH_MSG_WARNING(x)
bool msgLvl(const MSG::Level lvl) const
Test the output level.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Container class for CaloCell.
Data object for each calorimeter readout cell.
const_iterator to loop over cells belonging to a cluster
weight_t weight() const
Accessor for weight associated to this cell.
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
const CaloCellContainer * getCellContainer() const
Method to access underlying cell container.
const_iterator end() const
const end method
const DataLink< CaloCellContainer > & getCellContainerLink() const
const_iterator begin() const
const begin method
const ID_type & dataID() const
Get the key that we reference, as a string.
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
float energy_max(const CaloSample sampling) const
Retrieve maximum cell energy in given sampling.
float energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
float etamax(const CaloSample sampling) const
Retrieve of cell with maximum energy in given sampling.
float phimax(const CaloSample sampling) const
Retrieve of cell with maximum energy in given sampling.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.