diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/src/DataStructs.h b/Trigger/TrigMonitoring/TrigJetMonitoring/src/DataStructs.h index b1e255e3728fcae9f2334519e3987f37f119ff9d..110ecd65b1e1d3e243922545285695a88bb46ccf 100644 --- a/Trigger/TrigMonitoring/TrigJetMonitoring/src/DataStructs.h +++ b/Trigger/TrigMonitoring/TrigJetMonitoring/src/DataStructs.h @@ -9,7 +9,7 @@ class JetData { public: -JetData(float et, float eta, float phi, std::string et_label) : +JetData(float et, float eta, float phi, const std::string& et_label) : m_et{et}, m_eta{eta}, m_phi{phi}, m_et_label{et_label}{} float m_et; diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.cxx index 0c0b1a02d51cd4582b97e2a3478faad2d0c4bd9c..1c6f48559ad0ec8a84b15d9cfaaa6ef7ad7c729a 100644 --- a/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.cxx +++ b/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.cxx @@ -452,23 +452,25 @@ StatusCode TrigMETMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co if ( offline_met_cont.isValid() && offline_met_cont->size() > 0 ) { finalTrkMET = ((*offline_met_cont)["FinalTrk"]); muonsMET = ((*offline_met_cont)["Muons"]); - - offline_Ex = - finalTrkMET->mpx()/Gaudi::Units::GeV; - offline_Ey = - finalTrkMET->mpy()/Gaudi::Units::GeV; - offline_sumEt = finalTrkMET->sumet()/Gaudi::Units::GeV; - offline_Et = std::sqrt(offline_Ex*offline_Ex + offline_Ey*offline_Ey); - offline_Et_eff = std::sqrt(offline_Ex*offline_Ex + offline_Ey*offline_Ey); - fill(tool,offline_Ex,offline_Ey,offline_Et,offline_sumEt); - - if(finalTrkMET && muonsMET){ - xAOD::MissingET finalTrkNoMuMET = *finalTrkMET - *muonsMET; - offline_NoMu_Ex = - finalTrkNoMuMET.mpx()/Gaudi::Units::GeV; - offline_NoMu_Ey = - finalTrkNoMuMET.mpy()/Gaudi::Units::GeV; - offline_NoMu_sumEt = finalTrkNoMuMET.sumet()/Gaudi::Units::GeV; - offline_NoMu_Et = std::sqrt(offline_NoMu_Ex*offline_NoMu_Ex + offline_NoMu_Ey*offline_NoMu_Ey); - offline_NoMu_Et_eff = std::sqrt(offline_NoMu_Ex*offline_NoMu_Ex + offline_NoMu_Ey*offline_NoMu_Ey); - fill(tool,offline_NoMu_Ex,offline_NoMu_Ey,offline_NoMu_Et,offline_NoMu_sumEt); - } + + if(finalTrkMET) { + offline_Ex = - finalTrkMET->mpx()/Gaudi::Units::GeV; + offline_Ey = - finalTrkMET->mpy()/Gaudi::Units::GeV; + offline_sumEt = finalTrkMET->sumet()/Gaudi::Units::GeV; + offline_Et = std::sqrt(offline_Ex*offline_Ex + offline_Ey*offline_Ey); + offline_Et_eff = std::sqrt(offline_Ex*offline_Ex + offline_Ey*offline_Ey); + fill(tool,offline_Ex,offline_Ey,offline_Et,offline_sumEt); + + if(muonsMET){ + xAOD::MissingET finalTrkNoMuMET = *finalTrkMET - *muonsMET; + offline_NoMu_Ex = - finalTrkNoMuMET.mpx()/Gaudi::Units::GeV; + offline_NoMu_Ey = - finalTrkNoMuMET.mpy()/Gaudi::Units::GeV; + offline_NoMu_sumEt = finalTrkNoMuMET.sumet()/Gaudi::Units::GeV; + offline_NoMu_Et = std::sqrt(offline_NoMu_Ex*offline_NoMu_Ex + offline_NoMu_Ey*offline_NoMu_Ey); + offline_NoMu_Et_eff = std::sqrt(offline_NoMu_Ex*offline_NoMu_Ex + offline_NoMu_Ey*offline_NoMu_Ey); + fill(tool,offline_NoMu_Ex,offline_NoMu_Ey,offline_NoMu_Et,offline_NoMu_sumEt); + } + } } // access L1 MET values diff --git a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMinBiasTrkMonAlg.cxx b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMinBiasTrkMonAlg.cxx index e283a00a2c45f04eb571d521cb64ad83c82f1dd7..b57e4f841a7d434bcfcbdb05ba8579d884fb8546 100644 --- a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMinBiasTrkMonAlg.cxx +++ b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/src/HLTMinBiasTrkMonAlg.cxx @@ -190,7 +190,7 @@ StatusCode HLTMinBiasTrkMonAlg::monitorTrkCounts(const EventContext& context) co int nhits = 0; uint32_t pattern = trk->hitPattern(); for (int bit = 0; bit < 32; bit++) - nhits += (pattern & (1 << bit) ? 1 : 0); + nhits += (pattern & (1u << bit) ? 1 : 0); return nhits; }; auto trkHits = Collection("trkHits", *offlineTrkHandle, getNhits); diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuonMatchingTool.h b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuonMatchingTool.h index 2279d9a908acf23649a3366094f95daec662a798..70384a0f1c314ede7e4521f52d0dc95b2a777078 100644 --- a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuonMatchingTool.h +++ b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuonMatchingTool.h @@ -278,7 +278,7 @@ class MuonMatchingTool : public AthAlgTool { private: enum L1Items{ L1B_MU3V=1, L1B_MU5VF=2, L1B_MU8F=3, L1B_MU14FCH=6, L1B_MU14FCHR=6 , L1E_MU3V=1, L1E_MU5VF=3, L1E_MU8F=6, L1E_MU14FCH=12, L1E_MU14FCHR=12, ERROR}; - int L1ItemStringToInt(std::string l1item, int roiSource) const { + int L1ItemStringToInt(const std::string& l1item, int roiSource) const { if( "L1_MU3V"==l1item) return roiSource==0 ? L1Items::L1B_MU3V : L1Items::L1E_MU3V; if( "L1_MU5VF"==l1item) return roiSource==0 ? L1Items::L1B_MU5VF : L1Items::L1E_MU5VF; if( "L1_MU8F"==l1item) return roiSource==0 ? L1Items::L1B_MU8F : L1Items::L1E_MU8F; @@ -321,7 +321,7 @@ class MuonMatchingTool : public AthAlgTool { */ template<class T, class OFFL> const TrigCompositeUtils::LinkInfo<DataVector<T> > matchLinkInfo(const OFFL *offl, std::string trigger, float reqdR, bool &pass, - const std::string containerSGKey = "", + const std::string& containerSGKey = "", std::tuple<bool,double,double> (*trigPosForMatchFunc)(const T*) = &MuonMatchingTool::trigPosForMatch<T>) const; /** @@ -337,7 +337,7 @@ class MuonMatchingTool : public AthAlgTool { * @todo Consider improving the argument list. */ template<class T, class OFFL> const T* match(const OFFL *offl, std::string trigger, float reqdR, bool &pass, - const std::string containerSGKey = "", + const std::string& containerSGKey = "", std::tuple<bool,double,double> (*trigPosForMatchFunc)(const T*) = &MuonMatchingTool::trigPosForMatch<T>) const; /** diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuonMatchingTool.icc b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuonMatchingTool.icc index 581deda15fde0b39885bf24bd19f8cbc77af5c32..3cf355fe3787d5a46d5454008cd7368fc4f6ed12 100644 --- a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuonMatchingTool.icc +++ b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuonMatchingTool.icc @@ -49,7 +49,7 @@ const T* MuonMatchingTool :: matchReadHandle(const OFFL* offl, float reqdR, template<class T, class OFFL> const T* MuonMatchingTool :: match(const OFFL* offl, std::string trig, float reqdR, bool &pass, - const std::string containerSGKey, + const std::string& containerSGKey, std::tuple<bool,double,double> (*trigPosForMatchFunc)(const T*)) const { ATH_MSG_DEBUG("MuonMonitoring::match<T>"); @@ -70,7 +70,7 @@ const T* MuonMatchingTool :: match(const OFFL* offl, std::string trig, float req template<class T, class OFFL> const TrigCompositeUtils::LinkInfo<DataVector<T> > MuonMatchingTool :: matchLinkInfo(const OFFL* offl, std::string trig, float reqdR, bool &pass, - const std::string containerSGKey, + const std::string& containerSGKey, std::tuple<bool,double,double> (*trigPosForMatchFunc)(const T*)) const { ATH_MSG_DEBUG("MuonMonitoring::matchLinkInfo<T>"); diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoni.cxx b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoni.cxx index 286569d7c5398433781768534ab2f89020416dad..8154d879471ec595106394aee6b767829b82abb4 100644 --- a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoni.cxx +++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoni.cxx @@ -96,7 +96,7 @@ StatusCode TrigSignatureMoni::start() { if ( x > 0 ){ std::string outputRateName ("Rate" + std::to_string(m_duration) + "s"); m_rateHistogram.init(outputRateName, "Rate of positive decisions;chain;step", - x, yr, m_bookingPath + "/" + name() + '/' + outputRateName.c_str(), m_histSvc).ignore(); + x, yr, m_bookingPath + "/" + name() + '/' + outputRateName, m_histSvc).ignore(); ATH_CHECK(initHist(m_rateHistogram.getHistogram(), hltMenuHandle, false)); ATH_CHECK(initHist(m_rateHistogram.getBuffer(), hltMenuHandle, false)); } @@ -112,7 +112,7 @@ StatusCode TrigSignatureMoni::start() { if (xc > 0){ std::string outputSequenceName ("SequencesExecutionRate" + std::to_string(m_duration) + "s"); m_sequenceHistogram.init(outputSequenceName, "Rate of sequences execution;sequence;rate", - xc, yc, m_bookingPath + "/" + name() + '/' + outputSequenceName.c_str(), m_histSvc).ignore(); + xc, yc, m_bookingPath + "/" + name() + '/' + outputSequenceName, m_histSvc).ignore(); ATH_CHECK(initSeqHist(m_sequenceHistogram.getHistogram(), sequencesSet)); ATH_CHECK(initSeqHist(m_sequenceHistogram.getBuffer(), sequencesSet)); } diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoni.h b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoni.h index 5bda1771bc28ac185c33c3f0d07889059779a2e9..18b8b5208db5e2eb3871ee5b3626fc9d86e554ec 100644 --- a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoni.h +++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoni.h @@ -49,6 +49,7 @@ class TrigSignatureMoni : public extends<AthReentrantAlgorithm, IIncidentListene // Class representing asynchronously published histograms class RateHistogram { public: + RateHistogram() = default; ~RateHistogram(); // Initialize rate histogram and create buffer diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h index a2d6a685814ff31b1b3b88e444553cc58f56e5f7..30f91efc86b6c7f8f7314ba848d3476f7e5f3b89 100644 --- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h +++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h @@ -81,7 +81,7 @@ class TrigTauMonitorAlgorithm : public AthMonitorAlgorithm { return sqrt(deta*deta + dphi*dphi); }; - inline bool HLTMatching(const xAOD::TauJet* offline_tau, std::vector<const xAOD::TauJet*> online_tau_vec, float threshold) const + inline bool HLTMatching(const xAOD::TauJet* offline_tau, const std::vector<const xAOD::TauJet*>& online_tau_vec, float threshold) const { for(auto online_tau: online_tau_vec){ float deltaR = dR(offline_tau->eta(),offline_tau->phi(), online_tau->eta(),online_tau->phi()); @@ -103,7 +103,7 @@ class TrigTauMonitorAlgorithm : public AthMonitorAlgorithm { return false; }; - inline bool HLTTruthMatching(const xAOD::TruthParticle* true_taus, const std::vector<const xAOD::TauJet*> online_tau_vec, float threshold) const + inline bool HLTTruthMatching(const xAOD::TruthParticle* true_taus, const std::vector<const xAOD::TauJet*>& online_tau_vec, float threshold) const { for(auto online_tau: online_tau_vec){ float deltaR = dR(true_taus->eta(),true_taus->phi(), online_tau->eta(),online_tau->phi());