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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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 >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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.

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 }

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

◆ ~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 }

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.

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 }

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.

◆ 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.

24  {
25  edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::bookHistograms" << std::endl;
26  // book at beginRun
27  bookHistos(ibooker_);
28 }

References bookHistos().

◆ bookHistos()

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

Definition at line 102 of file SUSY_HLT_PhotonMET.cc.

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 }

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().

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().

trigNames
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
SUSY_HLT_PhotonMET::h_recoMet
MonitorElement * h_recoMet
Definition: SUSY_HLT_PhotonMET.h:56
SUSY_HLT_PhotonMET::h_photonTurnOn_den
MonitorElement * h_photonTurnOn_den
Definition: SUSY_HLT_PhotonMET.h:60
HLTBitAnalyser_cfi.hltresults
hltresults
Definition: HLTBitAnalyser_cfi.py:13
SUSY_HLT_PhotonMET::triggerPathBase_
std::string triggerPathBase_
Definition: SUSY_HLT_PhotonMET.h:48
SUSY_HLT_PhotonMET::h_metTurnOn_num
MonitorElement * h_metTurnOn_num
Definition: SUSY_HLT_PhotonMET.h:57
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle< reco::PFMETCollection >
SUSY_HLT_PhotonMET::triggerPath_
std::string triggerPath_
Definition: SUSY_HLT_PhotonMET.h:47
SUSY_HLT_PhotonMET::metThrOffline_
double metThrOffline_
Definition: SUSY_HLT_PhotonMET.h:52
SUSY_HLT_PhotonMET::thePhotonCollection_
edm::EDGetTokenT< reco::PhotonCollection > thePhotonCollection_
Definition: SUSY_HLT_PhotonMET.h:44
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
SUSY_HLT_PhotonMET::bookHistos
void bookHistos(DQMStore::IBooker &)
Definition: SUSY_HLT_PhotonMET.cc:102
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SUSY_HLT_PhotonMET::h_recoPhotonPt
MonitorElement * h_recoPhotonPt
Definition: SUSY_HLT_PhotonMET.h:55
SUSY_HLT_PhotonMET::h_metTurnOn_den
MonitorElement * h_metTurnOn_den
Definition: SUSY_HLT_PhotonMET.h:58
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
SUSY_HLT_PhotonMET::ptThrOffline_
double ptThrOffline_
Definition: SUSY_HLT_PhotonMET.h:51
B2GDQM_cfi.pfMETCollection
pfMETCollection
Definition: B2GDQM_cfi.py:27
SUSY_HLT_PhotonMET::triggerResults_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
Definition: SUSY_HLT_PhotonMET.h:45
edm::TriggerNames
Definition: TriggerNames.h:55
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ExoticaDQM_cfi.photonCollection
photonCollection
Definition: ExoticaDQM_cfi.py:17
SUSY_HLT_PhotonMET::h_photonTurnOn_num
MonitorElement * h_photonTurnOn_num
Definition: SUSY_HLT_PhotonMET.h:59
SUSY_HLT_PhotonMET::thePfMETCollection_
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
Definition: SUSY_HLT_PhotonMET.h:43
edm::InputTag
Definition: InputTag.h:15
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37