|
ATLAS Offline Software
|
Outputs cluster moments (and other assorted properties) to text files.
More...
#include <CaloMomentsDumper.h>
|
| CaloMomentsDumper (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute (const EventContext &ctx, xAOD::CaloClusterContainer *cluster_collection) const override |
| Execute on an entire collection of clusters. More...
|
|
virtual | ~CaloMomentsDumper ()=default |
|
virtual StatusCode | execute (const EventContext &ctx, xAOD::CaloClusterContainer *collection) const=0 |
| Execute on an entire collection of clusters. More...
|
|
virtual StatusCode | execute (xAOD::CaloClusterContainer *collection) final |
| Execute on an entire collection of clusters. 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 |
|
virtual StatusCode | execute (xAOD::CaloClusterContainer *collection) final |
| Execute on an entire collection of clusters. More...
|
|
|
Gaudi::Property< std::string > | m_savePath {this, "SavePath", "./cluster_dump", "Path to where the files should be saved"} |
| The path specifying the folder to which the files should be saved. More...
|
|
Gaudi::Property< std::string > | m_filePrefix {this, "FilePrefix", "", "Prefix of the saved files"} |
| The prefix of the saved files. More...
|
|
Gaudi::Property< std::string > | m_fileSuffix {this, "FileSuffix", "", "Suffix of the saved files"} |
| The suffix of the saved files. More...
|
|
Gaudi::Property< unsigned int > | m_numWidth {this, "NumberWidth", 9, "The number of digits to reserve for the events"} |
| The number of digits to reserve for the events. More...
|
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Outputs cluster moments (and other assorted properties) to text files.
- Author
- Nuno Fernandes nuno..nosp@m.dos..nosp@m.santo.nosp@m.s.fe.nosp@m.rnand.nosp@m.es@c.nosp@m.ern.c.nosp@m.h
- Date
- 05 March 2023
Definition at line 24 of file CaloMomentsDumper.h.
◆ StoreGateSvc_t
◆ CaloMomentsDumper()
CaloMomentsDumper::CaloMomentsDumper |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~CaloMomentsDumper()
virtual CaloMomentsDumper::~CaloMomentsDumper |
( |
| ) |
|
|
virtualdefault |
◆ 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() [1/4]
Execute on an entire collection of clusters.
- Parameters
-
collection | The container of clusters. param ctx The event context. |
Implements CaloClusterCollectionProcessor.
Definition at line 27 of file CaloMomentsDumper.cxx.
33 return StatusCode::FAILURE;
39 std::ofstream out_file(save_file);
41 for (
auto cluster_iter = cluster_collection->begin(); cluster_iter != cluster_collection->end(); ++cluster_iter)
47 ATH_MSG_ERROR(
"Can't get valid links to CaloCells (CaloClusterCellLink)!");
48 return StatusCode::FAILURE;
51 out_file << cluster->
pt() <<
" " << cluster->
eta() <<
" " << cluster->
phi() <<
" " << cluster->
m() <<
" " << cluster->
e() <<
" " << cluster->
rapidity() <<
" " << cluster->
et() <<
"\n";
52 out_file <<
"------------------------------------------------\n";
54 for (
int i = 0;
i < 28; ++
i)
62 out_file <<
"------------------------------------------------\n";
64 out_file <<
"------------------------------------------------\n";
147 out_file <<
"\n------------------------------------------------\n";
148 out_file <<
"------------------------------------------------\n";
154 out_file << std::endl;
156 return StatusCode::SUCCESS;
◆ execute() [2/4]
virtual StatusCode CaloClusterCollectionProcessor::execute |
Execute on an entire collection of clusters.
- Parameters
-
collection | The container of clusters. param ctx The event context. |
◆ execute() [3/4]
virtual StatusCode CaloClusterCollectionProcessor::execute |
|
inlinefinal |
Execute on an entire collection of clusters.
- Parameters
-
collection | The container of clusters. (deprecated) |
Definition at line 49 of file CaloClusterCollectionProcessor.h.
51 return execute (Gaudi::Hive::currentContext(), collection);
◆ execute() [4/4]
|
inlinefinalvirtualinherited |
Execute on an entire collection of clusters.
- Parameters
-
collection | The container of clusters. (deprecated) |
Definition at line 49 of file CaloClusterCollectionProcessor.h.
51 return execute (Gaudi::Hive::currentContext(), collection);
◆ 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
◆ initialize()
StatusCode CaloMomentsDumper::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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& CaloClusterCollectionProcessor::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ 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_evtStore
◆ m_filePrefix
Gaudi::Property<std::string> CaloMomentsDumper::m_filePrefix {this, "FilePrefix", "", "Prefix of the saved files"} |
|
private |
The prefix of the saved files.
Empty string by default.
Definition at line 51 of file CaloMomentsDumper.h.
◆ m_fileSuffix
Gaudi::Property<std::string> CaloMomentsDumper::m_fileSuffix {this, "FileSuffix", "", "Suffix of the saved files"} |
|
private |
The suffix of the saved files.
Empty string by default.
Definition at line 56 of file CaloMomentsDumper.h.
◆ m_numWidth
Gaudi::Property<unsigned int> CaloMomentsDumper::m_numWidth {this, "NumberWidth", 9, "The number of digits to reserve for the events"} |
|
private |
The number of digits to reserve for the events.
9 by default.
Definition at line 61 of file CaloMomentsDumper.h.
◆ m_savePath
Gaudi::Property<std::string> CaloMomentsDumper::m_savePath {this, "SavePath", "./cluster_dump", "Path to where the files should be saved"} |
|
private |
The path specifying the folder to which the files should be saved.
Default
./saved_clusters
Definition at line 46 of file CaloMomentsDumper.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
@ CENTER_MAG
Cluster Centroid ( )
@ SECOND_R
Second Moment in .
float phimax(const CaloSample sampling) const
Retrieve of cell with maximum energy in given sampling.
virtual double phi() const
The azimuthal angle ( ) of the particle.
static std::string build_filename(const std::string &prefix, const std::string &text, const std::string &suffix, const std::string &ext)
flt_t time() const
Access cluster time.
@ ENG_CALIB_DEAD_UNCLASS
Attached Calibration Hit energy in dead material in unclassified areas of the detector.
@ FIRST_PHI
First Moment in .
Gaudi::Property< unsigned int > m_numWidth
The number of digits to reserve for the events.
@ OOC_WEIGHT
Out-of-cluster weight (E_ooc/E_w)
@ ENG_FRAC_CORE
Energy fraction of the sum of the hottest cells in each sampling.
path
python interpreter configuration --------------------------------------—
int numberCells() const
Return total number of cells in cluster.
@ VERTEX_FRACTION
Vertex fraction of this cluster wrt.
double getMomentValue(MomentType type) const
Retrieve individual moment - no check for existance! Returns -999 on error.
@ MASS
cell based mass i.e. the mass of the 4-vector sum of all massless positive energetic cells
@ EM_PROBABILITY
Classification probability to be em-like.
@ CENTER_X
Cluster Centroid ( )
@ ENG_BAD_HV_CELLS
Total em-scale energy of cells with bad HV in this cluster.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
@ ENG_CALIB_DEAD_LEAKAGE
Attached Calibration Hit energy in dead material behind calorimeters.
@ ETA2CALOFRAME
Eta of sampling 2 in the calo frame (for egamma)
flt_t secondTime() const
Access second moment of cell timing distribution.
@ AVG_LAR_Q
Sum(E_cell_LAr^2 Q_cell_LAr)/Sum(E_cell_LAr^2)
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *collection) const =0
Execute on an entire collection of clusters.
@ ETA1CALOFRAME
Eta of sampling 1 in the calo frame (for egamma)
virtual double m() const
The invariant mass of the particle.
@ ENG_CALIB_TILEG3
Calibration Hit energy inside the cluster scintillator.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
@ ENG_CALIB_DEAD_T
Attached Calibration Hit energy in dead material with tight matching (Angle < 0.3).
@ ENG_CALIB_OUT_M
Attached Calibration Hit energy outside clusters but inside the calorimeter with medium matching (Ang...
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *cluster_collection) const override
Execute on an entire collection of clusters.
Gaudi::Property< std::string > m_savePath
The path specifying the folder to which the files should be saved.
@ ENG_CALIB_EMB0
Calibration Hit energy inside the cluster barrel presampler.
@ ENG_CALIB_DEAD_TILE0
Attached Calibration Hit energy in dead material between EMB3 and TILE0.
@ ENG_FRAC_MAX
Energy fraction of hottest cell.
float etamax(const CaloSample sampling) const
Retrieve of cell with maximum energy in given sampling.
@ PHI1CALOFRAME
Phi of sampling 1 in the calo frame (for egamma)
virtual void setOwner(IDataHandleHolder *o)=0
@ SECOND_LAMBDA
Second Moment in .
@ PTD
relative spread of pT of constiuent cells = sqrt(n)*RMS/Mean
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
@ CENTER_Z
Cluster Centroid ( )
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
@ SECOND_ENG_DENS
Second Moment in E/V.
Description of a calorimeter cluster.
@ DM_WEIGHT
Dead-material weight (E_dm/E_ooc)
@ HAD_WEIGHT
Hadronic weight (E_w/E_em)
Gaudi::Property< std::string > m_filePrefix
The prefix of the saved files.
virtual double eta() const
The pseudorapidity ( ) of the particle.
float energy_max(const CaloSample sampling) const
Retrieve maximum cell energy in given sampling.
@ CELL_SIG_SAMPLING
CaloSample of the cell with the largest |E|/sig.
@ ENG_CALIB_TOT
Calibration Hit energy inside the cluster.
@ ENG_CALIB_FRAC_EM
Calibration Hit energy inside the cluster caused by e/gamma/pi0.
@ ISOLATION
Energy weighted fraction of non-clustered perimeter cells.
@ ENG_CALIB_FRAC_REST
Calibration Hit energy inside the cluster caused by other particles.
size_t size() const
size method (forwarded from CaloClusterCellLink obj)
@ DELTA_PHI
Angular shower axis deviation ( ) from IP-to-Center.
@ ENG_CALIB_DEAD_FCAL
Attached Calibration Hit energy in dead material before FCAL, between FCAL and HEC.
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
@ FIRST_ENG_DENS
First Moment in E/V.
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
@ ENG_BAD_CELLS
Total em-scale energy of bad cells in this cluster.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
@ TILE_CONFIDENCE_LEVEL
Confidence Level of a tile calorimeter cluster to be noise.
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters)
@ ENG_CALIB_EME0
Calibration Hit energy inside the cluster endcap presampler.
@ ENG_FRAC_EM
Energy fraction in EM calorimeters.
static ErrorState prepare_folder_for_output(const std::filesystem::path &folder, const bool output_errors=true)
@ ENG_CALIB_DEAD_M
Attached Calibration Hit energy in dead material with medium matching (Angle < 0.5).
@ ENG_CALIB_DEAD_HEC0
Attached Calibration Hit energy in dead material between EME3 and HEC0.
@ AVG_TILE_Q
Sum(E_cell_Tile^2 Q_cell_Tile)/Sum(E_cell_Tile^2)
@ PHICALOFRAME
Phi in the calo frame (for egamma)
@ ENG_CALIB_DEAD_TILEG3
Attached Calibration Hit energy in dead material before scintillator.
@ FIRST_ETA
First Moment in .
@ DELTA_THETA
Angular shower axis deviation ( ) from IP-to-Center.
float eSample(const CaloSample sampling) const
@ ENG_CALIB_DEAD_TOT
Attached Calibration Hit energy in dead material.
@ SIGNIFICANCE
Cluster significance.
@ PHI2CALOFRAME
Phi of sampling 2 in the calo frame (for egamma)
Gaudi::Property< std::string > m_fileSuffix
The suffix of the saved files.
@ N_BAD_HV_CELLS
number of cells with bad HV
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
@ ENG_CALIB_DEAD_L
Attached Calibration Hit energy in dead material with loose matching (Angle < 1.0).
@ LATERAL
Normalized lateral moment.
@ SECOND_TIME
Second moment of cell time distribution in cluster.
@ DELTA_ALPHA
Angular shower axis deviation ( ) from IP-to-Center.
@ ENG_CALIB_FRAC_HAD
Calibration Hit energy inside the cluster caused by charged pi+ and pi-.
@ CELL_SIGNIFICANCE
Cell significance = E/sig of the cell with the largest |E|/sig.
@ ENG_CALIB_OUT_L
Attached Calibration Hit energy outside clusters but inside the calorimeter with loose matching (Angl...
@ ENG_CALIB_DEAD_EME0
Attached Calibration Hit energy in dead material before EME0, between EME0 and EME1.
@ ENG_CALIB_OUT_T
Attached Calibration Hit energy outside clusters but inside the calorimeter with tight matching (Angl...
@ BAD_CELLS_CORR_E
Energy of bad cells with energy density average correction applied.
@ ETACALOFRAME
Eta in the calo frame (for egamma)
@ N_BAD_CELLS_CORR
Number of bad cells with energy density average correction applied.
@ LONGITUDINAL
Normalized longitudinal moment.
unsigned samplingPattern() const
Access to sampling pattern (one bit per sampling) (Method may be removed later)
@ NVERTEX_FRACTION
slightly updated vertex fraction more pile up independent (similar to nJVF)
@ N_BAD_CELLS
number of bad cells
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual double rapidity() const
The true rapidity (y) of the particle.
virtual double e() const
The total energy of the particle.
@ CENTER_Y
Cluster Centroid ( )
@ ENG_CALIB_DEAD_EMB0
Attached Calibration Hit energy in dead material before EMB0, between EMB0 and EMB1.
@ ENG_POS
Total positive Energy of this cluster.
int numberCellsInSampling(const CaloSample samp, bool isInnerWheel=false) const
Returns number of cells in given sampling.
@ BADLARQ_FRAC
Energy fraction of LAr cells with quality larger than a given cut.