13 const std::string& name,
14 const IInterface* parent) :
22 return StatusCode::SUCCESS;
26 return StatusCode::SUCCESS;
32 if (!tileActiveCaloCalibrationHitReadHandle.
isValid()){
38 if (!lArActiveCaloCalibrationHitReadHandle.
isValid()){
43 for (
unsigned int trackCounter = 0; trackCounter < thisEFlowCaloObject.
nTracks();trackCounter++){
54 if (!truthLink.
isValid())
continue;
57 const int uniqueID = (*truthLink)->uid();
59 std::map<Identifier,double> identifierToTruthEnergyMap;
61 for (
auto thisCalibHit : *tileActiveCaloCalibrationHitReadHandle) this->
fillMap(identifierToTruthEnergyMap,uniqueID,*thisCalibHit);
62 for (
auto thisCalibHit : *lArActiveCaloCalibrationHitReadHandle) this->
fillMap(identifierToTruthEnergyMap,uniqueID,*thisCalibHit);
66 for (
auto thisCell : *(thisLink->getCluster()->getCluster()->getOwnCellLinks())){
68 if (identifierToTruthEnergyMap.count(thisCell->ID()) == 0)
continue;
69 double truthEnergy = identifierToTruthEnergyMap[thisCell->ID()];
79 unsigned int count = identifierToTruthEnergyMap.count(thisIdentifier);
81 else identifierToTruthEnergyMap[thisIdentifier] += (thisCalibHit.
energyEM() + thisCalibHit.
energyNonEM());
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Class to store calorimeter calibration hit.
double energyNonEM() const
Identifier cellID() const
ElementLink implementation for ROOT usage.
bool isValid() const
Check if the element can be found.
Helper class to provide type-safe access to aux data.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
An internal EDM object which stores information about systems of associated tracks and calorimeter cl...
const eflowRecTrack * efRecTrack(int i) const
This class extends the information about a xAOD::Track.
const std::vector< eflowTrackClusterLink * > & getClusterMatches() const
const xAOD::TrackParticle * getTrack() const
void insertTruthEnergyPair(const CaloCell *cell, double truthEnergy)
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string