CMS 3D CMS Logo

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

#include <SUSY_HLT_Electron_BJet.h>

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

Public Member Functions

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

double etaThrJet_
 
HLTConfigProvider fHltConfig
 
MonitorElementh_triggerEleEta
 
MonitorElementh_triggerElePhi
 
MonitorElementh_triggerElePt
 
MonitorElementh_triggerJetEta
 
MonitorElementh_triggerJetPhi
 
MonitorElementh_triggerJetPt
 
std::string HLTProcess_
 
double ptThrJet_
 
edm::EDGetTokenT< reco::CaloJetCollectiontheCaloJetCollection_
 
edm::EDGetTokenT< reco::GsfElectronCollectiontheElectronCollection_
 
edm::EDGetTokenT< reco::PFJetCollectionthePfJetCollection_
 
edm::EDGetTokenT< trigger::TriggerEventtheTrigSummary_
 
edm::InputTag triggerFilterEle_
 
edm::InputTag triggerFilterJet_
 
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 >
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 30 of file SUSY_HLT_Electron_BJet.h.

Constructor & Destructor Documentation

◆ SUSY_HLT_Electron_BJet()

SUSY_HLT_Electron_BJet::SUSY_HLT_Electron_BJet ( const edm::ParameterSet ps)

Definition at line 9 of file SUSY_HLT_Electron_BJet.cc.

References etaThrJet_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLTProcess_, ptThrJet_, AlCaHLTBitMon_QueryRunRegistry::string, theCaloJetCollection_, theElectronCollection_, thePfJetCollection_, theTrigSummary_, triggerFilterEle_, triggerFilterJet_, triggerPath_, and triggerResults_.

9  {
10  edm::LogInfo("SUSY_HLT_Electron_BJet") << "Constructor SUSY_HLT_Electron_BJet::SUSY_HLT_Electron_BJet " << std::endl;
11  // Get parameters from configuration file
12  theTrigSummary_ = consumes<trigger::TriggerEvent>(ps.getParameter<edm::InputTag>("trigSummary"));
13  theElectronCollection_ = consumes<reco::GsfElectronCollection>(ps.getParameter<edm::InputTag>("ElectronCollection"));
14  thePfJetCollection_ = consumes<reco::PFJetCollection>(ps.getParameter<edm::InputTag>("pfJetCollection"));
15  theCaloJetCollection_ = consumes<reco::CaloJetCollection>(ps.getParameter<edm::InputTag>("caloJetCollection"));
16  triggerResults_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("TriggerResults"));
17  HLTProcess_ = ps.getParameter<std::string>("HLTProcess");
18  triggerPath_ = ps.getParameter<std::string>("TriggerPath");
19  triggerFilterEle_ = ps.getParameter<edm::InputTag>("TriggerFilterEle");
20  triggerFilterJet_ = ps.getParameter<edm::InputTag>("TriggerFilterJet");
21  ptThrJet_ = ps.getUntrackedParameter<double>("PtThrJet");
22  etaThrJet_ = ps.getUntrackedParameter<double>("EtaThrJet");
23 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< reco::GsfElectronCollection > theElectronCollection_
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
Log< level::Info, false > LogInfo
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_

◆ ~SUSY_HLT_Electron_BJet()

SUSY_HLT_Electron_BJet::~SUSY_HLT_Electron_BJet ( )
override

Definition at line 25 of file SUSY_HLT_Electron_BJet.cc.

25  {
26  edm::LogInfo("SUSY_HLT_Electron_BJet") << "Destructor SUSY_HLT_Electron_BJet::~SUSY_HLT_Electron_BJet " << std::endl;
27 }
Log< level::Info, false > LogInfo

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 60 of file SUSY_HLT_Electron_BJet.cc.

References MillePedeFileConverter_cfg::e, trigger::TriggerObject::eta(), dqm::impl::MonitorElement::Fill(), h_triggerEleEta, h_triggerElePhi, h_triggerElePt, h_triggerJetEta, h_triggerJetPhi, h_triggerJetPt, HLTBitAnalyser_cfi::hltresults, trigger::TriggerObject::id(), dqmiolumiharvest::j, relativeConstraints::keys, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), theTrigSummary_, triggerFilterEle_, triggerFilterJet_, triggerMatchMonitor_cfi::triggerObjects, triggerResults_, HLTMuonOfflineAnalyzer_cfi::triggerSummary, and x.

60  {
61  edm::LogInfo("SUSY_HLT_Electron_BJet") << "SUSY_HLT_Electron_BJet::analyze" << std::endl;
62 
63  //-------------------------------
64  //--- Trigger
65  //-------------------------------
67  e.getByToken(triggerResults_, hltresults);
68  if (!hltresults.isValid()) {
69  edm::LogError("SUSY_HLT_Electron_BJet") << "invalid collection: TriggerResults"
70  << "\n";
71  return;
72  }
74  e.getByToken(theTrigSummary_, triggerSummary);
75  if (!triggerSummary.isValid()) {
76  edm::LogError("SUSY_HLT_Electron_BJet") << "invalid collection: TriggerSummary"
77  << "\n";
78  return;
79  }
80 
81  // get online objects
82  std::vector<float> ptElectron; //, etaElectron, phiElectron;
83  size_t filterIndex = triggerSummary->filterIndex(triggerFilterEle_);
85  if (!(filterIndex >= triggerSummary->sizeFilters())) {
86  const trigger::Keys &keys = triggerSummary->filterKeys(filterIndex);
87  for (size_t j = 0; j < keys.size(); ++j) {
89  if (fabs(foundObject.id()) == 11) { // It's an electron
90 
91  bool same = false;
92  for (unsigned int x = 0; x < ptElectron.size(); x++) {
93  if (fabs(ptElectron[x] - foundObject.pt()) < 0.01)
94  same = true;
95  }
96 
97  if (!same) {
98  h_triggerElePt->Fill(foundObject.pt());
99  h_triggerEleEta->Fill(foundObject.eta());
100  h_triggerElePhi->Fill(foundObject.phi());
101  ptElectron.push_back(foundObject.pt());
102  }
103  }
104  }
105  }
106 
107  size_t filterIndex2 = triggerSummary->filterIndex(triggerFilterJet_);
108  if (!(filterIndex2 >= triggerSummary->sizeFilters())) {
109  const trigger::Keys &keys = triggerSummary->filterKeys(filterIndex2);
110  for (size_t j = 0; j < keys.size(); ++j) {
112  h_triggerJetPt->Fill(foundObject.pt());
113  h_triggerJetEta->Fill(foundObject.eta());
114  h_triggerJetPhi->Fill(foundObject.phi());
115  }
116  }
117 }
Log< level::Error, false > LogError
MonitorElement * h_triggerJetPhi
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
void Fill(long long x)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
int id() const
getters
Definition: TriggerObject.h:51
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
Log< level::Info, false > LogInfo
std::vector< size_type > Keys
MonitorElement * h_triggerJetEta
MonitorElement * h_triggerElePhi
MonitorElement * h_triggerEleEta
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 54 of file SUSY_HLT_Electron_BJet.cc.

References bookHistos().

54  {
55  edm::LogInfo("SUSY_HLT_Electron_BJet") << "SUSY_HLT_Electron_BJet::bookHistograms" << std::endl;
56  // book at beginRun
57  bookHistos(ibooker_);
58 }
Log< level::Info, false > LogInfo
void bookHistos(DQMStore::IBooker &)

◆ bookHistos()

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

Definition at line 119 of file SUSY_HLT_Electron_BJet.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), h_triggerEleEta, h_triggerElePhi, h_triggerElePt, h_triggerJetEta, h_triggerJetPhi, h_triggerJetPt, dqm::implementation::NavigatorBase::setCurrentFolder(), and triggerPath_.

Referenced by bookHistograms().

