From d6af157cf0ddaa20091d430bd4c002ab45bbfc4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch> Date: Sat, 25 Jul 2020 20:25:55 +0200 Subject: [PATCH] cleanup of MuonReadoutGeometry MM_Digitization TgcRawDataMonitoring --- .../MuonReadoutGeometry/MuonChannelDesign.h | 10 ++++----- .../MuonReadoutGeometry/sTgcReadoutElement.h | 2 +- .../src/CscReadoutElement.cxx | 6 ++--- .../src/GlobalUtilities.cxx | 4 ++-- .../src/MdtReadoutElement.cxx | 8 +++---- .../src/MuonDetectorManager.cxx | 22 +++++++++---------- .../MuonReadoutGeometry/src/MuonPadDesign.cxx | 2 +- .../MuonReadoutGeometry/src/MuonStation.cxx | 18 +++++++-------- .../MM_StripsResponseSimulation.h | 2 +- .../src/MM_ElectronicsResponseSimulation.cxx | 2 +- .../src/TgcLv1RawDataValAlg.cxx | 12 +++++----- .../src/TgcLv1RawDataValAlg_Functions.cxx | 2 +- .../TgcLv1RawDataValAlg_NumberOfTrigger.cxx | 1 - .../src/TgcLv1RawDataValAlg_ReadContainer.cxx | 2 +- .../src/TgcRawDataMonitorAlgorithm.cxx | 4 ++-- .../src/TgcRawDataValAlg_Efficiency.cxx | 2 +- .../Root/MuonResonancePlots.cxx | 2 +- 17 files changed, 50 insertions(+), 51 deletions(-) diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonChannelDesign.h b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonChannelDesign.h index 8143bce4ca6..a64d221ae21 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonChannelDesign.h +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonChannelDesign.h @@ -140,7 +140,7 @@ namespace MuonGM { //to introduce the correction for the stereo angle in the distance //Patrick Scholer March 18 2020 Amg::Vector2D chLoc( (pos.x()-pos.y()*tan(sAngle))-chPos.x() , pos.y()-chPos.y()); - if ( validMode && fabs(chLoc.x()) > 0.5*channelWidth( pos) ) { + if ( validMode && std::abs(chLoc.x()) > 0.5*channelWidth( pos) ) { MsgStream log(Athena::getMessageSvc(),"MuonChannelDesign"); if (log.level()<=MSG::INFO) log << MSG::INFO << "Problem in identification of the channel: distance to nearest channel, channel width: " << chLoc.x()<< ", " << channelWidth(pos) << " for channel number " << chNum << endmsg; @@ -270,9 +270,9 @@ namespace MuonGM { double locX = 0.; - if (fabs(locY)>0.5*(minYSize-deadS)) { + if (std::abs(locY)>0.5*(minYSize-deadS)) { - locX = 0.5*(xSize-deadO-deadI)*( 1. - (0.5*(maxYSize-deadS) -fabs(locY))/dY )+0.5*(deadI-deadO) ; + locX = 0.5*(xSize-deadO-deadI)*( 1. - (0.5*(maxYSize-deadS) -std::abs(locY))/dY )+0.5*(deadI-deadO) ; } @@ -379,9 +379,9 @@ namespace MuonGM { double gangLength = xSize-deadO-deadI ; - if (fabs(locY)>0.5*minYSize-deadS) { + if (std::abs(locY)>0.5*minYSize-deadS) { - gangLength = (0.5*maxYSize-deadS - fabs(locY))/dY * (xSize-deadI-deadO); + gangLength = (0.5*maxYSize-deadS - std::abs(locY))/dY * (xSize-deadI-deadO); } diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h index c9f42c62e5c..12e869bd182 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h @@ -231,7 +231,7 @@ namespace MuonGM { inline int sTgcReadoutElement::boundaryHash( const Identifier& id ) const { int iphi = manager()->stgcIdHelper()->channelType(id)!=1 ? 1:0 ; // wires and pads have locX oriented along phi - if (abs(getStationEta())<3) iphi += 2*(manager()->stgcIdHelper()->gasGap(id)-1); + if (std::abs(getStationEta())<3) iphi += 2*(manager()->stgcIdHelper()->gasGap(id)-1); return iphi; } diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/CscReadoutElement.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/CscReadoutElement.cxx index df1436262cd..1d59c4e3715 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/CscReadoutElement.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/CscReadoutElement.cxx @@ -359,7 +359,7 @@ double CscReadoutElement::stripLength(int chamberLayer, int measuresPhi, double pos = stripWidth * (stripNumber-0.5-numberOfStrips/2.0); epsilon = lengthCorrection(measuresPhi,pos); - double stripPos = fabs(pos); + double stripPos = std::abs(pos); if (measuresPhi==0) { double effectiveLength = stripWidth * numberOfStrips; @@ -399,8 +399,8 @@ double CscReadoutElement::lengthCorrection(int measuresPhi, double stripPos) con double shortLength = bigLength - (bigWidth-gslWidth)*tan(alpha)/2.; if (measuresPhi == 1) { - if ( fabs(stripPos) > (gslWidth/2.) ) - epsilon = ( fabs(stripPos)-gslWidth/2. ) * tan(alpha); + if ( std::abs(stripPos) > (gslWidth/2.) ) + epsilon = ( std::abs(stripPos)-gslWidth/2. ) * tan(alpha); } else { double z0 = shortLength-bigLength/2; diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/GlobalUtilities.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/GlobalUtilities.cxx index 1bc81f06831..24f3f61ebb0 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/GlobalUtilities.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/GlobalUtilities.cxx @@ -51,7 +51,7 @@ int stationPhiTGC(std::string stName, int fi, int zi_input, std::string geometry std::string stName3 = stName.substr(0,3); int stphi = 0; - int zi = abs(zi_input); + int zi = std::abs(zi_input); fi -= 1; // start from 0 @@ -98,7 +98,7 @@ int stationPhiTGC(std::string stName, int fi, int zi_input, std::string geometry { int nch = 3; if ( (stName).substr(2,1) == "E" ) nch=6; - int fioff = abs(zi); + int fioff = std::abs(zi); if (fioff>3 && (stName).substr(2,1) == "F") fioff = fioff-3; // minumum stPhi at phi 0 if ((stName).substr(2,1) == "F") fioff = fioff -1; diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx index 49671680b31..d618bc5b582 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx @@ -233,7 +233,7 @@ double MdtReadoutElement::distanceFromRO(Amg::Vector3D x, Identifier id) const double scalprod = c_ro.x()*x_ro.x()+c_ro.y()*x_ro.y()+c_ro.z()*x_ro.z(); double wlen = getWireLength(tubelayer, tube); if (wlen > 10.*CLHEP::mm) - scalprod = fabs(2.*scalprod/getWireLength(tubelayer, tube)); + scalprod = std::abs(2.*scalprod/getWireLength(tubelayer, tube)); else { double xx = x.x(); double xy = x.y(); @@ -1105,11 +1105,11 @@ MdtReadoutElement::posOnDefChamWire( const Amg::Vector3D& locAMDBPos, #endif double s0mdt = s0; // always I think ! - if (fabs(fixedPoint.x())>0.01) s0mdt = s0-fixedPoint.x(); + if (std::abs(fixedPoint.x())>0.01) s0mdt = s0-fixedPoint.x(); double z0mdt = z0; // unless in the D section of this station there's a dy diff. from 0 for the innermost MDT multilayer (sometimes in the barrel) - if (fabs(fixedPoint.y())>0.01) z0mdt = z0-fixedPoint.y(); + if (std::abs(fixedPoint.y())>0.01) z0mdt = z0-fixedPoint.y(); double t0mdt = t0; // unless in the D section of this station there's a dz diff. from 0 for the innermost MDT multilayer (often in barrel) - if (fabs(fixedPoint.z())>0.01) t0mdt = t0-fixedPoint.z(); + if (std::abs(fixedPoint.z())>0.01) t0mdt = t0-fixedPoint.z(); if (z0mdt<0 || t0mdt<0) { #ifndef TESTBLINES MsgStream log(Athena::getMessageSvc(),"MdtReadoutElement"); diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx index ece408a00bd..3a0d5ddde3b 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx @@ -369,11 +369,11 @@ MuonDetectorManager::muonStationKey(std::string stName, int statEtaIndex, int st std::string key; if (statEtaIndex<0) key = stName.substr(0,3) - +"_C_zi"+MuonGM::buildString(abs(statEtaIndex),2) + +"_C_zi"+MuonGM::buildString(std::abs(statEtaIndex),2) +"fi"+MuonGM::buildString(statPhiIndex,2); else key = stName.substr(0,3) - +"_A_zi"+MuonGM::buildString(abs(statEtaIndex),2) + +"_A_zi"+MuonGM::buildString(std::abs(statEtaIndex),2) +"fi"+MuonGM::buildString(statPhiIndex,2); return key; } @@ -443,18 +443,18 @@ void MuonDetectorManager::addRpcReadoutElement (RpcReadoutElement* x, Identifier // to be addressed with a dbz_index=dbZ+1 if (m_rpcIdHelper->stationNameString(m_rpcIdHelper->stationName(id)) == "BMS") { - if (abs(m_rpcIdHelper->stationEta(id)) == 2 && + if (std::abs(m_rpcIdHelper->stationEta(id)) == 2 && m_rpcIdHelper->doubletZ(id) == 3) { if (doubletPhi == 2) dbz_index++; } - else if (abs(m_rpcIdHelper->stationEta(id)) == 4 && + else if (std::abs(m_rpcIdHelper->stationEta(id)) == 4 && m_rpcIdHelper->doubletR(id) == 2 && m_rpcIdHelper->doubletZ(id) == 3) { if (doubletPhi == 2) dbz_index++; } - else if (abs(m_rpcIdHelper->stationEta(id)) == 4 && + else if (std::abs(m_rpcIdHelper->stationEta(id)) == 4 && m_rpcIdHelper->doubletR(id) == 1 && m_rpcIdHelper->doubletZ(id) == 2) { @@ -526,18 +526,18 @@ const RpcReadoutElement* MuonDetectorManager::getRpcReadoutElement (const Identi // to be addressed with a dbz_index=dbZ+1 if (m_rpcIdHelper->stationNameString(m_rpcIdHelper->stationName(id)) == "BMS") { - if (abs(m_rpcIdHelper->stationEta(id)) == 2 && + if (std::abs(m_rpcIdHelper->stationEta(id)) == 2 && m_rpcIdHelper->doubletZ(id) == 3) { if (doubletPhi == 2) dbz_index++; } - else if (abs(m_rpcIdHelper->stationEta(id)) == 4 && + else if (std::abs(m_rpcIdHelper->stationEta(id)) == 4 && m_rpcIdHelper->doubletR(id) == 2 && m_rpcIdHelper->doubletZ(id) == 3) { if (doubletPhi == 2) dbz_index++; } - else if (abs(m_rpcIdHelper->stationEta(id)) == 4 && + else if (std::abs(m_rpcIdHelper->stationEta(id)) == 4 && m_rpcIdHelper->doubletR(id) == 1 && m_rpcIdHelper->doubletZ(id) == 2) { @@ -1026,7 +1026,7 @@ const RpcReadoutElement* MuonDetectorManager::getRpcRElement_fromIdFields(int i1 int dbr = i4; int dbz = i5; - int absEta = abs(i2); + int absEta = std::abs(i2); // BMS 5/ |stEta|= 2 / dbR = 1 and 2 / dbZ = 3 @@ -1184,7 +1184,7 @@ MuonDetectorManager::initABlineContainers() id = m_cscIdHelper->elementID(stType, jzz, jff); if (log.level()<=MSG::DEBUG) log<<MSG::DEBUG<<"Filling A-line container with entry for key = "<<m_cscIdHelper->show_to_string(id)<<endmsg; } - else if (m_rpcIdHelper && stType.substr(0,3)=="BML" && abs(jzz)==7) + else if (m_rpcIdHelper && stType.substr(0,3)=="BML" && std::abs(jzz)==7) { // RPC case id = m_rpcIdHelper->elementID(stType, jzz, jff, 1); @@ -1464,7 +1464,7 @@ MuonDetectorManager::updateDeformations(const BLineMapContainer& blineData) <<BLine.en()<<")"<<endmsg; } BLine.getAmdbId(stType, jff, jzz, job); - if (stType.substr(0,1)=="T" || stType.substr(0,1)=="C" || (stType.substr(0,3)=="BML" && abs(jzz)==7) ) { + if (stType.substr(0,1)=="T" || stType.substr(0,1)=="C" || (stType.substr(0,3)=="BML" && std::abs(jzz)==7) ) { if (log.level()<=MSG::DEBUG) log<<MSG::DEBUG <<"BLinePar with AmdbId " <<stType<<" "<<jzz<<" "<<jff<<" "<<job diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonPadDesign.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonPadDesign.cxx index 3f2674987c5..dbd0527b041 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonPadDesign.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonPadDesign.cxx @@ -14,7 +14,7 @@ bool MuonPadDesign::withinSensitiveArea(const Amg::Vector2D& pos) const double bot_H2 = minSensitiveY(); double max_x = maxAbsSensitiveX(pos.y()); bool y_in_range = (pos.y() <= top_H1 and pos.y() >= bot_H2); - bool x_in_range = fabs(pos.x()) <= max_x+0.01; + bool x_in_range = std::abs(pos.x()) <= max_x+0.01; return y_in_range and x_in_range; } //---------------------------------------------------------- diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonStation.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonStation.cxx index 58d1431c8e0..c35a4cfe3a7 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonStation.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonStation.cxx @@ -76,7 +76,7 @@ void MuonStation::setNominalAmdbLRSToGlobal(HepGeom::Transform3D xf) void MuonStation::setBlineFixedPointInAmdbLRS(double s0, double z0, double t0) { #ifndef NDEBUG - if ((std::fabs(s0)+std::fabs(z0)+std::fabs(t0))>0.01) { + if ((std::abs(s0)+std::abs(z0)+std::abs(t0))>0.01) { MsgStream log(Athena::getMessageSvc(),"MuonStation"); if (log.level()<=MSG::DEBUG) log << MSG::DEBUG << "Station "<<getStationType() <<" at zi/fi "<<getEtaIndex()<<"/"<<getPhiIndex() @@ -125,7 +125,7 @@ void MuonStation::updateBlineFixedPointInAmdbLRS() // Correct for tube staggering on barrel side C double shiftInZ = -0.5 * mdtRE->tubePitch(); - // in addition, correct for 35µm glue width incorrectly applied + // in addition, correct for 35microm glue width incorrectly applied double multilayerRealSize = 0; for (int ilayer=1; ilayer<=2; ++ilayer) { double val; @@ -225,7 +225,7 @@ MuonStation::setDelta_fromAline(double tras, double traz, double trat, m_rott = rott; HepGeom::Transform3D delta_amdb = HepGeom::Transform3D::Identity; - if (std::fabs(tras)+std::fabs(traz)+std::fabs(trat)+(std::fabs(rots)+std::fabs(rotz)+std::fabs(rott))*1000. > 0.01) + if (std::abs(tras)+std::abs(traz)+std::abs(trat)+(std::abs(rots)+std::abs(rotz)+std::abs(rott))*1000. > 0.01) { // compute the delta transform in the local AMDB frame delta_amdb = HepGeom::TranslateX3D(tras)*HepGeom::TranslateY3D(traz)* @@ -337,7 +337,7 @@ MuonStation::setDelta_fromAline_forComp(int jobindex, <<getStationName()<<" at zi/fi = "<<getEtaIndex()<<"/"<<getPhiIndex()<<endmsg; return; } - if (std::fabs(tras)+std::fabs(traz)+std::fabs(trat)+(std::fabs(rots)+std::fabs(rotz)+std::fabs(rott))*1000. < 0.01) + if (std::abs(tras)+std::abs(traz)+std::abs(trat)+(std::abs(rots)+std::abs(rotz)+std::abs(rott))*1000. < 0.01) { if (log.level()<=MSG::DEBUG) log<<MSG::DEBUG <<"setDelta_fromAline_forComp: A-line ignored --- too small (translations < 10microns & rotations <10microrad)"<<endmsg; return; @@ -353,7 +353,7 @@ MuonStation::setDelta_fromAline_forComp(int jobindex, //HepGeom::Point3D<double> thisREcenter = getMuonReadoutElement(jobindex)->center(); HepGeom::Point3D<double> thisREnominalCenter=(HepGeom::Transform3D(Amg::EigenTransformToCLHEP(getMuonReadoutElement(jobindex)->defTransform())))*HepGeom::Point3D<double>(0.,0.,0.); double Rcomp = thisREnominalCenter.perp()-(getMuonReadoutElement(jobindex)->getRsize())/2.; - double DZcomp = std::fabs(thisREnominalCenter.z())-std::fabs(((*m_amdbl_to_global)*HepGeom::Point3D<double>(0.,0.,0)).z())-std::fabs((getMuonReadoutElement(jobindex)->getZsize())/2.); + double DZcomp = std::abs(thisREnominalCenter.z())-std::abs(((*m_amdbl_to_global)*HepGeom::Point3D<double>(0.,0.,0)).z())-std::abs((getMuonReadoutElement(jobindex)->getZsize())/2.); HepGeom::Transform3D childToLocAmdbComponent; HepGeom::Transform3D childToLocAmdbStation = HepGeom::Transform3D(*m_native_to_amdbl)*parentToChildT; @@ -567,8 +567,8 @@ double MuonStation::RsizeMdtStation() const } else { - if (barrel()) Rsize += std::fabs(Rpos.x()-RposFirst.x()); - else Rsize += std::fabs(Rpos.y()-RposFirst.y()); + if (barrel()) Rsize += std::abs(Rpos.x()-RposFirst.x()); + else Rsize += std::abs(Rpos.y()-RposFirst.y()); } } } @@ -609,8 +609,8 @@ double MuonStation::ZsizeMdtStation() const } else { - if (barrel()) Zsize += std::fabs(Zpos.z()-ZposFirst.z()); - else Zsize += std::fabs(Zpos.x()-ZposFirst.x()); + if (barrel()) Zsize += std::abs(Zpos.z()-ZposFirst.z()); + else Zsize += std::abs(Zpos.x()-ZposFirst.x()); } } } diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripsResponseSimulation.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripsResponseSimulation.h index 2163d38de5d..b879888dabe 100644 --- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripsResponseSimulation.h +++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripsResponseSimulation.h @@ -112,7 +112,7 @@ private: float m_qThreshold; - /** // 0.350/10 diffusSigma=transverse diffusion (350 μm per 1cm ) for 93:7 @ 600 V/cm, according to garfield */ + /** // 0.350/10 diffusSigma=transverse diffusion (350 microm per 1cm ) for 93:7 @ 600 V/cm, according to garfield */ float m_transverseDiffusionSigma; float m_longitudinalDiffusionSigma; float m_pitch; diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_ElectronicsResponseSimulation.cxx b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_ElectronicsResponseSimulation.cxx index c3ba21bcae3..72509ec96b4 100644 --- a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_ElectronicsResponseSimulation.cxx +++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_ElectronicsResponseSimulation.cxx @@ -20,7 +20,7 @@ std::vector<float> shaperInputCharge; double shaperResponseFunction(double *x, double *par){ double response=0; for(size_t i=0; i<shaperInputTime.size(); i++){ - double amp = (x[0]>shaperInputTime[i])? shaperInputCharge[i]*pow((x[0]-shaperInputTime[i])/par[1],par[0])*exp(-(x[0]-shaperInputTime[i])/par[1]) :0; + double amp = (x[0]>shaperInputTime[i])? shaperInputCharge[i]*std::pow((x[0]-shaperInputTime[i])/par[1],par[0])*std::exp(-(x[0]-shaperInputTime[i])/par[1]) :0; response += amp; } return response; diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg.cxx index e6f380d37f9..d46df0c7ba3 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg.cxx @@ -408,9 +408,9 @@ TgcLv1RawDataValAlg::procHistograms(){ // Get Fractions and Errors fp=fc=fn=efp=efc=efn=0; if( tot != 0 ){ - fp= p/tot; efp = sqrt( fp*(1.-fp)/tot ); - fc= c/tot; efc = sqrt( fc*(1.-fc)/tot ); - fn= n/tot; efn = sqrt( fn*(1.-fn)/tot ); + fp= p/tot; efp = std::sqrt( fp*(1.-fp)/tot ); + fc= c/tot; efc = std::sqrt( fc*(1.-fc)/tot ); + fn= n/tot; efn = std::sqrt( fn*(1.-fn)/tot ); } // Fill Fractions into map m_tgclv1slcurrentfractionmap[ac]->SetBinContent(etabinp +1, phi48, fp); @@ -431,9 +431,9 @@ TgcLv1RawDataValAlg::procHistograms(){ // Get Fractions and Errors fp=fc=fn=efp=efc=efn=0; if( tot != 0 ){ - fp= p/tot; efp = sqrt( fp*(1.-fp)/tot ); - fc= c/tot; efc = sqrt( fc*(1.-fc)/tot ); - fn= n/tot; efn = sqrt( fn*(1.-fn)/tot ); + fp= p/tot; efp = std::sqrt( fp*(1.-fp)/tot ); + fc= c/tot; efc = std::sqrt( fc*(1.-fc)/tot ); + fn= n/tot; efn = std::sqrt( fn*(1.-fn)/tot ); } // Fill Fractions into map m_tgclv1lptcurrentfractionmap[ac]->SetBinContent(etabinp +1, phi48, fp); diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_Functions.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_Functions.cxx index 2338f61f3ad..2a37e9f7d74 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_Functions.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_Functions.cxx @@ -134,7 +134,7 @@ TgcLv1RawDataValAlg::deltaR(float eta1, float phi1, float eta2, float phi2){ float deta = eta1 - eta2; float dphi = acos(cos(phi1-phi2)); - return sqrt( deta*deta + dphi*dphi ); + return std::sqrt( deta*deta + dphi*dphi ); } /////////////////////////////////////////////////////////////////////////// diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_NumberOfTrigger.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_NumberOfTrigger.cxx index 2fac5209b64..ab55ab72adf 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_NumberOfTrigger.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_NumberOfTrigger.cxx @@ -684,7 +684,6 @@ TgcLv1RawDataValAlg::fillNumberOfTrigger(){ if(pcn==CURR){ if(t_isInner){ if(ws==0){ - //std::cout<<"bEIFI "<<b_EI0<<"/"<<b_FI0<<"/"<<b_EI1<<"/"<<b_FI1<<"/"<<b_EI2<<"/"<<b_FI2<<std::endl; if (b_EI0 == 1)m_tgclv1hptstripinlbvssecteifilumi[ac]->Fill(m_lumiblock,0); if (b_FI0 == 1)m_tgclv1hptstripinlbvssecteifilumi[ac]->Fill(m_lumiblock,1); if (b_EI1 == 1)m_tgclv1hptstripinlbvssecteifilumi[ac]->Fill(m_lumiblock,2); diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_ReadContainer.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_ReadContainer.cxx index df96df67e29..bfa97d2651d 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_ReadContainer.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_ReadContainer.cxx @@ -329,7 +329,7 @@ TgcLv1RawDataValAlg::readOfflineMuonContainer(std::vector<float>* mu_pt, std::ve float deta = std::abs(mu_eta->at(itr) - eta); float dphi = std::abs(mu_phi->at(itr) - phi); if(dphi > M_PI) dphi = 2*M_PI - dphi; - if(sqrt(deta*deta + dphi*dphi) < 0.1){ + if(std::sqrt(deta*deta + dphi*dphi) < 0.1){ if(pt > mu_pt->at(itr)){ std::vector<float>::iterator ipt; ipt = mu_pt->begin(); diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx index 3627fdd0649..2d0e7fbbfc1 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx @@ -559,9 +559,9 @@ TgcRawDataMonitorAlgorithm::getError(const std::vector<double>& inputVec) const } const double mean = sum/nSize; for(int jj = 0; jj < nSize; jj++){ - sum2 = sum2 + pow((inputVec.at(jj)-mean),2); + sum2 = sum2 + std::pow((inputVec.at(jj)-mean),2); } - const double stdDev = sqrt(sum2/nSize); + const double stdDev = std::sqrt(sum2/nSize); return stdDev; } diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_Efficiency.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_Efficiency.cxx index 13fe8a63402..1b75ab83956 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_Efficiency.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_Efficiency.cxx @@ -444,7 +444,7 @@ TgcRawDataValAlg::fillEfficiency(){ // channel number +offset for wires and strips in each layer int chIds[2][9] = {{-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,}, {-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,}};//[ws][layer] - // Eta and Phi positions of channels (layer2 has no strips) + // Eta and Phi positions of channels (layer2 has no strips) double chEtas[2][9] = {{-99,-99,-99,-99,-99,-99,-99,-99,-99,}, {-99, -1,-99,-99,-99,-99,-99,-99,-99,}};//[ws][layer] double chPhis[2][9] = {{-99,-99,-99,-99,-99,-99,-99,-99,-99,}, diff --git a/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/Root/MuonResonancePlots.cxx b/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/Root/MuonResonancePlots.cxx index 1162e63ec1c..65367477477 100644 --- a/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/Root/MuonResonancePlots.cxx +++ b/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/Root/MuonResonancePlots.cxx @@ -344,7 +344,7 @@ float MuonResonancePlots::deltaPt(TLorentzVector v1, TLorentzVector v2){ } -// function to return Chi² / DoF +// function to return Chi^2 / DoF float MuonResonancePlots::getChiSquared(const xAOD::Muon& mu, int type){ const xAOD::TrackParticle *cb_ = mu.trackParticle(xAOD::Muon::CombinedTrackParticle); -- GitLab