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

#include <SUSY_HLT_Electron_BJet.h>

Inheritance diagram for SUSY_HLT_Electron_BJet:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 SUSY_HLT_Electron_BJet (const edm::ParameterSet &ps)
 
virtual ~SUSY_HLT_Electron_BJet ()
 
- 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
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 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 (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) 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::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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

double etaThrJet_
 
HLTConfigProvider fHltConfig
 
MonitorElementh_triggerEleEta
 
MonitorElementh_triggerElePhi
 
MonitorElementh_triggerElePt
 
MonitorElementh_triggerJetEta
 
MonitorElementh_triggerJetPhi
 
MonitorElementh_triggerJetPt
 
std::string HLTProcess_
 
double ptThrJet_
 
edm::EDGetTokenT
< reco::CaloJetCollection
theCaloJetCollection_
 
edm::EDGetTokenT
< reco::GsfElectronCollection
theElectronCollection_
 
edm::EDGetTokenT
< reco::PFJetCollection
thePfJetCollection_
 
edm::EDGetTokenT
< trigger::TriggerEvent
theTrigSummary_
 
edm::InputTag triggerFilterEle_
 
edm::InputTag triggerFilterJet_
 
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
 
- 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 35 of file SUSY_HLT_Electron_BJet.h.

Constructor & Destructor Documentation

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_.

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

Definition at line 26 of file SUSY_HLT_Electron_BJet.cc.

27 {
28  edm::LogInfo("SUSY_HLT_Electron_BJet") << "Destructor SUSY_HLT_Electron_BJet::~SUSY_HLT_Electron_BJet " << std::endl;
29 }

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 72 of file SUSY_HLT_Electron_BJet.cc.

References trigger::TriggerObject::eta(), MonitorElement::Fill(), edm::Event::getByToken(), h_triggerEleEta, h_triggerElePhi, h_triggerElePt, h_triggerJetEta, h_triggerJetPhi, h_triggerJetPt, trigger::TriggerObject::id(), edm::HandleBase::isValid(), j, relativeConstraints::keys, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), theTrigSummary_, triggerFilterEle_, triggerFilterJet_, triggerResults_, and x.

72  {
73  edm::LogInfo("SUSY_HLT_Electron_BJet") << "SUSY_HLT_Electron_BJet::analyze" << std::endl;
74 
75  //-------------------------------
76  //--- Trigger
77  //-------------------------------
79  e.getByToken(triggerResults_,hltresults);
80  if(!hltresults.isValid()){
81  edm::LogError ("SUSY_HLT_Electron_BJet") << "invalid collection: TriggerResults" << "\n";
82  return;
83  }
85  e.getByToken(theTrigSummary_, triggerSummary);
86  if(!triggerSummary.isValid()) {
87  edm::LogError ("SUSY_HLT_Electron_BJet") << "invalid collection: TriggerSummary" << "\n";
88  return;
89  }
90 
91 
92  //get online objects
93  std::vector<float> ptElectron;//, etaElectron, phiElectron;
94  size_t filterIndex = triggerSummary->filterIndex( triggerFilterEle_ );
95  trigger::TriggerObjectCollection triggerObjects = triggerSummary->getObjects();
96  if( !(filterIndex >= triggerSummary->sizeFilters()) ){
97  const trigger::Keys& keys = triggerSummary->filterKeys( filterIndex );
98  for( size_t j = 0; j < keys.size(); ++j ){
99  trigger::TriggerObject foundObject = triggerObjects[keys[j]];
100  if(fabs(foundObject.id()) == 11){ //It's an electron
101 
102  bool same= false;
103  for(unsigned int x=0;x<ptElectron.size();x++){
104  if(fabs(ptElectron[x] - foundObject.pt()) < 0.01)
105  same = true;
106  }
107 
108  if(!same){
109  h_triggerElePt->Fill(foundObject.pt());
110  h_triggerEleEta->Fill(foundObject.eta());
111  h_triggerElePhi->Fill(foundObject.phi());
112  ptElectron.push_back(foundObject.pt());
113  }
114  }
115  }
116  }
117 
118  size_t filterIndex2 = triggerSummary->filterIndex( triggerFilterJet_ );
119  if( !(filterIndex2 >= triggerSummary->sizeFilters()) ){
120  const trigger::Keys& keys = triggerSummary->filterKeys( filterIndex2 );
121  for( size_t j = 0; j < keys.size(); ++j ){
122  trigger::TriggerObject foundObject = triggerObjects[keys[j]];
123  h_triggerJetPt->Fill(foundObject.pt());
124  h_triggerJetEta->Fill(foundObject.eta());
125  h_triggerJetPhi->Fill(foundObject.phi());
126  }
127  }
128 
129 
130 }
int id() const
getters
Definition: TriggerObject.h:55
float phi() const
Definition: TriggerObject.h:58
float eta() const
Definition: TriggerObject.h:57
MonitorElement * h_triggerJetPhi
void Fill(long long x)
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
int j
Definition: DBlmapReader.cc:9
bool isValid() const
Definition: HandleBase.h:76
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_triggerJetEta
MonitorElement * h_triggerElePhi
MonitorElement * h_triggerEleEta
Definition: DDAxes.h:10
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
void SUSY_HLT_Electron_BJet::beginLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 64 of file SUSY_HLT_Electron_BJet.cc.

