CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Private Member Functions | Private Attributes
JetMonitor Class Reference

#include <JetMonitor.h>

Inheritance diagram for JetMonitor:
DQMEDAnalyzer edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

struct  JetME
 
struct  MEbinning
 

Public Member Functions

 JetMonitor (const edm::ParameterSet &)
 
 ~JetMonitor () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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 () 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
 
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)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
static void fillHistoLSPSetDescription (edm::ParameterSetDescription &pset)
 
static void fillHistoPSetDescription (edm::ParameterSetDescription &pset)
 
- 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 Member Functions

void analyze (edm::Event const &iEvent, edm::EventSetup const &iSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void bookME (DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, unsigned int nbins, double xmin, double xmax)
 
void bookME (DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, std::vector< double > binningX)
 
void bookME (DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, int nbinsX, double xmin, double xmax, double ymin, double ymax)
 
void bookME (DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, int nbinsX, double xmin, double xmax, int nbinsY, double ymin, double ymax)
 
void bookME (DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, std::vector< double > binningX, std::vector< double > binningY)
 
void bookME (DQMStore::IBooker &, MonitorElement *me, std::string &histname, std::string &histtitle, int nbins, double xmin, double xmax)
 
void bookME (DQMStore::IBooker &, MonitorElement *me, std::string &histname, std::string &histtitle, int nbinsX, double xmin, double xmax, int nbinsY, double ymin, double ymax)
 
void bookMESub (DQMStore::IBooker &, JetME *a_me, const int len_, const std::string &h_Name, const std::string &h_Title, const std::string &h_subOptName, std::string h_subOptTitle, bool doPhi=true, bool doEta=true, bool doEtaPhi=true, bool doVsLS=true)
 
void FillME (JetME *a_me, double pt_, double phi_, double eta_, int ls_, const std::string &denu, bool doPhi=true, bool doEta=true, bool doEtaPhi=true, bool doVsLS=true)
 
bool isBarrel (double eta)
 
bool isEndCapM (double eta)
 
bool isEndCapP (double eta)
 For Hcal Endcap Plus Area. More...
 
bool isForward (double eta)
 For Hcal Forward Plus Area. More...
 
bool isHEM17 (double eta, double phi)
 For Hcal HEM17 Area. More...
 
bool isHEP17 (double eta, double phi)
 For Hcal HEP17 Area. More...
 
bool isHEP18 (double eta, double phi)
 For Hcal HEP18 Area. More...
 
void setMETitle (JetME &me, const std::string &titleX, const std::string &titleY)
 
- 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)
 

Static Private Member Functions

static MEbinning getHistoLSPSet (const edm::ParameterSet &pset)
 
static MEbinning getHistoPSet (const edm::ParameterSet &pset)
 

Private Attributes

JetME a_ME [7]
 
JetME a_ME_HB [7]
 
JetME a_ME_HE [7]
 
JetME a_ME_HE_m [7]
 
JetME a_ME_HE_p [7]
 
JetME a_ME_HEM17 [7]
 
JetME a_ME_HEP17 [7]
 
JetME a_ME_HEP18 [7]
 
JetME a_ME_HF [7]
 
edm::EDGetTokenT< reco::CaloJetCollectioncalojetToken_
 
std::unique_ptr< GenericTriggerEventFlagden_genTriggerEventFlag_
 
edm::EDGetTokenT< reco::GsfElectronCollectioneleToken_
 
MEbinning eta_binning_hem17_
 
MEbinning eta_binning_hep17_
 
std::string folderName_
 
std::string histoSuffix_
 
bool isCaloJetTrig
 
bool isPFJetTrig
 
MEbinning jet_eta_binning_
 
double Jet_MAX_ETA = 5
 
double Jet_MAX_ETA_HEP17 = 3.0
 
double Jet_MAX_PHI = 3.2
 
double Jet_MAX_PHI_HEP17 = -0.52
 
double Jet_MAX_PHI_HEP18 = -0.17
 
double Jet_MIN_ETA_HEP17 = 1.3
 
double Jet_MIN_PHI_HEP17 = -0.87
 
double Jet_MIN_PHI_HEP18 = -0.52
 
unsigned int Jet_N_ETA = 20
 
unsigned int Jet_N_PHI = 32
 
MEbinning jet_phi_binning_
 
JetME jetHEM17_AbsEta_
 
JetME jetHEM17_AbsEtaVsPhi_
 
JetME jetHEP17_AbsEta_
 
JetME jetHEP17_AbsEtaVsPhi_
 
MEbinning jetpT_binning
 
std::vector< double > jetpT_variable_binning_
 
MEbinning jetptThr_binning_
 
edm::EDGetTokenT< edm::View< reco::Jet > > jetSrc_
 
MEbinning ls_binning_
 
edm::EDGetTokenT< reco::PFMETCollectionmetToken_
 
edm::EDGetTokenT< reco::MuonCollectionmuoToken_
 
unsigned int N_ETA_HEP17 = 9
 
unsigned int N_PHI_HEP17 = 7
 
unsigned int N_PHI_HEP18 = 7
 
int nmuons_
 
std::unique_ptr< GenericTriggerEventFlagnum_genTriggerEventFlag_
 
edm::EDGetTokenT< reco::PFJetCollectionpfjetToken_
 
MEbinning phi_binning_hep17_
 
MEbinning phi_binning_hep18_
 
double ptcut_
 
std::vector< double > v_jeteta
 
std::vector< double > v_jetphi
 
std::vector< double > v_jetpt
 

Additional Inherited Members

- 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
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 49 of file JetMonitor.h.

Constructor & Destructor Documentation

JetMonitor::JetMonitor ( const edm::ParameterSet iConfig)

Definition at line 17 of file JetMonitor.cc.

References folderName_, getHistoPSet(), edm::ParameterSet::getParameter(), isCaloJetTrig, isPFJetTrig, jetpT_binning, jetpT_variable_binning_, jetptThr_binning_, jetSrc_, ls_binning_, ptcut_, AlCaHLTBitMon_QueryRunRegistry::string, and ~JetMonitor().

