ATLAS Offline Software
Loading...
Searching...
No Matches
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.
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 193 of file FEHelpers.cxx.

193{}

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 195 of file FEHelpers.cxx.

198 {
199
200 const SG::Accessor< float > feAttribute(attributeName);
201 double moment = 0.0;
202 if (theCluster.retrieveMoment(momentType, moment)) {
203 float float_moment = moment;
204 feAttribute(theFE) = float_moment;
205 }
206 return false;
207 }
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.

◆ addSamplingEnergy()

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

Definition at line 209 of file FEHelpers.cxx.

212 {
213 const SG::Accessor< float > feAttribute(attributeName);
214 feAttribute(theFE) = theCluster.eSample(sampling);
215 }
float eSample(const CaloSample sampling) const

◆ addStandardCalHitMoments()

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

Definition at line 237 of file FEHelpers.cxx.

237 {
238
239 const std::array< std::pair<xAOD::CaloCluster::MomentType, const std::string>, 4> momentAttributePairs{{
240 {xAOD::CaloCluster::ENG_CALIB_TOT, "ENG_CALIB_TOT"},
241 {xAOD::CaloCluster::ENG_CALIB_FRAC_EM, "ENG_CALIB_FRAC_EM"},
242 {xAOD::CaloCluster::ENG_CALIB_FRAC_HAD, "ENG_CALIB_FRAC_HAD"},
243 {xAOD::CaloCluster::ENG_CALIB_FRAC_REST, "ENG_CALIB_FRAC_REST"}
244 }};
245
246 for (const auto & [moment,attribute]:momentAttributePairs) this->addMoment(moment,attribute,theCluster,theFE);
247
248 }
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.
@ ENG_CALIB_FRAC_REST
Calibration Hit energy inside the cluster caused by other particles.
@ ENG_CALIB_FRAC_EM
Calibration Hit energy inside the cluster caused by e/gamma/pi0.
@ ENG_CALIB_TOT
Calibration Hit energy inside the cluster.
@ ENG_CALIB_FRAC_HAD
Calibration Hit energy inside the cluster caused by charged pi+ and pi-.

◆ addStandardMoments()

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

Definition at line 217 of file FEHelpers.cxx.

217 {
218
219 const std::array< std::pair<xAOD::CaloCluster::MomentType, const std::string>, 12> momentAttributePairs{{
220 {xAOD::CaloCluster::CENTER_MAG, "CENTER_MAG"},
221 {xAOD::CaloCluster::SECOND_R, "SECOND_R"},
222 {xAOD::CaloCluster::CENTER_LAMBDA, "CENTER_LAMBDA"},
223 {xAOD::CaloCluster::ENG_BAD_CELLS, "ENG_BAD_CELLS"},
224 {xAOD::CaloCluster::N_BAD_CELLS, "N_BAD_CELLS"},
225 {xAOD::CaloCluster::BADLARQ_FRAC, "BADLARQ_FRAC"},
226 {xAOD::CaloCluster::ENG_POS, "ENG_POS"},
227 {xAOD::CaloCluster::AVG_LAR_Q, "AVG_LAR_Q"},
228 {xAOD::CaloCluster::AVG_TILE_Q, "AVG_TILE_Q"},
229 {xAOD::CaloCluster::ISOLATION, "ISOLATION"},
230 {xAOD::CaloCluster::SECOND_LAMBDA, "SECOND_LAMBDA"},
231 {xAOD::CaloCluster::EM_PROBABILITY, "EM_PROBABILITY"}
232 }};
233
234 for (const auto & [moment,attribute]:momentAttributePairs) this->addMoment(moment,attribute,theCluster,theFE);
235 }
@ AVG_TILE_Q
Sum(E_cell_Tile^2 Q_cell_Tile)/Sum(E_cell_Tile^2).
@ SECOND_LAMBDA
Second Moment in .
@ EM_PROBABILITY
Classification probability to be em-like.
@ N_BAD_CELLS
number of bad cells
@ AVG_LAR_Q
Sum(E_cell_LAr^2 Q_cell_LAr)/Sum(E_cell_LAr^2).
@ SECOND_R
Second Moment in .
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
@ CENTER_MAG
Cluster Centroid ( ).
@ ENG_BAD_CELLS
Total em-scale energy of bad cells in this cluster.
@ ENG_POS
Total positive Energy of this cluster.
@ BADLARQ_FRAC
Energy fraction of LAr cells with quality larger than a given cut.
@ ISOLATION
Energy weighted fraction of non-clustered perimeter cells.