66 {
67  edm::LogInfo("SUSY_HLT_Electron_BJet") << "SUSY_HLT_Electron_BJet::beginLuminosityBlock" << std::endl;
68 }
void SUSY_HLT_Electron_BJet::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 57 of file SUSY_HLT_Electron_BJet.cc.

References bookHistos().

58 {
59  edm::LogInfo("SUSY_HLT_Electron_BJet") << "SUSY_HLT_Electron_BJet::bookHistograms" << std::endl;
60  //book at beginRun
61  bookHistos(ibooker_);
62 }
void bookHistos(DQMStore::IBooker &)
void SUSY_HLT_Electron_BJet::bookHistos ( DQMStore::IBooker ibooker_)
private

Definition at line 144 of file SUSY_HLT_Electron_BJet.cc.

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

Referenced by bookHistograms().

145 {
146  ibooker_.cd();
147  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
148 
149  //offline quantities
150 
151  //online quantities
152  h_triggerElePt = ibooker_.book1D("triggerElePt", "Trigger Electron Pt; GeV", 50, 0.0, 500.0);
153  h_triggerEleEta = ibooker_.book1D("triggerEleEta", "Trigger Electron Eta", 20, -3.0, 3.0);
154  h_triggerElePhi = ibooker_.book1D("triggerElePhi", "Trigger Electron Phi", 20, -3.5, 3.5);
155 
156  h_triggerJetPt = ibooker_.book1D("triggerJetPt", "Trigger Jet Pt; GeV", 50, 0.0, 500.0);
157  h_triggerJetEta = ibooker_.book1D("triggerJetEta", "Trigger Jet Eta", 20, -3.0, 3.0);
158  h_triggerJetPhi = ibooker_.book1D("triggerJetPhi", "Trigger Jet Phi", 20, -3.5, 3.5);
159 
160 
161  ibooker_.cd();
162 }
void cd(void)
Definition: DQMStore.cc:266
MonitorElement * h_triggerJetPhi
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * h_triggerJetEta
MonitorElement * h_triggerElePhi
MonitorElement * h_triggerEleEta
void SUSY_HLT_Electron_BJet::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &  e 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 31 of file SUSY_HLT_Electron_BJet.cc.

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

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

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 133 of file SUSY_HLT_Electron_BJet.cc.

134 {
135  edm::LogInfo("SUSY_HLT_Electron_BJet") << "SUSY_HLT_Electron_BJet::endLuminosityBlock" << std::endl;
136 }
void SUSY_HLT_Electron_BJet::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 139 of file SUSY_HLT_Electron_BJet.cc.

140 {
141  edm::LogInfo("SUSY_HLT_Electron_BJet") << "SUSY_HLT_Electron_BJet::endRun" << std::endl;
142 }

Member Data Documentation

double SUSY_HLT_Electron_BJet::etaThrJet_
private

Definition at line 68 of file SUSY_HLT_Electron_BJet.h.

Referenced by SUSY_HLT_Electron_BJet().

HLTConfigProvider SUSY_HLT_Electron_BJet::fHltConfig
private

Definition at line 61 of file SUSY_HLT_Electron_BJet.h.

Referenced by dqmBeginRun().

MonitorElement* SUSY_HLT_Electron_BJet::h_triggerEleEta
private

Definition at line 72 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Electron_BJet::h_triggerElePhi
private

Definition at line 73 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Electron_BJet::h_triggerElePt
private

Definition at line 71 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Electron_BJet::h_triggerJetEta
private

Definition at line 76 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Electron_BJet::h_triggerJetPhi
private

Definition at line 77 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Electron_BJet::h_triggerJetPt
private

Definition at line 75 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and bookHistos().

std::string SUSY_HLT_Electron_BJet::HLTProcess_
private

Definition at line 63 of file SUSY_HLT_Electron_BJet.h.

Referenced by dqmBeginRun(), and SUSY_HLT_Electron_BJet().

double SUSY_HLT_Electron_BJet::ptThrJet_
private

Definition at line 67 of file SUSY_HLT_Electron_BJet.h.

Referenced by SUSY_HLT_Electron_BJet().

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

Definition at line 56 of file SUSY_HLT_Electron_BJet.h.

Referenced by SUSY_HLT_Electron_BJet().

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

Definition at line 54 of file SUSY_HLT_Electron_BJet.h.

Referenced by SUSY_HLT_Electron_BJet().

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

Definition at line 55 of file SUSY_HLT_Electron_BJet.h.

Referenced by SUSY_HLT_Electron_BJet().

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

Definition at line 58 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and SUSY_HLT_Electron_BJet().

edm::InputTag SUSY_HLT_Electron_BJet::triggerFilterEle_
private

Definition at line 65 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and SUSY_HLT_Electron_BJet().

edm::InputTag SUSY_HLT_Electron_BJet::triggerFilterJet_
private

Definition at line 66 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and SUSY_HLT_Electron_BJet().

std::string SUSY_HLT_Electron_BJet::triggerPath_
private

Definition at line 64 of file SUSY_HLT_Electron_BJet.h.

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

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

Definition at line 57 of file SUSY_HLT_Electron_BJet.h.

Referenced by analyze(), and SUSY_HLT_Electron_BJet().