17  :
18 num_genTriggerEventFlag_ ( new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"),consumesCollector(), *this))
19 ,den_genTriggerEventFlag_ ( new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"),consumesCollector(), *this))
20 {
21  folderName_ = iConfig.getParameter<std::string>("FolderName");
22  jetSrc_ = mayConsume<edm::View<reco::Jet> >(iConfig.getParameter<edm::InputTag>("jetSrc"));//jet
23  jetpT_variable_binning_ = iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("jetptBinning");
27 
28 
29  ptcut_ = iConfig.getParameter<double>("ptcut" ); // for HLT Jet
30  isPFJetTrig = iConfig.getParameter<bool>("ispfjettrg" );
31  isCaloJetTrig = iConfig.getParameter<bool>("iscalojettrg" );
32 
33 
34 }
T getParameter(std::string const &) const
MEbinning ls_binning_
Definition: JetMonitor.h:112
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
Definition: JetMonitor.cc:38
std::string folderName_
Definition: JetMonitor.h:98
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
bool isCaloJetTrig
Definition: JetMonitor.h:138
MEbinning jetpT_binning
Definition: JetMonitor.h:110
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: JetMonitor.h:133
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< double > jetpT_variable_binning_
Definition: JetMonitor.h:109
MEbinning jetptThr_binning_
Definition: JetMonitor.h:111
edm::EDGetTokenT< edm::View< reco::Jet > > jetSrc_
Definition: JetMonitor.h:107
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: JetMonitor.h:132
bool isPFJetTrig
Definition: JetMonitor.h:137
double ptcut_
Definition: JetMonitor.h:136
JetMonitor::~JetMonitor ( )
overridedefault

Referenced by JetMonitor().

Member Function Documentation

void JetMonitor::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 155 of file JetMonitor.cc.

References a_ME, a_ME_HB, a_ME_HE, a_ME_HE_m, a_ME_HE_p, a_ME_HEM17, a_ME_HEP17, a_ME_HEP18, a_ME_HF, funct::abs(), den_genTriggerEventFlag_, JetMonitor::JetME::denominator, MonitorElement::Fill(), FillME(), edm::Event::getByToken(), edm::EventBase::id(), isBarrel(), isEndCapM(), isEndCapP(), isForward(), isHEM17(), isHEP17(), isHEP18(), edm::HandleBase::isValid(), jetHEM17_AbsEta_, jetHEP17_AbsEta_, jetSrc_, eostools::ls(), edm::EventID::luminosityBlock(), num_genTriggerEventFlag_, JetMonitor::JetME::numerator, ptcut_, v_jeteta, v_jetphi, and v_jetpt.

155  {
156  // Filter out events if Trigger Filtering is requested
157  if (den_genTriggerEventFlag_->on() && ! den_genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
158 // edm::Handle<reco::PFJetCollection> pfjetHandle;
159 // iEvent.getByToken( pfjetToken_, pfjetHandle );
160 
161 // edm::Handle<reco::CaloJetCollection> calojetHandle;
162 // iEvent.getByToken( calojetToken_, calojetHandle );
163 
164  int ls = iEvent.id().luminosityBlock();
165  v_jetpt.clear();
166  v_jeteta.clear();
167  v_jetphi.clear();
168 
170  iEvent.getByToken( jetSrc_, offjets );
171  if (!offjets.isValid()){
172  edm::LogWarning("JetMonitor") << "Jet handle not valid \n";
173  return;
174  }
175  for ( edm::View<reco::Jet>::const_iterator ibegin = offjets->begin(), iend = offjets->end(), ijet = ibegin; ijet != iend; ++ijet ) {
176  //if (ijet->pt()< 20) {continue;}
177  if (ijet->pt()< ptcut_) {continue;}
178  v_jetpt.push_back(ijet->pt());
179  v_jeteta.push_back(ijet->eta());
180  v_jetphi.push_back(ijet->phi());
181 // cout << "jetpt (view ) : " << ijet->pt() << endl;
182  }
183 
184  if ( v_jetpt.empty() ) return;
185  double jetpt_ = v_jetpt[0];
186  double jeteta_ = v_jeteta[0];
187  double jetphi_ = v_jetphi[0];
188 
189  FillME(a_ME,jetpt_,jetphi_,jeteta_,ls,"denominator");
190  if (isBarrel( jeteta_ ) )
191  {
192  FillME(a_ME_HB,jetpt_,jetphi_,jeteta_,ls,"denominator",true, true, true, false);
193  }
194  else if (isEndCapP( jeteta_ ) )
195  {
196  FillME(a_ME_HE, jetpt_,jetphi_,jeteta_,ls,"denominator",true, true, true, false);
197  FillME(a_ME_HE_p,jetpt_,jetphi_,jeteta_,ls,"denominator",true, true, true, false);
198  }
199  else if (isEndCapM( jeteta_ ) )
200  {
201  FillME(a_ME_HE, jetpt_,jetphi_,jeteta_,ls,"denominator",true, true, true, false);
202  FillME(a_ME_HE_m,jetpt_,jetphi_,jeteta_,ls,"denominator",true, true, true, false);
203  }
204  else if (isForward( jeteta_ ) )
205  {
206  FillME(a_ME_HF,jetpt_,jetphi_,jeteta_,ls,"denominator",true, true, true, false);
207  }
208 
209  if (isHEP17( jeteta_, jetphi_ ) )
210  {
211  FillME(a_ME_HEP17,jetpt_,jetphi_,jeteta_,ls,"denominator",true,false,false, false); // doPhi, doEta, doEtaPhi, doVsLS
213  }
214  else if (isHEM17( jeteta_, jetphi_ ) )
215  {
216  FillME(a_ME_HEM17,jetpt_,jetphi_,jeteta_,ls,"denominator",true,false,false, false); // doPhi, doEta, doEtaPhi
218  }
219  else if (isHEP18( jeteta_, jetphi_ ) )
220  {
221  FillME(a_ME_HEP18,jetpt_,jetphi_,jeteta_,ls,"denominator",false,false,false, false); // doPhi, doEta, doEtaPhi
222  }
223 
224 
225  if (num_genTriggerEventFlag_->on() && ! num_genTriggerEventFlag_->accept( iEvent, iSetup) ) return; // Require Numerator //
226 
227  FillME(a_ME,jetpt_,jetphi_,jeteta_,ls,"numerator");
228  if (isBarrel( jeteta_ ) )
229  {
230  FillME(a_ME_HB,jetpt_,jetphi_,jeteta_,ls,"numerator",true, true, true, false);
231  }
232  else if (isEndCapP( jeteta_ ) )
233  {
234  FillME(a_ME_HE, jetpt_,jetphi_,jeteta_,ls,"numerator",true, true, true, false);
235  FillME(a_ME_HE_p,jetpt_,jetphi_,jeteta_,ls,"numerator",true, true, true, false);
236  }
237  else if (isEndCapM( jeteta_ ) )
238  {
239  FillME(a_ME_HE, jetpt_,jetphi_,jeteta_,ls,"numerator",true, true, true, false);
240  FillME(a_ME_HE_m,jetpt_,jetphi_,jeteta_,ls,"numerator",true, true, true, false);
241  }
242  else if (isForward( jeteta_ ) )
243  {
244  FillME(a_ME_HF,jetpt_,jetphi_,jeteta_,ls,"numerator",true, true, true, false);
245  }
246 
247  if (isHEP17( jeteta_, jetphi_ ) )
248  {
249  FillME(a_ME_HEP17,jetpt_,jetphi_,jeteta_,ls,"numerator",true,false,false, false); // doPhi, doEta, doEtaPhi, doVsLS
250  jetHEP17_AbsEta_.numerator->Fill(abs(jeteta_));
251  }
252  else if (isHEM17( jeteta_, jetphi_ ) )
253  {
254  FillME(a_ME_HEM17,jetpt_,jetphi_,jeteta_,ls,"numerator",true,false,false,false); // doPhi, doEta, doEtaPhi, doVsLS
255  jetHEM17_AbsEta_.numerator->Fill(abs(jeteta_));
256  }
257  else if (isHEP18( jeteta_, jetphi_ ) )
258  {
259  FillME(a_ME_HEP18,jetpt_,jetphi_,jeteta_,ls,"numerator",false,false,false,false); // doPhi, doEta, doEtaPhi, doVsLS
260  }
261 
262 }
bool isBarrel(double eta)
Definition: JetMonitor.cc:331
JetME a_ME_HB[7]
Definition: JetMonitor.h:116
bool isHEP17(double eta, double phi)
For Hcal HEP17 Area.
Definition: JetMonitor.cc:357
JetME a_ME_HE_m[7]
Definition: JetMonitor.h:120
JetME jetHEP17_AbsEta_
Definition: JetMonitor.h:128
JetME a_ME_HEM17[7]
Definition: JetMonitor.h:121
JetME a_ME_HE_p[7]
Definition: JetMonitor.h:119
void FillME(JetME *a_me, double pt_, double phi_, double eta_, int ls_, const std::string &denu, bool doPhi=true, bool doEta=true, bool doEtaPhi=true, bool doVsLS=true)
Definition: JetMonitor.cc:387
JetME a_ME_HEP18[7]
Definition: JetMonitor.h:123
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:230
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: JetMonitor.h:133
bool isEndCapM(double eta)
Definition: JetMonitor.cc:338
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
JetME a_ME_HF[7]
Definition: JetMonitor.h:118
JetME a_ME_HEP17[7]
Definition: JetMonitor.h:122
bool isValid() const
Definition: HandleBase.h:74
bool isHEM17(double eta, double phi)
For Hcal HEM17 Area.
Definition: JetMonitor.cc:365
JetME jetHEM17_AbsEta_
Definition: JetMonitor.h:129
edm::EDGetTokenT< edm::View< reco::Jet > > jetSrc_
Definition: JetMonitor.h:107
def ls(path, rec=False)
Definition: eostools.py:348
JetME a_ME_HE[7]
Definition: JetMonitor.h:117
std::vector< double > v_jetpt
Definition: JetMonitor.h:140
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: JetMonitor.h:132
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
JetME a_ME[7]
Definition: JetMonitor.h:115
std::vector< double > v_jeteta
Definition: JetMonitor.h:141
MonitorElement * denominator
Definition: JetMonitor.h:60
bool isForward(double eta)
For Hcal Forward Plus Area.
Definition: JetMonitor.cc:351
std::vector< double > v_jetphi
Definition: JetMonitor.h:142
MonitorElement * numerator
Definition: JetMonitor.h:59
bool isHEP18(double eta, double phi)
For Hcal HEP18 Area.
Definition: JetMonitor.cc:372
bool isEndCapP(double eta)
For Hcal Endcap Plus Area.
Definition: JetMonitor.cc:344
double ptcut_
Definition: JetMonitor.h:136
void JetMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 99 of file JetMonitor.cc.

References a_ME, a_ME_HB, a_ME_HE, a_ME_HE_m, a_ME_HE_p, a_ME_HEM17, a_ME_HEP17, a_ME_HEP18, a_ME_HF, bookME(), bookMESub(), den_genTriggerEventFlag_, eta_binning_hep17_, folderName_, isCaloJetTrig, isPFJetTrig, jetHEM17_AbsEta_, jetHEP17_AbsEta_, JetMonitor::MEbinning::nbins, num_genTriggerEventFlag_, DQMStore::IBooker::setCurrentFolder(), setMETitle(), AlCaHLTBitMon_QueryRunRegistry::string, JetMonitor::MEbinning::xmax, and JetMonitor::MEbinning::xmin.

102 {
103 
104  std::string histname, histtitle;
105  std::string hist_obtag = "";
106  std::string histtitle_obtag = "";
107  std::string currentFolder = folderName_ ;
108  ibooker.setCurrentFolder(currentFolder);
109 
110  if (isPFJetTrig) {hist_obtag = "pfjet"; histtitle_obtag = "PFJet";}
111  else if (isCaloJetTrig) {hist_obtag = "calojet"; histtitle_obtag = "CaloJet"; }
112  else {hist_obtag = "pfjet"; histtitle_obtag = "PFJet"; } //default is pfjet
113 
114  bookMESub(ibooker,a_ME,sizeof(a_ME)/sizeof(a_ME[0]),hist_obtag,histtitle_obtag,"","");
115  bookMESub(ibooker,a_ME_HB,sizeof(a_ME_HB)/sizeof(a_ME_HB[0]),hist_obtag,histtitle_obtag,"HB","(HB)",true, true, true, false);
116  bookMESub(ibooker,a_ME_HE,sizeof(a_ME_HE)/sizeof(a_ME_HE[0]),hist_obtag,histtitle_obtag,"HE","(HE)", true, true, true, false);
117  bookMESub(ibooker,a_ME_HF,sizeof(a_ME_HF)/sizeof(a_ME_HF[0]),hist_obtag,histtitle_obtag,"HF","(HF)",true, true, true, false);
118  bookMESub(ibooker,a_ME_HE_p,sizeof(a_ME_HE_p)/sizeof(a_ME_HE_p[0]),hist_obtag,histtitle_obtag,"HE_p","(HE+)",true, true, true, false);
119  bookMESub(ibooker,a_ME_HE_m,sizeof(a_ME_HE_m)/sizeof(a_ME_HE_m[0]),hist_obtag,histtitle_obtag,"HE_m","(HE-)",true, true, true, false);
120  bookMESub(ibooker,a_ME_HEP17,sizeof(a_ME_HEP17)/sizeof(a_ME_HEP17[0]),hist_obtag,histtitle_obtag,"HEP17","(HEP17)", true, false, false, false);
121  bookMESub(ibooker,a_ME_HEM17,sizeof(a_ME_HEM17)/sizeof(a_ME_HEM17[0]),hist_obtag,histtitle_obtag,"HEM17","(HEM17)", true, false, false, false);
122  bookMESub(ibooker,a_ME_HEP18,sizeof(a_ME_HEP18)/sizeof(a_ME_HEP18[0]),hist_obtag,histtitle_obtag,"HEP18","(HEP18)", false, false, false, false);
123 
124  /*
125  WE WOULD NEED TURNON CURVES TO BE COMPARED NOT JUST THE ZOOM OF A 2D MAP !!!
126 
127  histname = hist_obtag +"AbsEtaVsPhi_HEP17"; histtitle = histtitle_obtag + " |eta| Vs phi (HEP17) ";
128  bookME(ibooker,jetHEP17_AbsEtaVsPhi_,histname,histtitle, eta_binning_hep17_.nbins, eta_binning_hep17_.xmin, eta_binning_hep17_.xmax, phi_binning_hep17_.nbins,phi_binning_hep17_.xmin,phi_binning_hep17_.xmax);
129  setMETitle(jetHEP17_AbsEtaVsPhi_,histtitle_obtag + " |#eta|","#phi");
130 
131  histname = hist_obtag +"AbsEtaVsPhi_HEM17"; histtitle = histtitle_obtag + " |eta| Vs phi (HEM17) ";
132  bookME(ibooker,jetHEM17_AbsEtaVsPhi_,histname,histtitle, eta_binning_hep17_.nbins, eta_binning_hep17_.xmin, eta_binning_hep17_.xmax, phi_binning_hep17_.nbins,phi_binning_hep17_.xmin,phi_binning_hep17_.xmax);
133  setMETitle(jetHEM17_AbsEtaVsPhi_,histtitle_obtag + " |#eta|","#phi");
134  */
135 
136  histname = hist_obtag +"abseta_HEP17"; histtitle = histtitle_obtag + " |#eta| (HEP17) ";
138  setMETitle(jetHEP17_AbsEta_,histtitle_obtag + " |#eta|","events / |#eta|");
139 
140  histname = hist_obtag +"abseta_HEM17"; histtitle = histtitle_obtag + " |eta| (HEM17) ";
142  setMETitle(jetHEM17_AbsEta_,histtitle_obtag + " |#eta|","events / |#eta|");
143 
144  // Initialize the GenericTriggerEventFlag
145  if ( num_genTriggerEventFlag_ && num_genTriggerEventFlag_->on() ) num_genTriggerEventFlag_->initRun( iRun, iSetup );
146  if ( den_genTriggerEventFlag_ && den_genTriggerEventFlag_->on() ) den_genTriggerEventFlag_->initRun( iRun, iSetup );
147 
148 }
JetME a_ME_HB[7]
Definition: JetMonitor.h:116
JetME a_ME_HE_m[7]
Definition: JetMonitor.h:120
JetME jetHEP17_AbsEta_
Definition: JetMonitor.h:128
JetME a_ME_HEM17[7]
Definition: JetMonitor.h:121
std::string folderName_
Definition: JetMonitor.h:98
JetME a_ME_HE_p[7]
Definition: JetMonitor.h:119
void bookME(DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, unsigned int nbins, double xmin, double xmax)
Definition: JetMonitor.cc:63
JetME a_ME_HEP18[7]
Definition: JetMonitor.h:123
bool isCaloJetTrig
Definition: JetMonitor.h:138
void bookMESub(DQMStore::IBooker &, JetME *a_me, const int len_, const std::string &h_Name, const std::string &h_Title, const std::string &h_subOptName, std::string h_subOptTitle, bool doPhi=true, bool doEta=true, bool doEtaPhi=true, bool doVsLS=true)
Definition: JetMonitor.cc:419
MEbinning eta_binning_hep17_
Definition: JetMonitor.h:178
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: JetMonitor.h:133
JetME a_ME_HF[7]
Definition: JetMonitor.h:118
JetME a_ME_HEP17[7]
Definition: JetMonitor.h:122
JetME jetHEM17_AbsEta_
Definition: JetMonitor.h:129
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
JetME a_ME_HE[7]
Definition: JetMonitor.h:117
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: JetMonitor.h:132
bool isPFJetTrig
Definition: JetMonitor.h:137
JetME a_ME[7]
Definition: JetMonitor.h:115
void setMETitle(JetME &me, const std::string &titleX, const std::string &titleY)
Definition: JetMonitor.cc:56
unsigned int nbins
Definition: JetMonitor.h:53
void JetMonitor::bookME ( DQMStore::IBooker ibooker,
JetME me,
std::string &  histname,
std::string &  histtitle,
unsigned int  nbins,
double  xmin,
double  xmax 
)
protected

Definition at line 63 of file JetMonitor.cc.

References DQMStore::IBooker::book1D(), JetMonitor::JetME::denominator, and JetMonitor::JetME::numerator.

Referenced by bookHistograms(), and bookMESub().

64 {
65  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, min, max);
66  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, min, max);
67 }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
T min(T a, T b)
Definition: MathUtil.h:58
void JetMonitor::bookME ( DQMStore::IBooker ibooker,
JetME me,
std::string &  histname,
std::string &  histtitle,
std::vector< double >  binningX 
)
protected

Definition at line 68 of file JetMonitor.cc.

References DQMStore::IBooker::book1D(), JetMonitor::JetME::denominator, pileupCalc::nbins, and JetMonitor::JetME::numerator.

69 {
70  int nbins = binning.size()-1;
71  std::vector<float> fbinning(binning.begin(),binning.end());
72  float* arr = &fbinning[0];
73  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, arr);
74  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, arr);
75 }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
void JetMonitor::bookME ( DQMStore::IBooker ibooker,
JetME me,
std::string &  histname,
std::string &  histtitle,
int  nbinsX,
double  xmin,
double  xmax,
double  ymin,
double  ymax 
)
protected

