37 histname =
"jetpt1"; histtitle =
"leading Jet Pt";
41 histname =
"jetpt2"; histtitle =
"second leading Jet Pt";
45 histname =
"jetptAvgB"; histtitle =
"Pt average before offline selection";
49 histname =
"jetptAvgA"; histtitle =
"Pt average after offline selection";
53 histname =
"jetptAvgAThr"; histtitle =
"Pt average after offline selection";
57 histname =
"jetptTag"; histtitle =
"Tag Jet Pt";
61 histname =
"jetptPrb"; histtitle =
"Probe Jet Pt";
65 histname =
"jetptAsym"; histtitle =
"Jet Pt Asymetry";
69 histname =
"jetetaPrb"; histtitle =
"Probe Jet eta";
73 histname =
"jetetaTag"; histtitle =
"Tag Jet eta";
77 histname =
"ptAsymVSetaPrb"; histtitle =
"Pt_Asym vs eta_prb";
81 histname =
"etaPrbVSphiPrb"; histtitle =
"eta_prb vs phi_prb";
85 histname =
"jetphiPrb"; histtitle =
"Probe Jet phi";
107 std::vector<double> v_jetpt;
108 std::vector<double> v_jeteta;
109 std::vector<double> v_jetphi;
121 for ( reco::PFJetCollection::const_iterator ibegin = offjets->begin(), iend = offjets->end(), ijet = ibegin; ijet != iend; ++ijet ) {
122 if (ijet->pt()<
ptcut_) {
continue;}
123 v_jetpt.push_back(ijet->pt());
124 v_jeteta.push_back(ijet->eta());
125 v_jetphi.push_back(ijet->phi());
127 if (v_jetpt.size() < 2) {
return;}
128 double pt_1 = v_jetpt[0];
129 double eta_1 = v_jeteta[0];
130 double phi_1 = v_jetphi[0];
131 double pt_2 = v_jetpt[1];
132 double eta_2 = v_jeteta[1];
133 double phi_2 = v_jetphi[1];
134 double pt_avg_b = (pt_1 + pt_2)*0.5;
135 int tag_id = -999, probe_id = -999;
141 if(
dijet_selection(eta_1, phi_1, eta_2, phi_2, pt_1, pt_2,tag_id, probe_id,Event) ){
143 if(tag_id == 0 && probe_id == 1) {
144 double pt_asy = (pt_2 - pt_1)/(pt_1 + pt_2);
145 double pt_avg = (pt_1 + pt_2)*0.5;
157 if(tag_id == 1 && probe_id == 0) {
158 double pt_asy = (pt_1 - pt_2)/(pt_2 + pt_1);
159 double pt_avg = (pt_2 + pt_1)*0.5;
178 if(tag_id == 0 && probe_id == 1) {
179 double pt_asy = (pt_2 - pt_1)/(pt_1 + pt_2);
180 double pt_avg = (pt_1 + pt_2)*0.5;
192 if(tag_id == 1 && probe_id == 0) {
193 double pt_asy = (pt_1 - pt_2)/(pt_2 + pt_1);
194 double pt_avg = (pt_2 + pt_1)*0.5;
218 desc.
add<
int>(
"njets", 0);
219 desc.
add<
int>(
"nelectrons", 0);
220 desc.
add<
double>(
"ptcut", 20);
223 genericTriggerEventPSet.
add<
bool>(
"andOr");
225 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions",{});
226 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
227 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
228 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
229 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
231 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths",{});
232 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
233 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel",1);
245 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.};
246 histoPSet.add<std::vector<double> >(
"jetptBinning",
bins);
253 descriptions.
add(
"dijetMonitoring", desc);
263 float delta_phi_1_2= (phi_1 - phi_2);
264 bool other_cuts = (
std::abs(delta_phi_1_2) >= phicut);
277 int numb = Event % 2;
287 if (passeta && other_cuts)
T getParameter(std::string const &) const
EventNumber_t event() const
MonitorElement * numerator
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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...
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
DiJetMonitor(const edm::ParameterSet &)
edm::EDGetTokenT< reco::PFJetCollection > dijetSrc_
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
#define DEFINE_FWK_MODULE(type)
MEbinning dijet_phi_binning
MonitorElement * denominator
void setCurrentFolder(std::string const &fullpath)
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)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Abs< T >::type abs(const T &t)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MEbinning dijet_eta_binning
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbins, double xmin, double xmax)