◆ addStandardSamplingEnergies()

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

Definition at line 250 of file FEHelpers.cxx.

250 {
251
252 static const std::array< std::pair<xAOD::CaloCluster::CaloSample, const SG::Accessor<float>>, 28> samplingAttributePairs{{
253 {xAOD::CaloCluster::CaloSample::PreSamplerB,SG::Accessor<float>("LAYERENERGY_PreSamplerB")},
254 {xAOD::CaloCluster::CaloSample::EMB1,SG::Accessor<float>("LAYERENERGY_EMB1")},
255 {xAOD::CaloCluster::CaloSample::EMB2,SG::Accessor<float>("LAYERENERGY_EMB2")},
256 {xAOD::CaloCluster::CaloSample::EMB3,SG::Accessor<float>("LAYERENERGY_EMB3")},
257 {xAOD::CaloCluster::CaloSample::PreSamplerE,SG::Accessor<float>("LAYERENERGY_PreSamplerE")},
258 {xAOD::CaloCluster::CaloSample::EME1,SG::Accessor<float>("LAYERENERGY_EME1")},
259 {xAOD::CaloCluster::CaloSample::EME2,SG::Accessor<float>("LAYERENERGY_EME2")},
260 {xAOD::CaloCluster::CaloSample::EME3,SG::Accessor<float>("LAYERENERGY_EME3")},
261 {xAOD::CaloCluster::CaloSample::HEC0,SG::Accessor<float>("LAYERENERGY_HEC0")},
262 {xAOD::CaloCluster::CaloSample::HEC1,SG::Accessor<float>("LAYERENERGY_HEC1")},
263 {xAOD::CaloCluster::CaloSample::HEC2,SG::Accessor<float>("LAYERENERGY_HEC2")},
264 {xAOD::CaloCluster::CaloSample::HEC3,SG::Accessor<float>("LAYERENERGY_HEC3")},
265 {xAOD::CaloCluster::CaloSample::TileBar0,SG::Accessor<float>("LAYERENERGY_TileBar0")},
266 {xAOD::CaloCluster::CaloSample::TileBar1,SG::Accessor<float>("LAYERENERGY_TileBar1")},
267 {xAOD::CaloCluster::CaloSample::TileBar2,SG::Accessor<float>("LAYERENERGY_TileBar2")},
268 {xAOD::CaloCluster::CaloSample::TileGap1,SG::Accessor<float>("LAYERENERGY_TileGap1")},
269 {xAOD::CaloCluster::CaloSample::TileGap2,SG::Accessor<float>("LAYERENERGY_TileGap2")},
270 {xAOD::CaloCluster::CaloSample::TileGap3,SG::Accessor<float>("LAYERENERGY_TileGap3")},
271 {xAOD::CaloCluster::CaloSample::TileExt0,SG::Accessor<float>("LAYERENERGY_TileExt0")},
272 {xAOD::CaloCluster::CaloSample::TileExt1,SG::Accessor<float>("LAYERENERGY_TileExt1")},
273 {xAOD::CaloCluster::CaloSample::TileExt2,SG::Accessor<float>("LAYERENERGY_TileExt2")},
274 {xAOD::CaloCluster::CaloSample::FCAL0,SG::Accessor<float>("LAYERENERGY_FCAL0")},
275 {xAOD::CaloCluster::CaloSample::FCAL1,SG::Accessor<float>("LAYERENERGY_FCAL1")},
276 {xAOD::CaloCluster::CaloSample::FCAL2,SG::Accessor<float>("LAYERENERGY_FCAL2")},
277 {xAOD::CaloCluster::CaloSample::MINIFCAL0,SG::Accessor<float>("LAYERENERGY_MINIFCAL0")},
278 {xAOD::CaloCluster::CaloSample::MINIFCAL1,SG::Accessor<float>("LAYERENERGY_MINIFCAL1")},
279 {xAOD::CaloCluster::CaloSample::MINIFCAL2,SG::Accessor<float>("LAYERENERGY_MINIFCAL2")},
280 {xAOD::CaloCluster::CaloSample::MINIFCAL3,SG::Accessor<float>("LAYERENERGY_MINIFCAL3")},
281 }};
282
283 for (const auto & [sampling,attribute]:samplingAttributePairs) {
284 attribute(theFE) = theCluster.eSample(sampling);
285 }
286 }

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