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_ElecFakes Class Reference

#include <SUSY_HLT_ElecFakes.h>

Inheritance diagram for SUSY_HLT_ElecFakes:
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_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
 
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

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::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 33 of file SUSY_HLT_ElecFakes.h.

Constructor & Destructor Documentation

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

Definition at line 9 of file SUSY_HLT_ElecFakes.cc.

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

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 }
T getParameter(std::string const &) const
edm::InputTag triggerJetFilter_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
edm::InputTag triggerFilter_
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

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.

References trigger::TriggerObject::eta(), dqm::impl::MonitorElement::Fill(), trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), edm::Event::getByToken(), trigger::TriggerEvent::getObjects(), h_triggerElEta, h_triggerElPhi, h_triggerElPt, h_triggerJetEta, h_triggerJetPhi, h_triggerJetPt, HLTBitAnalyser_cfi::hltresults, edm::HandleBase::isValid(), dqmiolumiharvest::j, relativeConstraints::keys, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), trigger::TriggerEvent::sizeFilters(), theTrigSummary_, triggerFilter_, triggerJetFilter_, triggerMatchMonitor_cfi::triggerObjects, triggerResults_, and HLTMuonOfflineAnalyzer_cfi::triggerSummary.

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) {
82  trigger::TriggerObject foundObject = triggerObjects[keys[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) {
96  trigger::TriggerObject foundObject = triggerObjects[keys[j]];
97  h_triggerJetPt->Fill(foundObject.pt());
98  h_triggerJetEta->Fill(foundObject.eta());
99  h_triggerJetPhi->Fill(foundObject.phi());
100  }
101  }
102 }
MonitorElement * h_triggerJetPhi
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:146
float phi() const
Definition: TriggerObject.h:54
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:118
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:132
edm::InputTag triggerJetFilter_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
float eta() const
Definition: TriggerObject.h:53
MonitorElement * h_triggerJetEta
void Fill(long long x)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:101
MonitorElement * h_triggerElEta
MonitorElement * h_triggerElPt
bool isValid() const
Definition: HandleBase.h:70
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
std::vector< size_type > Keys
MonitorElement * h_triggerJetPt
MonitorElement * h_triggerElPhi
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
edm::InputTag triggerFilter_
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.

References bookHistos().

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

Definition at line 108 of file SUSY_HLT_ElecFakes.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::cd(), DEFINE_FWK_MODULE, h_triggerElEta, h_triggerElPhi, h_triggerElPt, h_triggerJetEta, h_triggerJetPhi, h_triggerJetPt, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), and triggerPath_.

Referenced by bookHistograms().

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

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

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 }
const std::vector< std::string > & triggerNames() const
names of trigger paths
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
HLTConfigProvider fHltConfig
void SUSY_HLT_ElecFakes::dqmEndRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 104 of file SUSY_HLT_ElecFakes.cc.

104  {
105  edm::LogInfo("SUSY_HLT_ElecFakes") << "SUSY_HLT_ElecFakes::endRun" << std::endl;
106 }

Member Data Documentation

HLTConfigProvider SUSY_HLT_ElecFakes::fHltConfig
private

Definition at line 52 of file SUSY_HLT_ElecFakes.h.

Referenced by dqmBeginRun().

MonitorElement* SUSY_HLT_ElecFakes::h_triggerElEta
private

Definition at line 61 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_ElecFakes::h_triggerElJetdPhi
private

Definition at line 66 of file SUSY_HLT_ElecFakes.h.

MonitorElement* SUSY_HLT_ElecFakes::h_triggerElPhi
private

Definition at line 62 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_ElecFakes::h_triggerElPt
private

Definition at line 60 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_ElecFakes::h_triggerJetEta
private

Definition at line 64 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_ElecFakes::h_triggerJetPhi
private

Definition at line 65 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_ElecFakes::h_triggerJetPt
private

Definition at line 63 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

std::string SUSY_HLT_ElecFakes::HLTProcess_
private

Definition at line 54 of file SUSY_HLT_ElecFakes.h.

Referenced by dqmBeginRun(), and SUSY_HLT_ElecFakes().

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

Definition at line 50 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and SUSY_HLT_ElecFakes().

edm::InputTag SUSY_HLT_ElecFakes::triggerFilter_
private

Definition at line 56 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and SUSY_HLT_ElecFakes().

edm::InputTag SUSY_HLT_ElecFakes::triggerJetFilter_
private

Definition at line 57 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and SUSY_HLT_ElecFakes().

std::string SUSY_HLT_ElecFakes::triggerPath_
private

Definition at line 55 of file SUSY_HLT_ElecFakes.h.

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

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

Definition at line 49 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and SUSY_HLT_ElecFakes().