|
ATLAS Offline Software
|
#include <ClusterDumper.h>
|
| ClusterDumper (const std::string &name, ISvcLocator *svcLoc) |
| Regular algorithm constructor. More...
|
|
virtual StatusCode | initialize () |
| Function initialising the algorithm. More...
|
|
virtual StatusCode | execute () |
| Function executing the algorithm. More...
|
|
virtual StatusCode | finalize () |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. 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 | 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 |
|
Definition at line 22 of file ClusterDumper.h.
◆ StoreGateSvc_t
◆ ClusterDumper()
ClusterDumper::ClusterDumper |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svcLoc |
|
) |
| |
◆ 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]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode ClusterDumper::execute |
( |
| ) |
|
|
virtual |
Function executing the algorithm.
Definition at line 55 of file ClusterDumper.cxx.
64 ATH_MSG_INFO(
"Found corresponding cell-link container with size " << cclptr->
size());
67 ATH_MSG_INFO(
"Did not find corresponding cell-link container");
70 for (
const auto itr: *clustercontainer) {
72 (*m_out) <<
"Kinematics :" << std::endl;
73 (*m_out) <<
"E=" << cluster.
e() <<
", eta=" << cluster.
eta() <<
", phi=" << cluster.
phi() <<
", m=" << cluster.
m() <<
", pt=" << cluster.
pt() << std::endl;
74 (*m_out) <<
"Eta0=" << cluster.
eta0() <<
", Phi0=" << cluster.
phi0() << std::endl;
76 (*m_out) <<
"TLorentzVector :" << std::endl;
78 (*m_out) <<
" p4.E=" << p4.E() <<
", x=" << p4.X() <<
", y=" << p4.Y() <<
", z=" << p4.Z() <<
", m=" << p4.M() <<
", pt=" << p4.Pt() << std::endl;
80 (*m_out) <<
"Sampling variables :" << std::endl;
84 (*m_out) <<
" Sampling #" <<
s <<
": E=" << cluster.
eSample(
s) <<
", eta=" << cluster.
etaSample(
s) <<
", phi=" << cluster.
phiSample(
s) << std::endl;
104 constexpr
auto allMoments=std::to_array<const char*>({
"FIRST_PHI",
"FIRST_ETA",
"SECOND_R",
"SECOND_LAMBDA",
"DELTA_PHI",
"DELTA_THETA",
"DELTA_ALPHA",
"CENTER_X",
"CENTER_Y",
"CENTER_Z",
"CENTER_MAG",
"CENTER_LAMBDA",
"LATERAL",
"LONGITUDINAL",
"ENG_FRAC_EM",
"ENG_FRAC_MAX",
"ENG_FRAC_CORE",
"FIRST_ENG_DENS",
"SECOND_ENG_DENS",
"ISOLATION",
"ENG_BAD_CELLS",
"N_BAD_CELLS",
"N_BAD_CELLS_CORR",
"BAD_CELLS_CORR_E",
"BADLARQ_FRAC",
"ENG_POS",
"SIGNIFICANCE",
"CELL_SIGNIFICANCE",
"CELL_SIG_SAMPLING",
"AVG_LAR_Q",
"AVG_TILE_Q",
"EM_PROBABILITY",
"HAD_WEIGHT",
"OOC_WEIGHT",
"DM_WEIGHT",
"TILE_CONFIDENCE_LEVEL",
"VERTEX_FRACTION",
"NVERTEX_FRACTION",
"ENG_CALIB_TOT",
"ENG_CALIB_OUT_L",
"ENG_CALIB_OUT_M",
"ENG_CALIB_OUT_T",
"ENG_CALIB_DEAD_L",
"ENG_CALIB_DEAD_M",
"ENG_CALIB_DEAD_T",
"ENG_CALIB_EMB0",
"ENG_CALIB_EME0",
"ENG_CALIB_TILEG3",
"ENG_CALIB_DEAD_TOT",
"ENG_CALIB_DEAD_EMB0",
"ENG_CALIB_DEAD_TILE0",
"ENG_CALIB_DEAD_TILEG3",
"ENG_CALIB_DEAD_EME0",
"ENG_CALIB_DEAD_HEC0",
"ENG_CALIB_DEAD_FCAL",
"ENG_CALIB_DEAD_LEAKAGE",
"ENG_CALIB_DEAD_UNCLASS",
"ENG_CALIB_FRAC_EM",
"ENG_CALIB_FRAC_HAD",
"ENG_CALIB_FRAC_REST",
"ENERGY_Truth"});
105 (*m_out) <<
"Cluster Moments" << std::endl;
106 for (
const auto& momName : allMoments) {
108 if (
a.isAvailable(cluster)) {
109 float v =
a(cluster);
110 (*m_out) <<
" " << momName <<
": " <<
v << std::endl;
115 if (
a.isAvailable(cluster)) {
116 (*m_out) <<
"Bad Channel data: " << std::endl;
118 (*m_out) <<
" eta=" << bc.eta() <<
", phi=" << bc.phi() <<
", layer=" << bc.layer() <<
", word=" << bc.badChannel() << std::endl;
122 (*m_out) <<
"Cell-links:" << std::endl;
128 for (;lnk_it!=lnk_it_e;++lnk_it) {
130 (*m_out) <<
" ID=" << std::hex <<
cell->ID() << std::dec <<
", E=" <<
cell->e() <<
", weight=" << lnk_it.
weight() << std::endl;
134 (*
m_out) <<
" No Cell Links found" << std::endl;
138 return StatusCode::SUCCESS;
◆ 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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode ClusterDumper::finalize |
( |
| ) |
|
|
virtual |
◆ initialize()
StatusCode ClusterDumper::initialize |
( |
| ) |
|
|
virtual |
Function initialising the algorithm.
Definition at line 25 of file ClusterDumper.cxx.
36 return StatusCode::FAILURE;
44 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.
◆ 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()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_containerName
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_fileMutex
std::mutex ClusterDumper::m_fileMutex |
|
private |
◆ m_fileName
std::string ClusterDumper::m_fileName |
|
private |
◆ m_fileOut
std::ofstream ClusterDumper::m_fileOut |
|
private |
◆ m_out
std::ostream* ClusterDumper::m_out |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
flt_t phi0() const
Returns raw of cluster seed.
virtual double phi() const
The azimuthal angle ( ) of the particle.
Container class for CaloCellLink.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_containerName
The key for the output xAOD::CaloClusterContainer.
Helper class to provide type-safe access to aux data.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual double m() const
The invariant mass of the particle.
const_iterator begin() const
const begin method
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const std::string & key() const
Return the StoreGate ID for the referenced object.
weight_t weight() const
Accessor for weight associated to this cell.
virtual void setOwner(IDataHandleHolder *o)=0
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Description of a calorimeter cluster.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
virtual double eta() const
The pseudorapidity ( ) of the particle.
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
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)
virtual void renounce()=0
virtual FourMom_t p4() const
The full 4-momentum of the particle.
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters)
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
const CaloClusterBadChannelList & badChannelList() const
const_iterator end() const
const end method
flt_t eta0() const
Returns raw of cluster seed.
DataObjIDColl m_extendedExtraObjects
float eSample(const CaloSample sampling) const
Data object for each calorimeter readout cell.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
const_iterator to loop over cells belonging to a cluster
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual double e() const
The total energy of the particle.