CMS 3D CMS Logo

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

#include <SUSY_HLT_ElecFakes.h>

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

Public Member Functions

 SUSY_HLT_ElecFakes (const edm::ParameterSet &ps)
 
 ~SUSY_HLT_ElecFakes () 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
 
 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
 
void dqmBeginRun (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

HLTConfigProvider fHltConfig
 
MonitorElementh_triggerElEta
 
MonitorElementh_triggerElJetdPhi
 
MonitorElementh_triggerElPhi
 
MonitorElementh_triggerElPt
 
MonitorElementh_triggerJetEta
 
MonitorElementh_triggerJetPhi
 
MonitorElementh_triggerJetPt
 
std::string HLTProcess_
 
edm::EDGetTokenT< trigger::TriggerEventtheTrigSummary_
 
edm::InputTag triggerFilter_
 
edm::InputTag triggerJetFilter_
 
std::string triggerPath_
 
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 33 of file SUSY_HLT_ElecFakes.h.

Constructor & Destructor Documentation

◆ SUSY_HLT_ElecFakes()

SUSY_HLT_ElecFakes::SUSY_HLT_ElecFakes ( const edm::ParameterSet ps)

Definition at line 9 of file SUSY_HLT_ElecFakes.cc.

9  {
10  edm::LogInfo("SUSY_HLT_ElecFakes") << "Constructor SUSY_HLT_ElecFakes::SUSY_HLT_ElecFakes " << std::endl;
11  // Get parameters from configuration file
12  theTrigSummary_ = consumes<trigger::TriggerEvent>(ps.getParameter<edm::InputTag>("trigSummary"));
13  triggerResults_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("TriggerResults"));
14  HLTProcess_ = ps.getParameter<std::string>("HLTProcess");
15  triggerPath_ = ps.getParameter<std::string>("TriggerPath");
16  triggerFilter_ = ps.getParameter<edm::InputTag>("TriggerFilter");
17  triggerJetFilter_ = ps.getParameter<edm::InputTag>("TriggerJetFilter");
18 }

References edm::ParameterSet::getParameter(), HLTProcess_, AlCaHLTBitMon_QueryRunRegistry::string, theTrigSummary_, triggerFilter_, triggerJetFilter_, triggerPath_, and triggerResults_.

◆ ~SUSY_HLT_ElecFakes()

SUSY_HLT_ElecFakes::~SUSY_HLT_ElecFakes ( )
override

Definition at line 20 of file SUSY_HLT_ElecFakes.cc.

20  {
21  edm::LogInfo("SUSY_HLT_ElecFakes") << "Destructor SUSY_HLT_ElecFakes::~SUSY_HLT_ElecFakes " << std::endl;
22 }

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 55 of file SUSY_HLT_ElecFakes.cc.

55  {
56  edm::LogInfo("SUSY_HLT_ElecFakes") << "SUSY_HLT_ElecFakes::analyze" << std::endl;
57 
58  //-------------------------------
59  //--- Trigger
60  //-------------------------------
62  e.getByToken(triggerResults_, hltresults);
63  if (!hltresults.isValid()) {
64  edm::LogError("SUSY_HLT_ElecFakes") << "invalid collection: TriggerResults"
65  << "\n";
66  return;
67  }
69  e.getByToken(theTrigSummary_, triggerSummary);
70  if (!triggerSummary.isValid()) {
71  edm::LogError("SUSY_HLT_ElecFakes") << "invalid collection: TriggerSummary"
72  << "\n";
73  return;
74  }
75 
76  // get online objects
77  size_t filterIndex = triggerSummary->filterIndex(triggerFilter_);
79  if (!(filterIndex >= triggerSummary->sizeFilters())) {
80  const trigger::Keys &keys = triggerSummary->filterKeys(filterIndex);
81  for (size_t j = 0; j < keys.size(); ++j) {
83  // if(foundObject.id() == 11){ //Electrons check number
84  h_triggerElPt->Fill(foundObject.pt());
85  h_triggerElEta->Fill(foundObject.eta());
86  h_triggerElPhi->Fill(foundObject.phi());
87  // }
88  }
89  }
90 
91  filterIndex = triggerSummary->filterIndex(triggerJetFilter_);
92  // triggerObjects = triggerSummary->getObjects();
93  if (!(filterIndex >= triggerSummary->sizeFilters())) {
94  const trigger::Keys &keys = triggerSummary->filterKeys(filterIndex);
95  for (size_t j = 0; j < keys.size(); ++j) {
97  h_triggerJetPt->Fill(foundObject.pt());
98  h_triggerJetEta->Fill(foundObject.eta());
99  h_triggerJetPhi->Fill(foundObject.phi());
100  }
101  }
102 }

