19 for (
auto thisEflowCaloObject : theEflowCaloObjectContainer){
22 if (thisEflowCaloObject->nClusters() < 1 )
continue;
24 const std::vector<std::pair<eflowTrackClusterLink*,std::pair<float,float> > > matchedTrackList = thisEflowCaloObject->efRecLink();
26 for(
auto track: matchedTrackList){
30 std::vector<eflowRecCluster*> matchedClusters;
31 matchedClusters.clear();
33 for (
auto *thisEFlowTrackClusterLink :
links) matchedClusters.push_back(thisEFlowTrackClusterLink->getCluster());
35 std::vector<std::pair<xAOD::CaloCluster*, bool> > clusterSubtractionList;
36 clusterSubtractionList.reserve(matchedClusters.size());
37 for (
auto *thisEFlowRecCluster : matchedClusters) clusterSubtractionList.emplace_back(thisEFlowRecCluster->getCluster(),
false);
42 std::vector<int> layerToStoreVector;
43 std::vector<float> radiusToStoreVector;
44 std::vector<float> avgEdensityToStoreVector;
54 double eta_extr = calorimeterCellList.
etaFF(
layer);
56 double phi_extr = calorimeterCellList.
phiFF(
layer);
59 if (eta_extr == -999.0){
64 for (
unsigned int indexOfRing = 0; indexOfRing < 100; indexOfRing++){
67 if(beginRing == calorimeterCellList.
end())
break;
69 int totalCellsinRing = 0;
70 double totalEnergyPerRing = 0;
71 double energyDensityPerRing = 0;
72 double averageEnergyDensityPerRing = 0;
75 std::vector<std::pair<const CaloCell*,int> > tempVector = (*beginRing).second;
78 for (
auto thisPair : tempVector){
84 ATH_MSG_DEBUG(
" cell eta and phi are " << (thisPair.first)->eta() <<
" and " << (thisPair.first)->phi() <<
" with index " << thisPair.second <<
" and sampling of " << sampling);
85 ATH_MSG_DEBUG(
" cell energy is " << (thisPair.first)->energy());
87 totalCellsinRing += 1;
89 totalEnergyPerRing += (thisPair.first)->
energy();
90 double totalEnergyCell = (thisPair.first)->
energy();
94 double cellVolume = DDE->
volume();
97 double energyDensityCell = totalEnergyCell/(cellVolume/1000.);
98 ATH_MSG_DEBUG(
" E density per Cell is " << energyDensityCell);
99 ATH_MSG_DEBUG(
" Initial added E density per Cell is " << energyDensityPerRing);
100 energyDensityPerRing += energyDensityCell;
101 ATH_MSG_DEBUG(
" Final added E density per Cell is " << energyDensityPerRing);
102 averageEnergyDensityPerRing = energyDensityPerRing/((totalCellsinRing)*(efRecTrack->
getTrack()->
e()/1000.));
108 ATH_MSG_DEBUG(
" Average E density per Ring is " << averageEnergyDensityPerRing);
111 if (averageEnergyDensityPerRing != 0){
112 avgEdensityToStoreVector.push_back(averageEnergyDensityPerRing);
115 layerToStoreVector.push_back(layerToStore);
116 double radiusToStore = (indexOfRing)*ringThickness;
118 radiusToStoreVector.push_back(radiusToStore);
135 return StatusCode::SUCCESS;