ATLAS Offline Software
Public Member Functions | List of all members
FEHelpers::FillNeutralFlowElements Class Reference

#include <FEHelpers.h>

Collaboration diagram for FEHelpers::FillNeutralFlowElements:

Public Member Functions

 FillNeutralFlowElements ()
 
bool addMoment (const xAOD::CaloCluster::MomentType &momentType, const std::string &attributeName, const xAOD::CaloCluster &theCluster, xAOD::FlowElement &theFE)
 Function to add cluster moments onto FE. More...
 
void addSamplingEnergy (const xAOD::CaloCluster::CaloSample &sampling, const std::string &attributeName, const xAOD::CaloCluster &theCluster, xAOD::FlowElement &theFE)
 
void addStandardMoments (xAOD::FlowElement &theFE, const xAOD::CaloCluster &theCluster)
 
void addStandardCalHitMoments (xAOD::FlowElement &theFE, const xAOD::CaloCluster &theCluster)
 
void addStandardSamplingEnergies (xAOD::FlowElement &theFE, const xAOD::CaloCluster &theCluster)
 

Detailed Description

Definition at line 27 of file Event/xAOD/xAODPFlow/xAODPFlow/FEHelpers.h.

Constructor & Destructor Documentation

◆ FillNeutralFlowElements()

FEHelpers::FillNeutralFlowElements::FillNeutralFlowElements ( )

Definition at line 189 of file FEHelpers.cxx.

189 {}

Member Function Documentation

◆ addMoment()

bool FEHelpers::FillNeutralFlowElements::addMoment ( const xAOD::CaloCluster::MomentType momentType,
const std::string &  attributeName,
const xAOD::CaloCluster theCluster,
xAOD::FlowElement theFE 
)

Function to add cluster moments onto FE.

Definition at line 191 of file FEHelpers.cxx.

194  {
195 
196  const SG::AuxElement::Accessor< float > feAttribute(attributeName);
197  double moment = 0.0;
198  if (theCluster.retrieveMoment(momentType, moment)) {
199  float float_moment = moment;
200  feAttribute(theFE) = float_moment;
201  }
202  return false;
203  }

◆ addSamplingEnergy()

void FEHelpers::FillNeutralFlowElements::addSamplingEnergy ( const xAOD::CaloCluster::CaloSample sampling,
const std::string &  attributeName,
const xAOD::CaloCluster theCluster,
xAOD::FlowElement theFE 
)

Definition at line 205 of file FEHelpers.cxx.

208  {
209  const SG::AuxElement::Accessor< float > feAttribute(attributeName);
210  feAttribute(theFE) = theCluster.eSample(sampling);
211  }

◆ addStandardCalHitMoments()

void FEHelpers::FillNeutralFlowElements::addStandardCalHitMoments ( xAOD::FlowElement theFE,
const xAOD::CaloCluster theCluster 
)

Definition at line 233 of file FEHelpers.cxx.

233  {
234 
235  const std::array< std::pair<xAOD::CaloCluster::MomentType, const std::string>, 4> momentAttributePairs{{
236  {xAOD::CaloCluster::ENG_CALIB_TOT, "ENG_CALIB_TOT"},
237  {xAOD::CaloCluster::ENG_CALIB_FRAC_EM, "ENG_CALIB_FRAC_EM"},
238  {xAOD::CaloCluster::ENG_CALIB_FRAC_HAD, "ENG_CALIB_FRAC_HAD"},
239  {xAOD::CaloCluster::ENG_CALIB_FRAC_REST, "ENG_CALIB_FRAC_REST"}
240  }};
241 
242  for (const auto & [moment,attribute]:momentAttributePairs) this->addMoment(moment,attribute,theCluster,theFE);
243 
244  }

◆ addStandardMoments()

void FEHelpers::FillNeutralFlowElements::addStandardMoments ( xAOD::FlowElement theFE,
const xAOD::CaloCluster theCluster 
)

Definition at line 213 of file FEHelpers.cxx.

