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

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

◆ 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 }
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 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 }
@ 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 246 of file FEHelpers.cxx.

246 {
247
248 static const std::array< std::pair<xAOD::CaloCluster::CaloSample, const SG::AuxElement::Accessor<float>>, 28> samplingAttributePairs{{
249 {xAOD::CaloCluster::CaloSample::PreSamplerB,SG::AuxElement::Accessor<float>("LAYERENERGY_PreSamplerB")},
250 {xAOD::CaloCluster::CaloSample::EMB1,SG::AuxElement::Accessor<float>("LAYERENERGY_EMB1")},
251 {xAOD::CaloCluster::CaloSample::EMB2,SG::AuxElement::Accessor<float>("LAYERENERGY_EMB2")},
252 {xAOD::CaloCluster::CaloSample::EMB3,SG::AuxElement::Accessor<float>("LAYERENERGY_EMB3")},
253 {xAOD::CaloCluster::CaloSample::PreSamplerE,SG::AuxElement::Accessor<float>("LAYERENERGY_PreSamplerE")},
254 {xAOD::CaloCluster::CaloSample::EME1,SG::AuxElement::Accessor<float>("LAYERENERGY_EME1")},
255 {xAOD::CaloCluster::CaloSample::EME2,SG::AuxElement::Accessor<float>("LAYERENERGY_EME2")},
256 {xAOD::CaloCluster::CaloSample::EME3,SG::AuxElement::Accessor<float>("LAYERENERGY_EME3")},
257 {xAOD::CaloCluster::CaloSample::HEC0,SG::AuxElement::Accessor<float>("LAYERENERGY_HEC0")},
258 {xAOD::CaloCluster::CaloSample::HEC1,SG::AuxElement::Accessor<float>("LAYERENERGY_HEC1")},
259 {xAOD::CaloCluster::CaloSample::HEC2,SG::AuxElement::Accessor<float>("LAYERENERGY_HEC2")},
260 {xAOD::CaloCluster::CaloSample::HEC3,SG::AuxElement::Accessor<float>("LAYERENERGY_HEC3")},
261 {xAOD::CaloCluster::CaloSample::TileBar0,SG::AuxElement::Accessor<float>("LAYERENERGY_TileBar0")},
262 {xAOD::CaloCluster::CaloSample::TileBar1,SG::AuxElement::Accessor<float>("LAYERENERGY_TileBar1")},
263 {xAOD::CaloCluster::CaloSample::TileBar2,SG::AuxElement::Accessor<float>("LAYERENERGY_TileBar2")},
264 {xAOD::CaloCluster::CaloSample::TileGap1,SG::AuxElement::Accessor<float>("LAYERENERGY_TileGap1")},
265 {xAOD::CaloCluster::CaloSample::TileGap2,SG::AuxElement::Accessor<float>("LAYERENERGY_TileGap2")},
266 {xAOD::CaloCluster::CaloSample::TileGap3,SG::AuxElement::Accessor<float>("LAYERENERGY_TileGap3")},
267 {xAOD::CaloCluster::CaloSample::TileExt0,SG::AuxElement::Accessor<float>("LAYERENERGY_TileExt0")},
268 {xAOD::CaloCluster::CaloSample::TileExt1,SG::AuxElement::Accessor<float>("LAYERENERGY_TileExt1")},
269 {xAOD::CaloCluster::CaloSample::TileExt2,SG::AuxElement::Accessor<float>("LAYERENERGY_TileExt2")},
270 {xAOD::CaloCluster::CaloSample::FCAL0,SG::AuxElement::Accessor<float>("LAYERENERGY_FCAL0")},
271 {xAOD::CaloCluster::CaloSample::FCAL1,SG::AuxElement::Accessor<float>("LAYERENERGY_FCAL1")},
272 {xAOD::CaloCluster::CaloSample::FCAL2,SG::AuxElement::Accessor<float>("LAYERENERGY_FCAL2")},
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: