CMS 3D CMS Logo

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

#include <SUSY_HLT_PhotonHT.h>

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

Public Member Functions

 SUSY_HLT_PhotonHT (const edm::ParameterSet &ps)
 
 ~SUSY_HLT_PhotonHT () 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
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 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
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

void bookHistos (DQMStore::IBooker &)
 

Private Attributes

MonitorElementh_ht
 
MonitorElementh_htTurnOn_den
 
MonitorElementh_htTurnOn_num
 
MonitorElementh_photonPt
 
MonitorElementh_photonTurnOn_den
 
MonitorElementh_photonTurnOn_num
 
double htThrOffline_
 
double ptThrOffline_
 
edm::EDGetTokenT< reco::PFMETCollectionthePfMETCollection_
 
edm::EDGetTokenT< reco::PhotonCollectionthePhotonCollection_
 
edm::EDGetTokenT< trigger::TriggerEventtheTrigSummary_
 
edm::InputTag triggerFilterHt_
 
edm::InputTag triggerFilterPhoton_
 
std::string triggerPath_
 
std::string triggerPathAuxiliaryForHadronic_
 
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 29 of file SUSY_HLT_PhotonHT.h.

Constructor & Destructor Documentation

◆ SUSY_HLT_PhotonHT()

SUSY_HLT_PhotonHT::SUSY_HLT_PhotonHT ( const edm::ParameterSet ps)

Definition at line 8 of file SUSY_HLT_PhotonHT.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), htThrOffline_, ptThrOffline_, AlCaHLTBitMon_QueryRunRegistry::string, thePfMETCollection_, thePhotonCollection_, theTrigSummary_, triggerFilterHt_, triggerFilterPhoton_, triggerPath_, triggerPathAuxiliaryForHadronic_, and triggerResults_.

8  {
9  edm::LogInfo("SUSY_HLT_PhotonHT") << "Constructor SUSY_HLT_PhotonHT::SUSY_HLT_PhotonHT " << std::endl;
10  // Get parameters from configuration file
11  theTrigSummary_ = consumes<trigger::TriggerEvent>(ps.getParameter<edm::InputTag>("trigSummary"));
12  thePfMETCollection_ = consumes<reco::PFMETCollection>(ps.getParameter<edm::InputTag>("pfMETCollection"));
13  thePhotonCollection_ = consumes<reco::PhotonCollection>(ps.getParameter<edm::InputTag>("photonCollection"));
14  triggerResults_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("TriggerResults"));
15  triggerPath_ = ps.getParameter<std::string>("TriggerPath");
16  triggerPathAuxiliaryForHadronic_ = ps.getParameter<std::string>("TriggerPathAuxiliaryForHadronic");
17  triggerFilterPhoton_ = ps.getParameter<edm::InputTag>("TriggerFilterPhoton");
18  triggerFilterHt_ = ps.getParameter<edm::InputTag>("TriggerFilterHt");
19  ptThrOffline_ = ps.getUntrackedParameter<double>("ptThrOffline");
20  htThrOffline_ = ps.getUntrackedParameter<double>("htThrOffline");
21 }
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::InputTag triggerFilterHt_
edm::InputTag triggerFilterPhoton_
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
T getUntrackedParameter(std::string const &, T const &) const
Log< level::Info, false > LogInfo
std::string triggerPathAuxiliaryForHadronic_
std::string triggerPath_
edm::EDGetTokenT< reco::PhotonCollection > thePhotonCollection_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_

◆ ~SUSY_HLT_PhotonHT()

SUSY_HLT_PhotonHT::~SUSY_HLT_PhotonHT ( )
override

Definition at line 23 of file SUSY_HLT_PhotonHT.cc.

23  {
24  edm::LogInfo("SUSY_HLT_PhotonHT") << "Destructor SUSY_HLT_PhotonHT::~SUSY_HLT_PhotonHT " << std::endl;
25 }
Log< level::Info, false > LogInfo

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 33 of file SUSY_HLT_PhotonHT.cc.

References MillePedeFileConverter_cfg::e, dqm::impl::MonitorElement::Fill(), h_ht, h_htTurnOn_den, h_htTurnOn_num, h_photonPt, h_photonTurnOn_den, h_photonTurnOn_num, HLTBitAnalyser_cfi::hltresults, htThrOffline_, relativeConstraints::keys, B2GDQM_cfi::pfMETCollection, ExoticaDQM_cfi::photonCollection, DiDispStaMuonMonitor_cfi::pt, ptThrOffline_, thePfMETCollection_, thePhotonCollection_, theTrigSummary_, triggerFilterHt_, triggerFilterPhoton_, triggerMatchMonitor_cfi::triggerObjects, triggerPath_, triggerPathAuxiliaryForHadronic_, triggerResults_, HLTMuonOfflineAnalyzer_cfi::triggerSummary, and trigNames.