119  {
120  ibooker_.cd();
121  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
122 
123  // offline quantities
124 
125  // online quantities
126  h_triggerElePt = ibooker_.book1D("triggerElePt", "Trigger Electron Pt; GeV", 50, 0.0, 500.0);
127  h_triggerEleEta = ibooker_.book1D("triggerEleEta", "Trigger Electron Eta", 20, -3.0, 3.0);
128  h_triggerElePhi = ibooker_.book1D("triggerElePhi", "Trigger Electron Phi", 20, -3.5, 3.5);
129 
130  h_triggerJetPt = ibooker_.book1D("triggerJetPt", "Trigger Jet Pt; GeV", 50, 0.0, 500.0);
131  h_triggerJetEta = ibooker_.book1D("triggerJetEta", "Trigger Jet Eta", 20, -3.0, 3.0);
132  h_triggerJetPhi = ibooker_.book1D("triggerJetPhi", "Trigger Jet Phi", 20, -3.5, 3.5);
133 
134  ibooker_.cd();
135 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * h_triggerJetPhi
MonitorElement * h_triggerJetEta
MonitorElement * h_triggerElePhi
MonitorElement * h_triggerEleEta
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ dqmBeginRun()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 29 of file SUSY_HLT_Electron_BJet.cc.

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

29  {
30  bool changed;
31 
32  if (!fHltConfig.init(run, e, HLTProcess_, changed)) {
33  edm::LogError("SUSY_HLT_Electron_BJet") << "Initialization of HLTConfigProvider failed!!";
34  return;
35  }
36 
37  bool pathFound = false;
38  const std::vector<std::string> allTrigNames = fHltConfig.triggerNames();
39  for (size_t j = 0; j < allTrigNames.size(); ++j) {
40  if (allTrigNames[j].find(triggerPath_) != std::string::npos) {
41  pathFound = true;
42  }
43  }
44 
45  if (!pathFound) {
46  LogDebug("SUSY_HLT_Electron_BJet") << "Path not found"
47  << "\n";
48  return;
49  }
50 
51  edm::LogInfo("SUSY_HLT_Electron_BJet") << "SUSY_HLT_Electron_BJet::beginRun" << std::endl;
52 }
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
Log< level::Info, false > LogInfo
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
const std::vector< std::string > & triggerNames() const
names of trigger paths
#define LogDebug(id)

Member Data Documentation

◆ etaThrJet_

double SUSY_HLT_Electron_BJet::etaThrJet_
private

Definition at line 58 of file SUSY_HLT_Electron_BJet.h.

Referenced by SUSY_HLT_Electron_BJet().

◆ fHltConfig

HLTConfigProvider SUSY_HLT_Electron_BJet::fHltConfig
private

Definition at line 51 of file SUSY_HLT_Electron_BJet.h.

Referenced by dqmBeginRun().

◆ h_triggerEleEta

MonitorElement* SUSY_HLT_Electron_BJet::h_triggerEleEta
private

Definition at line 62 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerElePhi

MonitorElement* SUSY_HLT_Electron_BJet::h_triggerElePhi
private

Definition at line 63 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerElePt

MonitorElement* SUSY_HLT_Electron_BJet::h_triggerElePt
private

Definition at line 61 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerJetEta

MonitorElement* SUSY_HLT_Electron_BJet::h_triggerJetEta
private

Definition at line 66 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerJetPhi

MonitorElement* SUSY_HLT_Electron_BJet::h_triggerJetPhi
private

Definition at line 67 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and bookHistos().

◆ h_triggerJetPt

MonitorElement* SUSY_HLT_Electron_BJet::h_triggerJetPt
private

Definition at line 65 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and bookHistos().

◆ HLTProcess_

std::string SUSY_HLT_Electron_BJet::HLTProcess_
private

Definition at line 53 of file SUSY_HLT_Electron_BJet.h.

Referenced by dqmBeginRun(), and SUSY_HLT_Electron_BJet().

◆ ptThrJet_

double SUSY_HLT_Electron_BJet::ptThrJet_
private

Definition at line 57 of file SUSY_HLT_Electron_BJet.h.

Referenced by SUSY_HLT_Electron_BJet().

◆ theCaloJetCollection_

edm::EDGetTokenT<reco::CaloJetCollection> SUSY_HLT_Electron_BJet::theCaloJetCollection_
private

Definition at line 47 of file SUSY_HLT_Electron_BJet.h.

Referenced by SUSY_HLT_Electron_BJet().

◆ theElectronCollection_

edm::EDGetTokenT<reco::GsfElectronCollection> SUSY_HLT_Electron_BJet::theElectronCollection_
private

Definition at line 45 of file SUSY_HLT_Electron_BJet.h.

Referenced by SUSY_HLT_Electron_BJet().

◆ thePfJetCollection_

edm::EDGetTokenT<reco::PFJetCollection> SUSY_HLT_Electron_BJet::thePfJetCollection_
private

Definition at line 46 of file SUSY_HLT_Electron_BJet.h.

Referenced by SUSY_HLT_Electron_BJet().

◆ theTrigSummary_

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

Definition at line 49 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and SUSY_HLT_Electron_BJet().

◆ triggerFilterEle_

edm::InputTag SUSY_HLT_Electron_BJet::triggerFilterEle_
private

Definition at line 55 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and SUSY_HLT_Electron_BJet().

◆ triggerFilterJet_

edm::InputTag SUSY_HLT_Electron_BJet::triggerFilterJet_
private

Definition at line 56 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and SUSY_HLT_Electron_BJet().

◆ triggerPath_

std::string SUSY_HLT_Electron_BJet::triggerPath_
private

Definition at line 54 of file SUSY_HLT_Electron_BJet.h.

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

◆ triggerResults_

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

Definition at line 48 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and SUSY_HLT_Electron_BJet().