CMS 3D CMS Logo

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

#include <SUSY_HLT_PhotonMET.h>

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

Public Member Functions

 SUSY_HLT_PhotonMET (const edm::ParameterSet &ps)
 
 ~SUSY_HLT_PhotonMET () 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_metTurnOn_den
 
MonitorElementh_metTurnOn_num
 
MonitorElementh_photonTurnOn_den
 
MonitorElementh_photonTurnOn_num
 
MonitorElementh_recoMet
 
MonitorElementh_recoPhotonPt
 
double metThrOffline_
 
double ptThrOffline_
 
edm::EDGetTokenT< reco::PFMETCollectionthePfMETCollection_
 
edm::EDGetTokenT< reco::PhotonCollectionthePhotonCollection_
 
edm::InputTag triggerFilterMET_
 
edm::InputTag triggerFilterPhoton_
 
std::string triggerPath_
 
std::string triggerPathBase_
 
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_PhotonMET.h.

Constructor & Destructor Documentation

◆ SUSY_HLT_PhotonMET()

SUSY_HLT_PhotonMET::SUSY_HLT_PhotonMET ( const edm::ParameterSet ps)

Definition at line 8 of file SUSY_HLT_PhotonMET.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), metThrOffline_, ptThrOffline_, AlCaHLTBitMon_QueryRunRegistry::string, thePfMETCollection_, thePhotonCollection_, triggerPath_, triggerPathBase_, and triggerResults_.

8  {
9  edm::LogInfo("SUSY_HLT_PhotonMET") << "Constructor SUSY_HLT_PhotonMET::SUSY_HLT_PhotonMET " << std::endl;
10  // Get parameters from configuration file
11  thePfMETCollection_ = consumes<reco::PFMETCollection>(ps.getParameter<edm::InputTag>("pfMETCollection"));
12  thePhotonCollection_ = consumes<reco::PhotonCollection>(ps.getParameter<edm::InputTag>("photonCollection"));
13  triggerResults_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("TriggerResults"));
14  triggerPath_ = ps.getParameter<std::string>("TriggerPath");
15  triggerPathBase_ = ps.getParameter<std::string>("TriggerPathBase");
16  ptThrOffline_ = ps.getUntrackedParameter<double>("ptThrOffline");
17  metThrOffline_ = ps.getUntrackedParameter<double>("metThrOffline");
18 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< reco::PhotonCollection > thePhotonCollection_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
Log< level::Info, false > LogInfo
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
std::string triggerPathBase_

◆ ~SUSY_HLT_PhotonMET()

SUSY_HLT_PhotonMET::~SUSY_HLT_PhotonMET ( )
override

Definition at line 20 of file SUSY_HLT_PhotonMET.cc.

20  {
21  edm::LogInfo("SUSY_HLT_PhotonMET") << "Destructor SUSY_HLT_PhotonMET::~SUSY_HLT_PhotonMET " << std::endl;
22 }
Log< level::Info, false > LogInfo

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 30 of file SUSY_HLT_PhotonMET.cc.

References funct::abs(), MillePedeFileConverter_cfg::e, dqm::impl::MonitorElement::Fill(), h_metTurnOn_den, h_metTurnOn_num, h_photonTurnOn_den, h_photonTurnOn_num, h_recoMet, h_recoPhotonPt, HLTBitAnalyser_cfi::hltresults, metThrOffline_, B2GDQM_cfi::pfMETCollection, ExoticaDQM_cfi::photonCollection, ptThrOffline_, thePfMETCollection_, thePhotonCollection_, triggerPath_, triggerPathBase_, triggerResults_, and trigNames.

30  {
31  edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::analyze" << std::endl;
32 
33  //-------------------------------
34  //--- MET
35  //-------------------------------
38  if (!pfMETCollection.isValid()) {
39  edm::LogError("SUSY_HLT_PhotonMET") << "invalid met collection"
40  << "\n";
41  return;
42  }
43  //-------------------------------
44  //--- Photon
45  //-------------------------------
48  if (!photonCollection.isValid()) {
49  edm::LogError("SUSY_HLT_PhotonMET") << "invalid egamma collection"
50  << "\n";
51  return;
52  }
53 
54  // check what is in the menu
56  e.getByToken(triggerResults_, hltresults);
57  if (!hltresults.isValid()) {
58  edm::LogError("SUSY_HLT_PhotonMET") << "invalid collection: TriggerResults"
59  << "\n";
60  return;
61  }
62 
63  // use only events with leading photon in barrel
64  if (photonCollection->empty() || abs(photonCollection->begin()->superCluster()->eta()) > 1.4442)
65  return;
66 
67  // get reco photon and met
68  float const recoPhotonPt = !photonCollection->empty() ? photonCollection->begin()->et() : 0;
69  float const recoMET = !pfMETCollection->empty() ? pfMETCollection->begin()->et() : 0;
70  h_recoPhotonPt->Fill(recoPhotonPt);
71  h_recoMet->Fill(recoMET);
72 
73  // the actual trigger efficiencies
74  bool hasFired = false, hasFiredBaseTrigger = false;
75  edm::TriggerNames const &trigNames = e.triggerNames(*hltresults);
76  unsigned int const numTriggers = trigNames.size();
77  for (unsigned int hltIndex = 0; hltIndex < numTriggers; ++hltIndex) {
78  if (trigNames.triggerName(hltIndex).find(triggerPath_) != std::string::npos && hltresults->wasrun(hltIndex) &&
79  hltresults->accept(hltIndex))
80  hasFired = true;
81  if (trigNames.triggerName(hltIndex).find(triggerPathBase_) != std::string::npos && hltresults->wasrun(hltIndex) &&
82  hltresults->accept(hltIndex))
83  hasFiredBaseTrigger = true;
84  }
85 
86  if (hasFiredBaseTrigger || !e.isRealData()) {
87  // passed base trigger
88  if (recoPhotonPt > ptThrOffline_)
89  h_metTurnOn_den->Fill(recoMET);
90  if (recoMET > metThrOffline_)
91  h_photonTurnOn_den->Fill(recoPhotonPt);
92  if (hasFired) {
93  // passed base and signal trigger
94  if (recoPhotonPt > ptThrOffline_)
95  h_metTurnOn_num->Fill(recoMET);
96  if (recoMET > metThrOffline_)
97  h_photonTurnOn_num->Fill(recoPhotonPt);
98  }
99  }
100 }
MonitorElement * h_recoMet
MonitorElement * h_metTurnOn_den
MonitorElement * h_recoPhotonPt
MonitorElement * h_metTurnOn_num
Log< level::Error, false > LogError
void Fill(long long x)
MonitorElement * h_photonTurnOn_den
edm::EDGetTokenT< reco::PhotonCollection > thePhotonCollection_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Log< level::Info, false > LogInfo
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
MonitorElement * h_photonTurnOn_num
std::string triggerPathBase_

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 24 of file SUSY_HLT_PhotonMET.cc.

