diff --git a/RecoParticleFlow/PFClusterProducer/src/ECAL2DPositionCalcWithDepthCorr.cc b/RecoParticleFlow/PFClusterProducer/src/ECAL2DPositionCalcWithDepthCorr.cc index 180746ebc3e4f..979913f488515 100644 --- a/RecoParticleFlow/PFClusterProducer/src/ECAL2DPositionCalcWithDepthCorr.cc +++ b/RecoParticleFlow/PFClusterProducer/src/ECAL2DPositionCalcWithDepthCorr.cc @@ -17,12 +17,10 @@ void ECAL2DPositionCalcWithDepthCorr:: update(const edm::EventSetup& es) { - const CaloGeometryRecord& temp = es.get(); - if( _caloGeom == NULL || - ( _caloGeom->cacheIdentifier() != temp.cacheIdentifier() ) ) { - _caloGeom = &temp; + + const CaloGeometryRecord& caloGeom = es.get(); edm::ESHandle geohandle; - _caloGeom->get(geohandle); + caloGeom.get(geohandle); _ebGeom = geohandle->getSubdetectorGeometry(DetId::Ecal,EcalBarrel); _eeGeom = geohandle->getSubdetectorGeometry(DetId::Ecal,EcalEndcap); _esGeom = geohandle->getSubdetectorGeometry(DetId::Ecal,EcalPreshower); @@ -34,7 +32,7 @@ update(const edm::EventSetup& es) { _esPlus = _esPlus || ( 0 < z ) ; _esMinus = _esMinus || ( 0 > z ) ; } - } + } void ECAL2DPositionCalcWithDepthCorr:: diff --git a/RecoParticleFlow/PFClusterProducer/src/ECAL2DPositionCalcWithDepthCorr.h b/RecoParticleFlow/PFClusterProducer/src/ECAL2DPositionCalcWithDepthCorr.h index c34ef0f634892..75de317bdb1b3 100644 --- a/RecoParticleFlow/PFClusterProducer/src/ECAL2DPositionCalcWithDepthCorr.h +++ b/RecoParticleFlow/PFClusterProducer/src/ECAL2DPositionCalcWithDepthCorr.h @@ -24,7 +24,6 @@ class ECAL2DPositionCalcWithDepthCorr : public PFCPositionCalculatorBase { _param_W0(conf.getParameter("W0")), _param_X0(conf.getParameter("X0")), _minAllowedNorm(conf.getParameter("minAllowedNormalization")), - _caloGeom(NULL), _ebGeom(NULL), _eeGeom(NULL), _esGeom(NULL), @@ -54,7 +53,7 @@ class ECAL2DPositionCalcWithDepthCorr : public PFCPositionCalculatorBase { const double _minAllowedNorm; - const CaloGeometryRecord* _caloGeom; + //const CaloGeometryRecord _caloGeom; const CaloSubdetectorGeometry* _ebGeom; const CaloSubdetectorGeometry* _eeGeom; const CaloSubdetectorGeometry* _esGeom;