-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Scouting Offline DQM for 2025 data-taking (EGM+MUO+autoDQM) #47235
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
2289ea5
Setting up DQM infrustructure for scouting (first attempt, MUO example)
elfontan 0168294
Same code, working with release 15_0_0_pre2
7649ec2
[DQM For Scouting Electron] Update to CMSSW_15_0_X
tihsu99 6f8a0f4
[Sct EGM DQM] fix typo
tihsu99 ef1b6d8
Style changes made by cms bot
b2a401f
Merged EF_dqm_CMSSW1502 from repository elfontan with cms-merge-topic
silviodonato ef27340
merge conflicts between EGM and MUO scouting DQM codes
silviodonato efe6f1b
code-checks code-format
silviodonato bf2a4ee
remove some warnings
silviodonato 53f6025
Merge pull request #5 from silviodonato/scoutingDqmEgmMuo
elfontan 2efc2d6
Merge branch 'EF_dqm_CMSSW1502' into dev_15_0_X-ScoutingDQM
elfontan 4f83a78
Merge pull request #6 from JavierGarciadeCastro/dev_15_0_X-ScoutingDQM
elfontan 8c6618f
Minor fixes while testing the full workflow (EGM+MUO)
elfontan 4289d62
Minor fixes (v2) while testing the full workflow (EGM+MUO)
elfontan 05faeb0
Merged EF_dqm_CMSSW1502 from repository elfontan with cms-merge-topic
tihsu99 c4fe109
[Analyzer] remove print out
tihsu99 1901eab
[Directory] change scouting egamma directory
tihsu99 b077e3a
[test] add test files for scouting egamma
tihsu99 a27c1bb
[efficiency] update to newest version
tihsu99 44ce79f
[test] clean the code
tihsu99 447a1e3
Merge pull request #7 from tihsu99/tihsu_dqm_CMSSW1502_for_PR
elfontan 6cb200b
Code checks for new EGamma code
elfontan 3727ca8
Fixing the configuration files
elfontan cbcad39
Implementation of suggested corrections in PR47235
elfontan 76f52bd
Merged EF_dqm_CMSSW1502 from repository elfontan with cms-merge-topic
silviodonato 7187aa8
code-format
silviodonato f046f45
Merge pull request #8 from silviodonato/fixDQMscouting
elfontan 6651902
Implementation of suggested corrections in PR47235 (v2)
elfontan 37cd45c
Implementation of suggested corrections in PR47235 (config files fix)
elfontan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<use name="CalibFormats/SiStripObjects"/> | ||
<use name="CalibTracker/Records"/> | ||
<use name="CommonTools/TriggerUtils"/> | ||
<use name="CondFormats/DTObjects"/> | ||
<use name="CondFormats/DataRecord"/> | ||
<use name="CondFormats/SiStripObjects"/> | ||
<use name="DQMServices/Core"/> | ||
<use name="DataFormats/CaloTowers"/> | ||
<use name="DataFormats/CSCDigi"/> | ||
<use name="DataFormats/CSCRecHit"/> | ||
<use name="DataFormats/DTRecHit"/> | ||
<use name="DataFormats/DetId"/> | ||
<use name="DataFormats/EcalDetId"/> | ||
<use name="DataFormats/EgammaCandidates"/> | ||
<use name="DataFormats/EgammaReco"/> | ||
<use name="DataFormats/FEDRawData"/> | ||
<use name="DataFormats/HcalDetId"/> | ||
<use name="DataFormats/HcalRecHit"/> | ||
<use name="DataFormats/JetReco"/> | ||
<use name="DataFormats/METReco"/> | ||
<use name="DataFormats/Math"/> | ||
<use name="DataFormats/MuonReco"/> | ||
<use name="DataFormats/PatCandidates"/> | ||
<use name="DataFormats/RecoCandidate"/> | ||
<use name="DataFormats/SiStripCluster"/> | ||
<use name="DataFormats/SiStripDetId"/> | ||
<use name="DataFormats/TrackReco"/> | ||
<use name="DataFormats/TrackerRecHit2D"/> | ||
<use name="DataFormats/TrackingRecHit"/> | ||
<use name="EventFilter/CSCRawToDigi"/> | ||
<use name="FWCore/Framework"/> | ||
<use name="FWCore/PluginManager"/> | ||
<use name="FWCore/Utilities"/> | ||
<use name="Geometry/CaloGeometry"/> | ||
<use name="Geometry/CSCGeometry"/> | ||
<use name="Geometry/HcalTowerAlgo"/> | ||
<use name="HLTrigger/HLTcore"/> | ||
<use name="HLTriggerOffline/Scouting"/> | ||
<use name="JetMETCorrections/JetCorrector"/> | ||
<use name="MagneticField/Engine"/> | ||
<use name="MagneticField/Records"/> | ||
<use name="RecoJets/JetAssociationAlgorithms"/> | ||
<use name="RecoJets/JetProducers"/> | ||
<use name="RecoMuon/TrackingTools"/> | ||
<use name="TrackingTools/Records"/> | ||
<use name="TrackingTools/TransientTrack"/> | ||
<flags EDM_PLUGIN="1"/> |
21 changes: 21 additions & 0 deletions
21
DQMOffline/HLTScouting/python/HLTScoutingDqmOffline_cff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
''' | ||
Scouting DQM sequences for offline DQM developed for 2025 pp data-taking | ||
and used by DQM GUI (DQMOffline/Configuration): | ||
currently running EGM and MUO monitoring modules. | ||
''' | ||
|
||
import FWCore.ParameterSet.Config as cms | ||
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester | ||
|
||
from HLTriggerOffline.Scouting.ScoutingMuonTriggerAnalyzer_cfi import * | ||
from HLTriggerOffline.Scouting.ScoutingMuonTagProbeAnalyzer_cfi import * | ||
from HLTriggerOffline.Scouting.ScoutingMuonMonitoring_Client_cff import * | ||
|
||
from HLTriggerOffline.Scouting.HLTScoutingEGammaDqmOffline_cff import * | ||
|
||
hltScoutingMuonDqmOffline = cms.Sequence(scoutingMonitoringTagProbeMuonNoVtx | ||
* scoutingMonitoringTagProbeMuonVtx | ||
* scoutingMonitoringTriggerMuon | ||
) | ||
|
||
hltScoutingDqmOffline = cms.Sequence(hltScoutingMuonDqmOffline + hltScoutingEGammaDqmOffline) |
19 changes: 19 additions & 0 deletions
19
DQMOffline/HLTScouting/python/HLTScoutingPostProcessing_cff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
''' | ||
Scouting DQM sequences for offline DQM developed for 2025 pp data-taking | ||
and used by DQM GUI (DQMOffline/Configuration): | ||
currently running EGM and MUO monitoring modules. | ||
''' | ||
|
||
import FWCore.ParameterSet.Config as cms | ||
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester | ||
from DQMOffline.HLTScouting.HLTScoutingDqmOffline_cff import * | ||
|
||
from HLTriggerOffline.Scouting.ScoutingMuonMonitoring_Client_cff import * | ||
from HLTriggerOffline.Scouting.HLTScoutingEGammaPostProcessing_cff import * | ||
|
||
hltScoutingMuonPostProcessing = cms.Sequence(muonEfficiencyNoVtx | ||
* muonEfficiencyVtx | ||
* muonTriggerEfficiency | ||
) | ||
|
||
hltScoutingPostProcessing = cms.Sequence(hltScoutingMuonPostProcessing + hltScoutingEGammaPostProcessing) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<use name="FWCore/Framework"/> | ||
<use name="FWCore/PluginManager"/> | ||
<use name="FWCore/ParameterSet"/> | ||
<use name="DQMServices/Core"/> | ||
<use name="CLHEP"/> | ||
<use name="DataFormats/PatCandidates"/> | ||
<use name="DataFormats/Scouting"/> | ||
<use name="L1Trigger/L1TGlobal"/> | ||
<use name="DataFormats/L1TGlobal"/> | ||
<use name="FWCore/Utilities"/> | ||
<use name="TrackingTools/Records"/> | ||
<use name="HLTrigger/HLTcore"/> | ||
<use name="DataFormats/HLTReco"/> | ||
<flags EDM_PLUGIN="1"/> |
101 changes: 101 additions & 0 deletions
101
HLTriggerOffline/Scouting/plugins/ElectronEfficiencyPlotter.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
#include "ElectronEfficiencyPlotter.h" | ||
|
||
// Framework | ||
#include <cmath> | ||
#include <string> | ||
|
||
#include "DQMServices/Core/interface/DQMStore.h" | ||
#include "DataFormats/Common/interface/Handle.h" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "TF1.h" | ||
#include "TH1F.h" | ||
|
||
using namespace edm; | ||
using namespace std; | ||
|
||
// Constructor | ||
ElectronEfficiencyPlotter::ElectronEfficiencyPlotter(const edm::ParameterSet &ps) { | ||
ptBin_ = ps.getParameter<int>("ptBin"); | ||
ptMin_ = ps.getParameter<double>("ptMin"); | ||
ptMax_ = ps.getParameter<double>("ptMax"); | ||
|
||
ID_ = ps.getParameter<string>("sctElectronID"); | ||
theFolder_ = ps.getParameter<string>("folder"); | ||
sourceFolder_ = ps.getParameter<string>("srcFolder"); | ||
} | ||
|
||
void ElectronEfficiencyPlotter::dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) { | ||
ibooker.setCurrentFolder(theFolder_); | ||
|
||
h_eff_pt_EB_doubleEG_HLT = | ||
ibooker.book1D("Eff_pt_barrel_DSTdoubleEG", "DSTdoubleEG Eff. vs Pt (barrel)", ptBin_, ptMin_, ptMax_); | ||
h_eff_pt_EE_doubleEG_HLT = | ||
ibooker.book1D("Eff_pt_endcap_DSTdoubleEG", "DSTdoubleEG Eff. vs Pt (endcap)", ptBin_, ptMin_, ptMax_); | ||
h_eff_pt_EB_singlePhoton_HLT = | ||
ibooker.book1D("Eff_pt_barrel_DSTsinglePhoton", "DSTsinglePhoton Eff. vs Pt (barrel)", ptBin_, ptMin_, ptMax_); | ||
h_eff_pt_EE_singlePhoton_HLT = | ||
ibooker.book1D("Eff_pt_endcap_DSTsinglePhoton", "DSTsinglePhoton Eff. vs Pt (endcap)", ptBin_, ptMin_, ptMax_); | ||
|
||
// Axis title | ||
h_eff_pt_EB_singlePhoton_HLT->setAxisTitle("p_{T} (GeV)", 1); | ||
h_eff_pt_EE_singlePhoton_HLT->setAxisTitle("p_{T} (GeV)", 1); | ||
h_eff_pt_EB_doubleEG_HLT->setAxisTitle("p_{T} (GeV)", 1); | ||
h_eff_pt_EE_doubleEG_HLT->setAxisTitle("p_{T} (GeV)", 1); | ||
|
||
MonitorElement *Numerator_pt_barrel_doubleEG_hlt = | ||
igetter.get(sourceFolder_ + | ||
"/resonanceZ_Tag_pat_Probe_sctElectron_passDoubleEG_DST_" | ||
"fireTrigObj_Pt_Barrel"); | ||
MonitorElement *Numerator_pt_endcap_doubleEG_hlt = | ||
igetter.get(sourceFolder_ + | ||
"/resonanceZ_Tag_pat_Probe_sctElectron_passDoubleEG_DST_" | ||
"fireTrigObj_Pt_Endcap"); | ||
MonitorElement *Numerator_pt_barrel_singlePhoton_hlt = | ||
igetter.get(sourceFolder_ + | ||
"/resonanceZ_Tag_pat_Probe_sctElectron_passSinglePhoton_DST_" | ||
"fireTrigObj_Pt_Barrel"); | ||
MonitorElement *Numerator_pt_endcap_singlePhoton_hlt = | ||
igetter.get(sourceFolder_ + | ||
"/resonanceZ_Tag_pat_Probe_sctElectron_passSinglePhoton_DST_" | ||
"fireTrigObj_Pt_Endcap"); | ||
MonitorElement *Denominator_pt_barrel = | ||
igetter.get(sourceFolder_ + "/resonanceZ_Tag_pat_Probe_sctElectron_Pt_Barrel"); | ||
MonitorElement *Denominator_pt_endcap = | ||
igetter.get(sourceFolder_ + "/resonanceZ_Tag_pat_Probe_sctElectron_Pt_Endcap"); | ||
|
||
if (Numerator_pt_barrel_doubleEG_hlt && Denominator_pt_barrel) | ||
calculateEfficiency(Numerator_pt_barrel_doubleEG_hlt, Denominator_pt_barrel, h_eff_pt_EB_doubleEG_HLT); | ||
if (Numerator_pt_endcap_doubleEG_hlt && Denominator_pt_endcap) | ||
calculateEfficiency(Numerator_pt_endcap_doubleEG_hlt, Denominator_pt_endcap, h_eff_pt_EE_doubleEG_HLT); | ||
if (Numerator_pt_barrel_singlePhoton_hlt && Denominator_pt_barrel) | ||
calculateEfficiency(Numerator_pt_barrel_singlePhoton_hlt, Denominator_pt_barrel, h_eff_pt_EB_singlePhoton_HLT); | ||
if (Numerator_pt_endcap_singlePhoton_hlt && Denominator_pt_endcap) | ||
calculateEfficiency(Numerator_pt_endcap_singlePhoton_hlt, Denominator_pt_endcap, h_eff_pt_EE_singlePhoton_HLT); | ||
} | ||
|
||
void ElectronEfficiencyPlotter::calculateEfficiency(MonitorElement *Numerator, | ||
MonitorElement *Denominator, | ||
MonitorElement *Efficiency) { | ||
TH1F *h_numerator_pt = Numerator->getTH1F(); | ||
TH1F *h_denominator_pt = Denominator->getTH1F(); | ||
TH1F *h_eff_pt = Efficiency->getTH1F(); | ||
if (h_eff_pt->GetSumw2N() == 0) | ||
h_eff_pt->Sumw2(); | ||
|
||
// ReBin | ||
int nBins = h_eff_pt->GetNbinsX(); | ||
double *binEdges = new double[nBins + 1]; | ||
for (int i = 0; i <= nBins; i++) | ||
binEdges[i] = h_eff_pt->GetBinLowEdge(i + 1); | ||
|
||
TH1F *h_numerator_pt_rebin = (TH1F *)h_numerator_pt->Rebin(nBins, "num_pt_rebinned", binEdges); | ||
TH1F *h_denominator_pt_rebin = (TH1F *)h_denominator_pt->Rebin(nBins, "num_pt_rebinned", binEdges); | ||
h_eff_pt->Divide(h_numerator_pt_rebin, h_denominator_pt_rebin, 1., 1., "B"); | ||
} | ||
|
||
DEFINE_FWK_MODULE(ElectronEfficiencyPlotter); |
45 changes: 45 additions & 0 deletions
45
HLTriggerOffline/Scouting/plugins/ElectronEfficiencyPlotter.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#ifndef HLTriggerOffline_Scouting_ElectronEfficiencyPlotter_H | ||
#define HLTriggerOffline_Scouting_ElectronEfficiencyPlotter_H | ||
|
||
#include "DQMServices/Core/interface/DQMEDHarvester.h" | ||
#include "DQMServices/Core/interface/DQMStore.h" | ||
#include "DataFormats/Common/interface/Handle.h" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "FWCore/Framework/interface/LuminosityBlock.h" | ||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "FWCore/ServiceRegistry/interface/Service.h" | ||
|
||
class ElectronEfficiencyPlotter : public DQMEDHarvester { | ||
public: | ||
// Constructor | ||
ElectronEfficiencyPlotter(const edm::ParameterSet& ps); | ||
// Destructor | ||
~ElectronEfficiencyPlotter() override = default; | ||
|
||
protected: | ||
// DQM Client Diagnostic | ||
void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override; | ||
|
||
private: | ||
// counters | ||
|
||
int ptBin_; | ||
double ptMin_; | ||
double ptMax_; | ||
|
||
std::string ID_; | ||
|
||
MonitorElement* h_eff_pt_EB_doubleEG_HLT; | ||
MonitorElement* h_eff_pt_EE_doubleEG_HLT; | ||
MonitorElement* h_eff_pt_EB_singlePhoton_HLT; | ||
MonitorElement* h_eff_pt_EE_singlePhoton_HLT; | ||
|
||
std::string theFolder_; | ||
std::string sourceFolder_; | ||
void calculateEfficiency(MonitorElement* Numerator, MonitorElement* Denominator, MonitorElement* Efficiency); | ||
}; | ||
|
||
#endif |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you alpha-order here?