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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

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

HLTConfigProvider fHltConfig
 
MonitorElementh_triggerElEta
 
MonitorElementh_triggerElJetdPhi
 
MonitorElementh_triggerElPhi
 
MonitorElementh_triggerElPt
 
MonitorElementh_triggerJetEta
 
MonitorElementh_triggerJetPhi
 
MonitorElementh_triggerJetPt
 
std::string HLTProcess_
 
edm::EDGetTokenT
< trigger::TriggerEvent
theTrigSummary_
 
edm::InputTag triggerFilter_
 
edm::InputTag triggerJetFilter_
 
std::string triggerPath_
 
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 39 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_.

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

Definition at line 21 of file SUSY_HLT_ElecFakes.cc.

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

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 67 of file SUSY_HLT_ElecFakes.cc.

References trigger::TriggerObject::eta(), MonitorElement::Fill(), edm::Event::getByToken(), h_triggerElEta, h_triggerElPhi, h_triggerElPt, h_triggerJetEta, h_triggerJetPhi, h_triggerJetPt, edm::HandleBase::isValid(), j, relativeConstraints::keys, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), theTrigSummary_, triggerFilter_, triggerJetFilter_, and triggerResults_.

67  {
68  edm::LogInfo("SUSY_HLT_ElecFakes") << "SUSY_HLT_ElecFakes::analyze" << std::endl;
69 
70 
71  //-------------------------------
72  //--- Trigger
73  //-------------------------------
75  e.getByToken(triggerResults_,hltresults);
76  if(!hltresults.isValid()){
77  edm::LogError ("SUSY_HLT_ElecFakes") << "invalid collection: TriggerResults" << "\n";
78  return;
79  }
81  e.getByToken(theTrigSummary_, triggerSummary);
82  if(!triggerSummary.isValid()) {
83  edm::LogError ("SUSY_HLT_ElecFakes") << "invalid collection: TriggerSummary" << "\n";
84  return;
85  }
86 
87 
88  //get online objects
89  size_t filterIndex = triggerSummary->filterIndex( triggerFilter_ );
90  trigger::TriggerObjectCollection triggerObjects = triggerSummary->getObjects();
91  if( !(filterIndex >= triggerSummary->sizeFilters()) ){
92  const trigger::Keys& keys = triggerSummary->filterKeys( filterIndex );
93  for( size_t j = 0; j < keys.size(); ++j ){
94  trigger::TriggerObject foundObject = triggerObjects[keys[j]];
95  // if(foundObject.id() == 11){ //Electrons check number
96  h_triggerElPt->Fill(foundObject.pt());
97  h_triggerElEta->Fill(foundObject.eta());
98  h_triggerElPhi->Fill(foundObject.phi());
99  // }
100  }
101  }
102 
103  filterIndex = triggerSummary->filterIndex( triggerJetFilter_ );
104  // triggerObjects = triggerSummary->getObjects();
105  if( !(filterIndex >= triggerSummary->sizeFilters()) ){
106  const trigger::Keys& keys = triggerSummary->filterKeys( filterIndex );
107  for( size_t j = 0; j < keys.size(); ++j ){
108  trigger::TriggerObject foundObject = triggerObjects[keys[j]];
109  h_triggerJetPt->Fill(foundObject.pt());
110  h_triggerJetEta->Fill(foundObject.eta());
111  h_triggerJetPhi->Fill(foundObject.phi());
112  }
113  }
114 
115 }
MonitorElement * h_triggerJetPhi
float phi() const
Definition: TriggerObject.h:58
edm::InputTag triggerJetFilter_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
float eta() const
Definition: TriggerObject.h:57
MonitorElement * h_triggerJetEta
void Fill(long long x)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
int j
Definition: DBlmapReader.cc:9
MonitorElement * h_triggerElEta
MonitorElement * h_triggerElPt
bool isValid() const
Definition: HandleBase.h:75
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
std::vector< size_type > Keys
MonitorElement * h_triggerJetPt
MonitorElement * h_triggerElPhi
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
edm::InputTag triggerFilter_
void SUSY_HLT_ElecFakes::beginLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 59 of file SUSY_HLT_ElecFakes.cc.

61 {
62  edm::LogInfo("SUSY_HLT_ElecFakes") << "SUSY_HLT_ElecFakes::beginLuminosityBlock" << std::endl;
63 }
void SUSY_HLT_ElecFakes::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 52 of file SUSY_HLT_ElecFakes.cc.

References bookHistos().

53 {
54  edm::LogInfo("SUSY_HLT_ElecFakes") << "SUSY_HLT_ElecFakes::bookHistograms" << std::endl;
55  //book at beginRun
56  bookHistos(ibooker_);
57 }
void bookHistos(DQMStore::IBooker &)
void SUSY_HLT_ElecFakes::bookHistos ( DQMStore::IBooker ibooker_)
private

