 |
ATLAS Offline Software
|
#include <EGammaClusterCoreCellRecovery.h>
◆ EGammaClusterCoreCellRecovery()
DerivationFramework::EGammaClusterCoreCellRecovery::EGammaClusterCoreCellRecovery |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~EGammaClusterCoreCellRecovery()
DerivationFramework::EGammaClusterCoreCellRecovery::~EGammaClusterCoreCellRecovery |
( |
| ) |
|
|
default |
◆ addBranches()
StatusCode DerivationFramework::EGammaClusterCoreCellRecovery::addBranches |
( |
| ) |
const |
|
virtual |
Definition at line 92 of file EGammaClusterCoreCellRecovery.cxx.
94 const EventContext& ctx = Gaudi::Hive::currentContext();
96 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, char>> decon;
97 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>> decoE;
104 for (
int i = 0;
i < 2;
i++) {
115 for (
int i = 0;
i < 2;
i++) {
116 decon[
i](*photon) =
res.nCells[
i];
117 decoE[
i](*photon) =
res.eCells[
i];
125 decon.clear(); decon.reserve(2);
126 decoE.clear(); decoE.reserve(2);
128 for (
int i = 0;
i < 2;
i++) {
140 for (
int i = 0;
i < 2;
i++) {
141 decon[
i](*electron) =
res.nCells[
i];
142 decoE[
i](*electron) =
res.eCells[
i];
147 return StatusCode::SUCCESS;
◆ decorateObject()
◆ finalize()
StatusCode DerivationFramework::EGammaClusterCoreCellRecovery::finalize |
( |
| ) |
|
|
inline |
◆ findMaxECell()
StatusCode DerivationFramework::EGammaClusterCoreCellRecovery::findMaxECell |
( |
const xAOD::CaloCluster * |
clus, |
|
|
double & |
etamax, |
|
|
double & |
phimax |
|
) |
| const |
|
private |
Definition at line 183 of file EGammaClusterCoreCellRecovery.cxx.
189 return StatusCode::FAILURE;
197 return StatusCode::FAILURE;
204 return StatusCode::FAILURE;
208 it_cell_e = cellLinks->
end();
212 std::pair<const CaloCell*,double> maxcell{
nullptr,0};
213 for(; it_cell != it_cell_e; ++it_cell) {
216 if (!
cell->caloDDE()) {
218 <<
cell->eta() <<
" phi = " <<
cell->phi());
221 int layer =
cell->caloDDE()->getSampling();
224 double eCell =
cell->energy();
228 maxcell.first =
cell;
236 etamax = maxcell.first->caloDDE()->eta_raw();
237 phimax = maxcell.first->caloDDE()->phi_raw();
240 double etaAmax = clus->
etamax(sam);
241 double phiAmax = clus->
phimax(sam);
244 <<
" maximum layer 2 energy cell, E = " << maxcell.first->energy()
245 <<
" check E = " << vemax
246 <<
" w = " << maxcell.second <<
"\n"
247 <<
" in calo frame, eta = " << etamax <<
" phi = " << phimax <<
"\n"
248 <<
" in ATLAS frame, eta = " << etaAmax <<
" phi = " << phiAmax);
251 ATH_MSG_WARNING(
"No layer 2 cell with positive energy ! Should never happen");
252 return StatusCode::FAILURE;
254 return StatusCode::SUCCESS;
◆ initialize()
StatusCode DerivationFramework::EGammaClusterCoreCellRecovery::initialize |
( |
| ) |
|
Definition at line 32 of file EGammaClusterCoreCellRecovery.cxx.
40 ATH_MSG_FATAL(
"No e-gamma collection provided for thinning. At least one "
41 "egamma collection (photons/electrons) must be provided!");
42 return StatusCode::FAILURE;
50 for (
int i = 2;
i <= 3;
i++) {
51 for (
int t = 0;
t <=1 ;
t++) {
53 Form(
"%s.%sadded_Lr%d", containerKey.c_str(), (
t == 0 ?
"n" :
"E"),
i));
72 for (
int i = 2;
i <= 3;
i++) {
73 for (
int t = 0;
t <= 1 ;
t++) {
75 Form(
"%s.%sadded_Lr%d", containerKey.c_str(), (
t == 0 ?
"n" :
"E"),
i));
86 return StatusCode::SUCCESS;
◆ m_egammaCellRecoveryTool
Initial value:{
this,
"egammaCellRecoveryTool",
"egammaCellRecoveryTool/egammaCellRecoveryTool",
"Optional tool that adds cells in L2 or L3 "
"that could have been rejected by timing cut"
}
Pointer to the egammaCellRecoveryTool.
Definition at line 78 of file EGammaClusterCoreCellRecovery.h.
◆ m_SGKey_CaloCells
SG::ReadHandleKey<CaloCellContainer> DerivationFramework::EGammaClusterCoreCellRecovery::m_SGKey_CaloCells { this, "SGKey_CaloCells", "AllCalo", "SG key of calo cell container" } |
|
private |
◆ m_SGKey_electrons
◆ m_SGKey_electrons_decorations
Initial value:{
this,
"SGKey_electrons_decorations_noConf",
{},
"SG keys for electrons decorations not really configurable"
}
Definition at line 58 of file EGammaClusterCoreCellRecovery.h.
◆ m_SGKey_photons
◆ m_SGKey_photons_decorations
Initial value:{
this,
"SGKey_photons_decorations_noConf",
{},
"SG keys for photon decorations not really configurable"
}
Definition at line 50 of file EGammaClusterCoreCellRecovery.h.
◆ m_UseWeightForMaxCell
Gaudi::Property<bool> DerivationFramework::EGammaClusterCoreCellRecovery::m_UseWeightForMaxCell |
|
private |
Initial value:{
this,
"UseWeightForMaxCell",
false,
"Use the cell weights when finding the L2 max energy cell"
}
Definition at line 65 of file EGammaClusterCoreCellRecovery.h.
The documentation for this class was generated from the following files:
float phimax(const CaloSample sampling) const
Retrieve of cell with maximum energy in given sampling.
xAOD::ElectronContainer * electronContainer
virtual double pt() const
transverse momentum
const ID_type & dataID() const
Get the key that we reference, as a string.
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_electrons_decorations
const_iterator begin() const
const begin method
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
IegammaCellRecoveryTool::Info decorateObject(const xAOD::Egamma *&egamma) const
SG::ReadHandleKey< CaloCellContainer > m_SGKey_CaloCells
float etamax(const CaloSample sampling) const
Retrieve of cell with maximum energy in given sampling.
weight_t weight() const
Accessor for weight associated to this cell.
const DataLink< CaloCellContainer > & getCellContainerLink() const
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
Description of a calorimeter cluster.
const CaloCellContainer * getCellContainer() const
Method to access underlying cell container.
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_photons_decorations
float energy_max(const CaloSample sampling) const
Retrieve maximum cell energy in given sampling.
std::pair< std::vector< unsigned int >, bool > res
virtual double phi() const
phi in [-pi,pi[
virtual double eta() const
pseudo rapidity
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
xAOD::PhotonContainer * photonContainer
ToolHandle< IegammaCellRecoveryTool > m_egammaCellRecoveryTool
Pointer to the egammaCellRecoveryTool.
Container class for CaloCell.
const_iterator end() const
const end method
Data object for each calorimeter readout cell.
#define ATH_MSG_WARNING(x)
StatusCode findMaxECell(const xAOD::CaloCluster *clus, double &etamax, double &phimax) const
float energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_photons
Gaudi::Property< bool > m_UseWeightForMaxCell
const_iterator to loop over cells belonging to a cluster
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_electrons