47 return (i.pt() > j.pt());
51 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
63 virtual bool goodSusyElectron(
const Ele*);
64 virtual bool goodSusyMuon(
const Mu*);
136 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
141 muons_ = consumes<std::vector<reco::Muon> >(
143 electrons_ = consumes<std::vector<reco::GsfElectron> >(
145 jets_ = consumes<std::vector<reco::CaloJet> >(
147 met_ = consumes<std::vector<reco::CaloMET> >(
149 vertex_ = consumes<reco::VertexCollection>(
152 muon_eta_cut_ = pset.
getParameter<
double>(
"muon_eta_cut");
153 muon_nHits_cut_ = pset.
getParameter<
double>(
"muon_nHits_cut");
154 muon_nChi2_cut_ = pset.
getParameter<
double>(
"muon_nChi2_cut");
155 muon_d0_cut_ = pset.
getParameter<
double>(
"muon_d0_cut");
157 elec_eta_cut_ = pset.
getParameter<
double>(
"elec_eta_cut");
158 elec_mva_cut_ = pset.
getParameter<
double>(
"elec_mva_cut");
159 elec_d0_cut_ = pset.
getParameter<
double>(
"elec_d0_cut");
161 RAL_muon_pt_cut_ = pset.
getParameter<
double>(
"RAL_muon_pt_cut");
162 RAL_muon_iso_cut_ = pset.
getParameter<
double>(
"RAL_muon_iso_cut");
164 RAL_elec_pt_cut_ = pset.
getParameter<
double>(
"RAL_elec_pt_cut");
165 RAL_elec_iso_cut_ = pset.
getParameter<
double>(
"RAL_elec_iso_cut");
167 RAL_jet_pt_cut_ = pset.
getParameter<
double>(
"RAL_jet_pt_cut");
168 RAL_jet_sum_pt_cut_ = pset.
getParameter<
double>(
"RAL_jet_sum_pt_cut");
169 RAL_jet_eta_cut_ = pset.
getParameter<
double>(
"RAL_jet_eta_cut");
170 RAL_jet_min_emf_cut_ = pset.
getParameter<
double>(
"RAL_jet_min_emf_cut");
171 RAL_jet_max_emf_cut_ = pset.
getParameter<
double>(
"RAL_jet_max_emf_cut");
173 RAL_met_cut_ = pset.
getParameter<
double>(
"RAL_met_cut");
175 hRAL_N_muons_ =
nullptr;
176 hRAL_pt_muons_ =
nullptr;
177 hRAL_eta_muons_ =
nullptr;
178 hRAL_phi_muons_ =
nullptr;
179 hRAL_Iso_muons_ =
nullptr;
180 hRAL_N_elecs_ =
nullptr;
181 hRAL_pt_elecs_ =
nullptr;
182 hRAL_eta_elecs_ =
nullptr;
183 hRAL_phi_elecs_ =
nullptr;
184 hRAL_Iso_elecs_ =
nullptr;
185 hRAL_Sum_pt_jets_ =
nullptr;
187 hRAL_dR_emu_ =
nullptr;
188 hRAL_mass_OS_mumu_ =
nullptr;
189 hRAL_mass_OS_ee_ =
nullptr;
190 hRAL_mass_OS_emu_ =
nullptr;
191 hRAL_mass_SS_mumu_ =
nullptr;
192 hRAL_mass_SS_ee_ =
nullptr;
193 hRAL_mass_SS_emu_ =
nullptr;
194 hRAL_Muon_monitor_ =
nullptr;
195 hRAL_Electron_monitor_ =
nullptr;
196 hRAL_OSee_monitor_ =
nullptr;
197 hRAL_OSemu_monitor_ =
nullptr;
198 hRAL_OSmumu_monitor_ =
nullptr;
199 hRAL_SSee_monitor_ =
nullptr;
200 hRAL_SSemu_monitor_ =
nullptr;
201 hRAL_SSmumu_monitor_ =
nullptr;
202 hRAL_TriMuon_monitor_ =
nullptr;
205 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
208 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
214 hRAL_N_muons_ = iBooker.
book1D(
"RAL_N_muons",
"RAL_N_muons", 10, 0., 10.);
215 hRAL_pt_muons_ = iBooker.
book1D(
"RAL_pt_muons",
"RAL_pt_muons", 50, 0., 300.);
217 iBooker.
book1D(
"RAL_eta_muons",
"RAL_eta_muons", 50, -2.5, 2.5);
218 hRAL_phi_muons_ = iBooker.
book1D(
"RAL_phi_muons",
"RAL_phi_muons", 50, -4., 4.);
219 hRAL_Iso_muons_ = iBooker.
book1D(
"RAL_Iso_muons",
"RAL_Iso_muons", 50, 0., 25.);
221 hRAL_N_elecs_ = iBooker.
book1D(
"RAL_N_elecs",
"RAL_N_elecs", 10, 0., 10.);
222 hRAL_pt_elecs_ = iBooker.
book1D(
"RAL_pt_elecs",
"RAL_pt_elecs", 50, 0., 300.);
224 iBooker.
book1D(
"RAL_eta_elecs",
"RAL_eta_elecs", 50, -2.5, 2.5);
225 hRAL_phi_elecs_ = iBooker.
book1D(
"RAL_phi_elecs",
"RAL_phi_elecs", 50, -4., 4.);
226 hRAL_Iso_elecs_ = iBooker.
book1D(
"RAL_Iso_elecs",
"RAL_Iso_elecs", 50, 0., 25.);
229 iBooker.
book1D(
"RAL_Sum_pt_jets",
"RAL_Sum_pt_jets", 50, 0., 2000.);
230 hRAL_Met_ = iBooker.
book1D(
"RAL_Met",
"RAL_Met", 50, 0., 1000.);
232 hRAL_dR_emu_ = iBooker.
book1D(
"RAL_deltaR_emu",
"RAL_deltaR_emu", 50, 0., 10.);
235 iBooker.
book1D(
"RAL_mass_OS_mumu",
"RAL_mass_OS_mumu", 50, 0., 300.);
237 iBooker.
book1D(
"RAL_mass_OS_ee",
"RAL_mass_OS_ee", 50, 0., 300.);
239 iBooker.
book1D(
"RAL_mass_OS_emu",
"RAL_mass_OS_emu", 50, 0., 300.);
241 iBooker.
book1D(
"RAL_mass_SS_mumu",
"RAL_mass_SS_mumu", 50, 0., 300.);
243 iBooker.
book1D(
"RAL_mass_SS_ee",
"RAL_mass_SS_ee", 50, 0., 300.);
245 iBooker.
book1D(
"RAL_mass_SS_emu",
"RAL_mass_SS_emu", 50, 0., 300.);
248 iBooker.
book2D(
"RAL_Single_Muon_Selection",
"RAL_Single_Muon_Selection", 50,
249 0., 1000., 50, 0., 1000.);
250 hRAL_Electron_monitor_ = iBooker.
book2D(
"RAL_Single_Electron_Selection",
251 "RAL_Single_Electron_Selection", 50, 0.,
252 1000., 50, 0., 1000.);
254 iBooker.
book2D(
"RAL_OS_Electron_Selection",
"RAL_OS_Electron_Selection", 50,
255 0., 1000., 50, 0., 1000.);
256 hRAL_OSemu_monitor_ = iBooker.
book2D(
"RAL_OS_ElectronMuon_Selection",
257 "RAL_OS_ElectronMuon_Selection", 50, 0.,
258 1000., 50, 0., 1000.);
259 hRAL_OSmumu_monitor_ =
260 iBooker.
book2D(
"RAL_OS_Muon_Selection",
"RAL_OS_Muon_Selection", 50, 0.,
261 1000., 50, 0., 1000.);
263 iBooker.
book2D(
"RAL_SS_Electron_Selection",
"RAL_SS_Electron_Selection", 50,
264 0., 1000., 50, 0., 1000.);
265 hRAL_SSemu_monitor_ = iBooker.
book2D(
"RAL_SS_ElectronMuon_Selection",
266 "RAL_SS_ElectronMuon_Selection", 50, 0.,
267 1000., 50, 0., 1000.);
268 hRAL_SSmumu_monitor_ =
269 iBooker.
book2D(
"RAL_SS_Muon_Selection",
"RAL_SS_Muon_Selection", 50, 0.,
270 1000., 50, 0., 1000.);
271 hRAL_TriMuon_monitor_ =
272 iBooker.
book2D(
"RAL_Tri_Muon_Selection",
"RAL_Tri_Muon_Selection", 50, 0.,
273 1000., 50, 0., 1000.);
276 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
280 if (fabs(ele->eta()) > elec_eta_cut_)
return false;
283 if (fabs(ele->gsfTrack()->dxy(bs)) > elec_d0_cut_)
return false;
287 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
291 if (fabs(mu->eta()) > muon_eta_cut_)
return false;
292 if (!mu->isGlobalMuon())
return false;
293 if (mu->innerTrack()->numberOfValidHits() < muon_nHits_cut_)
return false;
294 if (mu->globalTrack()->normalizedChi2() > muon_nChi2_cut_)
return false;
295 if (fabs(mu->innerTrack()->dxy(bs)) > muon_d0_cut_)
return false;
299 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
304 if (!isFound)
return;
308 if (!isFound)
return;
313 if (!isFound)
return;
314 std::vector<Jet>
jets = *cJets;
319 if (!isFound)
return;
323 if (!isFound)
return;
330 for (
typename std::vector<Jet>::const_iterator jet_i = jets.begin();
331 jet_i != jets.end(); ++jet_i) {
332 if (jet_i->pt() < RAL_jet_pt_cut_)
continue;
333 if (fabs(jet_i->eta()) > RAL_jet_eta_cut_)
continue;
334 if (fabs(jet_i->eta()) > RAL_jet_eta_cut_)
continue;
335 if (jet_i->emEnergyFraction() < RAL_jet_min_emf_cut_)
continue;
336 if (jet_i->emEnergyFraction() > RAL_jet_max_emf_cut_)
continue;
337 sumPt += jet_i->pt();
340 hRAL_Sum_pt_jets_->Fill(sumPt);
343 for (
typename std::vector<Met>::const_iterator met_i = mets->begin();
344 met_i != mets->end(); ++met_i) {
349 hRAL_Met_->Fill(MET);
359 for (
typename std::vector<Mu>::const_iterator mu_i = muons->begin();
360 mu_i != muons->end(); ++mu_i) {
361 if (!(goodSusyMuon(&(*mu_i)) && mu_i->pt() > RAL_muon_pt_cut_))
continue;
364 hRAL_pt_muons_->Fill(mu_i->pt());
365 hRAL_eta_muons_->Fill(mu_i->eta());
366 hRAL_phi_muons_->Fill(mu_i->phi());
372 for (
typename std::vector<Mu>::const_iterator mu_j = muons->begin();
373 mu_j != muons->end(); ++mu_j) {
374 if (mu_i >= mu_j)
continue;
375 if (!(goodSusyMuon(&(*mu_j)) && mu_j->pt() > RAL_muon_pt_cut_))
continue;
377 inv = (mu_i->p4() + mu_j->p4()).M();
378 if (mu_i->charge() * mu_j->charge() > 0) {
380 hRAL_mass_SS_mumu_->Fill(inv);
382 if (mu_i->charge() * mu_j->charge() < 0) {
384 hRAL_mass_OS_mumu_->Fill(inv);
389 for (
typename std::vector<Ele>::const_iterator ele_j = elecs->begin();
390 ele_j != elecs->end(); ++ele_j) {
391 if (!(goodSusyElectron(&(*ele_j)) && ele_j->pt() > RAL_elec_pt_cut_))
393 inv = (mu_i->p4() + ele_j->p4()).M();
394 dR =
deltaR(*mu_i, *ele_j);
395 hRAL_dR_emu_->Fill(dR);
396 if (mu_i->charge() * ele_j->charge() > 0) {
398 hRAL_mass_SS_emu_->Fill(inv);
400 if (mu_i->charge() * ele_j->charge() < 0) {
402 hRAL_mass_OS_emu_->Fill(inv);
407 hRAL_N_muons_->Fill(nMuons);
412 for (
typename std::vector<Ele>::const_iterator ele_i = elecs->begin();
413 ele_i != elecs->end(); ++ele_i) {
414 if (!(goodSusyElectron(&(*ele_i)) && ele_i->pt() > RAL_elec_pt_cut_))
418 hRAL_pt_elecs_->Fill(ele_i->pt());
419 hRAL_eta_elecs_->Fill(ele_i->eta());
420 hRAL_phi_elecs_->Fill(ele_i->phi());
422 hRAL_Iso_elecs_->Fill(ele_i->dr03TkSumPt() + ele_i->dr03EcalRecHitSumEt() +
423 ele_i->dr03HcalTowerSumEt());
426 for (
typename std::vector<Ele>::const_iterator ele_j = elecs->begin();
427 ele_j != elecs->end(); ++ele_j) {
428 if (ele_i >= ele_j)
continue;
429 if (!(goodSusyElectron(&(*ele_j)) && ele_j->pt() > RAL_elec_pt_cut_))
432 inv = (ele_i->p4() + ele_j->p4()).M();
433 if (ele_i->charge() * ele_j->charge() > 0) {
435 hRAL_mass_SS_ee_->Fill(inv);
437 if (ele_i->charge() * ele_j->charge() < 0) {
439 hRAL_mass_OS_ee_->Fill(inv);
444 hRAL_N_elecs_->Fill(nElectrons);
446 if (MET > RAL_met_cut_ && sumPt > RAL_jet_sum_pt_cut_) {
448 hRAL_Muon_monitor_->Fill(sumPt, MET);
450 if (nElectrons >= 1) {
451 hRAL_Electron_monitor_->Fill(sumPt, MET);
454 hRAL_OSee_monitor_->Fill(sumPt, MET);
457 hRAL_OSemu_monitor_->Fill(sumPt, MET);
460 hRAL_OSmumu_monitor_->Fill(sumPt, MET);
463 hRAL_SSee_monitor_->Fill(sumPt, MET);
466 hRAL_SSemu_monitor_->Fill(sumPt, MET);
469 hRAL_SSmumu_monitor_->Fill(sumPt, MET);
473 hRAL_TriMuon_monitor_->Fill(sumPt, MET);
MonitorElement * hRAL_Iso_elecs_
MonitorElement * hRAL_OSemu_monitor_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * hRAL_N_muons_
edm::EDGetTokenT< std::vector< reco::GsfElectron > > electrons_
float sumPt
sum-pt of tracks
SusyDQM(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * hRAL_Iso_muons_
virtual bool goodSusyMuon(const Mu *)
MonitorElement * hRAL_SSmumu_monitor_
MonitorElement * hRAL_Sum_pt_jets_
edm::EDGetTokenT< reco::VertexCollection > vertex_
double RAL_jet_sum_pt_cut_
MonitorElement * hRAL_eta_elecs_
edm::EDGetTokenT< std::vector< reco::Muon > > muons_
double RAL_jet_max_emf_cut_
MonitorElement * hRAL_mass_SS_mumu_
double RAL_jet_min_emf_cut_
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * hRAL_mass_SS_emu_
MonitorElement * hRAL_OSee_monitor_
edm::EDGetTokenT< std::vector< reco::CaloJet > > jets_
void setCurrentFolder(std::string const &fullpath)
edm::EDGetTokenT< std::vector< reco::CaloMET > > met_
MonitorElement * hRAL_mass_OS_emu_
MonitorElement * hRAL_mass_OS_mumu_
MonitorElement * hRAL_OSmumu_monitor_
MonitorElement * book1D(Args &&...args)
virtual bool goodSusyElectron(const Ele *)
MonitorElement * hRAL_Muon_monitor_
MonitorElement * hRAL_pt_elecs_
MonitorElement * hRAL_eta_muons_
MonitorElement * hRAL_phi_elecs_
edm::ParameterSet parameters_
MonitorElement * hRAL_pt_muons_
MonitorElement * hRAL_N_elecs_
MonitorElement * hRAL_Electron_monitor_
MonitorElement * hRAL_Met_
MonitorElement * book2D(Args &&...args)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
XYZPointD XYZPoint
point in space with cartesian internal representation
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * hRAL_SSee_monitor_
MonitorElement * hRAL_SSemu_monitor_
MonitorElement * hRAL_mass_OS_ee_
MonitorElement * hRAL_TriMuon_monitor_
MonitorElement * hRAL_phi_muons_
MonitorElement * hRAL_mass_SS_ee_
bool operator()(const T &i, const T &j)
MonitorElement * hRAL_dR_emu_
SusyDQM< reco::Muon, reco::GsfElectron, reco::CaloJet, reco::CaloMET > RecoSusyDQM