15 for (
auto thisEflowCaloObject : *
data.caloObjects){
18 if (thisEflowCaloObject->nClusters() < 1 )
continue;
20 const std::vector<std::pair<eflowTrackClusterLink*,std::pair<float,float> > > matchedTrackList = thisEflowCaloObject->efRecLink();
22 for(
auto track: matchedTrackList){
26 std::vector<eflowRecCluster*> matchedClusters;
27 matchedClusters.clear();
29 for (
auto *thisEFlowTrackClusterLink :
links) matchedClusters.push_back(thisEFlowTrackClusterLink->getCluster());
31 std::vector<std::pair<xAOD::CaloCluster*, bool> > clusterSubtractionList;
32 clusterSubtractionList.reserve(matchedClusters.size());
33 for (
auto *thisEFlowRecCluster : matchedClusters) clusterSubtractionList.emplace_back(thisEFlowRecCluster->getCluster(),
false);
38 std::vector<int> layerToStoreVector;
39 std::vector<float> radiusToStoreVector;
40 std::vector<float> avgEdensityToStoreVector;
50 double eta_extr = calorimeterCellList.
etaFF(
layer);
52 double phi_extr = calorimeterCellList.
phiFF(
layer);
55 if (eta_extr == -999.0){
60 for (
unsigned int indexOfRing = 0; indexOfRing < 100; indexOfRing++){
63 if(beginRing == calorimeterCellList.
end())
break;
65 int totalCellsinRing = 0;
66 double totalEnergyPerRing = 0;
67 double energyDensityPerRing = 0;
68 double averageEnergyDensityPerRing = 0;
71 std::vector<std::pair<const CaloCell*,int> > tempVector = (*beginRing).second;
74 for (
auto thisPair : tempVector){
80 ATH_MSG_DEBUG(
" cell eta and phi are " << (thisPair.first)->eta() <<
" and " << (thisPair.first)->phi() <<
" with index " << thisPair.second <<
" and sampling of " << sampling);
81 ATH_MSG_DEBUG(
" cell energy is " << (thisPair.first)->energy());
83 totalCellsinRing += 1;
85 totalEnergyPerRing += (thisPair.first)->
energy();
86 double totalEnergyCell = (thisPair.first)->
energy();
90 double cellVolume = DDE->
volume();
93 double energyDensityCell = totalEnergyCell/(cellVolume/1000.);
94 ATH_MSG_DEBUG(
" E density per Cell is " << energyDensityCell);
95 ATH_MSG_DEBUG(
" Initial added E density per Cell is " << energyDensityPerRing);
96 energyDensityPerRing += energyDensityCell;
97 ATH_MSG_DEBUG(
" Final added E density per Cell is " << energyDensityPerRing);
98 averageEnergyDensityPerRing = energyDensityPerRing/((totalCellsinRing)*(efRecTrack->
getTrack()->
e()/1000.));
104 ATH_MSG_DEBUG(
" Average E density per Ring is " << averageEnergyDensityPerRing);
107 if (averageEnergyDensityPerRing != 0){
108 avgEdensityToStoreVector.push_back(averageEnergyDensityPerRing);
111 layerToStoreVector.push_back(layerToStore);
112 double radiusToStore = (indexOfRing)*ringThickness;
114 radiusToStoreVector.push_back(radiusToStore);