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::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

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
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

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 dqmEndRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 29 of file SUSY_HLT_PhotonMET.h.

Constructor & Destructor Documentation

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
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< reco::PhotonCollection > thePhotonCollection_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
std::string triggerPathBase_
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

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

Reimplemented from DQMEDAnalyzer.

Definition at line 34 of file SUSY_HLT_PhotonMET.cc.

References funct::abs(), edm::HLTGlobalStatus::accept(), dqm::impl::MonitorElement::Fill(), edm::Event::getByToken(), h_metTurnOn_den, h_metTurnOn_num, h_photonTurnOn_den, h_photonTurnOn_num, h_recoMet, h_recoPhotonPt, HLTBitAnalyser_cfi::hltresults, edm::EventBase::isRealData(), edm::HandleBase::isValid(), metThrOffline_, B2GDQM_cfi::pfMETCollection, ExoticaDQM_cfi::photonCollection, ptThrOffline_, edm::TriggerNames::size(), thePfMETCollection_, thePhotonCollection_, edm::TriggerNames::triggerName(), edm::Event::triggerNames(), triggerPath_, triggerPathBase_, triggerResults_, trigNames, and edm::HLTGlobalStatus::wasrun().

34  {
35  edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::analyze" << std::endl;
36 
37  //-------------------------------
38  //--- MET
39  //-------------------------------
41  e.getByToken(thePfMETCollection_, pfMETCollection);
42  if (!pfMETCollection.isValid()) {
43  edm::LogError("SUSY_HLT_PhotonMET") << "invalid met collection"
44  << "\n";
45  return;
46  }
47  //-------------------------------
48  //--- Photon
49  //-------------------------------
51  e.getByToken(thePhotonCollection_, photonCollection);
52  if (!photonCollection.isValid()) {
53  edm::LogError("SUSY_HLT_PhotonMET") << "invalid egamma collection"
54  << "\n";
55  return;
56  }
57 
58  // check what is in the menu
60  e.getByToken(triggerResults_, hltresults);
61  if (!hltresults.isValid()) {
62  edm::LogError("SUSY_HLT_PhotonMET") << "invalid collection: TriggerResults"
63  << "\n";
64  return;
65  }
66 
67  // use only events with leading photon in barrel
68  if (photonCollection->empty() || abs(photonCollection->begin()->superCluster()->eta()) > 1.4442)
69  return;
70 
71  // get reco photon and met
72  float const recoPhotonPt = !photonCollection->empty() ? photonCollection->begin()->et() : 0;
73  float const recoMET = !pfMETCollection->empty() ? pfMETCollection->begin()->et() : 0;
74  h_recoPhotonPt->Fill(recoPhotonPt);
75  h_recoMet->Fill(recoMET);
76 
77  // the actual trigger efficiencies
78  bool hasFired = false, hasFiredBaseTrigger = false;
79  edm::TriggerNames const &trigNames = e.triggerNames(*hltresults);
80  unsigned int const numTriggers = trigNames.size();
81  for (unsigned int hltIndex = 0; hltIndex < numTriggers; ++hltIndex) {
82  if (trigNames.triggerName(hltIndex).find(triggerPath_) != std::string::npos && hltresults->wasrun(hltIndex) &&
83  hltresults->accept(hltIndex))
84  hasFired = true;
85  if (trigNames.triggerName(hltIndex).find(triggerPathBase_) != std::string::npos && hltresults->wasrun(hltIndex) &&
86  hltresults->accept(hltIndex))
87  hasFiredBaseTrigger = true;
88  }
89 
90  if (hasFiredBaseTrigger || !e.isRealData()) {
91  // passed base trigger
92  if (recoPhotonPt > ptThrOffline_)
93  h_metTurnOn_den->Fill(recoMET);
94  if (recoMET > metThrOffline_)
95  h_photonTurnOn_den->Fill(recoPhotonPt);
96  if (hasFired) {
97  // passed base and signal trigger
98  if (recoPhotonPt > ptThrOffline_)
99  h_metTurnOn_num->Fill(recoMET);
100  if (recoMET > metThrOffline_)
101  h_photonTurnOn_num->Fill(recoPhotonPt);
102  }
103  }
104 }
MonitorElement * h_recoMet
MonitorElement * h_metTurnOn_den
bool wasrun() const
Was at least one path run?
MonitorElement * h_recoPhotonPt
MonitorElement * h_metTurnOn_num
bool accept() const
Has at least one path accepted the event?
Strings::size_type size() const
Definition: TriggerNames.cc:31
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
bool isValid() const
Definition: HandleBase.h:70
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:22
MonitorElement * h_photonTurnOn_num
std::string triggerPathBase_
void SUSY_HLT_PhotonMET::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 28 of file SUSY_HLT_PhotonMET.cc.