33  {
34  edm::LogInfo("SUSY_HLT_PhotonHT") << "SUSY_HLT_PhotonHT::analyze" << std::endl;
35 
36  //-------------------------------
37  //--- MET / HT
38  //-------------------------------
41  if (!pfMETCollection.isValid()) {
42  edm::LogError("SUSY_HLT_PhotonHT") << "invalid met collection"
43  << "\n";
44  return;
45  }
46  //-------------------------------
47  //--- Photon
48  //-------------------------------
51  if (!photonCollection.isValid()) {
52  edm::LogError("SUSY_HLT_PhotonHT") << "invalid egamma collection"
53  << "\n";
54  return;
55  }
56 
57  // check what is in the menu
59  e.getByToken(triggerResults_, hltresults);
60  if (!hltresults.isValid()) {
61  edm::LogError("SUSY_HLT_PhotonHT") << "invalid collection: TriggerResults"
62  << "\n";
63  return;
64  }
65 
66  //-------------------------------
67  //--- Trigger
68  //-------------------------------
70  e.getByToken(theTrigSummary_, triggerSummary);
71  if (!triggerSummary.isValid()) {
72  edm::LogError("SUSY_HLT_PhotonHT") << "invalid collection: TriggerSummary"
73  << "\n";
74  return;
75  }
76 
77  // get online objects
79 
80  // get the photon object
81  size_t filterIndexPhoton = triggerSummary->filterIndex(triggerFilterPhoton_);
82  if (filterIndexPhoton < triggerSummary->sizeFilters()) {
83  const trigger::Keys &keys = triggerSummary->filterKeys(filterIndexPhoton);
84  if (!keys.empty()) {
85  // take the leading photon
86  float pt = triggerObjects[keys[0]].pt();
87  h_photonPt->Fill(pt);
88  }
89  }
90 
91  // get ht
92  size_t filterIndexHt = triggerSummary->filterIndex(triggerFilterHt_);
93  if (filterIndexHt < triggerSummary->sizeFilters()) {
94  const trigger::Keys &keys = triggerSummary->filterKeys(filterIndexHt);
95  if (!keys.empty()) {
96  float ht = triggerObjects[keys[0]].pt();
97  h_ht->Fill(ht);
98  }
99  }
100 
101  bool hasFired = false, hasFiredAuxiliaryForHadronicLeg = false;
102  const edm::TriggerNames &trigNames = e.triggerNames(*hltresults);
103  unsigned int numTriggers = trigNames.size();
104  for (unsigned int hltIndex = 0; hltIndex < numTriggers; ++hltIndex) {
105  if (trigNames.triggerName(hltIndex).find(triggerPath_) != std::string::npos && hltresults->wasrun(hltIndex) &&
106  hltresults->accept(hltIndex))
107  hasFired = true;
108  if (trigNames.triggerName(hltIndex).find(triggerPathAuxiliaryForHadronic_) != std::string::npos &&
109  hltresults->wasrun(hltIndex) && hltresults->accept(hltIndex))
110  hasFiredAuxiliaryForHadronicLeg = true;
111  }
112 
113  if (hasFiredAuxiliaryForHadronicLeg || !e.isRealData()) {
114  float recoPhotonPt = !photonCollection->empty() ? photonCollection->begin()->et() : 0;
115  float recoHt = !pfMETCollection->empty() ? pfMETCollection->begin()->et() : 0;
116 
117  if (hasFired) {
118  if (!photonCollection->empty() && recoHt >= htThrOffline_)
119  h_photonTurnOn_num->Fill(recoPhotonPt);
120  if (!pfMETCollection->empty() && recoPhotonPt >= ptThrOffline_)
121  h_htTurnOn_num->Fill(recoHt);
122  }
123  if (!photonCollection->empty() && recoHt >= htThrOffline_)
124  h_photonTurnOn_den->Fill(recoPhotonPt);
125  if (!pfMETCollection->empty() && recoPhotonPt >= ptThrOffline_)
126  h_htTurnOn_den->Fill(recoPhotonPt);
127  }
128 }
MonitorElement * h_photonTurnOn_den
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
MonitorElement * h_ht
edm::InputTag triggerFilterHt_
edm::InputTag triggerFilterPhoton_
Log< level::Error, false > LogError
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
void Fill(long long x)
MonitorElement * h_htTurnOn_den
MonitorElement * h_photonPt
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
Log< level::Info, false > LogInfo
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
MonitorElement * h_htTurnOn_num
std::vector< size_type > Keys
std::string triggerPathAuxiliaryForHadronic_
MonitorElement * h_photonTurnOn_num
std::string triggerPath_
edm::EDGetTokenT< reco::PhotonCollection > thePhotonCollection_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 27 of file SUSY_HLT_PhotonHT.cc.

