CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 SUSY_HLT_PhotonMET (const edm::ParameterSet &ps)
 
virtual ~SUSY_HLT_PhotonMET ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup)
 
void endRun (edm::Run const &run, edm::EventSetup const &eSetup)
 
- 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 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::PFMETCollection
thePfMETCollection_
 
edm::EDGetTokenT
< reco::PhotonCollection
thePhotonCollection_
 
edm::InputTag triggerFilterMET_
 
edm::InputTag triggerFilterPhoton_
 
std::string triggerPath_
 
std::string triggerPathBase_
 
edm::EDGetTokenT
< edm::TriggerResults
triggerResults_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 30 of file SUSY_HLT_PhotonMET.h.

Constructor & Destructor Documentation

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

Definition at line 9 of file SUSY_HLT_PhotonMET.cc.

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

10 {
11  edm::LogInfo("SUSY_HLT_PhotonMET") << "Constructor SUSY_HLT_PhotonMET::SUSY_HLT_PhotonMET " << std::endl;
12  // Get parameters from configuration file
13  thePfMETCollection_ = consumes<reco::PFMETCollection>(ps.getParameter<edm::InputTag>("pfMETCollection"));
14  thePhotonCollection_ = consumes<reco::PhotonCollection>(ps.getParameter<edm::InputTag>("photonCollection"));
15  triggerResults_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("TriggerResults"));
16  triggerPath_ = ps.getParameter<std::string>("TriggerPath");
17  triggerPathBase_ = ps.getParameter<std::string>("TriggerPathBase");
18  ptThrOffline_ = ps.getUntrackedParameter<double>("ptThrOffline");
19  metThrOffline_ = ps.getUntrackedParameter<double>("metThrOffline");
20 }
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 ( )
virtual

Definition at line 22 of file SUSY_HLT_PhotonMET.cc.

23 {
24  edm::LogInfo("SUSY_HLT_PhotonMET") << "Destructor SUSY_HLT_PhotonMET::~SUSY_HLT_PhotonMET " << std::endl;
25 }

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 45 of file SUSY_HLT_PhotonMET.cc.

References funct::abs(), MonitorElement::Fill(), edm::Event::getByToken(), h_metTurnOn_den, h_metTurnOn_num, h_photonTurnOn_den, h_photonTurnOn_num, h_recoMet, h_recoPhotonPt, edm::EventBase::isRealData(), edm::HandleBase::isValid(), metThrOffline_, ptThrOffline_, edm::TriggerNames::size(), thePfMETCollection_, thePhotonCollection_, edm::TriggerNames::triggerName(), edm::Event::triggerNames(), triggerPath_, triggerPathBase_, triggerResults_, and trigNames.

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

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 39 of file SUSY_HLT_PhotonMET.cc.

41 {
42  edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::beginLuminosityBlock" << std::endl;
43 }
void SUSY_HLT_PhotonMET::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 32 of file SUSY_HLT_PhotonMET.cc.

References bookHistos().

33 {
34  edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::bookHistograms" << std::endl;
35  //book at beginRun
36  bookHistos(ibooker_);
37 }
void bookHistos(DQMStore::IBooker &)
void SUSY_HLT_PhotonMET::bookHistos ( DQMStore::IBooker ibooker_)
private

Definition at line 117 of file SUSY_HLT_PhotonMET.cc.

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

Referenced by bookHistograms().

118 {
119  ibooker_.cd();
120  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
121 
122  //offline quantities
123  h_recoPhotonPt = ibooker_.book1D("recoPhotonPt", "reco Photon transverse momentum; p_{T} (GeV)", 20, 0, 1000);
124  h_recoMet = ibooker_.book1D("recoMet", "reco Missing transverse energy;E_{T}^{miss} (GeV)", 20, 0, 1000);
125  h_metTurnOn_num = ibooker_.book1D("pfMetTurnOn_num", "PF MET Turn On Numerator", 20, 0, 500);
126  h_metTurnOn_den = ibooker_.book1D("pfMetTurnOn_den", "PF MET Turn On Denominator", 20, 0, 500);
127  h_photonTurnOn_num = ibooker_.book1D("photonTurnOn_num", "Photon Turn On Numerator", 20, 0, 1000);
128  h_photonTurnOn_den = ibooker_.book1D("photonTurnOn_den", "Photon Turn On Denominator", 20, 0, 1000);
129 
130  ibooker_.cd();
131 }
MonitorElement * h_recoMet
MonitorElement * h_metTurnOn_den
MonitorElement * h_recoPhotonPt
MonitorElement * h_metTurnOn_num
void cd(void)
Definition: DQMStore.cc:268
MonitorElement * h_photonTurnOn_den
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * h_photonTurnOn_num
void SUSY_HLT_PhotonMET::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 27 of file SUSY_HLT_PhotonMET.cc.

28 {
29  edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::beginRun" << std::endl;
30 }
void SUSY_HLT_PhotonMET::endLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 106 of file SUSY_HLT_PhotonMET.cc.

107 {
108  edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::endLuminosityBlock" << std::endl;
109 }
void SUSY_HLT_PhotonMET::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 112 of file SUSY_HLT_PhotonMET.cc.

113 {
114  edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::endRun" << std::endl;
115 }

Member Data Documentation

MonitorElement* SUSY_HLT_PhotonMET::h_metTurnOn_den
private

Definition at line 64 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_PhotonMET::h_metTurnOn_num
private

Definition at line 63 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_PhotonMET::h_photonTurnOn_den
private

Definition at line 66 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_PhotonMET::h_photonTurnOn_num
private

Definition at line 65 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_PhotonMET::h_recoMet
private

Definition at line 62 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_PhotonMET::h_recoPhotonPt
private

Definition at line 61 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and bookHistos().

double SUSY_HLT_PhotonMET::metThrOffline_
private

Definition at line 58 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().

double SUSY_HLT_PhotonMET::ptThrOffline_
private

Definition at line 57 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 49 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 50 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().

edm::InputTag SUSY_HLT_PhotonMET::triggerFilterMET_
private

Definition at line 56 of file SUSY_HLT_PhotonMET.h.

edm::InputTag SUSY_HLT_PhotonMET::triggerFilterPhoton_
private

Definition at line 55 of file SUSY_HLT_PhotonMET.h.

std::string SUSY_HLT_PhotonMET::triggerPath_
private

Definition at line 53 of file SUSY_HLT_PhotonMET.h.

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

std::string SUSY_HLT_PhotonMET::triggerPathBase_
private

Definition at line 54 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 51 of file SUSY_HLT_PhotonMET.h.

Referenced by analyze(), and SUSY_HLT_PhotonMET().