Definition at line 129 of file SUSY_HLT_ElecFakes.cc.

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

Referenced by bookHistograms().

130 {
131  ibooker_.cd();
132  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
133 
134  //online quantities
135  h_triggerElPt = ibooker_.book1D("triggerElPt", "Trigger El Pt; GeV", 50, 0.0, 100.0);
136  h_triggerElEta = ibooker_.book1D("triggerElEta", "Trigger El Eta", 20, -2.5, 2.5);
137  h_triggerElPhi = ibooker_.book1D("triggerElPhi", "Trigger El Phi", 20, -3.5, 3.5);
138 
139  h_triggerJetPt = ibooker_.book1D("triggerJetPt", "Trigger Jet Pt; GeV", 20, 0.0, 200.0);
140  h_triggerJetEta = ibooker_.book1D("triggerJetEta", "Trigger Jet Eta", 20, -3.0, 3.0);
141  h_triggerJetPhi = ibooker_.book1D("triggerJetPhi", "Trigger Jet Phi", 20, -3.5, 3.5);
142 
143 // h_triggerElJetdPhi = ibooker_.book1D("triggerElJetdPhi", "Trigger El,Jet dPhi", 20, -3.5, 3.5);
144 
145 
146  //num and den hists to be divided in harvesting step to make turn on curves
147  ibooker_.cd();
148 }
MonitorElement * h_triggerJetPhi
void cd(void)
Definition: DQMStore.cc:268
MonitorElement * h_triggerJetEta
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * h_triggerElEta
MonitorElement * h_triggerElPt
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
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 26 of file SUSY_HLT_ElecFakes.cc.

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

27 {
28 
29  bool changed;
30 
31  if (!fHltConfig.init(run, e, HLTProcess_, changed)) {
32  edm::LogError("SUSY_HLT_ElecFakes") << "Initialization of HLTConfigProvider failed!!";
33  return;
34  }
35 
36  bool pathFound = false;
37  const std::vector<std::string> allTrigNames = fHltConfig.triggerNames();
38  for(size_t j = 0; j <allTrigNames.size(); ++j) {
39  if(allTrigNames[j].find(triggerPath_) != std::string::npos) {
40  pathFound = true;
41  }
42  }
43 
44  if(!pathFound) {
45  edm::LogInfo ("SUSY_HLT_ElecFakes") << "Path not found" << "\n";
46  return;
47  }
48 
49  edm::LogInfo("SUSY_HLT_ElecFakes") << "SUSY_HLT_ElecFakes::beginRun" << std::endl;
50 }
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:7
int j
Definition: DBlmapReader.cc:9
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::endLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 118 of file SUSY_HLT_ElecFakes.cc.

119 {
120  edm::LogInfo("SUSY_HLT_ElecFakes") << "SUSY_HLT_ElecFakes::endLuminosityBlock" << std::endl;
121 }
void SUSY_HLT_ElecFakes::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 124 of file SUSY_HLT_ElecFakes.cc.

125 {
126  edm::LogInfo("SUSY_HLT_ElecFakes") << "SUSY_HLT_ElecFakes::endRun" << std::endl;
127 }

Member Data Documentation

HLTConfigProvider SUSY_HLT_ElecFakes::fHltConfig
private

Definition at line 62 of file SUSY_HLT_ElecFakes.h.

Referenced by dqmBeginRun().

MonitorElement* SUSY_HLT_ElecFakes::h_triggerElEta
private

Definition at line 71 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_ElecFakes::h_triggerElJetdPhi
private

Definition at line 76 of file SUSY_HLT_ElecFakes.h.

MonitorElement* SUSY_HLT_ElecFakes::h_triggerElPhi
private

Definition at line 72 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_ElecFakes::h_triggerElPt
private

Definition at line 70 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_ElecFakes::h_triggerJetEta
private

Definition at line 74 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_ElecFakes::h_triggerJetPhi
private

Definition at line 75 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_ElecFakes::h_triggerJetPt
private

Definition at line 73 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and bookHistos().

std::string SUSY_HLT_ElecFakes::HLTProcess_
private

Definition at line 64 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 59 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and SUSY_HLT_ElecFakes().

edm::InputTag SUSY_HLT_ElecFakes::triggerFilter_
private

Definition at line 66 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and SUSY_HLT_ElecFakes().

edm::InputTag SUSY_HLT_ElecFakes::triggerJetFilter_
private

Definition at line 67 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and SUSY_HLT_ElecFakes().

std::string SUSY_HLT_ElecFakes::triggerPath_
private

Definition at line 65 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 58 of file SUSY_HLT_ElecFakes.h.

Referenced by analyze(), and SUSY_HLT_ElecFakes().