diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx index 90defcc086eee98cf0661acb3847e9c6f68b8cd5..af5fe82fe80f55db6cac9b0d35b2a15238d5920c 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx @@ -169,7 +169,7 @@ StatusCode Muon::ProjectionMMClusterBuilderTool::doFineScan(std::vector<int>& fl } StatusCode Muon::ProjectionMMClusterBuilderTool::doPositionCalculation(std::vector<double>& v_posxc, - const std::vector<double>& v_cor,const std::vector<int> idx_selected, double& xmean, double& xmeanErr,double& qtot,const std::vector<Muon::MMPrepData>& prdsOfLayer)const { + const std::vector<double>& v_cor,const std::vector<int>& idx_selected, double& xmean, double& xmeanErr,double& qtot,const std::vector<Muon::MMPrepData>& prdsOfLayer)const { //determine cluster charge qtot=0; for(const auto& idx:idx_selected) qtot+=prdsOfLayer.at(idx).charge(); diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.h index b46faee9d68ac74c50e517bdea5b2ae323731279..817023efc8d2b9a9e96200832e74cff1bead2e06 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.h @@ -57,7 +57,7 @@ namespace Muon StatusCode calculateCorrection(const std::vector<Muon::MMPrepData> &prdsOfLayer,std::vector<double>& v_posxc,std::vector<double>& v_cor) const ; StatusCode doFineScan(std::vector<int>& flag,const std::vector<double>& v_posxc, const std::vector<double>& v_cor, std::vector<int>& idx_selected) const ; - StatusCode doPositionCalculation(std::vector<double>& v_posxc, const std::vector<double>& v_cor, const std::vector<int> idx_selected,double& xmean, double& xmeanErr, double & qtot,const std::vector<Muon::MMPrepData>& prdsOfLayer) const; + StatusCode doPositionCalculation(std::vector<double>& v_posxc, const std::vector<double>& v_cor, const std::vector<int>& idx_selected,double& xmean, double& xmeanErr, double & qtot,const std::vector<Muon::MMPrepData>& prdsOfLayer) const; StatusCode writeNewPrd(std::vector<std::unique_ptr<Muon::MMPrepData>>& clustersVect,double xmean, double xerr,double qtot,const std::vector<int>& idx_selected,const std::vector<Muon::MMPrepData>& prdsOfLayer) const ; diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx index de315539cee5b52d707990ca8f9c5b519e577c3f..c87d3499a5459a7edbb2b2d1ae06b93140fdd3fd 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx @@ -83,7 +83,7 @@ StatusCode Muon::UTPCMMClusterBuilderTool::getClusters(std::vector<Muon::MMPrepD std::vector<double> stripsLocalPosX; stripsLocalPosX.reserve(MMprdsOfLayer.size()); - for( auto MMprd: MMprdsOfLayer){ + for( const auto& MMprd: MMprdsOfLayer){ Identifier id_prd=MMprd.identify(); int gasGap=m_idHelperSvc->mmIdHelper().gasGap(id_prd); stripsLocalPosX.push_back(((gasGap%2==0 && m_digiHasNegativeAngles) ? -1:1)*MMprd.localPosition().x()); //flip local positions for even gas gaps to reduce hough space to positiv angles diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/STgcClusterization/src/SimpleSTgcClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/STgcClusterization/src/SimpleSTgcClusterBuilderTool.cxx index f9662875fa74f54114c292be13e2f39a5e5c5100..394196382587def505f8b14aca4632dd13b9b690 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/STgcClusterization/src/SimpleSTgcClusterBuilderTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/STgcClusterization/src/SimpleSTgcClusterBuilderTool.cxx @@ -87,7 +87,7 @@ StatusCode Muon::SimpleSTgcClusterBuilderTool::getClusters(std::vector<Muon::sTg double maxCharge = -1.0; double totalCharge = 0.0; - for ( auto it : cluster ) { + for ( const auto& it : cluster ) { rdoList.push_back(it.identify()); elementsCharge.push_back(it.charge()); elementsChannel.push_back(m_idHelperSvc->stgcIdHelper().channel(it.identify())); @@ -119,7 +119,7 @@ StatusCode Muon::SimpleSTgcClusterBuilderTool::getClusters(std::vector<Muon::sTg ATH_MSG_DEBUG("Cluster size: " << cluster.size()); if ( cluster.size() > 1 ) { double weight = 0.0; - for ( auto it : cluster ) { + for ( const auto& it : cluster ) { isStrip ? weight = it.charge() : weight = 1.0; ATH_MSG_DEBUG("isStrip: " << isStrip << " weight: " << weight); //sigmaSq += weight*(it.localPosition().x()-weightedPosX)*(it.localPosition().x()-weightedPosX); @@ -239,7 +239,7 @@ void SimpleSTgcClusterBuilderTool::dumpStrips( std::vector<Muon::sTgcPrepData>& { ATH_MSG_INFO("====> Dumping all strips: "); - for ( auto it : stripsVect ) { + for ( const auto& it : stripsVect ) { Identifier stripId = it.identify(); ATH_MSG_INFO("Strip identifier: " << m_idHelperSvc->stgcIdHelper().show_to_string(stripId) ); }