Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove trigger evaluation in ExoticaDQM module and related variables #40665

Merged
merged 2 commits into from Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions DQM/Physics/python/ExoticaDQM_cfi.py
Expand Up @@ -4,10 +4,6 @@
ExoticaDQM = DQMEDAnalyzer(
"ExoticaDQM",

#Trigger Results
TriggerResults = cms.InputTag('TriggerResults','','HLT'),
HltPaths = cms.vstring("HLT_Mu","HLT_Ele","HLT_Photon","HLT_PFHT","HLT_HT","HLT_PFMET","HLT_MET","HLT_"),

#Physics objects
vertexCollection = cms.InputTag('offlinePrimaryVertices'),
electronCollection = cms.InputTag("gedGsfElectrons"),
Expand Down
27 changes: 0 additions & 27 deletions DQM/Physics/src/ExoticaDQM.cc
Expand Up @@ -3,7 +3,6 @@
using namespace edm;
using namespace std;
using namespace reco;
using namespace trigger;

typedef vector<string> vstring;

Expand All @@ -17,9 +16,6 @@ ExoticaDQM::ExoticaDQM(const edm::ParameterSet& ps) {
typedef std::vector<edm::InputTag> vtag;

// Get parameters from configuration file
// Trigger
TriggerToken_ = consumes<TriggerResults>(ps.getParameter<edm::InputTag>("TriggerResults"));
HltPaths_ = ps.getParameter<vector<string> >("HltPaths");
//
VertexToken_ = consumes<reco::VertexCollection>(ps.getParameter<InputTag>("vertexCollection"));
//
Expand Down Expand Up @@ -327,11 +323,6 @@ void ExoticaDQM::bookHistograms(DQMStore::IBooker& bei, edm::Run const&, edm::Ev
void ExoticaDQM::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
// objects

//Trigger
bool ValidTriggers = iEvent.getByToken(TriggerToken_, TriggerResults_);
if (!ValidTriggers)
return;

// Vertices
bool ValidVertices = iEvent.getByToken(VertexToken_, VertexCollection_);
if (!ValidVertices)
Expand Down Expand Up @@ -378,24 +369,6 @@ void ExoticaDQM::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup
// JetCorrector
bool ValidJetCorrector = iEvent.getByToken(JetCorrectorToken_, JetCorrector_);

//Trigger

int N_Triggers = TriggerResults_->size();
int N_GoodTriggerPaths = HltPaths_.size();
bool triggered_event = false;
const edm::TriggerNames& trigName = iEvent.triggerNames(*TriggerResults_);
for (int i_Trig = 0; i_Trig < N_Triggers; ++i_Trig) {
if (TriggerResults_.product()->accept(i_Trig)) {
for (int n = 0; n < N_GoodTriggerPaths; n++) {
if (trigName.triggerName(i_Trig).find(HltPaths_[n]) != std::string::npos) {
triggered_event = true;
}
}
}
}
if (triggered_event == false)
return;

for (int i = 0; i < 2; i++) {
//Jets
PFJetPx[i] = 0.;
Expand Down
12 changes: 0 additions & 12 deletions DQM/Physics/src/ExoticaDQM.h
Expand Up @@ -22,11 +22,6 @@
#include "FWCore/ParameterSet/interface/FileInPath.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

// Trigger
#include "DataFormats/Common/interface/TriggerResults.h"
#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
#include "FWCore/Common/interface/TriggerNames.h"

// Candidate handling
#include "DataFormats/Common/interface/Handle.h"
#include "DataFormats/Candidate/interface/Candidate.h"
Expand Down Expand Up @@ -129,13 +124,6 @@ class ExoticaDQM : public DQMEDAnalyzer {
int nLumiSecs_;
int nEvents_, irun, ievt;

bool isValidHltConfig_;

//Trigger
std::vector<std::string> HltPaths_;
edm::EDGetTokenT<edm::TriggerResults> TriggerToken_;
edm::Handle<edm::TriggerResults> TriggerResults_;

//Vertex
edm::EDGetTokenT<reco::VertexCollection> VertexToken_;
edm::Handle<reco::VertexCollection> VertexCollection_;
Expand Down
2 changes: 1 addition & 1 deletion DQM/Physics/test/ExoticaDQM_cfg.py
Expand Up @@ -58,7 +58,7 @@
process.source = cms.Source(
"PoolSource",
fileNames = cms.untracked.vstring(
'/store/relval/CMSSW_12_2_0_pre2/RelValZprimeToEE_M-6000_TuneCP5_14TeV-pythia8/GEN-SIM-RECO/122X_mcRun3_2021_realistic_v1_TkmkFitHighStat-v1/2580000/1e0694f9-fbf3-4bd0-8eef-3ec39232e5ad.root'
'/store/relval/CMSSW_12_6_0_pre5/RelValZEE_14/GEN-SIM-RECO/125X_mcRun3_2022_realistic_v5-v1/2590000/30d197e2-5802-41da-9d2d-5c8e8bf7f1c0.root'
)
)

Expand Down
2 changes: 1 addition & 1 deletion DQM/Physics/test/ExoticaDQM_harvesting_cfg.py
Expand Up @@ -26,7 +26,7 @@

## input file
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring(options.inputFiles),
fileNames = cms.untracked.vstring('file:EXOTICA_DQM_TEST.root'),
processingMode = cms.untracked.string('RunsAndLumis')
)

Expand Down