Definition at line 76 of file JetMonitor.cc.

References DQMStore::IBooker::bookProfile(), JetMonitor::JetME::denominator, and JetMonitor::JetME::numerator.

77 {
78  me.numerator = ibooker.bookProfile(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
79  me.denominator = ibooker.bookProfile(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
80 }
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:160
void JetMonitor::bookME ( DQMStore::IBooker ibooker,
JetME me,
std::string &  histname,
std::string &  histtitle,
int  nbinsX,
double  xmin,
double  xmax,
int  nbinsY,
double  ymin,
double  ymax 
)
protected

Definition at line 81 of file JetMonitor.cc.

References DQMStore::IBooker::book2D(), JetMonitor::JetME::denominator, and JetMonitor::JetME::numerator.

82 {
83  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
84  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
85 }
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
void JetMonitor::bookME ( DQMStore::IBooker ibooker,
JetME me,
std::string &  histname,
std::string &  histtitle,
std::vector< double >  binningX,
std::vector< double >  binningY 
)
protected

Definition at line 86 of file JetMonitor.cc.

References DQMStore::IBooker::book2D(), JetMonitor::JetME::denominator, and JetMonitor::JetME::numerator.

87 {
88  int nbinsX = binningX.size()-1;
89  std::vector<float> fbinningX(binningX.begin(),binningX.end());
90  float* arrX = &fbinningX[0];
91  int nbinsY = binningY.size()-1;
92  std::vector<float> fbinningY(binningY.begin(),binningY.end());
93  float* arrY = &fbinningY[0];
94 
95  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, arrX, nbinsY, arrY);
96  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, arrX, nbinsY, arrY);
97 }
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
void JetMonitor::bookME ( DQMStore::IBooker ,
MonitorElement me,
std::string &  histname,
std::string &  histtitle,
int  nbins,
double  xmin,
double  xmax 
)
protected
void JetMonitor::bookME ( DQMStore::IBooker ,
MonitorElement me,
std::string &  histname,
std::string &  histtitle,
int  nbinsX,
double  xmin,
double  xmax,
int  nbinsY,
double  ymin,
double  ymax 
)
protected
void JetMonitor::bookMESub ( DQMStore::IBooker Ibooker,
JetME a_me,
const int  len_,
const std::string &  h_Name,
const std::string &  h_Title,
const std::string &  h_subOptName,
std::string  h_subOptTitle,
bool  doPhi = true,
bool  doEta = true,
bool  doEtaPhi = true,
bool  doVsLS = true 
)
protected

Definition at line 419 of file JetMonitor.cc.

References bookME(), DEFINE_FWK_MODULE, eta_binning_hem17_, eta_binning_hep17_, jet_eta_binning_, jet_phi_binning_, jetpT_binning, jetptThr_binning_, ls_binning_, eostools::move(), JetMonitor::MEbinning::nbins, phi_binning_hep17_, phi_binning_hep18_, setMETitle(), AlCaHLTBitMon_QueryRunRegistry::string, JetMonitor::MEbinning::xmax, and JetMonitor::MEbinning::xmin.

Referenced by bookHistograms().

419  {
420 
421  std::string hName = h_Name;
422  std::string hTitle = h_Title;
423  std::string hSubN ="";
424  std::string hSubT ="";
425  hSubT = std::move(h_suOptTitle);
426 
427  int nbin_phi = jet_phi_binning_.nbins;
428  double maxbin_phi = jet_phi_binning_.xmax;
429  double minbin_phi = jet_phi_binning_.xmin;
430 
431  int nbin_eta = jet_eta_binning_.nbins;
432  double maxbin_eta = jet_eta_binning_.xmax;
433  double minbin_eta = jet_eta_binning_.xmin;
434 
435  if (h_subOptName != ""){
436  hSubN = "_"+h_subOptName;
437  }
438 
439  if (h_subOptName == "HEP17") {
440  nbin_phi = phi_binning_hep17_.nbins;
441  maxbin_phi = phi_binning_hep17_.xmax;
442  minbin_phi = phi_binning_hep17_.xmin;
443 
444  nbin_eta = eta_binning_hep17_.nbins;
445  maxbin_eta = eta_binning_hep17_.xmax;
446  minbin_eta = eta_binning_hep17_.xmin;
447 
448  }
449  if (h_subOptName == "HEM17") {
450  nbin_phi = phi_binning_hep17_.nbins;
451  maxbin_phi = phi_binning_hep17_.xmax;
452  minbin_phi = phi_binning_hep17_.xmin;
453 
454  nbin_eta = eta_binning_hem17_.nbins;
455  maxbin_eta = eta_binning_hem17_.xmax;
456  minbin_eta = eta_binning_hem17_.xmin;
457 
458  }
459  if (h_subOptName == "HEP18") {
460  nbin_phi = phi_binning_hep18_.nbins;
461  maxbin_phi = phi_binning_hep18_.xmax;
462  minbin_phi = phi_binning_hep18_.xmin;
463 
464  nbin_eta = eta_binning_hep17_.nbins;
465  maxbin_eta = eta_binning_hep17_.xmax;
466  minbin_eta = eta_binning_hep17_.xmin;
467 
468  }
469  hName = h_Name+"pT"+hSubN;
470  hTitle = h_Title+" pT " + hSubT;
471  bookME(Ibooker,a_me[0],hName,hTitle,jetpT_binning.nbins,jetpT_binning.xmin, jetpT_binning.xmax);
472  setMETitle(a_me[0], h_Title +" pT [GeV]","events / [GeV]");
473 
474  hName = h_Name+ "pT_pTThresh" + hSubN;
475  hTitle = h_Title+" pT " + hSubT;
477  setMETitle(a_me[1],h_Title + "pT [GeV]","events / [GeV]");
478 
479  if ( doVsLS ) {
480  hName = h_Name + "pTVsLS" + hSubN;
481  hTitle = h_Title+" vs LS " + hSubT;
483  setMETitle(a_me[2],"LS",h_Title + "pT [GeV]");
484  }
485 
486  if ( doPhi ) {
487  hName = h_Name + "phi" + hSubN;
488  hTitle = h_Title+" phi " + hSubT;
489  bookME(Ibooker,a_me[3],hName,hTitle, nbin_phi, minbin_phi,maxbin_phi );
490  setMETitle(a_me[3],h_Title +" #phi","events / 0.1 rad");
491  }
492 
493  if ( doEta ) {
494  hName = h_Name + "eta"+ hSubN;
495  hTitle = h_Title+" eta " + hSubT;
496  bookME(Ibooker,a_me[4],hName,hTitle, nbin_eta, minbin_eta, maxbin_eta);
497  setMETitle(a_me[4],h_Title + " #eta","events / #eta");
498  }
499 
500  if ( doEtaPhi ) {
501  hName = h_Name + "EtaVsPhi"+hSubN;
502  hTitle = h_Title+" eta Vs phi " + hSubT;
503  bookME(Ibooker,a_me[5],hName,hTitle, nbin_eta, minbin_eta, maxbin_eta, nbin_phi, minbin_phi, maxbin_phi);
504  setMETitle(a_me[5],h_Title + " #eta","#phi");
505  }
506 
507  if ( doEta ) {
508  hName = h_Name + "EtaVspT"+hSubN;
509  hTitle = h_Title+" eta Vs pT " + hSubT;
510  bookME(Ibooker,a_me[6],hName,hTitle, nbin_eta, minbin_eta, maxbin_eta, jetpT_binning.nbins,jetpT_binning.xmin, jetpT_binning.xmax);
511  setMETitle(a_me[6],h_Title + " #eta","Leading Jet pT [GeV]");
512  }
513 
514 }
MEbinning eta_binning_hem17_
Definition: JetMonitor.h:182
MEbinning phi_binning_hep17_
Definition: JetMonitor.h:163
MEbinning ls_binning_
Definition: JetMonitor.h:112
void bookME(DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, unsigned int nbins, double xmin, double xmax)
Definition: JetMonitor.cc:63
MEbinning jetpT_binning
Definition: JetMonitor.h:110
MEbinning eta_binning_hep17_
Definition: JetMonitor.h:178
MEbinning phi_binning_hep18_
Definition: JetMonitor.h:171
MEbinning jet_phi_binning_
Definition: JetMonitor.h:148
MEbinning jetptThr_binning_
Definition: JetMonitor.h:111
def move(src, dest)
Definition: eostools.py:510
MEbinning jet_eta_binning_
Definition: JetMonitor.h:155
void setMETitle(JetME &me, const std::string &titleX, const std::string &titleY)
Definition: JetMonitor.cc:56
unsigned int nbins
Definition: JetMonitor.h:53
void JetMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 278 of file JetMonitor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), create_public_pileup_plots::bins, fillHistoLSPSetDescription(), fillHistoPSetDescription(), and AlCaHLTBitMon_QueryRunRegistry::string.