213  {
214 
215  const std::array< std::pair<xAOD::CaloCluster::MomentType, const std::string>, 12> momentAttributePairs{{
216  {xAOD::CaloCluster::CENTER_MAG, "CENTER_MAG"},
217  {xAOD::CaloCluster::SECOND_R, "SECOND_R"},
218  {xAOD::CaloCluster::CENTER_LAMBDA, "CENTER_LAMBDA"},
219  {xAOD::CaloCluster::ENG_BAD_CELLS, "ENG_BAD_CELLS"},
220  {xAOD::CaloCluster::N_BAD_CELLS, "N_BAD_CELLS"},
221  {xAOD::CaloCluster::BADLARQ_FRAC, "BADLARQ_FRAC"},
222  {xAOD::CaloCluster::ENG_POS, "ENG_POS"},
223  {xAOD::CaloCluster::AVG_LAR_Q, "AVG_LAR_Q"},
224  {xAOD::CaloCluster::AVG_TILE_Q, "AVG_TILE_Q"},
225  {xAOD::CaloCluster::ISOLATION, "ISOLATION"},
226  {xAOD::CaloCluster::SECOND_LAMBDA, "SECOND_LAMBDA"},
227  {xAOD::CaloCluster::EM_PROBABILITY, "EM_PROBABILITY"}
228  }};
229 
230  for (const auto & [moment,attribute]:momentAttributePairs) this->addMoment(moment,attribute,theCluster,theFE);
231  }

◆ addStandardSamplingEnergies()

void FEHelpers::FillNeutralFlowElements::addStandardSamplingEnergies ( xAOD::FlowElement theFE,
const xAOD::CaloCluster theCluster 
)

Definition at line 246 of file FEHelpers.cxx.

246  {
247 
248  static const std::array< std::pair<xAOD::CaloCluster::CaloSample, const SG::AuxElement::Accessor<float>>, 28> samplingAttributePairs{{
273  {xAOD::CaloCluster::CaloSample::MINIFCAL0,SG::AuxElement::Accessor<float>("LAYERENERGY_MINIFCAL0")},
274  {xAOD::CaloCluster::CaloSample::MINIFCAL1,SG::AuxElement::Accessor<float>("LAYERENERGY_MINIFCAL1")},
275  {xAOD::CaloCluster::CaloSample::MINIFCAL2,SG::AuxElement::Accessor<float>("LAYERENERGY_MINIFCAL2")},
276  {xAOD::CaloCluster::CaloSample::MINIFCAL3,SG::AuxElement::Accessor<float>("LAYERENERGY_MINIFCAL3")},
277  }};
278 
279  for (const auto & [sampling,attribute]:samplingAttributePairs) {
280  attribute(theFE) = theCluster.eSample(sampling);
281  }
282  }