References bookHistos().

27  {
28  edm::LogInfo("SUSY_HLT_PhotonHT") << "SUSY_HLT_PhotonHT::bookHistograms" << std::endl;
29  // book at beginRun
30  bookHistos(ibooker_);
31 }
void bookHistos(DQMStore::IBooker &)
Log< level::Info, false > LogInfo

◆ bookHistos()

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

Definition at line 130 of file SUSY_HLT_PhotonHT.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), h_ht, h_htTurnOn_den, h_htTurnOn_num, h_photonPt, h_photonTurnOn_den, h_photonTurnOn_num, dqm::implementation::NavigatorBase::setCurrentFolder(), and triggerPath_.

Referenced by bookHistograms().

130  {
131  ibooker_.cd();
132  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
133 
134  // offline quantities
135  h_photonPt = ibooker_.book1D("photonPt", "Photon transverse momentum; p_{T} (GeV)", 20, 0, 500);
136  h_ht = ibooker_.book1D("ht", "Hadronic activity;H_{T} (GeV)", 20, 0, 2000);
137  h_htTurnOn_num = ibooker_.book1D("pfHtTurnOn_num", "PF HT Turn On Numerator", 20, 300, 800);
138  h_htTurnOn_den = ibooker_.book1D("pfHtTurnOn_den", "PF HT Turn On Denominator", 20, 300, 800);
139  h_photonTurnOn_num = ibooker_.book1D("photonTurnOn_num", "Photon Turn On Numerator", 20, 70, 130);
140  h_photonTurnOn_den = ibooker_.book1D("photonTurnOn_den", "Photon Turn On Denominator", 20, 70, 130);
141 
142  ibooker_.cd();
143 }
MonitorElement * h_photonTurnOn_den
MonitorElement * h_ht
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * h_htTurnOn_den
MonitorElement * h_photonPt
MonitorElement * h_htTurnOn_num
MonitorElement * h_photonTurnOn_num
std::string triggerPath_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

Member Data Documentation

◆ h_ht

MonitorElement* SUSY_HLT_PhotonHT::h_ht
private

Definition at line 57 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and bookHistos().

◆ h_htTurnOn_den

MonitorElement* SUSY_HLT_PhotonHT::h_htTurnOn_den
private

Definition at line 59 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and bookHistos().

◆ h_htTurnOn_num

MonitorElement* SUSY_HLT_PhotonHT::h_htTurnOn_num
private

Definition at line 58 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and bookHistos().

◆ h_photonPt

MonitorElement* SUSY_HLT_PhotonHT::h_photonPt
private

Definition at line 56 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and bookHistos().

◆ h_photonTurnOn_den

MonitorElement* SUSY_HLT_PhotonHT::h_photonTurnOn_den
private

Definition at line 61 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and bookHistos().

◆ h_photonTurnOn_num

MonitorElement* SUSY_HLT_PhotonHT::h_photonTurnOn_num
private

Definition at line 60 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and bookHistos().

◆ htThrOffline_

double SUSY_HLT_PhotonHT::htThrOffline_
private

Definition at line 53 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and SUSY_HLT_PhotonHT().

◆ ptThrOffline_

double SUSY_HLT_PhotonHT::ptThrOffline_
private

Definition at line 52 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and SUSY_HLT_PhotonHT().

◆ thePfMETCollection_

edm::EDGetTokenT<reco::PFMETCollection> SUSY_HLT_PhotonHT::thePfMETCollection_
private

Definition at line 43 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and SUSY_HLT_PhotonHT().

◆ thePhotonCollection_

edm::EDGetTokenT<reco::PhotonCollection> SUSY_HLT_PhotonHT::thePhotonCollection_
private

Definition at line 44 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and SUSY_HLT_PhotonHT().

◆ theTrigSummary_

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

Definition at line 46 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and SUSY_HLT_PhotonHT().

◆ triggerFilterHt_

edm::InputTag SUSY_HLT_PhotonHT::triggerFilterHt_
private

Definition at line 51 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and SUSY_HLT_PhotonHT().

◆ triggerFilterPhoton_

edm::InputTag SUSY_HLT_PhotonHT::triggerFilterPhoton_
private

Definition at line 50 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and SUSY_HLT_PhotonHT().

◆ triggerPath_

std::string SUSY_HLT_PhotonHT::triggerPath_
private

Definition at line 48 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), bookHistos(), and SUSY_HLT_PhotonHT().

◆ triggerPathAuxiliaryForHadronic_

std::string SUSY_HLT_PhotonHT::triggerPathAuxiliaryForHadronic_
private

Definition at line 49 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and SUSY_HLT_PhotonHT().

◆ triggerResults_

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

Definition at line 45 of file SUSY_HLT_PhotonHT.h.

Referenced by analyze(), and SUSY_HLT_PhotonHT().