279 {
281  desc.add<std::string> ( "FolderName", "HLT/Jet" );
282 
283  desc.add<edm::InputTag>( "met", edm::InputTag("pfMet") );
284 // desc.add<edm::InputTag>( "pfjets", edm::InputTag("ak4PFJetsCHS") );
285 // desc.add<edm::InputTag>( "calojets", edm::InputTag("ak4CaloJets") );
286  desc.add<edm::InputTag>( "jetSrc", edm::InputTag("ak4PFJetsCHS") );
287  desc.add<edm::InputTag>( "electrons",edm::InputTag("gedGsfElectrons") );
288  desc.add<edm::InputTag>( "muons", edm::InputTag("muons") );
289  desc.add<int>("njets", 0);
290  desc.add<int>("nelectrons", 0);
291  desc.add<double>("ptcut", 20);
292  desc.add<bool>("ispfjettrg", true);
293  desc.add<bool>("iscalojettrg", false);
294 
295  edm::ParameterSetDescription genericTriggerEventPSet;
296  genericTriggerEventPSet.add<bool>("andOr");
297  genericTriggerEventPSet.add<edm::InputTag>("dcsInputTag", edm::InputTag("scalersRawToDigi") );
298  genericTriggerEventPSet.add<std::vector<int> >("dcsPartitions",{});
299  genericTriggerEventPSet.add<bool>("andOrDcs", false);
300  genericTriggerEventPSet.add<bool>("errorReplyDcs", true);
301  genericTriggerEventPSet.add<std::string>("dbLabel","");
302  genericTriggerEventPSet.add<bool>("andOrHlt", true);
303  genericTriggerEventPSet.add<edm::InputTag>("hltInputTag", edm::InputTag("TriggerResults::HLT") );
304  genericTriggerEventPSet.add<std::vector<std::string> >("hltPaths",{});
305 // genericTriggerEventPSet.add<std::string>("hltDBKey","");
306  genericTriggerEventPSet.add<bool>("errorReplyHlt",false);
307  genericTriggerEventPSet.add<unsigned int>("verbosityLevel",1);
308 
309  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
310  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
311 
314  edm::ParameterSetDescription jetPtThrPSet;
315  fillHistoPSetDescription(jetPSet);
316  fillHistoPSetDescription(jetPtThrPSet);
317  histoPSet.add<edm::ParameterSetDescription>("jetPSet", jetPSet);
318  histoPSet.add<edm::ParameterSetDescription>("jetPtThrPSet", jetPtThrPSet);
319  std::vector<double> bins = {0.,20.,40.,60.,80.,90.,100.,110.,120.,130.,140.,150.,160.,170.,180.,190.,200.,220.,240.,260.,280.,300.,350.,400.,450.,1000.}; // Jet pT Binning
320  histoPSet.add<std::vector<double> >("jetptBinning", bins);
321 
324  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
325 
326  desc.add<edm::ParameterSetDescription>("histoPSet",histoPSet);
327 
328  descriptions.add("jetMonitoring", desc);
329 }
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
Definition: JetMonitor.cc:271
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
Definition: JetMonitor.cc:264
void JetMonitor::fillHistoLSPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 271 of file JetMonitor.cc.

