|
ATLAS Offline Software
|
#include <EGammaClusterCoreCellRecovery.h>
|
| EGammaClusterCoreCellRecovery (const std::string &t, const std::string &n, const IInterface *p) |
|
| ~EGammaClusterCoreCellRecovery ()=default |
|
StatusCode | initialize () |
|
StatusCode | finalize () |
|
virtual StatusCode | addBranches () const |
| Pass the thinning service
More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
◆ StoreGateSvc_t
◆ 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 |
Pass the thinning service
Implements DerivationFramework::IAugmentationTool.
Definition at line 93 of file EGammaClusterCoreCellRecovery.cxx.
95 const EventContext& ctx = Gaudi::Hive::currentContext();
97 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, char>> decon;
98 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>> decoE;
105 for (
int i = 0;
i < 2;
i++) {
116 for (
int i = 0;
i < 2;
i++) {
117 decon[
i](*photon) =
res.nCells[
i];
118 decoE[
i](*photon) =
res.eCells[
i];
126 decon.clear(); decon.reserve(2);
127 decoE.clear(); decoE.reserve(2);
129 for (
int i = 0;
i < 2;
i++) {
141 for (
int i = 0;
i < 2;
i++) {
142 decon[
i](*electron) =
res.nCells[
i];
143 decoE[
i](*electron) =
res.eCells[
i];
148 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ decorateObject()
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ finalize()
StatusCode DerivationFramework::EGammaClusterCoreCellRecovery::finalize |
( |
| ) |
|
|
inline |
◆ findMaxECell()
StatusCode DerivationFramework::EGammaClusterCoreCellRecovery::findMaxECell |
( |
const xAOD::CaloCluster * |
clus, |
|
|
double & |
etamax, |
|
|
double & |
phimax |
|
) |
| const |
|
private |
Definition at line 184 of file EGammaClusterCoreCellRecovery.cxx.
190 return StatusCode::FAILURE;
198 return StatusCode::FAILURE;
205 return StatusCode::FAILURE;
209 it_cell_e = cellLinks->
end();
213 std::pair<const CaloCell*,double> maxcell{
nullptr,0};
214 for(; it_cell != it_cell_e; ++it_cell) {
217 if (!
cell->caloDDE()) {
219 <<
cell->eta() <<
" phi = " <<
cell->phi());
222 int layer =
cell->caloDDE()->getSampling();
225 double eCell =
cell->energy();
229 maxcell.first =
cell;
237 etamax = maxcell.first->caloDDE()->eta_raw();
238 phimax = maxcell.first->caloDDE()->phi_raw();
241 double etaAmax = clus->
etamax(sam);
242 double phiAmax = clus->
phimax(sam);
245 <<
" maximum layer 2 energy cell, E = " << maxcell.first->energy()
246 <<
" check E = " << vemax
247 <<
" w = " << maxcell.second <<
"\n"
248 <<
" in calo frame, eta = " << etamax <<
" phi = " << phimax <<
"\n"
249 <<
" in ATLAS frame, eta = " << etaAmax <<
" phi = " << phiAmax);
252 ATH_MSG_WARNING(
"No layer 2 cell with positive energy ! Should never happen");
253 return StatusCode::FAILURE;
255 return StatusCode::SUCCESS;
◆ initialize()
StatusCode DerivationFramework::EGammaClusterCoreCellRecovery::initialize |
( |
| ) |
|
Definition at line 33 of file EGammaClusterCoreCellRecovery.cxx.
41 ATH_MSG_FATAL(
"No e-gamma collection provided for thinning. At least one "
42 "egamma collection (photons/electrons) must be provided!");
43 return StatusCode::FAILURE;
51 for (
int i = 2;
i <= 3;
i++) {
52 for (
int t = 0;
t <=1 ;
t++) {
54 Form(
"%s.%sadded_Lr%d", containerKey.c_str(), (
t == 0 ?
"n" :
"E"),
i));
73 for (
int i = 2;
i <= 3;
i++) {
74 for (
int t = 0;
t <= 1 ;
t++) {
76 Form(
"%s.%sadded_Lr%d", containerKey.c_str(), (
t == 0 ?
"n" :
"E"),
i));
87 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
static const InterfaceID& DerivationFramework::IAugmentationTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
AlgTool interface methods.
Definition at line 31 of file IAugmentationTool.h.
31 {
return IID_IAugmentationTool; }
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ 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 80 of file EGammaClusterCoreCellRecovery.h.
◆ m_evtStore
◆ 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 60 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 52 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 67 of file EGammaClusterCoreCellRecovery.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
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
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
#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.
virtual void setOwner(IDataHandleHolder *o)=0
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[
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
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
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
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::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
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
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>