27#include "CaloDetDescr/CaloDetDescrElement.h"
33 m_rMax(rMaxOverStdDev * stdDev),
42 double emX0PerUnitLengthToTheMinus3 =
pow(database.getEmX0PerUnitLength(), -3.0);
43 double hadX0PerUnitLengthToTheMinus3 =
pow(database.getHadX0PerUnitLength(), -3.0);
47 emX0PerUnitLengthToTheMinus3 :
48 hadX0PerUnitLengthToTheMinus3;
55 double nUnitCellsPerWindow =
M_PI * stdDev * stdDev / (database.getEtaUnit() * database.getPhiUnit());
56 std::vector<double> cellEtaWidth = database.getCellEtaWidth();
57 std::vector<double> cellPhiWidth = database.getCellPhiWidth();
60 nUnitCellsPerWindow / (cellEtaWidth[i] * cellPhiWidth[i]);
79 if (
this == &originalEflowLayerIntegrator)
return *
this;
106 if ( fabs(em2Eta) > 2.5 ) em2Eta = 2.49;
110 if ( fabs(em2Eta) > 4.0 ) { em2Eta = 3.99; }
120 std::cerr <<
" eflowLayerIntegrator ERROR: cluster integral sizes do not match" << std::endl;
142 const EventContext& ctx = Gaudi::Hive::currentContext();
184 for (; itCell != itCellEnd; ++itCell) {
195 if (!caloDetDescrElement)
return;
199 if ( caloDetDescrElement->
volume() < 1e-6 )
return;
204 const double extrapTrackEta = trackCalo.
getEta(layer);
205 const double extrapTrackPhi = trackCalo.
getPhi(layer);
211 const double etaWidth = caloDetDescrElement->
deta();
212 const double phiWidth = caloDetDescrElement->
dphi();
214 const double dEta = cell->eta() - extrapTrackEta;
216 const double dr = sqrt(dEta * dEta + dPhi * dPhi);
218 if ( fabs(dr - std::max(etaWidth, phiWidth)) <=
m_rMax || dr <=
m_rMax ) {
220 eflowRange etaRange(dEta - etaWidth/2.0, dEta + etaWidth/2.0);
221 eflowRange phiRange(dPhi - phiWidth/2.0, dPhi+phiWidth/2.0);
232 const double* depthArray =
m_caloModel.getDepthArray();
237 double maxGradient = -10.0;
246 const double dx = depthArray[depthLayer+1] - xPrev;
247 const double dy = convertedDensity - yPrev;
248 xPrev = depthArray[depthLayer+1];
249 yPrev = convertedDensity;
250 const double gradient = dy / dx;
252 if (gradient > maxGradient) {
253 maxGradient = gradient;
constexpr int pow(int base, int exp) noexcept
Data object for each calorimeter readout cell.
const_iterator to loop over cells belonging to a cluster
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
const_iterator end() const
const end method
const_iterator begin() const
const begin method
This class groups all DetDescr information related to a CaloCell.
float dphi() const
cell dphi
CaloCell_ID::CaloSample getSampling() const
cell sampling
float deta() const
cell deta
float volume() const
cell volume
This defines the eflowCalo enum, which is used to label calorimeter layers in a simplified scheme whi...
static LAYER translateSampl(CaloCell_ID::CaloSample sampl)
static const int nRegions
Class that controls the 2D integration.
Stores calorimeter cell eta and phi widths, a X0 per unit length in the EM and HAD calorimeters.
static DEPTHLAYER depthIndex(eflowCaloENUM layer)
static J1STLAYER translateCalo(eflowCaloENUM layer)
std::vector< double > m_allClustersIntegral
void resetAllClustersIntegralForNewTrack(const eflowTrackCaloPoints &trackCalo)
std::unique_ptr< eflowCellIntegrator< 1 > > m_integratorLookup
void measureCluster(eflowTrackClusterLink *trackClusterLink)
eflowLayerIntegrator & operator=(const eflowLayerIntegrator &originalEflowLayerIntegrator)
eflowDepthCalculator m_caloModel
void addToAllClustersIntegral(const std::vector< double > &clusterIntegral)
void measureCell(const CaloCell *cell, const eflowTrackCaloPoints &trackCalo)
void measureNewClus(const xAOD::CaloCluster *clus, const eflowTrackCaloPoints &trackCalo)
eflowLayerIntegrator(double stdDev, double error, double rMaxOverStdDev, bool isHLLHC=false)
double m_densityConversion[eflowCalo::nRegions]
std::vector< double > m_singleClusterIntegral
std::vector< double > m_nUnitCellPerWindowOverCellEtaPhiArea
eflowFirstIntENUM getFirstIntLayer() const
std::unique_ptr< eflowCellIntegrator< 0 > > m_integrator
This class extends the information about a xAOD::CaloCluster.
xAOD::CaloCluster * getCluster()
This class extends the information about a xAOD::Track.
const std::vector< double > & getCaloDepthArray() const
const eflowTrackCaloPoints & getTrackCaloPoints() const
void setCaloDepthArray(const double *depthArray)
This class stores a map of calorimeter layers and track parameters (the result of the track extrapola...
double getFCAL0eta() const
static double defaultEta()
static double defaultPhi()
double getPhi(eflowCalo::LAYER layer) const
double getEta(eflowCalo::LAYER layer) const
bool haveLayer(eflowCalo::LAYER layer) const
Stores pointers to an eflowRecTrack and an eflowRecCluster.
eflowRecTrack * getTrack()
eflowRecCluster * getCluster()
const std::vector< double > & getClusterIntegral() const
static eflowTrackClusterLink * getInstance(eflowRecTrack *track, eflowRecCluster *cluster, const EventContext &ctx=Gaudi::Hive::currentContext())
void setClusterIntegral(const std::vector< double > &clusterIntegral)
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
eflowCalo::LAYER eflowCaloENUM
eflowFirstIntRegions::J1STLAYER eflowFirstIntENUM
eflowDepthCalculator::DEPTHLAYER eflowDepthLayerENUM
eflowRangeBase< double > eflowRange
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.