References edm::ParameterSetDescription::add().

Referenced by fillDescriptions().

272 {
273  pset.add<unsigned int> ( "nbins", 2500);
274  pset.add<double> ( "xmin", 0.);
275  pset.add<double> ( "xmax", 2500.);
276 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void JetMonitor::fillHistoPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 264 of file JetMonitor.cc.

References edm::ParameterSetDescription::add().

Referenced by fillDescriptions().

265 {
266  pset.add<unsigned int> ( "nbins");
267  pset.add<double>( "xmin" );
268  pset.add<double>( "xmax" );
269 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void JetMonitor::FillME ( JetME a_me,
double  pt_,
double  phi_,
double  eta_,
int  ls_,
const std::string &  denu,
bool  doPhi = true,
bool  doEta = true,
bool  doEtaPhi = true,
bool  doVsLS = true 
)
protected

Definition at line 387 of file JetMonitor.cc.

References JetMonitor::JetME::denominator, MonitorElement::Fill(), JetMonitor::JetME::numerator, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by analyze().

387  {
388  std::string isDeno = "";
389  isDeno = denu;
390  std::string DenoOrNume = "";
391  DenoOrNume = denu;
392 
393  if (DenoOrNume == "denominator")
394  {
395  // index 0 = pt, 1 = ptThreshold , 2 = pt vs ls , 3 = phi, 4 = eta,
396  // 5 = eta vs phi, 6 = eta vs pt , 7 = abs(eta) , 8 = abs(eta) vs phi
397  a_me[0].denominator->Fill(pt_);// pt
398  a_me[1].denominator->Fill(pt_);// jetpT Threshold binning for pt
399  if ( doVsLS ) a_me[2].denominator->Fill(ls_,pt_);// pt vs ls
400  if ( doPhi ) a_me[3].denominator->Fill(phi_);// phi
401  if ( doEta ) a_me[4].denominator->Fill(eta_);// eta
402  if ( doEtaPhi ) a_me[5].denominator->Fill(eta_,phi_);// eta vs phi
403  if ( doEta ) a_me[6].denominator->Fill(eta_,pt_);// eta vs pT
404  }
405  else if (DenoOrNume == "numerator")
406  {
407  a_me[0].numerator->Fill(pt_);// pt
408  a_me[1].numerator->Fill(pt_);// jetpT Threshold binning for pt
409  if ( doVsLS ) a_me[2].numerator->Fill(ls_,pt_);// pt vs ls
410  if ( doPhi ) a_me[3].numerator->Fill(phi_);// phi
411  if ( doEta ) a_me[4].numerator->Fill(eta_);// eat
412  if ( doEtaPhi ) a_me[5].numerator->Fill(eta_,phi_);// eta vs phi
413  if ( doEta ) a_me[6].numerator->Fill(eta_,pt_);// eta vs pT
414  }
415  else {
416  edm::LogWarning("JetMonitor") << "CHECK OUT denu option in FillME !!! DenoOrNume ? : " << DenoOrNume << std::endl;
417  }
418 }
JetMonitor::MEbinning JetMonitor::getHistoLSPSet ( const edm::ParameterSet pset)
staticprivate

Definition at line 47 of file JetMonitor.cc.

References edm::ParameterSet::getParameter().

48 {
49  return JetMonitor::MEbinning{
50  pset.getParameter<unsigned int>("nbins"),
51  0.,
52  double(pset.getParameter<unsigned int>("nbins"))
53  };
54 }
T getParameter(std::string const &) const
JetMonitor::MEbinning JetMonitor::getHistoPSet ( const edm::ParameterSet pset)
staticprivate

Definition at line 38 of file JetMonitor.cc.

References edm::ParameterSet::getParameter().

Referenced by JetMonitor().

39 {
40  return JetMonitor::MEbinning{
41  pset.getParameter<unsigned int>("nbins"),
42  pset.getParameter<double>("xmin"),
43  pset.getParameter<double>("xmax"),
44  };
45 }
T getParameter(std::string const &) const
bool JetMonitor::isBarrel ( double  eta)
protected

Definition at line 331 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

331  {
332  bool output = false;
333  if (fabs(eta)<=1.3) output=true;
334  return output;
335 }
bool JetMonitor::isEndCapM ( double  eta)
protected

Definition at line 338 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

338  {
339  bool output = false;
340  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta < 0) ) output=true; // (mia) this magic number should come from some file in CMSSW !!!
341  return output;
342 }
bool JetMonitor::isEndCapP ( double  eta)
protected

