From 2cfb1c1ee3cc51806689de955a00ef15da0de10a Mon Sep 17 00:00:00 2001 From: Ianna Osborne Date: Tue, 22 Aug 2017 10:25:24 +0200 Subject: [PATCH] Apply patch from the code checks --- Geometry/EcalAlgo/src/EcalBarrelGeometry.cc | 4 ++-- Geometry/EcalAlgo/src/EcalEndcapGeometry.cc | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Geometry/EcalAlgo/src/EcalBarrelGeometry.cc b/Geometry/EcalAlgo/src/EcalBarrelGeometry.cc index 6928a452fa4a0..2ef8fbf0ccd77 100644 --- a/Geometry/EcalAlgo/src/EcalBarrelGeometry.cc +++ b/Geometry/EcalAlgo/src/EcalBarrelGeometry.cc @@ -481,7 +481,7 @@ EcalBarrelGeometry::avgRadiusXYFrontFaceCenter() const for( uint32_t i ( 0 ) ; i != m_cellVec.size() ; ++i ) { const CaloCellGeometry* cell ( cellGeomPtr(i) ) ; - if( 0 != cell ) + if( nullptr != cell ) { const GlobalPoint& pos ( cell->getPosition() ) ; sum += pos.perp() ; @@ -498,5 +498,5 @@ EcalBarrelGeometry::cellGeomPtr( uint32_t index ) const { const CaloCellGeometry* cell ( &m_cellVec[ index ] ) ; return ( m_cellVec.size() < index || - 0 == cell->param() ? 0 : cell ) ; + nullptr == cell->param() ? nullptr : cell ) ; } diff --git a/Geometry/EcalAlgo/src/EcalEndcapGeometry.cc b/Geometry/EcalAlgo/src/EcalEndcapGeometry.cc index 180a9a73e03dd..4cb920c5c5208 100644 --- a/Geometry/EcalAlgo/src/EcalEndcapGeometry.cc +++ b/Geometry/EcalAlgo/src/EcalEndcapGeometry.cc @@ -88,7 +88,7 @@ EcalEndcapGeometry::initializeParms() for( uint32_t i ( 0 ) ; i != m_cellVec.size() ; ++i ) { const CaloCellGeometry* cell ( cellGeomPtr(i) ) ; - if( 0 != cell ) + if( nullptr != cell ) { const CCGFloat z ( cell->getPosition().z() ) ; if(z>0.) @@ -122,9 +122,9 @@ EcalEndcapGeometry::initializeParms() for( uint32_t i ( 0 ) ; i != m_cellVec.size() ; ++i ) { const CaloCellGeometry* cell ( cellGeomPtr(i) ) ; - if( 0 != cell ) + if( nullptr != cell ) { - const GlobalPoint p ( cell->getPosition() ) ; + const GlobalPoint& p ( cell->getPosition() ) ; const CCGFloat z ( p.z() ) ; const CCGFloat zz ( 0 > z ? zeN : zeP ) ; const CCGFloat x ( p.x()*zz/z ) ; @@ -264,7 +264,7 @@ EcalEndcapGeometry::getClosestCell( const GlobalPoint& r ) const // compute the distance of the point with respect of the 4 crystal lateral planes - if( 0 != getGeometry(mycellID) ) + if( nullptr != getGeometry(mycellID) ) { const GlobalPoint& myPosition=getGeometry(mycellID)->getPosition(); @@ -432,7 +432,7 @@ EcalEndcapGeometry::getClosestBarrelCells( EEDetId id ) const OrderedListOfEBDetId* ptr ( nullptr ) ; auto ptrVec = m_borderPtrVec.load(std::memory_order_acquire); if(!ptrVec) { - if(0 != id.rawId() && 0 != getGeometry(id)) { + if(0 != id.rawId() && nullptr != getGeometry(id)) { const float phi(370.+getGeometry(id)->getPosition().phi().degrees()); const int iPhi(1+int(phi)%360) ; const int iz(id.zside()) ; @@ -505,7 +505,7 @@ EcalEndcapGeometry::avgAbsZFrontFaceCenter() const for( unsigned int i ( 0 ) ; i != m_cellVec.size() ; ++i ) { const CaloCellGeometry* cell ( cellGeomPtr(i) ) ; - if( 0 != cell ) + if( nullptr != cell ) { sum += fabs( cell->getPosition().z() ) ; } @@ -521,5 +521,5 @@ EcalEndcapGeometry::cellGeomPtr( uint32_t index ) const { const CaloCellGeometry* cell ( &m_cellVec[ index ] ) ; return ( m_cellVec.size() < index || - 0 == cell->param() ? 0 : cell ) ; + nullptr == cell->param() ? nullptr : cell ) ; }