CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
SUSY_HLT_Muon_BJet Class Reference

#include <SUSY_HLT_Muon_BJet.h>

Inheritance diagram for SUSY_HLT_Muon_BJet:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 SUSY_HLT_Muon_BJet (const edm::ParameterSet &ps)
 
 ~SUSY_HLT_Muon_BJet () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

void bookHistos (DQMStore::IBooker &)
 

Private Attributes

double etaThrJet_
 
HLTConfigProvider fHltConfig
 
MonitorElementh_triggerJetEta
 
MonitorElementh_triggerJetPhi
 
MonitorElementh_triggerJetPt
 
MonitorElementh_triggerMuEta
 
MonitorElementh_triggerMuPhi
 
MonitorElementh_triggerMuPt
 
std::string HLTProcess_
 
double ptThrJet_
 
edm::EDGetTokenT< reco::CaloJetCollectiontheCaloJetCollection_
 
edm::EDGetTokenT< reco::MuonCollectiontheMuonCollection_
 
edm::EDGetTokenT< reco::PFJetCollectionthePfJetCollection_
 
edm::EDGetTokenT< trigger::TriggerEventtheTrigSummary_
 
edm::InputTag triggerFilterJet_
 
edm::InputTag triggerFilterMuon_
 
std::string triggerPath_
 
edm::EDGetTokenT< edm::TriggerResultstriggerResults_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 27 of file SUSY_HLT_Muon_BJet.h.

Constructor & Destructor Documentation

◆ SUSY_HLT_Muon_BJet()

SUSY_HLT_Muon_BJet::SUSY_HLT_Muon_BJet ( const edm::ParameterSet ps)

Definition at line 9 of file SUSY_HLT_Muon_BJet.cc.

References etaThrJet_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLTProcess_, ptThrJet_, AlCaHLTBitMon_QueryRunRegistry::string, theCaloJetCollection_, theMuonCollection_, thePfJetCollection_, theTrigSummary_, triggerFilterJet_, triggerFilterMuon_, triggerPath_, and triggerResults_.

9  {
10  edm::LogInfo("SUSY_HLT_Muon_BJet") << "Constructor SUSY_HLT_Muon_BJet::SUSY_HLT_Muon_BJet " << std::endl;
11  // Get parameters from configuration file
12  theTrigSummary_ = consumes<trigger::TriggerEvent>(ps.getParameter<edm::InputTag>("trigSummary"));
13  theMuonCollection_ = consumes<reco::MuonCollection>(ps.getParameter<edm::InputTag>("MuonCollection"));
14  thePfJetCollection_ = consumes<reco::PFJetCollection>(ps.getParameter<edm::InputTag>("pfJetCollection"));
15  theCaloJetCollection_ = consumes<reco::CaloJetCollection>(ps.getParameter<edm::InputTag>("caloJetCollection"));
16  triggerResults_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("TriggerResults"));
17  HLTProcess_ = ps.getParameter<std::string>("HLTProcess");
18  triggerPath_ = ps.getParameter<std::string>("TriggerPath");
19  triggerFilterMuon_ = ps.getParameter<edm::InputTag>("TriggerFilterMuon");
20  triggerFilterJet_ = ps.getParameter<edm::InputTag>("TriggerFilterJet");
21  ptThrJet_ = ps.getUntrackedParameter<double>("PtThrJet");
22  etaThrJet_ = ps.getUntrackedParameter<double>("EtaThrJet");
23 }
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag triggerFilterJet_
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
Log< level::Info, false > LogInfo
edm::InputTag triggerFilterMuon_
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_

◆ ~SUSY_HLT_Muon_BJet()

SUSY_HLT_Muon_BJet::~SUSY_HLT_Muon_BJet ( )
override

Definition at line 25 of file SUSY_HLT_Muon_BJet.cc.

25  {
26  edm::LogInfo("SUSY_HLT_Muon_BJet") << "Destructor SUSY_HLT_Muon_BJet::~SUSY_HLT_Muon_BJet " << std::endl;
27 }
Log< level::Info, false > LogInfo

Member Function Documentation

◆ analyze()

void SUSY_HLT_Muon_BJet::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 62 of file SUSY_HLT_Muon_BJet.cc.

References MillePedeFileConverter_cfg::e, trigger::TriggerObject::eta(), dqm::impl::MonitorElement::Fill(), h_triggerJetEta, h_triggerJetPhi, h_triggerJetPt, h_triggerMuEta, h_triggerMuPhi, h_triggerMuPt, HLTBitAnalyser_cfi::hltresults, trigger::TriggerObject::id(), dqmiolumiharvest::j, relativeConstraints::keys, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), theTrigSummary_, triggerFilterJet_, triggerFilterMuon_, triggerMatchMonitor_cfi::triggerObjects, triggerResults_, and HLTMuonOfflineAnalyzer_cfi::triggerSummary.