References MillePedeFileConverter_cfg::e, trigger::TriggerObject::eta(), dqm::impl::MonitorElement::Fill(), h_triggerElEta, h_triggerElPhi, h_triggerElPt, h_triggerJetEta, h_triggerJetPhi, h_triggerJetPt, HLTBitAnalyser_cfi::hltresults, dqmiolumiharvest::j, relativeConstraints::keys, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), theTrigSummary_, triggerFilter_, triggerJetFilter_, triggerMatchMonitor_cfi::triggerObjects, triggerResults_, and HLTMuonOfflineAnalyzer_cfi::triggerSummary.

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 49 of file SUSY_HLT_ElecFakes.cc.

49  {
50  edm::LogInfo("SUSY_HLT_ElecFakes") << "SUSY_HLT_ElecFakes::bookHistograms" << std::endl;
51  // book at beginRun
52  bookHistos(ibooker_);
53 }

References bookHistos().

◆ bookHistos()

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

Definition at line 104 of file SUSY_HLT_ElecFakes.cc.

104  {
105  ibooker_.cd();
106  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
107 
108  // online quantities
109  h_triggerElPt = ibooker_.book1D("triggerElPt", "Trigger El Pt; GeV", 50, 0.0, 100.0);
110  h_triggerElEta = ibooker_.book1D("triggerElEta", "Trigger El Eta", 20, -2.5, 2.5);
111  h_triggerElPhi = ibooker_.book1D("triggerElPhi", "Trigger El Phi", 20, -3.5, 3.5);
112 
113  h_triggerJetPt = ibooker_.book1D("triggerJetPt", "Trigger Jet Pt; GeV", 20, 0.0, 200.0);
114  h_triggerJetEta = ibooker_.book1D("triggerJetEta", "Trigger Jet Eta", 20, -3.0, 3.0);
115  h_triggerJetPhi = ibooker_.book1D("triggerJetPhi", "Trigger Jet Phi", 20, -3.5, 3.5);
116 
117  // h_triggerElJetdPhi = ibooker_.book1D("triggerElJetdPhi", "Trigger El,Jet
118  // dPhi", 20, -3.5, 3.5);
119 
120  // num and den hists to be divided in harvesting step to make turn on curves
121  ibooker_.cd();
122 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), h_triggerElEta, h_triggerElPhi, h_triggerElPt, h_triggerJetEta, h_triggerJetPhi, h_triggerJetPt, dqm::implementation::NavigatorBase::setCurrentFolder(), and triggerPath_.

Referenced by bookHistograms().

◆ dqmBeginRun()

void SUSY_HLT_ElecFakes::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &  e 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 24 of file SUSY_HLT_ElecFakes.cc.

24  {
25  bool changed;
26 
27  if (!fHltConfig.init(run, e, HLTProcess_, changed)) {
28  edm::LogError("SUSY_HLT_ElecFakes") << "Initialization of HLTConfigProvider failed!!";
29  return;
30  }
31 
32  bool pathFound = false;
33  const std::vector<std::string> allTrigNames = fHltConfig.triggerNames();
34  for (size_t j = 0; j < allTrigNames.size(); ++j) {
35  if (allTrigNames[j].find(triggerPath_) != std::string::npos) {
36  pathFound = true;
37  }
38  }
39 
40  if (!pathFound) {
41  edm::LogInfo("SUSY_HLT_ElecFakes") << "Path not found"
42  << "\n";
43  return;
44  }
45 
46  edm::LogInfo("SUSY_HLT_ElecFakes") << "SUSY_HLT_ElecFakes::beginRun" << std::endl;
47 }

References MillePedeFileConverter_cfg::e, fHltConfig, spr::find(), HLTProcess_, HLTConfigProvider::init(), dqmiolumiharvest::j, writedatasetfile::run, HLTConfigProvider::triggerNames(), and triggerPath_.

Member Data Documentation

◆ fHltConfig

HLTConfigProvider SUSY_HLT_ElecFakes::fHltConfig
private

Definition at line 51 of file SUSY_HLT_ElecFakes.h.

Referenced by dqmBeginRun().

◆ h_triggerElEta

MonitorElement* SUSY_HLT_ElecFakes::h_triggerElEta
private

Definition at line 60 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerElJetdPhi

MonitorElement* SUSY_HLT_ElecFakes::h_triggerElJetdPhi
private

Definition at line 65 of file SUSY_HLT_ElecFakes.h.

◆ h_triggerElPhi

MonitorElement* SUSY_HLT_ElecFakes::h_triggerElPhi
private

Definition at line 61 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerElPt

MonitorElement* SUSY_HLT_ElecFakes::h_triggerElPt
private

Definition at line 59 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerJetEta

MonitorElement* SUSY_HLT_ElecFakes::h_triggerJetEta
private

Definition at line 63 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerJetPhi

