13 const std::string& name,
14 const IInterface* parent) :
22 return StatusCode::SUCCESS;
26 return StatusCode::SUCCESS;
31 for (
unsigned int trackCounter = 0; trackCounter < thisEFlowCaloObject.
nTracks();trackCounter++){
42 if (!truthLink.
isValid())
continue;
45 const int uniqueID = (*truthLink)->uid();
48 if (!tileActiveCaloCalibrationHitReadHandle.
isValid()){
54 if (!lArActiveCaloCalibrationHitReadHandle.
isValid()){
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);
65 std::vector<eflowRecCluster*> matchedClusters;
66 for (
auto thisLink : thisTrack->
getClusterMatches()) matchedClusters.push_back(thisLink->getCluster());
69 for (
auto thisCell : *(thisLink->getCluster()->getCluster()->getOwnCellLinks())){
71 if (identifierToTruthEnergyMap.count(thisCell->ID()) == 0)
continue;
72 double truthEnergy = identifierToTruthEnergyMap[thisCell->ID()];
82 unsigned int count = identifierToTruthEnergyMap.count(thisIdentifier);
84 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
Test to see if the link can be dereferenced.
SG::Accessor< T, ALLOC > Accessor
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