From b374509d7b5e1dd63dbe313ab007ef4b77ef6983 Mon Sep 17 00:00:00 2001 From: llunerti Date: Mon, 16 Oct 2023 13:05:23 +0200 Subject: [PATCH 1/3] fixed dimuon invariant mass plots range --- DQMOffline/Muon/src/DiMuonHistograms.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DQMOffline/Muon/src/DiMuonHistograms.cc b/DQMOffline/Muon/src/DiMuonHistograms.cc index 35e1ae21cf9d1..35b834a317564 100644 --- a/DQMOffline/Muon/src/DiMuonHistograms.cc +++ b/DQMOffline/Muon/src/DiMuonHistograms.cc @@ -111,18 +111,18 @@ void DiMuonHistograms::bookHistograms(DQMStore::IBooker& ibooker, TightTightMuon.push_back(ibooker.book1D("TightTightMuon" + EtaName[iEtaRegion], "InvMass_{Tight,Tight}" + EtaName[iEtaRegion], nBin[iEtaRegion], - LowMassMin, - LowMassMax)); + HighMassMin, + HighMassMax)); MediumMediumMuon.push_back(ibooker.book1D("MediumMediumMuon" + EtaName[iEtaRegion], "InvMass_{Medium,Medium}" + EtaName[iEtaRegion], nBin[iEtaRegion], - LowMassMin, - LowMassMax)); + HighMassMin, + HighMassMax)); LooseLooseMuon.push_back(ibooker.book1D("LooseLooseMuon" + EtaName[iEtaRegion], "InvMass_{Loose,Loose}" + EtaName[iEtaRegion], nBin[iEtaRegion], - LowMassMin, - LowMassMax)); + HighMassMin, + HighMassMax)); //Fraction of bad hits in the tracker track to the total TightTightMuonBadFrac.push_back(ibooker.book1D( "TightTightMuonBadFrac" + EtaName[iEtaRegion], "BadFrac_{Tight,Tight}" + EtaName[iEtaRegion], 10, 0, 0.4)); From 2fb45d2c08065535cbc88553253f0a192c9107cc Mon Sep 17 00:00:00 2001 From: llunerti Date: Mon, 11 Dec 2023 10:09:37 +0100 Subject: [PATCH 2/3] variables name fix --- DQMOffline/Muon/interface/DiMuonHistograms.h | 8 +-- DQMOffline/Muon/src/DiMuonHistograms.cc | 60 ++++++++++---------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/DQMOffline/Muon/interface/DiMuonHistograms.h b/DQMOffline/Muon/interface/DiMuonHistograms.h index 94feb93bde699..ae8c762494a17 100644 --- a/DQMOffline/Muon/interface/DiMuonHistograms.h +++ b/DQMOffline/Muon/interface/DiMuonHistograms.h @@ -64,10 +64,10 @@ class DiMuonHistograms : public DQMEDAnalyzer { double etaECMax; //Defining the relevant invariant mass regions - double LowMassMin; - double LowMassMax; - double HighMassMin; - double HighMassMax; + double lowMassMin; + double lowMassMax; + double highMassMin; + double highMassMax; std::vector GlbGlbMuon_LM; std::vector GlbGlbMuon_HM; diff --git a/DQMOffline/Muon/src/DiMuonHistograms.cc b/DQMOffline/Muon/src/DiMuonHistograms.cc index 35b834a317564..f89cacabf8e9e 100644 --- a/DQMOffline/Muon/src/DiMuonHistograms.cc +++ b/DQMOffline/Muon/src/DiMuonHistograms.cc @@ -53,10 +53,10 @@ DiMuonHistograms::DiMuonHistograms(const edm::ParameterSet& pSet) { etaECMin = parameters.getParameter("etaECMin"); etaECMax = parameters.getParameter("etaECMax"); - LowMassMin = parameters.getParameter("LowMassMin"); - LowMassMax = parameters.getParameter("LowMassMax"); - HighMassMin = parameters.getParameter("HighMassMin"); - HighMassMax = parameters.getParameter("HighMassMax"); + lowMassMin = parameters.getParameter("lowMassMin"); + lowMassMax = parameters.getParameter("lowMassMax"); + highMassMin = parameters.getParameter("highMassMin"); + highMassMax = parameters.getParameter("highMassMax"); theFolder = parameters.getParameter("folder"); } @@ -78,51 +78,51 @@ void DiMuonHistograms::bookHistograms(DQMStore::IBooker& ibooker, GlbGlbMuon_LM.push_back(ibooker.book1D("GlbGlbMuon_LM" + EtaName[iEtaRegion], "InvMass_{GLB,GLB}" + EtaName[iEtaRegion], nBin[iEtaRegion], - LowMassMin, - LowMassMax)); + lowMassMin, + lowMassMax)); TrkTrkMuon_LM.push_back(ibooker.book1D("TrkTrkMuon_LM" + EtaName[iEtaRegion], "InvMass_{TRK,TRK}" + EtaName[iEtaRegion], nBin[iEtaRegion], - LowMassMin, - LowMassMax)); + lowMassMin, + lowMassMax)); StaTrkMuon_LM.push_back(ibooker.book1D("StaTrkMuon_LM" + EtaName[iEtaRegion], "InvMass_{STA,TRK}" + EtaName[iEtaRegion], nBin[iEtaRegion], - LowMassMin, - LowMassMax)); + lowMassMin, + lowMassMax)); GlbGlbMuon_HM.push_back(ibooker.book1D("GlbGlbMuon_HM" + EtaName[iEtaRegion], "InvMass_{GLB,GLB}" + EtaName[iEtaRegion], nBin[iEtaRegion], - HighMassMin, - HighMassMax)); + highMassMin, + highMassMax)); TrkTrkMuon_HM.push_back(ibooker.book1D("TrkTrkMuon_HM" + EtaName[iEtaRegion], "InvMass_{TRK,TRK}" + EtaName[iEtaRegion], nBin[iEtaRegion], - HighMassMin, - HighMassMax)); + highMassMin, + highMassMax)); StaTrkMuon_HM.push_back(ibooker.book1D("StaTrkMuon_HM" + EtaName[iEtaRegion], "InvMass_{STA,TRK}" + EtaName[iEtaRegion], nBin[iEtaRegion], - HighMassMin, - HighMassMax)); + highMassMin, + highMassMax)); // arround the Z peak TightTightMuon.push_back(ibooker.book1D("TightTightMuon" + EtaName[iEtaRegion], "InvMass_{Tight,Tight}" + EtaName[iEtaRegion], nBin[iEtaRegion], - HighMassMin, - HighMassMax)); + highMassMin, + highMassMax)); MediumMediumMuon.push_back(ibooker.book1D("MediumMediumMuon" + EtaName[iEtaRegion], "InvMass_{Medium,Medium}" + EtaName[iEtaRegion], nBin[iEtaRegion], - HighMassMin, - HighMassMax)); + highMassMin, + highMassMax)); LooseLooseMuon.push_back(ibooker.book1D("LooseLooseMuon" + EtaName[iEtaRegion], "InvMass_{Loose,Loose}" + EtaName[iEtaRegion], nBin[iEtaRegion], - HighMassMin, - HighMassMax)); + highMassMin, + highMassMax)); //Fraction of bad hits in the tracker track to the total TightTightMuonBadFrac.push_back(ibooker.book1D( "TightTightMuonBadFrac" + EtaName[iEtaRegion], "BadFrac_{Tight,Tight}" + EtaName[iEtaRegion], 10, 0, 0.4)); @@ -222,9 +222,9 @@ void DiMuonHistograms::analyze(const edm::Event& iEvent, const edm::EventSetup& fabs(recoCombinedGlbTrack1->eta()) < EtaCutMax[iEtaRegion] && fabs(recoCombinedGlbTrack2->eta()) > EtaCutMin[iEtaRegion] && fabs(recoCombinedGlbTrack2->eta()) < EtaCutMax[iEtaRegion]) { - if (InvMass < LowMassMax) + if (InvMass < lowMassMax) GlbGlbMuon_LM[iEtaRegion]->Fill(InvMass); - if (InvMass > HighMassMin) + if (InvMass > highMassMin) GlbGlbMuon_HM[iEtaRegion]->Fill(InvMass); } } @@ -300,9 +300,9 @@ void DiMuonHistograms::analyze(const edm::Event& iEvent, const edm::EventSetup& if (fabs(recoStaTrack->eta()) > EtaCutMin[iEtaRegion] && fabs(recoStaTrack->eta()) < EtaCutMax[iEtaRegion] && fabs(recoTrack->eta()) > EtaCutMin[iEtaRegion] && fabs(recoTrack->eta()) < EtaCutMax[iEtaRegion]) { - if (InvMass < LowMassMax) + if (InvMass < lowMassMax) StaTrkMuon_LM[iEtaRegion]->Fill(InvMass); - if (InvMass > HighMassMin) + if (InvMass > highMassMin) StaTrkMuon_HM[iEtaRegion]->Fill(InvMass); } } @@ -322,9 +322,9 @@ void DiMuonHistograms::analyze(const edm::Event& iEvent, const edm::EventSetup& if (fabs(recoStaTrack->eta()) > EtaCutMin[iEtaRegion] && fabs(recoStaTrack->eta()) < EtaCutMax[iEtaRegion] && fabs(recoTrack->eta()) > EtaCutMin[iEtaRegion] && fabs(recoTrack->eta()) < EtaCutMax[iEtaRegion]) { - if (InvMass < LowMassMax) + if (InvMass < lowMassMax) StaTrkMuon_LM[iEtaRegion]->Fill(InvMass); - if (InvMass > HighMassMin) + if (InvMass > highMassMin) StaTrkMuon_HM[iEtaRegion]->Fill(InvMass); } } @@ -345,9 +345,9 @@ void DiMuonHistograms::analyze(const edm::Event& iEvent, const edm::EventSetup& for (unsigned int iEtaRegion = 0; iEtaRegion < 3; iEtaRegion++) { if (fabs(recoTrack1->eta()) > EtaCutMin[iEtaRegion] && fabs(recoTrack1->eta()) < EtaCutMax[iEtaRegion] && fabs(recoTrack2->eta()) > EtaCutMin[iEtaRegion] && fabs(recoTrack2->eta()) < EtaCutMax[iEtaRegion]) { - if (InvMass < LowMassMax) + if (InvMass < lowMassMax) TrkTrkMuon_LM[iEtaRegion]->Fill(InvMass); - if (InvMass > HighMassMin) + if (InvMass > highMassMin) TrkTrkMuon_HM[iEtaRegion]->Fill(InvMass); } } From 6f31d606592675786cf5b9128503e05c59675b04 Mon Sep 17 00:00:00 2001 From: llunerti Date: Mon, 11 Dec 2023 10:15:15 +0100 Subject: [PATCH 3/3] missing fix on cfg file --- .../Muon/python/diMuonHistograms_cfi.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/DQMOffline/Muon/python/diMuonHistograms_cfi.py b/DQMOffline/Muon/python/diMuonHistograms_cfi.py index f0fcb59ddc4d0..70431269e6baf 100644 --- a/DQMOffline/Muon/python/diMuonHistograms_cfi.py +++ b/DQMOffline/Muon/python/diMuonHistograms_cfi.py @@ -17,10 +17,10 @@ etaECMin = cms.double(0.9), etaECMax = cms.double(2.4), - LowMassMin = cms.double(2.0), - LowMassMax = cms.double(12.0), - HighMassMin = cms.double(70.0), - HighMassMax = cms.double(110.0), + lowMassMin = cms.double(2.0), + lowMassMax = cms.double(12.0), + highMassMin = cms.double(70.0), + highMassMax = cms.double(110.0), folder = cms.string("Muons/diMuonHistograms") ) diMuonHistos_miniAOD = DQMEDAnalyzer('DiMuonHistograms', @@ -37,10 +37,10 @@ etaECMin = cms.double(0.9), etaECMax = cms.double(2.4), - LowMassMin = cms.double(2.0), - LowMassMax = cms.double(12.0), - HighMassMin = cms.double(70.0), - HighMassMax = cms.double(110.0), + lowMassMin = cms.double(2.0), + lowMassMax = cms.double(12.0), + highMassMin = cms.double(70.0), + highMassMax = cms.double(110.0), folder = cms.string("Muons_miniAOD/diMuonHistograms") ) @@ -50,8 +50,8 @@ etaBBin = 350, etaEBin = 350, - LowMassMin = 2.0, - LowMassMax = 51.0, - HighMassMin = 55.0, - HighMassMax = 125.0 + lowMassMin = 2.0, + lowMassMax = 51.0, + highMassMin = 55.0, + highMassMax = 125.0 )