ATLAS Offline Software
Functions
xAOD::xAODInDetMeasurement::Utilities Namespace Reference

Functions

float computeTotalCharge (const SG::AuxElement &cluster)
 
float computeTotalCharge (const std::vector< float > &charges)
 
int computeTotalToT (const SG::AuxElement &cluster)
 
int computeTotalToT (const std::vector< int > &tots)
 

Function Documentation

◆ computeTotalCharge() [1/2]

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

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

9  {
10  static const SG::AuxElement::Accessor<std::vector<float> > chargesAcc("chargeList");
11  assert( chargesAcc.isAvailable( cluster ) );
13  }

◆ computeTotalCharge() [2/2]

float xAOD::xAODInDetMeasurement::Utilities::computeTotalCharge ( const std::vector< float > &  charges)

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

15  {
16  float totalCharge = 0.f;
17  for (auto& charge : charges)
18  totalCharge += charge;
19  return totalCharge;
20  }

◆ computeTotalToT() [1/2]

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

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

22  {
23  static const SG::AuxElement::Accessor< std::vector<int> > totsAcc("totList");
24  assert( totsAcc.isAvailable( cluster ) );
26  }

◆ computeTotalToT() [2/2]

int xAOD::xAODInDetMeasurement::Utilities::computeTotalToT ( const std::vector< int > &  tots)

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

28  {
29  int totalToT = 0;
30  for (auto& tot : tots)
31  totalToT += tot;
32  return totalToT;
33  }
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
xAOD::xAODInDetMeasurement::Utilities::computeTotalToT
int computeTotalToT(const SG::AuxElement &cluster)
Definition: Event/xAOD/xAODInDetMeasurement/Root/Utilities.cxx:22
xAOD::xAODInDetMeasurement::Utilities::computeTotalCharge
float computeTotalCharge(const SG::AuxElement &cluster)
Definition: Event/xAOD/xAODInDetMeasurement/Root/Utilities.cxx:9
charge
double charge(const T &p)
Definition: AtlasPID.h:756