References bookHistos().

24  {
25  edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::bookHistograms" << std::endl;
26  // book at beginRun
27  bookHistos(ibooker_);
28 }
Log< level::Info, false > LogInfo
void bookHistos(DQMStore::IBooker &)

◆ bookHistos()

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

Definition at line 102 of file SUSY_HLT_PhotonMET.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), h_metTurnOn_den, h_metTurnOn_num, h_photonTurnOn_den, h_photonTurnOn_num, h_recoMet, h_recoPhotonPt, dqm::implementation::NavigatorBase::setCurrentFolder(), and triggerPath_.

Referenced by bookHistograms().

102  {
103  ibooker_.cd();
104  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
105 
106  // offline quantities
107  h_recoPhotonPt = ibooker_.book1D("recoPhotonPt", "reco Photon transverse momentum; p_{T} (GeV)", 20, 0, 1000);
108  h_recoMet = ibooker_.book1D("recoMet", "reco Missing transverse energy;E_{T}^{miss} (GeV)", 20, 0, 1000);
109  h_metTurnOn_num = ibooker_.book1D("pfMetTurnOn_num", "PF MET Turn On Numerator", 20, 0, 500);
110  h_metTurnOn_den = ibooker_.book1D("pfMetTurnOn_den", "PF MET Turn On Denominator", 20, 0, 500);
111  h_photonTurnOn_num = ibooker_.book1D("photonTurnOn_num", "Photon Turn On Numerator", 20, 0, 1000);
112  h_photonTurnOn_den = ibooker_.book1D("photonTurnOn_den", "Photon Turn On Denominator", 20, 0, 1000);
113 
114  ibooker_.cd();
115 }
MonitorElement * h_recoMet
MonitorElement * h_metTurnOn_den
MonitorElement * h_recoPhotonPt
MonitorElement * h_metTurnOn_num
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * h_photonTurnOn_den
MonitorElement * h_photonTurnOn_num
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_metTurnOn_den

MonitorElement* SUSY_HLT_PhotonMET::h_metTurnOn_den
private

Definition at line 58 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

◆ h_metTurnOn_num

MonitorElement* SUSY_HLT_PhotonMET::h_metTurnOn_num
private

Definition at line 57 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

◆ h_photonTurnOn_den

MonitorElement* SUSY_HLT_PhotonMET::h_photonTurnOn_den
private

Definition at line 60 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

◆ h_photonTurnOn_num

MonitorElement* SUSY_HLT_PhotonMET::h_photonTurnOn_num
private

Definition at line 59 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

◆ h_recoMet

MonitorElement* SUSY_HLT_PhotonMET::h_recoMet
private

Definition at line 56 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

◆ h_recoPhotonPt

MonitorElement* SUSY_HLT_PhotonMET::h_recoPhotonPt
private

Definition at line 55 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

◆ metThrOffline_

double SUSY_HLT_PhotonMET::metThrOffline_
private

Definition at line 52 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().

◆ ptThrOffline_

double SUSY_HLT_PhotonMET::ptThrOffline_
private

Definition at line 51 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().

◆ thePfMETCollection_

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

Definition at line 43 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().

◆ thePhotonCollection_

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

Definition at line 44 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().

◆ triggerFilterMET_

edm::InputTag SUSY_HLT_PhotonMET::triggerFilterMET_
private

Definition at line 50 of file SUSY_HLT_PhotonMET.h.

◆ triggerFilterPhoton_

edm::InputTag SUSY_HLT_PhotonMET::triggerFilterPhoton_
private

Definition at line 49 of file SUSY_HLT_PhotonMET.h.

◆ triggerPath_

std::string SUSY_HLT_PhotonMET::triggerPath_
private

Definition at line 47 of file SUSY_HLT_PhotonMET.h.

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

◆ triggerPathBase_

std::string SUSY_HLT_PhotonMET::triggerPathBase_
private

Definition at line 48 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().

◆ triggerResults_

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

Definition at line 45 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().