62  {
63  edm::LogInfo("SUSY_HLT_Muon_BJet") << "SUSY_HLT_Muon_BJet::analyze" << std::endl;
64 
65  //-------------------------------
66  //--- Trigger
67  //-------------------------------
69  e.getByToken(triggerResults_, hltresults);
70  if (!hltresults.isValid()) {
71  edm::LogError("SUSY_HLT_Muon_BJet") << "invalid collection: TriggerResults"
72  << "\n";
73  return;
74  }
76  e.getByToken(theTrigSummary_, triggerSummary);
77  if (!triggerSummary.isValid()) {
78  edm::LogError("SUSY_HLT_Muon_BJet") << "invalid collection: TriggerSummary"
79  << "\n";
80  return;
81  }
82 
83  // get online objects
84  // std::vector<float> ptMuon, etaMuon, phiMuon;
85  size_t filterIndex = triggerSummary->filterIndex(triggerFilterMuon_);
87  if (!(filterIndex >= triggerSummary->sizeFilters())) {
88  const trigger::Keys &keys = triggerSummary->filterKeys(filterIndex);
89  for (size_t j = 0; j < keys.size(); ++j) {
91  if (fabs(foundObject.id()) == 13) { // It's a muon
92  h_triggerMuPt->Fill(foundObject.pt());
93  h_triggerMuEta->Fill(foundObject.eta());
94  h_triggerMuPhi->Fill(foundObject.phi());
95  // ptMuon.push_back(foundObject.pt());
96  // etaMuon.push_back(foundObject.eta());
97  // phiMuon.push_back(foundObject.phi());
98  }
99  }
100  }
101 
102  size_t filterIndex2 = triggerSummary->filterIndex(triggerFilterJet_);
103  if (!(filterIndex2 >= triggerSummary->sizeFilters())) {
104  const trigger::Keys &keys = triggerSummary->filterKeys(filterIndex2);
105  for (size_t j = 0; j < keys.size(); ++j) {
107  h_triggerJetPt->Fill(foundObject.pt());
108  h_triggerJetEta->Fill(foundObject.eta());
109  h_triggerJetPhi->Fill(foundObject.phi());
110  }
111  }
112 }
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
MonitorElement * h_triggerJetPt
Log< level::Error, false > LogError
MonitorElement * h_triggerJetPhi
void Fill(long long x)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
edm::InputTag triggerFilterJet_
MonitorElement * h_triggerMuEta
MonitorElement * h_triggerMuPt
int id() const
getters
Definition: TriggerObject.h:51
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
Log< level::Info, false > LogInfo
std::vector< size_type > Keys
MonitorElement * h_triggerJetEta
edm::InputTag triggerFilterMuon_
MonitorElement * h_triggerMuPhi

◆ bookHistograms()

void SUSY_HLT_Muon_BJet::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 56 of file SUSY_HLT_Muon_BJet.cc.

References bookHistos().

56  {
57  edm::LogInfo("SUSY_HLT_Muon_BJet") << "SUSY_HLT_Muon_BJet::bookHistograms" << std::endl;
58  // book at beginRun
59  bookHistos(ibooker_);
60 }
void bookHistos(DQMStore::IBooker &)
Log< level::Info, false > LogInfo

◆ bookHistos()

void SUSY_HLT_Muon_BJet::bookHistos ( DQMStore::IBooker ibooker_)
private

Definition at line 114 of file SUSY_HLT_Muon_BJet.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), h_triggerJetEta, h_triggerJetPhi, h_triggerJetPt, h_triggerMuEta, h_triggerMuPhi, h_triggerMuPt, dqm::implementation::NavigatorBase::setCurrentFolder(), and triggerPath_.

Referenced by bookHistograms().

