ATLAS Offline Software
Loading...
Searching...
No Matches
xAOD::xAODInDetMeasurement::Utilities Namespace Reference

Classes

class  JaggedVecEltCache

Functions

float computeTotalCharge (const SG::AuxElement &cluster)
int computeTotalToT (const SG::AuxElement &cluster)

Function Documentation

◆ computeTotalCharge()

float xAOD::xAODInDetMeasurement::Utilities::computeTotalCharge ( const SG::AuxElement & cluster)

Definition at line 11 of file Event/xAOD/xAODInDetMeasurement/Root/Utilities.cxx.

11 {
12 static const SG::AuxElement::Accessor<SG::JaggedVecElt<float> > chargesAcc("chargeList");
13 assert( chargesAcc.isAvailable( cluster ) );
14 const std::vector<float>& charges = chargesAcc(cluster);
15 return std::accumulate(charges.begin(), charges.end(), 0.);
16 }

◆ computeTotalToT()

int xAOD::xAODInDetMeasurement::Utilities::computeTotalToT ( const SG::AuxElement & cluster)

Definition at line 18 of file Event/xAOD/xAODInDetMeasurement/Root/Utilities.cxx.

18 {
19 static const SG::AuxElement::Accessor< SG::JaggedVecElt<int> > totsAcc("totList");
20 assert( totsAcc.isAvailable( cluster ) );
21 const std::vector<int>& tots = totsAcc(cluster);
22 return std::accumulate(tots.begin(), tots.end(), 0);
23 }