References bookHistos().

28  {
29  edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::bookHistograms" << std::endl;
30  // book at beginRun
31  bookHistos(ibooker_);
32 }
void bookHistos(DQMStore::IBooker &)
void SUSY_HLT_PhotonMET::bookHistos ( DQMStore::IBooker ibooker_)
private

Definition at line 110 of file SUSY_HLT_PhotonMET.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::cd(), DEFINE_FWK_MODULE, h_metTurnOn_den, h_metTurnOn_num, h_photonTurnOn_den, h_photonTurnOn_num, h_recoMet, h_recoPhotonPt, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), and triggerPath_.

Referenced by bookHistograms().

110  {
111  ibooker_.cd();
112  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
113 
114  // offline quantities
115  h_recoPhotonPt = ibooker_.book1D("recoPhotonPt", "reco Photon transverse momentum; p_{T} (GeV)", 20, 0, 1000);
116  h_recoMet = ibooker_.book1D("recoMet", "reco Missing transverse energy;E_{T}^{miss} (GeV)", 20, 0, 1000);
117  h_metTurnOn_num = ibooker_.book1D("pfMetTurnOn_num", "PF MET Turn On Numerator", 20, 0, 500);
118  h_metTurnOn_den = ibooker_.book1D("pfMetTurnOn_den", "PF MET Turn On Denominator", 20, 0, 500);
119  h_photonTurnOn_num = ibooker_.book1D("photonTurnOn_num", "Photon Turn On Numerator", 20, 0, 1000);
120  h_photonTurnOn_den = ibooker_.book1D("photonTurnOn_den", "Photon Turn On Denominator", 20, 0, 1000);
121 
122  ibooker_.cd();
123 }
MonitorElement * h_recoMet
MonitorElement * h_metTurnOn_den
MonitorElement * h_recoPhotonPt
MonitorElement * h_metTurnOn_num
MonitorElement * h_photonTurnOn_den
MonitorElement * h_photonTurnOn_num
void SUSY_HLT_PhotonMET::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 24 of file SUSY_HLT_PhotonMET.cc.

24  {
25  edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::beginRun" << std::endl;
26 }
void SUSY_HLT_PhotonMET::dqmEndRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 106 of file SUSY_HLT_PhotonMET.cc.

106  {
107  edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::endRun" << std::endl;
108 }

Member Data Documentation

MonitorElement* SUSY_HLT_PhotonMET::h_metTurnOn_den
private

Definition at line 60 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_PhotonMET::h_metTurnOn_num
private

Definition at line 59 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_PhotonMET::h_photonTurnOn_den
private

Definition at line 62 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_PhotonMET::h_photonTurnOn_num
private

Definition at line 61 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_PhotonMET::h_recoMet
private

Definition at line 58 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_PhotonMET::h_recoPhotonPt
private

Definition at line 57 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

double SUSY_HLT_PhotonMET::metThrOffline_
private

Definition at line 54 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().

double SUSY_HLT_PhotonMET::ptThrOffline_
private

Definition at line 53 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().

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

Definition at line 45 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().

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

Definition at line 46 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().

edm::InputTag SUSY_HLT_PhotonMET::triggerFilterMET_
private

Definition at line 52 of file SUSY_HLT_PhotonMET.h.

edm::InputTag SUSY_HLT_PhotonMET::triggerFilterPhoton_
private

Definition at line 51 of file SUSY_HLT_PhotonMET.h.

std::string SUSY_HLT_PhotonMET::triggerPath_
private

Definition at line 49 of file SUSY_HLT_PhotonMET.h.

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

std::string SUSY_HLT_PhotonMET::triggerPathBase_
private

Definition at line 50 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().

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

Definition at line 47 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().