The documentation for this class was generated from the following files:
xAOD::CaloCluster_v1::SECOND_R
@ SECOND_R
Second Moment in .
Definition: CaloCluster_v1.h:123
xAOD::CaloCluster_v1::CENTER_MAG
@ CENTER_MAG
Cluster Centroid ( )
Definition: CaloCluster_v1.h:135
CaloCell_ID_FCS::TileExt2
@ TileExt2
Definition: FastCaloSim_CaloCell_ID.h:39
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
xAOD::CaloCluster_v1::EM_PROBABILITY
@ EM_PROBABILITY
Classification probability to be em-like.
Definition: CaloCluster_v1.h:173
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
CaloCell_ID_FCS::TileExt0
@ TileExt0
Definition: FastCaloSim_CaloCell_ID.h:37
CaloCell_ID_FCS::TileBar1
@ TileBar1
Definition: FastCaloSim_CaloCell_ID.h:32
xAOD::CaloCluster_v1::AVG_LAR_Q
@ AVG_LAR_Q
Sum(E_cell_LAr^2 Q_cell_LAr)/Sum(E_cell_LAr^2)
Definition: CaloCluster_v1.h:163
CaloCell_ID_FCS::FCAL1
@ FCAL1
Definition: FastCaloSim_CaloCell_ID.h:41
xAOD::CaloCluster_v1::CENTER_LAMBDA
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
Definition: CaloCluster_v1.h:136
FEHelpers::FillNeutralFlowElements::addMoment
bool addMoment(const xAOD::CaloCluster::MomentType &momentType, const std::string &attributeName, const xAOD::CaloCluster &theCluster, xAOD::FlowElement &theFE)
Function to add cluster moments onto FE.
Definition: FEHelpers.cxx:191
CaloCell_ID_FCS::HEC2
@ HEC2
Definition: FastCaloSim_CaloCell_ID.h:29
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
xAOD::CaloCluster_v1::SECOND_LAMBDA
@ SECOND_LAMBDA
Second Moment in .
Definition: CaloCluster_v1.h:124
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
CaloCell_ID_FCS::TileBar0
@ TileBar0
Definition: FastCaloSim_CaloCell_ID.h:31
CaloCell_ID_FCS::TileGap2
@ TileGap2
Definition: FastCaloSim_CaloCell_ID.h:35
xAOD::CaloCluster_v1::ENG_CALIB_TOT
@ ENG_CALIB_TOT
Calibration Hit energy inside the cluster.
Definition: CaloCluster_v1.h:195
xAOD::CaloCluster_v1::ENG_CALIB_FRAC_EM
@ ENG_CALIB_FRAC_EM
Calibration Hit energy inside the cluster caused by e/gamma/pi0.
Definition: CaloCluster_v1.h:248
xAOD::CaloCluster_v1::ISOLATION
@ ISOLATION
Energy weighted fraction of non-clustered perimeter cells.
Definition: CaloCluster_v1.h:146
xAOD::CaloCluster_v1::ENG_CALIB_FRAC_REST
@ ENG_CALIB_FRAC_REST
Calibration Hit energy inside the cluster caused by other particles.
Definition: CaloCluster_v1.h:253
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
xAOD::CaloCluster_v1::retrieveMoment
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
Definition: CaloCluster_v1.cxx:738
CaloCell_ID_FCS::TileGap1
@ TileGap1
Definition: FastCaloSim_CaloCell_ID.h:34
xAOD::CaloCluster_v1::ENG_BAD_CELLS
@ ENG_BAD_CELLS
Total em-scale energy of bad cells in this cluster.
Definition: CaloCluster_v1.h:148
CaloCell_ID_FCS::TileExt1
@ TileExt1
Definition: FastCaloSim_CaloCell_ID.h:38
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
xAOD::CaloCluster_v1::AVG_TILE_Q
@ AVG_TILE_Q
Sum(E_cell_Tile^2 Q_cell_Tile)/Sum(E_cell_Tile^2)
Definition: CaloCluster_v1.h:165
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
xAOD::CaloCluster_v1::eSample
float eSample(const CaloSample sampling) const
Definition: CaloCluster_v1.cxx:521
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
CaloCell_ID_FCS::FCAL2
@ FCAL2
Definition: FastCaloSim_CaloCell_ID.h:42
xAOD::CaloCluster_v1::ENG_CALIB_FRAC_HAD
@ ENG_CALIB_FRAC_HAD
Calibration Hit energy inside the cluster caused by charged pi+ and pi-.
Definition: CaloCluster_v1.h:251
CaloCell_ID_FCS::HEC3
@ HEC3
Definition: FastCaloSim_CaloCell_ID.h:30
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
CaloCell_ID_FCS::TileBar2
@ TileBar2
Definition: FastCaloSim_CaloCell_ID.h:33
xAOD::CaloCluster_v1::N_BAD_CELLS
@ N_BAD_CELLS
number of bad cells
Definition: CaloCluster_v1.h:149
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
xAOD::CaloCluster_v1::ENG_POS
@ ENG_POS
Total positive Energy of this cluster.
Definition: CaloCluster_v1.h:156
xAOD::CaloCluster_v1::BADLARQ_FRAC
@ BADLARQ_FRAC
Energy fraction of LAr cells with quality larger than a given cut.
Definition: CaloCluster_v1.h:155