MonitorElement* SUSY_HLT_ElecFakes::h_triggerJetPhi
private

Definition at line 64 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerJetPt

MonitorElement* SUSY_HLT_ElecFakes::h_triggerJetPt
private

Definition at line 62 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

◆ HLTProcess_

std::string SUSY_HLT_ElecFakes::HLTProcess_
private

Definition at line 53 of file SUSY_HLT_ElecFakes.h.

Referenced by dqmBeginRun(), and SUSY_HLT_ElecFakes().

◆ theTrigSummary_

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

Definition at line 49 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and SUSY_HLT_ElecFakes().

◆ triggerFilter_

edm::InputTag SUSY_HLT_ElecFakes::triggerFilter_
private

Definition at line 55 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and SUSY_HLT_ElecFakes().

◆ triggerJetFilter_

edm::InputTag SUSY_HLT_ElecFakes::triggerJetFilter_
private

Definition at line 56 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and SUSY_HLT_ElecFakes().

◆ triggerPath_

std::string SUSY_HLT_ElecFakes::triggerPath_
private

Definition at line 54 of file SUSY_HLT_ElecFakes.h.

Referenced by bookHistos(), dqmBeginRun(), and SUSY_HLT_ElecFakes().

◆ triggerResults_

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

Definition at line 48 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and SUSY_HLT_ElecFakes().

trigger::TriggerObject::phi
float phi() const
Definition: TriggerObject.h:54
triggerMatchMonitor_cfi.triggerObjects
triggerObjects
Definition: triggerMatchMonitor_cfi.py:15
HLTBitAnalyser_cfi.hltresults
hltresults
Definition: HLTBitAnalyser_cfi.py:13
SUSY_HLT_ElecFakes::h_triggerJetPhi
MonitorElement * h_triggerJetPhi
Definition: SUSY_HLT_ElecFakes.h:64
SUSY_HLT_ElecFakes::bookHistos
void bookHistos(DQMStore::IBooker &)
Definition: SUSY_HLT_ElecFakes.cc:104
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SUSY_HLT_ElecFakes::triggerJetFilter_
edm::InputTag triggerJetFilter_
Definition: SUSY_HLT_ElecFakes.h:56
HLTMuonOfflineAnalyzer_cfi.triggerSummary
triggerSummary
Definition: HLTMuonOfflineAnalyzer_cfi.py:86
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::Handle< edm::TriggerResults >
SUSY_HLT_ElecFakes::h_triggerJetEta
MonitorElement * h_triggerJetEta
Definition: SUSY_HLT_ElecFakes.h:63
trigger::TriggerObject::pt
float pt() const
Definition: TriggerObject.h:52
SUSY_HLT_ElecFakes::theTrigSummary_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
Definition: SUSY_HLT_ElecFakes.h:49
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
trigger::TriggerObject
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SUSY_HLT_ElecFakes::HLTProcess_
std::string HLTProcess_
Definition: SUSY_HLT_ElecFakes.h:53
SUSY_HLT_ElecFakes::h_triggerElEta
MonitorElement * h_triggerElEta
Definition: SUSY_HLT_ElecFakes.h:60
trigger::TriggerObjectCollection
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
SUSY_HLT_ElecFakes::triggerPath_
std::string triggerPath_
Definition: SUSY_HLT_ElecFakes.h:54
SUSY_HLT_ElecFakes::h_triggerElPt
MonitorElement * h_triggerElPt
Definition: SUSY_HLT_ElecFakes.h:59
trigger::Keys
std::vector< size_type > Keys
Definition: TriggerTypeDefs.h:19
trigger::TriggerObject::eta
float eta() const
Definition: TriggerObject.h:53
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
writedatasetfile.run
run
Definition: writedatasetfile.py:27
HLTConfigProvider::init
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
Definition: HLTConfigProvider.cc:36
SUSY_HLT_ElecFakes::h_triggerElPhi
MonitorElement * h_triggerElPhi
Definition: SUSY_HLT_ElecFakes.h:61
SUSY_HLT_ElecFakes::fHltConfig
HLTConfigProvider fHltConfig
Definition: SUSY_HLT_ElecFakes.h:51
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SUSY_HLT_ElecFakes::h_triggerJetPt
MonitorElement * h_triggerJetPt
Definition: SUSY_HLT_ElecFakes.h:62
SUSY_HLT_ElecFakes::triggerResults_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
Definition: SUSY_HLT_ElecFakes.h:48
HLTConfigProvider::triggerNames
const std::vector< std::string > & triggerNames() const
names of trigger paths
Definition: HLTConfigProvider.h:69
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
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
SUSY_HLT_ElecFakes::triggerFilter_
edm::InputTag triggerFilter_
Definition: SUSY_HLT_ElecFakes.h:55