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(
const auto& track: matchedTrackList){
30 std::vector<eflowRecCluster*> matchedClusters;
31 const std::vector<eflowTrackClusterLink*>& links = efRecTrack->
getClusterMatches();
32 for (
auto *thisEFlowTrackClusterLink : links) matchedClusters.push_back(thisEFlowTrackClusterLink->getCluster());
34 std::vector<std::pair<xAOD::CaloCluster*, bool> > clusterSubtractionList;
35 clusterSubtractionList.reserve(matchedClusters.size());
36 for (
auto *thisEFlowRecCluster : matchedClusters) clusterSubtractionList.emplace_back(thisEFlowRecCluster->getCluster(),
false);
41 std::vector<int> layerToStoreVector;
42 std::vector<float> radiusToStoreVector;
43 std::vector<float> avgEdensityToStoreVector;
53 double eta_extr = calorimeterCellList.
etaFF(layer);
54 ATH_MSG_DEBUG(
"extrapolated eta ["<<layer<<
"] is "<<eta_extr);
55 double phi_extr = calorimeterCellList.
phiFF(layer);
56 ATH_MSG_DEBUG(
"extrapolated phi ["<<layer<<
"] is "<<phi_extr);
58 if (eta_extr == -999.0){
63 for (
unsigned int indexOfRing = 0; indexOfRing < 100; indexOfRing++){
66 if(beginRing == calorimeterCellList.
end())
break;
68 int totalCellsinRing = 0;
69 double totalEnergyPerRing = 0;
70 double energyDensityPerRing = 0;
71 double averageEnergyDensityPerRing = 0;
74 const std::vector<std::pair<const CaloCell*,int> >& tempVector = (*beginRing).second;
77 for (
const auto& thisPair : tempVector){
83 ATH_MSG_DEBUG(
" cell eta and phi are " << (thisPair.first)->eta() <<
" and " << (thisPair.first)->phi() <<
" with index " << thisPair.second <<
" and sampling of " << sampling);
84 ATH_MSG_DEBUG(
" cell energy is " << (thisPair.first)->energy());
86 totalCellsinRing += 1;
88 totalEnergyPerRing += (thisPair.first)->energy();
89 double totalEnergyCell = (thisPair.first)->energy();
93 double cellVolume = DDE->
volume();
96 double energyDensityCell = totalEnergyCell/(cellVolume/1000.);
97 ATH_MSG_DEBUG(
" E density per Cell is " << energyDensityCell);
98 ATH_MSG_DEBUG(
" Initial added E density per Cell is " << energyDensityPerRing);
99 energyDensityPerRing += energyDensityCell;
100 ATH_MSG_DEBUG(
" Final added E density per Cell is " << energyDensityPerRing);
101 averageEnergyDensityPerRing = energyDensityPerRing/((totalCellsinRing)*(efRecTrack->
getTrack()->e()/1000.));
107 ATH_MSG_DEBUG(
" Average E density per Ring is " << averageEnergyDensityPerRing);
110 if (averageEnergyDensityPerRing != 0){
111 avgEdensityToStoreVector.push_back(averageEnergyDensityPerRing);
114 layerToStoreVector.push_back(layerToStore);
115 double radiusToStore = (indexOfRing)*ringThickness;
117 radiusToStoreVector.push_back(radiusToStore);
134 return StatusCode::SUCCESS;
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual double e() const override final
The total energy of the particle.