For Hcal Endcap Plus Area.

Definition at line 344 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

344  {
345  bool output = false;
346  //if ( eta<=3.0 && eta >1.3) output=true;
347  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0) ) output=true; // (mia) this magic number should come from some file in CMSSW !!!
348  return output;
349 }
bool JetMonitor::isForward ( double  eta)
protected

For Hcal Forward Plus Area.

Definition at line 351 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

351  {
352  bool output = false;
353  if (fabs(eta)>3.0) output=true;
354  return output;
355 }
bool JetMonitor::isHEM17 ( double  eta,
double  phi 
)
protected

For Hcal HEM17 Area.

Definition at line 365 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

365  {
366  bool output = false;
367  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta < 0) &&
368  phi > -0.87 && phi <= -0.52 ) {output=true;} // (mia) this magic number should come from some file in CMSSW !!!
369  return output;
370 }
bool JetMonitor::isHEP17 ( double  eta,
double  phi 
)
protected

For Hcal HEP17 Area.

Definition at line 357 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

357  {
358  bool output = false;
359  // phi -0.87 to -0.52
360  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0) &&
361  phi > -0.87 && phi <= -0.52 ) {output=true;} // (mia) this magic number should come from some file in CMSSW !!!
362  return output;
363 }
bool JetMonitor::isHEP18 ( double  eta,
double  phi 
)
protected

For Hcal HEP18 Area.

Definition at line 372 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

372  {
373  bool output = false;
374  // phi -0.87 to -0.52
375  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0) &&
376  phi > -0.52 && phi <= -0.17 ) {output=true;} // (mia) this magic number should come from some file in CMSSW !!!
377  return output;
378 
379 }
void JetMonitor::setMETitle ( JetME me,
const std::string &  titleX,
const std::string &  titleY 
)
protected

Definition at line 56 of file JetMonitor.cc.

References JetMonitor::JetME::denominator, JetMonitor::JetME::numerator, and MonitorElement::setAxisTitle().

Referenced by bookHistograms(), and bookMESub().

57 {
58  me.numerator->setAxisTitle(titleX,1);
59  me.numerator->setAxisTitle(titleY,2);
60  me.denominator->setAxisTitle(titleX,1);
61  me.denominator->setAxisTitle(titleY,2);
62 }

Member Data Documentation

JetME JetMonitor::a_ME[7]
private

Definition at line 115 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HB[7]
private

Definition at line 116 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HE[7]
private

