CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
DiJetMonitor Class Reference

#include <DiJetMonitor.h>

Inheritance diagram for DiJetMonitor:
DQMEDAnalyzer TriggerDQMBase 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 Types

typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- 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
 
- Public Types inherited from TriggerDQMBase
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

 DiJetMonitor (const edm::ParameterSet &)
 
 ~DiJetMonitor () override throw ()
 
- 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 &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run 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)
 
- Public Member Functions inherited from TriggerDQMBase
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbins, double xmin, double xmax)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbinsX, double xmin, double xmax, double ymin, double ymax)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbinsX, double xmin, double xmax, unsigned nbinsY, double ymin, double ymax)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const std::vector< double > &binningY)
 
void setMETitle (ObjME &me, const std::string &titleX, const std::string &titleY)
 
 TriggerDQMBase ()=default
 
virtual ~TriggerDQMBase ()=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from TriggerDQMBase
static void fillHistoLSPSetDescription (edm::ParameterSetDescription &pset)
 
static void fillHistoPSetDescription (edm::ParameterSetDescription &pset)
 
static MEbinning getHistoLSPSet (const edm::ParameterSet &pset)
 
static MEbinning getHistoPSet (const edm::ParameterSet &pset)
 

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
 
bool dijet_selection (double eta_1, double phi_1, double eta_2, double phi_2, double pt_1, double pt_2, int &tag_id, int &probe_id, int Event)
 
- 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 Attributes

MEbinning asy_binning {N_asy, MIN_asy, MAX_asy}
 
std::unique_ptr< GenericTriggerEventFlagden_genTriggerEventFlag_
 
MEbinning dijet_eta_binning {DiJet_N_ETA, -DiJet_MAX_ETA, DiJet_MAX_ETA}
 
const double DiJet_MAX_ETA = 5
 
const double DiJet_MAX_PHI = 3.2
 
unsigned int DiJet_N_ETA = 20
 
unsigned int DiJet_N_PHI = 32
 
MEbinning dijet_phi_binning {DiJet_N_PHI, -DiJet_MAX_PHI, DiJet_MAX_PHI}
 
MEbinning dijetpt_binning_
 
MEbinning dijetptThr_binning_
 
edm::EDGetTokenT< reco::PFJetCollectiondijetSrc_
 
edm::EDGetTokenT< reco::GsfElectronCollectioneleToken_
 
std::string folderName_
 
std::string histoSuffix_
 
ObjME jetAsyEtaME_
 
ObjME jetEtaPhiME_
 
ObjME jetetaPrbME_
 
ObjME jetetaTagME_
 
ObjME jetphiPrbME_
 
ObjME jetpt1ME_
 
ObjME jetpt2ME_
 
ObjME jetptAsyME_
 
ObjME jetptAvgaME_
 
ObjME jetptAvgaThrME_
 
ObjME jetptAvgbME_
 
ObjME jetptPrbME_
 
ObjME jetptTagME_
 
const double MAX_asy = 1
 
edm::EDGetTokenT< reco::PFMETCollectionmetToken_
 
const double MIN_asy = -1
 
edm::EDGetTokenT< reco::MuonCollectionmuoToken_
 
unsigned int N_asy = 50
 
int nmuons_
 
std::unique_ptr< GenericTriggerEventFlagnum_genTriggerEventFlag_
 
double ptcut_
 

Additional Inherited Members

- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 49 of file DiJetMonitor.h.

Member Typedef Documentation

Definition at line 52 of file DiJetMonitor.h.

Definition at line 51 of file DiJetMonitor.h.

Constructor & Destructor Documentation

DiJetMonitor::DiJetMonitor ( const edm::ParameterSet iConfig)

Definition at line 13 of file DiJetMonitor.cc.

References dijetpt_binning_, dijetptThr_binning_, dijetSrc_, folderName_, TriggerDQMBase::getHistoPSet(), edm::ParameterSet::getParameter(), ptcut_, and AlCaHLTBitMon_QueryRunRegistry::string.

15  iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"), consumesCollector(), *this)),
17  iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"), consumesCollector(), *this)) {
18  folderName_ = iConfig.getParameter<std::string>("FolderName");
19  dijetSrc_ = mayConsume<reco::PFJetCollection>(iConfig.getParameter<edm::InputTag>("dijetSrc")); //jet
20 
22  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("dijetPSet"));
24  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("dijetPtThrPSet"));
25 
26  ptcut_ = iConfig.getParameter<double>("ptcut");
27 }
T getParameter(std::string const &) const
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: DiJetMonitor.h:98
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: DiJetMonitor.h:97
MEbinning dijetpt_binning_
Definition: DiJetMonitor.h:80
MEbinning dijetptThr_binning_
Definition: DiJetMonitor.h:81
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
edm::EDGetTokenT< reco::PFJetCollection > dijetSrc_
Definition: DiJetMonitor.h:78
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
std::string folderName_
Definition: DiJetMonitor.h:72
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
DiJetMonitor::~DiJetMonitor ( )
throw (
)
inlineoverride

Definition at line 55 of file DiJetMonitor.h.

References analyze(), bookHistograms(), dijet_selection(), fillDescriptions(), and iEvent.

55 {};

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 158 of file DiJetMonitor.cc.

References den_genTriggerEventFlag_, TriggerDQMBase::ObjME::denominator, dijet_selection(), dijetSrc_, edm::EventID::event(), dqm::impl::MonitorElement::Fill(), edm::Event::getByToken(), edm::EventBase::id(), edm::HandleBase::isValid(), jetAsyEtaME_, jetEtaPhiME_, jetetaPrbME_, jetetaTagME_, jetphiPrbME_, jetpt1ME_, jetpt2ME_, jetptAsyME_, jetptAvgaME_, jetptAvgaThrME_, jetptAvgbME_, jetptPrbME_, jetptTagME_, num_genTriggerEventFlag_, TriggerDQMBase::ObjME::numerator, and ptcut_.

Referenced by ~DiJetMonitor().

158  {
159  int Event = -999;
160  Event = iEvent.id().event();
161  // Filter out events if Trigger Filtering is requested
162  if (den_genTriggerEventFlag_->on() && !den_genTriggerEventFlag_->accept(iEvent, iSetup))
163  return;
164 
165  std::vector<double> v_jetpt;
166  std::vector<double> v_jeteta;
167  std::vector<double> v_jetphi;
168 
169  v_jetpt.clear();
170  v_jeteta.clear();
171  v_jetphi.clear();
172 
174  iEvent.getByToken(dijetSrc_, offjets);
175  if (!offjets.isValid()) {
176  edm::LogWarning("DiJetMonitor") << "DiJet handle not valid \n";
177  return;
178  }
179  for (reco::PFJetCollection::const_iterator ibegin = offjets->begin(), iend = offjets->end(), ijet = ibegin;
180  ijet != iend;
181  ++ijet) {
182  if (ijet->pt() < ptcut_) {
183  continue;
184  }
185  v_jetpt.push_back(ijet->pt());
186  v_jeteta.push_back(ijet->eta());
187  v_jetphi.push_back(ijet->phi());
188  }
189  if (v_jetpt.size() < 2) {
190  return;
191  }
192  double pt_1 = v_jetpt[0];
193  double eta_1 = v_jeteta[0];
194  double phi_1 = v_jetphi[0];
195  double pt_2 = v_jetpt[1];
196  double eta_2 = v_jeteta[1];
197  double phi_2 = v_jetphi[1];
198  double pt_avg_b = (pt_1 + pt_2) * 0.5;
199  int tag_id = -999, probe_id = -999;
200 
201  jetpt1ME_.denominator->Fill(pt_1);
202  jetpt2ME_.denominator->Fill(pt_2);
203  jetptAvgbME_.denominator->Fill(pt_avg_b);
204 
205  if (dijet_selection(eta_1, phi_1, eta_2, phi_2, pt_1, pt_2, tag_id, probe_id, Event)) {
206  if (tag_id == 0 && probe_id == 1) {
207  double pt_asy = (pt_2 - pt_1) / (pt_1 + pt_2);
208  double pt_avg = (pt_1 + pt_2) * 0.5;
209  jetptAvgaME_.denominator->Fill(pt_avg);
213  jetetaPrbME_.denominator->Fill(eta_2);
214  jetetaTagME_.denominator->Fill(eta_1);
215  jetptAsyME_.denominator->Fill(pt_asy);
216  jetphiPrbME_.denominator->Fill(phi_2);
217  jetAsyEtaME_.denominator->Fill(pt_asy, eta_2);
218  jetEtaPhiME_.denominator->Fill(eta_2, phi_2);
219  }
220  if (tag_id == 1 && probe_id == 0) {
221  double pt_asy = (pt_1 - pt_2) / (pt_2 + pt_1);
222  double pt_avg = (pt_2 + pt_1) * 0.5;
223  jetptAvgaME_.denominator->Fill(pt_avg);
227  jetetaPrbME_.denominator->Fill(eta_1);
228  jetetaTagME_.denominator->Fill(eta_2);
229  jetptAsyME_.denominator->Fill(pt_asy);
230  jetphiPrbME_.denominator->Fill(phi_1);
231  jetAsyEtaME_.denominator->Fill(pt_asy, eta_1);
232  jetEtaPhiME_.denominator->Fill(eta_1, phi_1);
233  }
234 
235  if (num_genTriggerEventFlag_->on() && !num_genTriggerEventFlag_->accept(iEvent, iSetup))
236  return;
237 
238  jetpt1ME_.numerator->Fill(pt_1);
239  jetpt2ME_.numerator->Fill(pt_2);
240  jetptAvgbME_.numerator->Fill(pt_avg_b);
241 
242  if (tag_id == 0 && probe_id == 1) {
243  double pt_asy = (pt_2 - pt_1) / (pt_1 + pt_2);
244  double pt_avg = (pt_1 + pt_2) * 0.5;
245  jetptAvgaME_.numerator->Fill(pt_avg);
246  jetptAvgaThrME_.numerator->Fill(pt_avg);
247  jetptTagME_.numerator->Fill(pt_1);
248  jetptPrbME_.numerator->Fill(pt_2);
249  jetetaPrbME_.numerator->Fill(eta_2);
250  jetetaTagME_.numerator->Fill(eta_1);
251  jetptAsyME_.numerator->Fill(pt_asy);
252  jetphiPrbME_.numerator->Fill(phi_2);
253  jetAsyEtaME_.numerator->Fill(pt_asy, eta_2);
254  jetEtaPhiME_.numerator->Fill(eta_2, phi_2);
255  }
256  if (tag_id == 1 && probe_id == 0) {
257  double pt_asy = (pt_1 - pt_2) / (pt_2 + pt_1);
258  double pt_avg = (pt_2 + pt_1) * 0.5;
259  jetptAvgaME_.numerator->Fill(pt_avg);
260  jetptAvgaThrME_.numerator->Fill(pt_avg);
261  jetptTagME_.numerator->Fill(pt_2);
262  jetptPrbME_.numerator->Fill(pt_1);
263  jetetaPrbME_.numerator->Fill(eta_1);
264  jetetaTagME_.numerator->Fill(eta_2);
265  jetptAsyME_.numerator->Fill(pt_asy);
266  jetphiPrbME_.numerator->Fill(phi_1);
267  jetAsyEtaME_.numerator->Fill(pt_asy, eta_1);
268  jetEtaPhiME_.numerator->Fill(eta_1, phi_1);
269  }
270  }
271 }
ObjME jetetaPrbME_
Definition: DiJetMonitor.h:91
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: DiJetMonitor.h:98
ObjME jetphiPrbME_
Definition: DiJetMonitor.h:93
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: DiJetMonitor.h:97
ObjME jetptPrbME_
Definition: DiJetMonitor.h:89
ObjME jetAsyEtaME_
Definition: DiJetMonitor.h:94
ObjME jetptAvgbME_
Definition: DiJetMonitor.h:87
ObjME jetptAsyME_
Definition: DiJetMonitor.h:90
void Fill(long long x)
edm::EDGetTokenT< reco::PFJetCollection > dijetSrc_
Definition: DiJetMonitor.h:78
int iEvent
Definition: GenABIO.cc:224
ObjME jetetaTagME_
Definition: DiJetMonitor.h:92
bool dijet_selection(double eta_1, double phi_1, double eta_2, double phi_2, double pt_1, double pt_2, int &tag_id, int &probe_id, int Event)
MonitorElement * denominator
MonitorElement * numerator
bool isValid() const
Definition: HandleBase.h:70
ObjME jetptAvgaME_
Definition: DiJetMonitor.h:85
ObjME jetptTagME_
Definition: DiJetMonitor.h:88
ObjME jetpt2ME_
Definition: DiJetMonitor.h:84
ObjME jetptAvgaThrME_
Definition: DiJetMonitor.h:86
ObjME jetpt1ME_
Definition: DiJetMonitor.h:83
ObjME jetEtaPhiME_
Definition: DiJetMonitor.h:95
void DiJetMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 29 of file DiJetMonitor.cc.

References asy_binning, TriggerDQMBase::bookME(), den_genTriggerEventFlag_, dijet_eta_binning, dijet_phi_binning, dijetpt_binning_, dijetptThr_binning_, folderName_, jetAsyEtaME_, jetEtaPhiME_, jetetaPrbME_, jetetaTagME_, jetphiPrbME_, jetpt1ME_, jetpt2ME_, jetptAsyME_, jetptAvgaME_, jetptAvgaThrME_, jetptAvgbME_, jetptPrbME_, jetptTagME_, TriggerDQMBase::MEbinning::nbins, num_genTriggerEventFlag_, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), TriggerDQMBase::setMETitle(), AlCaHLTBitMon_QueryRunRegistry::string, TriggerDQMBase::MEbinning::xmax, and TriggerDQMBase::MEbinning::xmin.

Referenced by ~DiJetMonitor().

29  {
30  std::string histname, histtitle;
31  std::string currentFolder = folderName_;
32  ibooker.setCurrentFolder(currentFolder);
33 
34  histname = "jetpt1";
35  histtitle = "leading Jet Pt";
37  setMETitle(jetpt1ME_, "Pt_1 [GeV]", "events");
38 
39  histname = "jetpt2";
40  histtitle = "second leading Jet Pt";
42  setMETitle(jetpt2ME_, "Pt_2 [GeV]", "events");
43 
44  histname = "jetptAvgB";
45  histtitle = "Pt average before offline selection";
46  bookME(
48  setMETitle(jetptAvgbME_, "(pt_1 + pt_2)*0.5 [GeV]", "events");
49 
50  histname = "jetptAvgA";
51  histtitle = "Pt average after offline selection";
52  bookME(
54  setMETitle(jetptAvgaME_, "(pt_1 + pt_2)*0.5 [GeV]", "events");
55 
56  histname = "jetptAvgAThr";
57  histtitle = "Pt average after offline selection";
58  bookME(ibooker,
60  histname,
61  histtitle,
65  setMETitle(jetptAvgaThrME_, "(pt_1 + pt_2)*0.5 [GeV]", "events");
66 
67  histname = "jetptTag";
68  histtitle = "Tag Jet Pt";
69  bookME(
71  setMETitle(jetptTagME_, "Pt_tag [GeV]", "events ");
72 
73  histname = "jetptPrb";
74  histtitle = "Probe Jet Pt";
75  bookME(
77  setMETitle(jetptPrbME_, "Pt_prb [GeV]", "events");
78 
79  histname = "jetptAsym";
80  histtitle = "Jet Pt Asymetry";
81  bookME(ibooker, jetptAsyME_, histname, histtitle, asy_binning.nbins, asy_binning.xmin, asy_binning.xmax);
82  setMETitle(jetptAsyME_, "(pt_prb - pt_tag)/(pt_prb + pt_tag)", "events");
83 
84  histname = "jetetaPrb";
85  histtitle = "Probe Jet eta";
86  bookME(ibooker,
88  histname,
89  histtitle,
93  setMETitle(jetetaPrbME_, "Eta_probe #eta", "events");
94 
95  histname = "jetetaTag";
96  histtitle = "Tag Jet eta";
97  bookME(ibooker,
99  histname,
100  histtitle,
104  setMETitle(jetetaTagME_, "Eta_tag #eta", "events");
105 
106  histname = "ptAsymVSetaPrb";
107  histtitle = "Pt_Asym vs eta_prb";
108  bookME(ibooker,
109  jetAsyEtaME_,
110  histname,
111  histtitle,
118  setMETitle(jetAsyEtaME_, "(pt_prb - pt_tag)/(pt_prb + pt_tag)", "Eta_probe #eta");
119 
120  histname = "etaPrbVSphiPrb";
121  histtitle = "eta_prb vs phi_prb";
122  bookME(ibooker,
123  jetEtaPhiME_,
124  histname,
125  histtitle,
132  setMETitle(jetEtaPhiME_, "Eta_probe #eta", "Phi_probe #phi");
133 
134  histname = "jetphiPrb";
135  histtitle = "Probe Jet phi";
136  bookME(ibooker,
137  jetphiPrbME_,
138  histname,
139  histtitle,
143  setMETitle(jetphiPrbME_, "Phi_probe #phi", "events");
144 
145  // Initialize the GenericTriggerEventFlag
146  // Initialize the GenericTriggerEventFlag
148  num_genTriggerEventFlag_->initRun(iRun, iSetup);
150  den_genTriggerEventFlag_->initRun(iRun, iSetup);
151 }
ObjME jetetaPrbME_
Definition: DiJetMonitor.h:91
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: DiJetMonitor.h:98
ObjME jetphiPrbME_
Definition: DiJetMonitor.h:93
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: DiJetMonitor.h:97
ObjME jetptPrbME_
Definition: DiJetMonitor.h:89
MEbinning dijetpt_binning_
Definition: DiJetMonitor.h:80
ObjME jetAsyEtaME_
Definition: DiJetMonitor.h:94
MEbinning asy_binning
Definition: DiJetMonitor.h:118
MEbinning dijetptThr_binning_
Definition: DiJetMonitor.h:81
ObjME jetptAvgbME_
Definition: DiJetMonitor.h:87
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
ObjME jetptAsyME_
Definition: DiJetMonitor.h:90
ObjME jetetaTagME_
Definition: DiJetMonitor.h:92
MEbinning dijet_phi_binning
Definition: DiJetMonitor.h:107
std::string folderName_
Definition: DiJetMonitor.h:72
ObjME jetptAvgaME_
Definition: DiJetMonitor.h:85
ObjME jetptTagME_
Definition: DiJetMonitor.h:88
MEbinning dijet_eta_binning
Definition: DiJetMonitor.h:112
ObjME jetpt2ME_
Definition: DiJetMonitor.h:84
ObjME jetptAvgaThrME_
Definition: DiJetMonitor.h:86
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbins, double xmin, double xmax)
ObjME jetpt1ME_
Definition: DiJetMonitor.h:83
ObjME jetEtaPhiME_
Definition: DiJetMonitor.h:95
bool DiJetMonitor::dijet_selection ( double  eta_1,
double  phi_1,
double  eta_2,
double  phi_2,
double  pt_1,
double  pt_2,
int &  tag_id,
int &  probe_id,
int  Event 
)
protected

Definition at line 322 of file DiJetMonitor.cc.

References funct::abs(), and DEFINE_FWK_MODULE.

Referenced by analyze(), and ~DiJetMonitor().

330  {
331  double etacut = 1.7;
332  double phicut = 2.7;
333 
334  bool passeta = (std::abs(eta_1) < etacut || std::abs(eta_2) < etacut); //check that one of the jets in the barrel
335 
336  float delta_phi_1_2 = (phi_1 - phi_2);
337  bool other_cuts = (std::abs(delta_phi_1_2) >= phicut); //check that jets are back to back
338 
339  if (std::abs(eta_1) < etacut && std::abs(eta_2) > etacut) {
340  tag_id = 0;
341  probe_id = 1;
342  } else if (std::abs(eta_2) < etacut && std::abs(eta_1) > etacut) {
343  tag_id = 1;
344  probe_id = 0;
345  } else if (std::abs(eta_2) < etacut && std::abs(eta_1) < etacut) {
346  int numb = Event % 2;
347  if (numb == 0) {
348  tag_id = 0;
349  probe_id = 1;
350  }
351  if (numb == 1) {
352  tag_id = 1;
353  probe_id = 0;
354  }
355  }
356  if (passeta && other_cuts)
357  return true;
358  else
359  return false;
360 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void DiJetMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 273 of file DiJetMonitor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), trigObjTnPSource_cfi::bins, DiJetMonitor_cfi::dijetPSet, DiJetMonitor_cff::dijetPtThrPSet, TriggerDQMBase::fillHistoLSPSetDescription(), TriggerDQMBase::fillHistoPSetDescription(), SiStripSourceConfigTier0_cff::genericTriggerEventPSet, LumiMonitor_cff::histoPSet, HLT_2018_cff::InputTag, LumiMonitor_cff::lsPSet, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ~DiJetMonitor().

273  {
275  desc.add<std::string>("FolderName", "HLT/JME/Jets/AK4/PF");
276 
277  desc.add<edm::InputTag>("met", edm::InputTag("pfMet"));
278  desc.add<edm::InputTag>("dijetSrc", edm::InputTag("ak4PFJets"));
279  desc.add<edm::InputTag>("electrons", edm::InputTag("gedGsfElectrons"));
280  desc.add<edm::InputTag>("muons", edm::InputTag("muons"));
281  desc.add<int>("njets", 0);
282  desc.add<int>("nelectrons", 0);
283  desc.add<double>("ptcut", 20);
284 
286  genericTriggerEventPSet.add<bool>("andOr");
287  genericTriggerEventPSet.add<edm::InputTag>("dcsInputTag", edm::InputTag("scalersRawToDigi"));
288  genericTriggerEventPSet.add<std::vector<int> >("dcsPartitions", {});
289  genericTriggerEventPSet.add<bool>("andOrDcs", false);
290  genericTriggerEventPSet.add<bool>("errorReplyDcs", true);
291  genericTriggerEventPSet.add<std::string>("dbLabel", "");
292  genericTriggerEventPSet.add<bool>("andOrHlt", true);
293  genericTriggerEventPSet.add<edm::InputTag>("hltInputTag", edm::InputTag("TriggerResults::HLT"));
294  genericTriggerEventPSet.add<std::vector<std::string> >("hltPaths", {});
295  genericTriggerEventPSet.add<bool>("errorReplyHlt", false);
296  genericTriggerEventPSet.add<unsigned int>("verbosityLevel", 1);
297 
298  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
299  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
300 
304  fillHistoPSetDescription(dijetPSet);
305  fillHistoPSetDescription(dijetPtThrPSet);
306  histoPSet.add<edm::ParameterSetDescription>("dijetPSet", dijetPSet);
307  histoPSet.add<edm::ParameterSetDescription>("dijetPtThrPSet", dijetPtThrPSet);
308  std::vector<double> bins = {
309  0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
310  170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.}; // DiJet pT Binning
311  histoPSet.add<std::vector<double> >("jetptBinning", bins);
312 
315  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
316  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
317 
318  descriptions.add("dijetMonitoring", desc);
319 }
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

MEbinning DiJetMonitor::asy_binning {N_asy, MIN_asy, MAX_asy}
private

Definition at line 118 of file DiJetMonitor.h.

Referenced by bookHistograms().

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

Definition at line 98 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

MEbinning DiJetMonitor::dijet_eta_binning {DiJet_N_ETA, -DiJet_MAX_ETA, DiJet_MAX_ETA}
private

Definition at line 112 of file DiJetMonitor.h.

Referenced by bookHistograms().

const double DiJetMonitor::DiJet_MAX_ETA = 5
private

Definition at line 109 of file DiJetMonitor.h.

const double DiJetMonitor::DiJet_MAX_PHI = 3.2
private

Definition at line 104 of file DiJetMonitor.h.

unsigned int DiJetMonitor::DiJet_N_ETA = 20
private

Definition at line 111 of file DiJetMonitor.h.

unsigned int DiJetMonitor::DiJet_N_PHI = 32
private

Definition at line 106 of file DiJetMonitor.h.

MEbinning DiJetMonitor::dijet_phi_binning {DiJet_N_PHI, -DiJet_MAX_PHI, DiJet_MAX_PHI}
private

Definition at line 107 of file DiJetMonitor.h.

Referenced by bookHistograms().

MEbinning DiJetMonitor::dijetpt_binning_
private

Definition at line 80 of file DiJetMonitor.h.

Referenced by bookHistograms(), and DiJetMonitor().

MEbinning DiJetMonitor::dijetptThr_binning_
private

Definition at line 81 of file DiJetMonitor.h.

Referenced by bookHistograms(), and DiJetMonitor().

edm::EDGetTokenT<reco::PFJetCollection> DiJetMonitor::dijetSrc_
private

Definition at line 78 of file DiJetMonitor.h.

Referenced by analyze(), and DiJetMonitor().

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

Definition at line 76 of file DiJetMonitor.h.

std::string DiJetMonitor::folderName_
private

Definition at line 72 of file DiJetMonitor.h.

Referenced by bookHistograms(), and DiJetMonitor().

std::string DiJetMonitor::histoSuffix_
private

Definition at line 73 of file DiJetMonitor.h.

ObjME DiJetMonitor::jetAsyEtaME_
private

Definition at line 94 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

ObjME DiJetMonitor::jetEtaPhiME_
private

Definition at line 95 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

ObjME DiJetMonitor::jetetaPrbME_
private

Definition at line 91 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

ObjME DiJetMonitor::jetetaTagME_
private

Definition at line 92 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

ObjME DiJetMonitor::jetphiPrbME_
private

Definition at line 93 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

ObjME DiJetMonitor::jetpt1ME_
private

Definition at line 83 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

ObjME DiJetMonitor::jetpt2ME_
private

Definition at line 84 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

ObjME DiJetMonitor::jetptAsyME_
private

Definition at line 90 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

ObjME DiJetMonitor::jetptAvgaME_
private

Definition at line 85 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

ObjME DiJetMonitor::jetptAvgaThrME_
private

Definition at line 86 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

ObjME DiJetMonitor::jetptAvgbME_
private

Definition at line 87 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

ObjME DiJetMonitor::jetptPrbME_
private

Definition at line 89 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

ObjME DiJetMonitor::jetptTagME_
private

Definition at line 88 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

const double DiJetMonitor::MAX_asy = 1
private

Definition at line 114 of file DiJetMonitor.h.

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

Definition at line 75 of file DiJetMonitor.h.

const double DiJetMonitor::MIN_asy = -1
private

Definition at line 115 of file DiJetMonitor.h.

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

Definition at line 77 of file DiJetMonitor.h.

unsigned int DiJetMonitor::N_asy = 50
private

Definition at line 117 of file DiJetMonitor.h.

int DiJetMonitor::nmuons_
private

Definition at line 100 of file DiJetMonitor.h.

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

Definition at line 97 of file DiJetMonitor.h.

Referenced by analyze(), and bookHistograms().

double DiJetMonitor::ptcut_
private

Definition at line 101 of file DiJetMonitor.h.

Referenced by analyze(), and DiJetMonitor().