114  {
115  ibooker_.cd();
116  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
117 
118  // offline quantities
119 
120  // online quantities
121  h_triggerMuPt = ibooker_.book1D("triggerMuPt", "Trigger Muon Pt; GeV", 50, 0.0, 500.0);
122  h_triggerMuEta = ibooker_.book1D("triggerMuEta", "Trigger Muon Eta", 20, -3.0, 3.0);
123  h_triggerMuPhi = ibooker_.book1D("triggerMuPhi", "Trigger Muon Phi", 20, -3.5, 3.5);
124 
125  h_triggerJetPt = ibooker_.book1D("triggerJetPt", "Trigger Jet Pt; GeV", 50, 0.0, 500.0);
126  h_triggerJetEta = ibooker_.book1D("triggerJetEta", "Trigger Jet Eta", 20, -3.0, 3.0);
127  h_triggerJetPhi = ibooker_.book1D("triggerJetPhi", "Trigger Jet Phi", 20, -3.5, 3.5);
128 
129  ibooker_.cd();
130 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * h_triggerJetPt
MonitorElement * h_triggerJetPhi
MonitorElement * h_triggerMuEta
MonitorElement * h_triggerMuPt
MonitorElement * h_triggerJetEta
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * h_triggerMuPhi

◆ dqmBeginRun()

void SUSY_HLT_Muon_BJet::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &  e 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 29 of file SUSY_HLT_Muon_BJet.cc.

References MillePedeFileConverter_cfg::e, fHltConfig, spr::find(), HLTProcess_, HLTConfigProvider::init(), dqmiolumiharvest::j, LogDebug, writedatasetfile::run, HLTConfigProvider::triggerNames(), and triggerPath_.

31 {
32  bool changed;
33 
34  if (!fHltConfig.init(run, e, HLTProcess_, changed)) {
35  edm::LogError("SUSY_HLT_Muon_BJet") << "Initialization of HLTConfigProvider failed!!";
36  return;
37  }
38 
39  bool pathFound = false;
40  const std::vector<std::string> allTrigNames = fHltConfig.triggerNames();
41  for (size_t j = 0; j < allTrigNames.size(); ++j) {
42  if (allTrigNames[j].find(triggerPath_) != std::string::npos) {
43  pathFound = true;
44  }
45  }
46 
47  if (!pathFound) {
48  LogDebug("SUSY_HLT_Muon_BJet") << "Path not found"
49  << "\n";
50  return;
51  }
52 
53  edm::LogInfo("SUSY_HLT_Muon_BJet") << "SUSY_HLT_Muon_BJet::beginRun" << std::endl;
54 }
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
HLTConfigProvider fHltConfig
Log< level::Info, false > LogInfo
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
const std::vector< std::string > & triggerNames() const
names of trigger paths
#define LogDebug(id)

Member Data Documentation

◆ etaThrJet_

double SUSY_HLT_Muon_BJet::etaThrJet_
private

Definition at line 55 of file SUSY_HLT_Muon_BJet.h.

Referenced by SUSY_HLT_Muon_BJet().

◆ fHltConfig

HLTConfigProvider SUSY_HLT_Muon_BJet::fHltConfig
private

Definition at line 48 of file SUSY_HLT_Muon_BJet.h.

Referenced by dqmBeginRun().

◆ h_triggerJetEta

MonitorElement* SUSY_HLT_Muon_BJet::h_triggerJetEta
private

Definition at line 62 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerJetPhi

MonitorElement* SUSY_HLT_Muon_BJet::h_triggerJetPhi
private

Definition at line 63 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerJetPt

MonitorElement* SUSY_HLT_Muon_BJet::h_triggerJetPt
private

Definition at line 61 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerMuEta

MonitorElement* SUSY_HLT_Muon_BJet::h_triggerMuEta
private

Definition at line 59 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerMuPhi

MonitorElement* SUSY_HLT_Muon_BJet::h_triggerMuPhi
private

Definition at line 60 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerMuPt

MonitorElement* SUSY_HLT_Muon_BJet::h_triggerMuPt
private

Definition at line 58 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and bookHistos().

◆ HLTProcess_

std::string SUSY_HLT_Muon_BJet::HLTProcess_
private

Definition at line 50 of file SUSY_HLT_Muon_BJet.h.

Referenced by dqmBeginRun(), and SUSY_HLT_Muon_BJet().

◆ ptThrJet_

double SUSY_HLT_Muon_BJet::ptThrJet_
private

Definition at line 54 of file SUSY_HLT_Muon_BJet.h.

Referenced by SUSY_HLT_Muon_BJet().

◆ theCaloJetCollection_

edm::EDGetTokenT<reco::CaloJetCollection> SUSY_HLT_Muon_BJet::theCaloJetCollection_
private

Definition at line 44 of file SUSY_HLT_Muon_BJet.h.

Referenced by SUSY_HLT_Muon_BJet().

◆ theMuonCollection_

edm::EDGetTokenT<reco::MuonCollection> SUSY_HLT_Muon_BJet::theMuonCollection_
private

Definition at line 42 of file SUSY_HLT_Muon_BJet.h.

Referenced by SUSY_HLT_Muon_BJet().

◆ thePfJetCollection_

edm::EDGetTokenT<reco::PFJetCollection> SUSY_HLT_Muon_BJet::thePfJetCollection_
private

Definition at line 43 of file SUSY_HLT_Muon_BJet.h.

Referenced by SUSY_HLT_Muon_BJet().

◆ theTrigSummary_

edm::EDGetTokenT<trigger::TriggerEvent> SUSY_HLT_Muon_BJet::theTrigSummary_
private

Definition at line 46 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and SUSY_HLT_Muon_BJet().

◆ triggerFilterJet_

edm::InputTag SUSY_HLT_Muon_BJet::triggerFilterJet_
private

Definition at line 53 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and SUSY_HLT_Muon_BJet().

◆ triggerFilterMuon_

edm::InputTag SUSY_HLT_Muon_BJet::triggerFilterMuon_
private

Definition at line 52 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and SUSY_HLT_Muon_BJet().

◆ triggerPath_

std::string SUSY_HLT_Muon_BJet::triggerPath_
private

Definition at line 51 of file SUSY_HLT_Muon_BJet.h.

Referenced by bookHistos(), dqmBeginRun(), and SUSY_HLT_Muon_BJet().

◆ triggerResults_

edm::EDGetTokenT<edm::TriggerResults> SUSY_HLT_Muon_BJet::triggerResults_
private

Definition at line 45 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and SUSY_HLT_Muon_BJet().