Definition at line 117 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HE_m[7]
private

Definition at line 120 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HE_p[7]
private

Definition at line 119 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HEM17[7]
private

Definition at line 121 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HEP17[7]
private

Definition at line 122 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HEP18[7]
private

Definition at line 123 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HF[7]
private

Definition at line 118 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<reco::CaloJetCollection> JetMonitor::calojetToken_
private

Definition at line 103 of file JetMonitor.h.

std::unique_ptr<GenericTriggerEventFlag> JetMonitor::den_genTriggerEventFlag_
private

Definition at line 133 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<reco::GsfElectronCollection> JetMonitor::eleToken_
private

Definition at line 104 of file JetMonitor.h.

MEbinning JetMonitor::eta_binning_hem17_
private
Initial value:

Definition at line 182 of file JetMonitor.h.

Referenced by bookMESub().

MEbinning JetMonitor::eta_binning_hep17_
private
Initial value:

Definition at line 178 of file JetMonitor.h.

Referenced by bookHistograms(), and bookMESub().

std::string JetMonitor::folderName_
private

Definition at line 98 of file JetMonitor.h.

Referenced by bookHistograms(), and JetMonitor().

std::string JetMonitor::histoSuffix_
private

Definition at line 99 of file JetMonitor.h.

bool JetMonitor::isCaloJetTrig
private

Definition at line 138 of file JetMonitor.h.

Referenced by bookHistograms(), and JetMonitor().

bool JetMonitor::isPFJetTrig
private

Definition at line 137 of file JetMonitor.h.

Referenced by bookHistograms(), and JetMonitor().

MEbinning JetMonitor::jet_eta_binning_
private
Initial value:
{
Jet_N_ETA, -Jet_MAX_ETA, Jet_MAX_ETA
}

Definition at line 155 of file JetMonitor.h.

Referenced by bookMESub().

double JetMonitor::Jet_MAX_ETA = 5
private

Definition at line 152 of file JetMonitor.h.

double JetMonitor::Jet_MAX_ETA_HEP17 = 3.0
private

Definition at line 175 of file JetMonitor.h.

double JetMonitor::Jet_MAX_PHI = 3.2
private

Definition at line 145 of file JetMonitor.h.

double JetMonitor::Jet_MAX_PHI_HEP17 = -0.52
private

Definition at line 160 of file JetMonitor.h.

double JetMonitor::Jet_MAX_PHI_HEP18 = -0.17
private

Definition at line 168 of file JetMonitor.h.

double JetMonitor::Jet_MIN_ETA_HEP17 = 1.3
private

Definition at line 176 of file JetMonitor.h.

double JetMonitor::Jet_MIN_PHI_HEP17 = -0.87
private

Definition at line 161 of file JetMonitor.h.

double JetMonitor::Jet_MIN_PHI_HEP18 = -0.52
private

Definition at line 169 of file JetMonitor.h.

unsigned int JetMonitor::Jet_N_ETA = 20
private

Definition at line 154 of file JetMonitor.h.

unsigned int JetMonitor::Jet_N_PHI = 32
private

Definition at line 147 of file JetMonitor.h.

MEbinning JetMonitor::jet_phi_binning_
private
Initial value:
{
Jet_N_PHI, -Jet_MAX_PHI, Jet_MAX_PHI
}

Definition at line 148 of file JetMonitor.h.

Referenced by bookMESub().

JetME JetMonitor::jetHEM17_AbsEta_
private

Definition at line 129 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::jetHEM17_AbsEtaVsPhi_
private

Definition at line 126 of file JetMonitor.h.

JetME JetMonitor::jetHEP17_AbsEta_
private

Definition at line 128 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::jetHEP17_AbsEtaVsPhi_
private

Definition at line 125 of file JetMonitor.h.

MEbinning JetMonitor::jetpT_binning
private

Definition at line 110 of file JetMonitor.h.

Referenced by bookMESub(), and JetMonitor().

std::vector<double> JetMonitor::jetpT_variable_binning_
private

Definition at line 109 of file JetMonitor.h.

Referenced by JetMonitor().

MEbinning JetMonitor::jetptThr_binning_
private

Definition at line 111 of file JetMonitor.h.

Referenced by bookMESub(), and JetMonitor().

edm::EDGetTokenT<edm::View<reco::Jet> > JetMonitor::jetSrc_
private

Definition at line 107 of file JetMonitor.h.

Referenced by analyze(), and JetMonitor().

MEbinning JetMonitor::ls_binning_
private

Definition at line 112 of file JetMonitor.h.

Referenced by bookMESub(), and JetMonitor().

edm::EDGetTokenT<reco::PFMETCollection> JetMonitor::metToken_
private

Definition at line 101 of file JetMonitor.h.

edm::EDGetTokenT<reco::MuonCollection> JetMonitor::muoToken_
private

Definition at line 105 of file JetMonitor.h.

unsigned int JetMonitor::N_ETA_HEP17 = 9
private

Definition at line 177 of file JetMonitor.h.

unsigned int JetMonitor::N_PHI_HEP17 = 7
private

Definition at line 162 of file JetMonitor.h.

unsigned int JetMonitor::N_PHI_HEP18 = 7
private

Definition at line 170 of file JetMonitor.h.

int JetMonitor::nmuons_
private

Definition at line 135 of file JetMonitor.h.

std::unique_ptr<GenericTriggerEventFlag> JetMonitor::num_genTriggerEventFlag_
private

Definition at line 132 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<reco::PFJetCollection> JetMonitor::pfjetToken_
private

Definition at line 102 of file JetMonitor.h.

MEbinning JetMonitor::phi_binning_hep17_
private
Initial value:

Definition at line 163 of file JetMonitor.h.

Referenced by bookMESub().

MEbinning JetMonitor::phi_binning_hep18_
private
Initial value:

Definition at line 171 of file JetMonitor.h.

Referenced by bookMESub().

double JetMonitor::ptcut_
private

Definition at line 136 of file JetMonitor.h.

Referenced by analyze(), and JetMonitor().

std::vector<double> JetMonitor::v_jeteta
private

Definition at line 141 of file JetMonitor.h.

Referenced by analyze().

std::vector<double> JetMonitor::v_jetphi
private

Definition at line 142 of file JetMonitor.h.

Referenced by analyze().

std::vector<double> JetMonitor::v_jetpt
private

Definition at line 140 of file JetMonitor.h.

Referenced by analyze().