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:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 SUSY_HLT_Muon_BJet (const edm::ParameterSet &ps)
 
 ~SUSY_HLT_Muon_BJet () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

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
 
void endRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 

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_
 

Detailed Description

Definition at line 28 of file SUSY_HLT_Muon_BJet.h.

Constructor & Destructor Documentation

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 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
edm::InputTag triggerFilterJet_
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
edm::InputTag triggerFilterMuon_
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
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 }

Member Function Documentation

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

Definition at line 62 of file SUSY_HLT_Muon_BJet.cc.

References trigger::TriggerObject::eta(), MonitorElement::Fill(), trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), edm::Event::getByToken(), trigger::TriggerEvent::getObjects(), h_triggerJetEta, h_triggerJetPhi, h_triggerJetPt, h_triggerMuEta, h_triggerMuPhi, h_triggerMuPt, trigger::TriggerObject::id(), edm::HandleBase::isValid(), relativeConstraints::keys, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), trigger::TriggerEvent::sizeFilters(), theTrigSummary_, triggerFilterJet_, triggerFilterMuon_, TriggerAnalyzer::triggerObjects, and triggerResults_.

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) {
90  trigger::TriggerObject foundObject = triggerObjects[keys[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) {
106  trigger::TriggerObject foundObject = triggerObjects[keys[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_
int id() const
getters
Definition: TriggerObject.h:55
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:135
float phi() const
Definition: TriggerObject.h:58
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:111
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:123
MonitorElement * h_triggerJetPt
float eta() const
Definition: TriggerObject.h:57
MonitorElement * h_triggerJetPhi
void Fill(long long x)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
edm::InputTag triggerFilterJet_
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:98
MonitorElement * h_triggerMuEta
MonitorElement * h_triggerMuPt
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
std::vector< size_type > Keys
MonitorElement * h_triggerJetEta
edm::InputTag triggerFilterMuon_
MonitorElement * h_triggerMuPhi
void SUSY_HLT_Muon_BJet::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotected

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 &)
void SUSY_HLT_Muon_BJet::bookHistos ( DQMStore::IBooker ibooker_)
private

Definition at line 118 of file SUSY_HLT_Muon_BJet.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::cd(), DEFINE_FWK_MODULE, h_triggerJetEta, h_triggerJetPhi, h_triggerJetPt, h_triggerMuEta, h_triggerMuPhi, h_triggerMuPt, DQMStore::IBooker::setCurrentFolder(), and triggerPath_.

Referenced by bookHistograms().

118  {
119  ibooker_.cd();
120  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
121 
122  // offline quantities
123 
124  // online quantities
125  h_triggerMuPt = ibooker_.book1D("triggerMuPt", "Trigger Muon Pt; GeV", 50, 0.0, 500.0);
126  h_triggerMuEta = ibooker_.book1D("triggerMuEta", "Trigger Muon Eta", 20, -3.0, 3.0);
127  h_triggerMuPhi = ibooker_.book1D("triggerMuPhi", "Trigger Muon Phi", 20, -3.5, 3.5);
128 
129  h_triggerJetPt = ibooker_.book1D("triggerJetPt", "Trigger Jet Pt; GeV", 50, 0.0, 500.0);
130  h_triggerJetEta = ibooker_.book1D("triggerJetEta", "Trigger Jet Eta", 20, -3.0, 3.0);
131  h_triggerJetPhi = ibooker_.book1D("triggerJetPhi", "Trigger Jet Phi", 20, -3.5, 3.5);
132 
133  ibooker_.cd();
134 }
MonitorElement * h_triggerJetPt
MonitorElement * h_triggerJetPhi
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * h_triggerMuEta
MonitorElement * h_triggerMuPt
MonitorElement * h_triggerJetEta
MonitorElement * h_triggerMuPhi
void SUSY_HLT_Muon_BJet::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &  e 
)
overrideprotected

Definition at line 29 of file SUSY_HLT_Muon_BJet.cc.

References fHltConfig, spr::find(), HLTProcess_, HLTConfigProvider::init(), LogDebug, 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 }
#define LogDebug(id)
const std::vector< std::string > & triggerNames() const
names of trigger paths
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
HLTConfigProvider fHltConfig
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
void SUSY_HLT_Muon_BJet::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprotected

Definition at line 114 of file SUSY_HLT_Muon_BJet.cc.

114  {
115  edm::LogInfo("SUSY_HLT_Muon_BJet") << "SUSY_HLT_Muon_BJet::endRun" << std::endl;
116 }

Member Data Documentation

double SUSY_HLT_Muon_BJet::etaThrJet_
private

Definition at line 57 of file SUSY_HLT_Muon_BJet.h.

Referenced by SUSY_HLT_Muon_BJet().

HLTConfigProvider SUSY_HLT_Muon_BJet::fHltConfig
private

Definition at line 50 of file SUSY_HLT_Muon_BJet.h.

Referenced by dqmBeginRun().

MonitorElement* SUSY_HLT_Muon_BJet::h_triggerJetEta
private

Definition at line 64 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Muon_BJet::h_triggerJetPhi
private

Definition at line 65 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Muon_BJet::h_triggerJetPt
private

Definition at line 63 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Muon_BJet::h_triggerMuEta
private

Definition at line 61 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Muon_BJet::h_triggerMuPhi
private

Definition at line 62 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Muon_BJet::h_triggerMuPt
private

Definition at line 60 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and bookHistos().

std::string SUSY_HLT_Muon_BJet::HLTProcess_
private

Definition at line 52 of file SUSY_HLT_Muon_BJet.h.

Referenced by dqmBeginRun(), and SUSY_HLT_Muon_BJet().

double SUSY_HLT_Muon_BJet::ptThrJet_
private

Definition at line 56 of file SUSY_HLT_Muon_BJet.h.

Referenced by SUSY_HLT_Muon_BJet().

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

Definition at line 46 of file SUSY_HLT_Muon_BJet.h.

Referenced by SUSY_HLT_Muon_BJet().

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

Definition at line 44 of file SUSY_HLT_Muon_BJet.h.

Referenced by SUSY_HLT_Muon_BJet().

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

Definition at line 45 of file SUSY_HLT_Muon_BJet.h.

Referenced by SUSY_HLT_Muon_BJet().

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

Definition at line 48 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and SUSY_HLT_Muon_BJet().

edm::InputTag SUSY_HLT_Muon_BJet::triggerFilterJet_
private

Definition at line 55 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and SUSY_HLT_Muon_BJet().

edm::InputTag SUSY_HLT_Muon_BJet::triggerFilterMuon_
private

Definition at line 54 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and SUSY_HLT_Muon_BJet().

std::string SUSY_HLT_Muon_BJet::triggerPath_
private

Definition at line 53 of file SUSY_HLT_Muon_BJet.h.

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

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

Definition at line 47 of file SUSY_HLT_Muon_BJet.h.

Referenced by analyze(), and SUSY_HLT_Muon_BJet().