ATLAS Offline Software
Loading...
Searching...
No Matches
xAODClusterCompressor Class Reference

#include <xAODClusterCompressor.h>

Inheritance diagram for xAODClusterCompressor:
Collaboration diagram for xAODClusterCompressor:

Public Types

typedef std::array< xAOD::CaloCluster::MomentType, 60 > momentList_t

Public Member Functions

 xAODClusterCompressor ()=delete
 xAODClusterCompressor (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters:
virtual StatusCode initialize () override
virtual void compress (xAOD::CaloClusterContainer *clustercontainer) const override

Public Attributes

momentList_t m_allMoments
CxxUtils::FloatCompressor m_compressor
bool m_isEnabled

Detailed Description

Definition at line 19 of file xAODClusterCompressor.h.

Member Typedef Documentation

◆ momentList_t

Constructor & Destructor Documentation

◆ xAODClusterCompressor() [1/2]

xAODClusterCompressor::xAODClusterCompressor ( )
delete

◆ xAODClusterCompressor() [2/2]

xAODClusterCompressor::xAODClusterCompressor ( const std::string & name,
ISvcLocator * pSvcLocator )

Constructor with parameters:

Definition at line 19 of file xAODClusterCompressor.cxx.

19 :
20 base_class(name, pSvcLocator),
21 m_allMoments({{xAOD::CaloCluster::FIRST_PHI ,xAOD::CaloCluster::FIRST_ETA ,xAOD::CaloCluster::SECOND_R ,xAOD::CaloCluster::SECOND_LAMBDA ,xAOD::CaloCluster::DELTA_PHI ,xAOD::CaloCluster::DELTA_THETA ,xAOD::CaloCluster::DELTA_ALPHA ,xAOD::CaloCluster::CENTER_X ,xAOD::CaloCluster::CENTER_Y ,xAOD::CaloCluster::CENTER_Z ,xAOD::CaloCluster::CENTER_MAG ,xAOD::CaloCluster::CENTER_LAMBDA ,xAOD::CaloCluster::LATERAL ,xAOD::CaloCluster::LONGITUDINAL ,xAOD::CaloCluster::ENG_FRAC_EM ,xAOD::CaloCluster::ENG_FRAC_MAX ,xAOD::CaloCluster::ENG_FRAC_CORE ,xAOD::CaloCluster::FIRST_ENG_DENS ,xAOD::CaloCluster::SECOND_ENG_DENS ,xAOD::CaloCluster::ISOLATION ,xAOD::CaloCluster::ENG_BAD_CELLS ,xAOD::CaloCluster::N_BAD_CELLS ,xAOD::CaloCluster::N_BAD_CELLS_CORR ,xAOD::CaloCluster::BAD_CELLS_CORR_E ,xAOD::CaloCluster::BADLARQ_FRAC ,xAOD::CaloCluster::ENG_POS ,xAOD::CaloCluster::SIGNIFICANCE ,xAOD::CaloCluster::CELL_SIGNIFICANCE ,xAOD::CaloCluster::CELL_SIG_SAMPLING ,xAOD::CaloCluster::AVG_LAR_Q ,xAOD::CaloCluster::AVG_TILE_Q ,xAOD::CaloCluster::EM_PROBABILITY ,xAOD::CaloCluster::HAD_WEIGHT ,xAOD::CaloCluster::OOC_WEIGHT ,xAOD::CaloCluster::DM_WEIGHT ,xAOD::CaloCluster::TILE_CONFIDENCE_LEVEL ,xAOD::CaloCluster::VERTEX_FRACTION ,xAOD::CaloCluster::NVERTEX_FRACTION ,xAOD::CaloCluster::ENG_CALIB_TOT ,xAOD::CaloCluster::ENG_CALIB_OUT_L ,xAOD::CaloCluster::ENG_CALIB_OUT_M ,xAOD::CaloCluster::ENG_CALIB_OUT_T ,xAOD::CaloCluster::ENG_CALIB_DEAD_L ,xAOD::CaloCluster::ENG_CALIB_DEAD_M ,xAOD::CaloCluster::ENG_CALIB_DEAD_T ,xAOD::CaloCluster::ENG_CALIB_EMB0 ,xAOD::CaloCluster::ENG_CALIB_EME0 ,xAOD::CaloCluster::ENG_CALIB_TILEG3 ,xAOD::CaloCluster::ENG_CALIB_DEAD_TOT ,xAOD::CaloCluster::ENG_CALIB_DEAD_EMB0 ,xAOD::CaloCluster::ENG_CALIB_DEAD_TILE0 ,xAOD::CaloCluster::ENG_CALIB_DEAD_TILEG3 ,xAOD::CaloCluster::ENG_CALIB_DEAD_EME0 ,xAOD::CaloCluster::ENG_CALIB_DEAD_HEC0 ,xAOD::CaloCluster::ENG_CALIB_DEAD_FCAL ,xAOD::CaloCluster::ENG_CALIB_DEAD_LEAKAGE ,xAOD::CaloCluster::ENG_CALIB_DEAD_UNCLASS ,xAOD::CaloCluster::ENG_CALIB_FRAC_EM ,xAOD::CaloCluster::ENG_CALIB_FRAC_HAD ,xAOD::CaloCluster::ENG_CALIB_FRAC_REST}}),
22 //This listd DOES NOT contain the egamma-related moments: ETACALOFRAME, PHICALOFRAME, ETA1CALOFRAME, PHI1CALOFRAME, ETA2CALOFRAME, PHI2CALOFRAME
23 //Would be nicer to be jobO congfigurable (ideally per container) -> ENUMS? String-to-enum matching?
25
26{
27 declareProperty( "Enable", m_isEnabled=true);
28}
CxxUtils::FloatCompressor m_compressor
@ ENG_CALIB_OUT_M
Attached Calibration Hit energy outside clusters but inside the calorimeter with medium matching (Ang...
@ SECOND_ENG_DENS
Second Moment in E/V.
@ DELTA_PHI
Angular shower axis deviation ( ) from IP-to-Center.
@ DELTA_ALPHA
Angular shower axis deviation ( ) from IP-to-Center.
@ OOC_WEIGHT
Out-of-cluster weight (E_ooc/E_w)
@ AVG_TILE_Q
Sum(E_cell_Tile^2 Q_cell_Tile)/Sum(E_cell_Tile^2)
@ DELTA_THETA
Angular shower axis deviation ( ) from IP-to-Center.
@ SECOND_LAMBDA
Second Moment in .
@ FIRST_PHI
First Moment in .
@ ENG_CALIB_OUT_L
Attached Calibration Hit energy outside clusters but inside the calorimeter with loose matching (Angl...
@ CELL_SIGNIFICANCE
Cell significance = E/sig of the cell with the largest |E|/sig.
@ CELL_SIG_SAMPLING
CaloSample of the cell with the largest |E|/sig.
@ EM_PROBABILITY
Classification probability to be em-like.
@ VERTEX_FRACTION
Vertex fraction of this cluster wrt.
@ ENG_CALIB_DEAD_T
Attached Calibration Hit energy in dead material with tight matching (Angle < 0.3).
@ NVERTEX_FRACTION
slightly updated vertex fraction more pile up independent (similar to nJVF)
@ N_BAD_CELLS_CORR
Number of bad cells with energy density average correction applied.
@ DM_WEIGHT
Dead-material weight (E_dm/E_ooc)
@ LATERAL
Normalized lateral moment.
@ N_BAD_CELLS
number of bad cells
@ LONGITUDINAL
Normalized longitudinal moment.
@ ENG_FRAC_MAX
Energy fraction of hottest cell.
@ AVG_LAR_Q
Sum(E_cell_LAr^2 Q_cell_LAr)/Sum(E_cell_LAr^2)
@ ENG_CALIB_DEAD_UNCLASS
Attached Calibration Hit energy in dead material in unclassified areas of the detector.
@ ENG_FRAC_EM
Energy fraction in EM calorimeters.
@ SECOND_R
Second Moment in .
@ ENG_CALIB_DEAD_HEC0
Attached Calibration Hit energy in dead material between EME3 and HEC0.
@ FIRST_ETA
First Moment in .
@ FIRST_ENG_DENS
First Moment in E/V.
@ HAD_WEIGHT
Hadronic weight (E_w/E_em)
@ ENG_CALIB_DEAD_TILEG3
Attached Calibration Hit energy in dead material before scintillator.
@ ENG_FRAC_CORE
Energy fraction of the sum of the hottest cells in each sampling.
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
@ SIGNIFICANCE
Cluster significance.
@ CENTER_MAG
Cluster Centroid ( )
@ ENG_CALIB_DEAD_M
Attached Calibration Hit energy in dead material with medium matching (Angle < 0.5).
@ ENG_CALIB_FRAC_REST
Calibration Hit energy inside the cluster caused by other particles.
@ ENG_CALIB_DEAD_L
Attached Calibration Hit energy in dead material with loose matching (Angle < 1.0).
@ ENG_CALIB_DEAD_EME0
Attached Calibration Hit energy in dead material before EME0, between EME0 and EME1.
@ ENG_CALIB_DEAD_TILE0
Attached Calibration Hit energy in dead material between EMB3 and TILE0.
@ CENTER_Z
Cluster Centroid ( )
@ BAD_CELLS_CORR_E
Energy of bad cells with energy density average correction applied.
@ ENG_CALIB_FRAC_EM
Calibration Hit energy inside the cluster caused by e/gamma/pi0.
@ ENG_BAD_CELLS
Total em-scale energy of bad cells in this cluster.
@ ENG_CALIB_DEAD_FCAL
Attached Calibration Hit energy in dead material before FCAL, between FCAL and HEC.
@ ENG_CALIB_TOT
Calibration Hit energy inside the cluster.
@ ENG_CALIB_OUT_T
Attached Calibration Hit energy outside clusters but inside the calorimeter with tight matching (Angl...
@ ENG_CALIB_DEAD_LEAKAGE
Attached Calibration Hit energy in dead material behind calorimeters.
@ ENG_CALIB_FRAC_HAD
Calibration Hit energy inside the cluster caused by charged pi+ and pi-.
@ ENG_CALIB_EMB0
Calibration Hit energy inside the cluster barrel presampler.
@ ENG_CALIB_EME0
Calibration Hit energy inside the cluster endcap presampler.
@ ENG_POS
Total positive Energy of this cluster.
@ BADLARQ_FRAC
Energy fraction of LAr cells with quality larger than a given cut.
@ CENTER_X
Cluster Centroid ( )
@ ENG_CALIB_DEAD_EMB0
Attached Calibration Hit energy in dead material before EMB0, between EMB0 and EMB1.
@ ISOLATION
Energy weighted fraction of non-clustered perimeter cells.
@ ENG_CALIB_DEAD_TOT
Attached Calibration Hit energy in dead material.
@ CENTER_Y
Cluster Centroid ( )
@ ENG_CALIB_TILEG3
Calibration Hit energy inside the cluster scintillator.
@ TILE_CONFIDENCE_LEVEL
Confidence Level of a tile calorimeter cluster to be noise.

Member Function Documentation

◆ compress()

void xAODClusterCompressor::compress ( xAOD::CaloClusterContainer * clustercontainer) const
overridevirtual

Definition at line 40 of file xAODClusterCompressor.cxx.

40 {
41
42 if (!m_isEnabled) return;
43 if (clustercontainer->empty()) return;
44
45 if (!clustercontainer->hasNonConstStore()) {
46 ATH_MSG_DEBUG("ClusterContainer has no non-const aux store. No compression.");
47 return;
48 }
49
50 constexpr size_t nMoments=std::tuple_size<momentList_t>::value;
51
52 std::bitset<nMoments> incompressibleMoments; //Idices of moments that are const or inexistant
53
54
55 for (xAOD::CaloCluster* cluster : *clustercontainer) { //Outer loop over clusters
56 for (size_t iMom=0; iMom<nMoments; ++iMom) { //Inner loop over moments
57 if (!incompressibleMoments.test(iMom)) {//Moment not (yet) known to be incompressible
58 double momValue;
60 if (cluster->retrieveMoment(mom,momValue)) {
61 cluster->insertMoment(mom,m_compressor.reduceFloatPrecision(momValue));
62 }
63 else {//moment doesn't exist
64 incompressibleMoments.set(iMom);
65 ATH_MSG_VERBOSE("Moment " << mom << " doesn not exists. Not attemps to compress it in subsequent clusters");
66 }
67 }//end if Moment not yet known to be incompressible
68 }//end loop over moments
69 }//end loop over clusters
70}
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
bool empty() const noexcept
Returns true if the collection is empty.
MomentType
Enums to identify different moments.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

◆ initialize()

StatusCode xAODClusterCompressor::initialize ( )
overridevirtual

Definition at line 31 of file xAODClusterCompressor.cxx.

31 {
32 if (m_isEnabled)
33 ATH_MSG_INFO("Compression of ClusterMoments to 16 bits enabled");
34 else
35 ATH_MSG_INFO("Compression of ClusterMoments disabled");
36 return StatusCode::SUCCESS;
37}
#define ATH_MSG_INFO(x)

Member Data Documentation

◆ m_allMoments

momentList_t xAODClusterCompressor::m_allMoments

Definition at line 37 of file xAODClusterCompressor.h.

◆ m_compressor

CxxUtils::FloatCompressor xAODClusterCompressor::m_compressor

Definition at line 40 of file xAODClusterCompressor.h.

◆ m_isEnabled

bool xAODClusterCompressor::m_isEnabled

Definition at line 43 of file xAODClusterCompressor.h.


The documentation for this class was generated from the following files: