107 : folderName_(iConfig.getParameter<std::
string>(
"FolderName")),
108 requireValidHLTPaths_(iConfig.getParameter<bool>(
"requireValidHLTPaths")),
109 hltPathsAreValid_(
false),
111 dijetpt_binning_(getHistoPSet(
113 dijetptThr_binning_(getHistoPSet(
116 iConfig.getParameter<edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
118 iConfig.getParameter<edm::
ParameterSet>(
"denGenericTriggerEventPSet"), consumesCollector(), *this)),
119 ptcut_(iConfig.getParameter<double>(
"ptcut")) {}
155 histtitle =
"leading Jet Pt";
160 histtitle =
"second leading Jet Pt";
164 histname =
"jetptAvgB";
165 histtitle =
"Pt average before offline selection";
170 histname =
"jetptAvgA";
171 histtitle =
"Pt average after offline selection";
176 histname =
"jetptAvgAThr";
177 histtitle =
"Pt average after offline selection";
187 histname =
"jetptTag";
188 histtitle =
"Tag Jet Pt";
193 histname =
"jetptPrb";
194 histtitle =
"Probe Jet Pt";
199 histname =
"jetptAsym";
200 histtitle =
"Jet Pt Asymetry";
204 histname =
"jetetaPrb";
205 histtitle =
"Probe Jet eta";
215 histname =
"jetetaTag";
216 histtitle =
"Tag Jet eta";
226 histname =
"ptAsymVSetaPrb";
227 histtitle =
"Pt_Asym vs eta_prb";
240 histname =
"etaPrbVSphiPrb";
241 histtitle =
"eta_prb vs phi_prb";
254 histname =
"jetphiPrb";
255 histtitle =
"Probe Jet phi";
277 std::vector<double> v_jetpt;
278 std::vector<double> v_jeteta;
279 std::vector<double> v_jetphi;
291 for (reco::PFJetCollection::const_iterator ibegin = offjets->begin(), iend = offjets->end(), ijet = ibegin;
294 if (ijet->pt() <
ptcut_) {
297 v_jetpt.push_back(ijet->pt());
298 v_jeteta.push_back(ijet->eta());
299 v_jetphi.push_back(ijet->phi());
301 if (v_jetpt.size() < 2) {
304 double pt_1 = v_jetpt[0];
305 double eta_1 = v_jeteta[0];
306 double phi_1 = v_jetphi[0];
307 double pt_2 = v_jetpt[1];
308 double eta_2 = v_jeteta[1];
309 double phi_2 = v_jetphi[1];
310 double pt_avg_b = (pt_1 + pt_2) * 0.5;
311 int tag_id = -999, probe_id = -999;
318 if (tag_id == 0 && probe_id == 1) {
319 double pt_asy = (pt_2 - pt_1) / (pt_1 + pt_2);
320 double pt_avg = (pt_1 + pt_2) * 0.5;
332 if (tag_id == 1 && probe_id == 0) {
333 double pt_asy = (pt_1 - pt_2) / (pt_2 + pt_1);
334 double pt_avg = (pt_2 + pt_1) * 0.5;
354 if (tag_id == 0 && probe_id == 1) {
355 double pt_asy = (pt_2 - pt_1) / (pt_1 + pt_2);
356 double pt_avg = (pt_1 + pt_2) * 0.5;
368 if (tag_id == 1 && probe_id == 0) {
369 double pt_asy = (pt_1 - pt_2) / (pt_2 + pt_1);
370 double pt_avg = (pt_2 + pt_1) * 0.5;
400 float delta_phi_1_2 = (phi_1 - phi_2);
401 bool other_cuts = (
std::abs(delta_phi_1_2) >= phicut);
410 int numb = Event % 2;
421 return (passeta && other_cuts);
427 desc.
add<
bool>(
"requireValidHLTPaths",
true);
433 desc.
add<
int>(
"njets", 0);
434 desc.
add<
int>(
"nelectrons", 0);
435 desc.
add<
double>(
"ptcut", 20);
438 genericTriggerEventPSet.
add<
bool>(
"andOr");
440 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions", {});
441 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
442 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
443 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
444 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
446 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths", {});
447 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
448 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel", 1);
460 std::vector<double> bins = {
461 0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
462 170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
463 histoPSet.
add<std::vector<double> >(
"jetptBinning", bins);
470 descriptions.
add(
"dijetMonitoring", desc);
dqm::reco::DQMStore DQMStore
EventNumber_t event() const
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
virtual void setCurrentFolder(std::string const &fullpath)
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
den_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter< edm::ParameterSet >("denGenericTriggerEventPSet"), consumesCollector(),*this))
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
MEbinning dijetpt_binning_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MEbinning dijetptThr_binning_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
dqm::reco::MonitorElement MonitorElement
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
const std::string folderName_
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
DiJetMonitor(const edm::ParameterSet &)
std::vector< Muon > MuonCollection
collection of Muon objects
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
edm::EDGetTokenT< reco::PFJetCollection > dijetSrc_
const bool requireValidHLTPaths_
const double DiJet_MAX_PHI
MEbinning dijet_phi_binning
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
Abs< T >::type abs(const T &t)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
num_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter< edm::ParameterSet >("numGenericTriggerEventPSet"), consumesCollector(),*this))
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbins, const double xmin, const double xmax, const bool bookDen=true)
const double DiJet_MAX_ETA
std::vector< PFJet > PFJetCollection
collection of PFJet objects
edm::EDGetTokenT< reco::MuonCollection > muoToken_
MEbinning dijet_eta_binning
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Log< level::Warning, false > LogWarning
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)