47 return (i.pt() > j.pt());
51 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
141 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
149 muons_ = consumes<std::vector<reco::Muon> >(
151 electrons_ = consumes<std::vector<reco::GsfElectron> >(
153 jets_ = consumes<std::vector<reco::CaloJet> >(
155 met_ = consumes<std::vector<reco::CaloMET> >(
157 vertex_ = consumes<reco::VertexCollection>(
160 muon_eta_cut_ = pset.
getParameter<
double>(
"muon_eta_cut");
161 muon_nHits_cut_ = pset.
getParameter<
double>(
"muon_nHits_cut");
162 muon_nChi2_cut_ = pset.
getParameter<
double>(
"muon_nChi2_cut");
163 muon_d0_cut_ = pset.
getParameter<
double>(
"muon_d0_cut");
165 elec_eta_cut_ = pset.
getParameter<
double>(
"elec_eta_cut");
166 elec_mva_cut_ = pset.
getParameter<
double>(
"elec_mva_cut");
167 elec_d0_cut_ = pset.
getParameter<
double>(
"elec_d0_cut");
169 RAL_muon_pt_cut_ = pset.
getParameter<
double>(
"RAL_muon_pt_cut");
170 RAL_muon_iso_cut_ = pset.
getParameter<
double>(
"RAL_muon_iso_cut");
172 RAL_elec_pt_cut_ = pset.
getParameter<
double>(
"RAL_elec_pt_cut");
173 RAL_elec_iso_cut_ = pset.
getParameter<
double>(
"RAL_elec_iso_cut");
175 RAL_jet_pt_cut_ = pset.
getParameter<
double>(
"RAL_jet_pt_cut");
176 RAL_jet_sum_pt_cut_ = pset.
getParameter<
double>(
"RAL_jet_sum_pt_cut");
177 RAL_jet_eta_cut_ = pset.
getParameter<
double>(
"RAL_jet_eta_cut");
178 RAL_jet_min_emf_cut_ = pset.
getParameter<
double>(
"RAL_jet_min_emf_cut");
179 RAL_jet_max_emf_cut_ = pset.
getParameter<
double>(
"RAL_jet_max_emf_cut");
181 RAL_met_cut_ = pset.
getParameter<
double>(
"RAL_met_cut");
195 hRAL_Sum_pt_jets_ = 0;
198 hRAL_mass_OS_mumu_ = 0;
199 hRAL_mass_OS_ee_ = 0;
200 hRAL_mass_OS_emu_ = 0;
201 hRAL_mass_SS_mumu_ = 0;
202 hRAL_mass_SS_ee_ = 0;
203 hRAL_mass_SS_emu_ = 0;
204 hRAL_Muon_monitor_ = 0;
205 hRAL_Electron_monitor_ = 0;
206 hRAL_OSee_monitor_ = 0;
207 hRAL_OSemu_monitor_ = 0;
208 hRAL_OSmumu_monitor_ = 0;
209 hRAL_SSee_monitor_ = 0;
210 hRAL_SSemu_monitor_ = 0;
211 hRAL_SSmumu_monitor_ = 0;
212 hRAL_TriMuon_monitor_ = 0;
215 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
218 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
221 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
226 hRAL_N_muons_ =
dbe_->
book1D(
"RAL_N_muons",
"RAL_N_muons", 10, 0., 10.);
227 hRAL_pt_muons_ =
dbe_->
book1D(
"RAL_pt_muons",
"RAL_pt_muons", 50, 0., 300.);
229 dbe_->
book1D(
"RAL_eta_muons",
"RAL_eta_muons", 50, -2.5, 2.5);
230 hRAL_phi_muons_ =
dbe_->
book1D(
"RAL_phi_muons",
"RAL_phi_muons", 50, -4., 4.);
231 hRAL_Iso_muons_ =
dbe_->
book1D(
"RAL_Iso_muons",
"RAL_Iso_muons", 50, 0., 25.);
233 hRAL_N_elecs_ =
dbe_->
book1D(
"RAL_N_elecs",
"RAL_N_elecs", 10, 0., 10.);
234 hRAL_pt_elecs_ =
dbe_->
book1D(
"RAL_pt_elecs",
"RAL_pt_elecs", 50, 0., 300.);
236 dbe_->
book1D(
"RAL_eta_elecs",
"RAL_eta_elecs", 50, -2.5, 2.5);
237 hRAL_phi_elecs_ =
dbe_->
book1D(
"RAL_phi_elecs",
"RAL_phi_elecs", 50, -4., 4.);
238 hRAL_Iso_elecs_ =
dbe_->
book1D(
"RAL_Iso_elecs",
"RAL_Iso_elecs", 50, 0., 25.);
241 dbe_->
book1D(
"RAL_Sum_pt_jets",
"RAL_Sum_pt_jets", 50, 0., 2000.);
242 hRAL_Met_ =
dbe_->
book1D(
"RAL_Met",
"RAL_Met", 50, 0., 1000.);
244 hRAL_dR_emu_ =
dbe_->
book1D(
"RAL_deltaR_emu",
"RAL_deltaR_emu", 50, 0., 10.);
247 dbe_->
book1D(
"RAL_mass_OS_mumu",
"RAL_mass_OS_mumu", 50, 0., 300.);
249 dbe_->
book1D(
"RAL_mass_OS_ee",
"RAL_mass_OS_ee", 50, 0., 300.);
251 dbe_->
book1D(
"RAL_mass_OS_emu",
"RAL_mass_OS_emu", 50, 0., 300.);
253 dbe_->
book1D(
"RAL_mass_SS_mumu",
"RAL_mass_SS_mumu", 50, 0., 300.);
255 dbe_->
book1D(
"RAL_mass_SS_ee",
"RAL_mass_SS_ee", 50, 0., 300.);
257 dbe_->
book1D(
"RAL_mass_SS_emu",
"RAL_mass_SS_emu", 50, 0., 300.);
260 dbe_->
book2D(
"RAL_Single_Muon_Selection",
"RAL_Single_Muon_Selection", 50,
261 0., 1000., 50, 0., 1000.);
262 hRAL_Electron_monitor_ =
dbe_->
book2D(
"RAL_Single_Electron_Selection",
263 "RAL_Single_Electron_Selection", 50, 0.,
264 1000., 50, 0., 1000.);
266 dbe_->
book2D(
"RAL_OS_Electron_Selection",
"RAL_OS_Electron_Selection", 50,
267 0., 1000., 50, 0., 1000.);
268 hRAL_OSemu_monitor_ =
dbe_->
book2D(
"RAL_OS_ElectronMuon_Selection",
269 "RAL_OS_ElectronMuon_Selection", 50, 0.,
270 1000., 50, 0., 1000.);
271 hRAL_OSmumu_monitor_ =
272 dbe_->
book2D(
"RAL_OS_Muon_Selection",
"RAL_OS_Muon_Selection", 50, 0.,
273 1000., 50, 0., 1000.);
275 dbe_->
book2D(
"RAL_SS_Electron_Selection",
"RAL_SS_Electron_Selection", 50,
276 0., 1000., 50, 0., 1000.);
277 hRAL_SSemu_monitor_ =
dbe_->
book2D(
"RAL_SS_ElectronMuon_Selection",
278 "RAL_SS_ElectronMuon_Selection", 50, 0.,
279 1000., 50, 0., 1000.);
280 hRAL_SSmumu_monitor_ =
281 dbe_->
book2D(
"RAL_SS_Muon_Selection",
"RAL_SS_Muon_Selection", 50, 0.,
282 1000., 50, 0., 1000.);
283 hRAL_TriMuon_monitor_ =
284 dbe_->
book2D(
"RAL_Tri_Muon_Selection",
"RAL_Tri_Muon_Selection", 50, 0.,
285 1000., 50, 0., 1000.);
288 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
291 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
295 if (fabs(ele->eta()) > elec_eta_cut_)
return false;
298 if (fabs(ele->gsfTrack()->dxy(bs)) > elec_d0_cut_)
return false;
302 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
306 if (fabs(mu->eta()) > muon_eta_cut_)
return false;
307 if (!mu->isGlobalMuon())
return false;
308 if (mu->innerTrack()->numberOfValidHits() < muon_nHits_cut_)
return false;
309 if (mu->globalTrack()->normalizedChi2() > muon_nChi2_cut_)
return false;
310 if (fabs(mu->innerTrack()->dxy(bs)) > muon_d0_cut_)
return false;
314 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
320 if (!isFound)
return;
324 if (!isFound)
return;
329 if (!isFound)
return;
330 std::vector<Jet>
jets = *cJets;
335 if (!isFound)
return;
339 if (!isFound)
return;
346 for (
typename std::vector<Jet>::const_iterator jet_i = jets.begin();
347 jet_i != jets.end(); ++jet_i) {
348 if (jet_i->pt() < RAL_jet_pt_cut_)
continue;
349 if (fabs(jet_i->eta()) > RAL_jet_eta_cut_)
continue;
350 if (fabs(jet_i->eta()) > RAL_jet_eta_cut_)
continue;
351 if (jet_i->emEnergyFraction() < RAL_jet_min_emf_cut_)
continue;
352 if (jet_i->emEnergyFraction() > RAL_jet_max_emf_cut_)
continue;
353 sumPt += jet_i->pt();
356 hRAL_Sum_pt_jets_->Fill(sumPt);
359 for (
typename std::vector<Met>::const_iterator met_i = mets->begin();
360 met_i != mets->end(); ++met_i) {
365 hRAL_Met_->Fill(MET);
375 for (
typename std::vector<Mu>::const_iterator mu_i = muons->begin();
376 mu_i != muons->end(); ++mu_i) {
377 if (!(goodSusyMuon(&(*mu_i)) && mu_i->pt() > RAL_muon_pt_cut_))
continue;
380 hRAL_pt_muons_->Fill(mu_i->pt());
381 hRAL_eta_muons_->Fill(mu_i->eta());
382 hRAL_phi_muons_->Fill(mu_i->phi());
388 for (
typename std::vector<Mu>::const_iterator mu_j = muons->begin();
389 mu_j != muons->end(); ++mu_j) {
390 if (mu_i >= mu_j)
continue;
391 if (!(goodSusyMuon(&(*mu_j)) && mu_j->pt() > RAL_muon_pt_cut_))
continue;
393 inv = (mu_i->p4() + mu_j->p4()).M();
394 if (mu_i->charge() * mu_j->charge() > 0) {
396 hRAL_mass_SS_mumu_->Fill(inv);
398 if (mu_i->charge() * mu_j->charge() < 0) {
400 hRAL_mass_OS_mumu_->Fill(inv);
405 for (
typename std::vector<Ele>::const_iterator ele_j = elecs->begin();
406 ele_j != elecs->end(); ++ele_j) {
407 if (!(goodSusyElectron(&(*ele_j)) && ele_j->pt() > RAL_elec_pt_cut_))
409 inv = (mu_i->p4() + ele_j->p4()).M();
410 dR =
deltaR(*mu_i, *ele_j);
411 hRAL_dR_emu_->Fill(dR);
412 if (mu_i->charge() * ele_j->charge() > 0) {
414 hRAL_mass_SS_emu_->Fill(inv);
416 if (mu_i->charge() * ele_j->charge() < 0) {
418 hRAL_mass_OS_emu_->Fill(inv);
423 hRAL_N_muons_->Fill(nMuons);
428 for (
typename std::vector<Ele>::const_iterator ele_i = elecs->begin();
429 ele_i != elecs->end(); ++ele_i) {
430 if (!(goodSusyElectron(&(*ele_i)) && ele_i->pt() > RAL_elec_pt_cut_))
434 hRAL_pt_elecs_->Fill(ele_i->pt());
435 hRAL_eta_elecs_->Fill(ele_i->eta());
436 hRAL_phi_elecs_->Fill(ele_i->phi());
438 hRAL_Iso_elecs_->Fill(ele_i->dr03TkSumPt() + ele_i->dr03EcalRecHitSumEt() +
439 ele_i->dr03HcalTowerSumEt());
442 for (
typename std::vector<Ele>::const_iterator ele_j = elecs->begin();
443 ele_j != elecs->end(); ++ele_j) {
444 if (ele_i >= ele_j)
continue;
445 if (!(goodSusyElectron(&(*ele_j)) && ele_j->pt() > RAL_elec_pt_cut_))
448 inv = (ele_i->p4() + ele_j->p4()).M();
449 if (ele_i->charge() * ele_j->charge() > 0) {
451 hRAL_mass_SS_ee_->Fill(inv);
453 if (ele_i->charge() * ele_j->charge() < 0) {
455 hRAL_mass_OS_ee_->Fill(inv);
460 hRAL_N_elecs_->Fill(nElectrons);
462 if (MET > RAL_met_cut_ && sumPt > RAL_jet_sum_pt_cut_) {
464 hRAL_Muon_monitor_->Fill(sumPt, MET);
466 if (nElectrons >= 1) {
467 hRAL_Electron_monitor_->Fill(sumPt, MET);
470 hRAL_OSee_monitor_->Fill(sumPt, MET);
473 hRAL_OSemu_monitor_->Fill(sumPt, MET);
476 hRAL_OSmumu_monitor_->Fill(sumPt, MET);
479 hRAL_SSee_monitor_->Fill(sumPt, MET);
482 hRAL_SSemu_monitor_->Fill(sumPt, MET);
485 hRAL_SSmumu_monitor_->Fill(sumPt, MET);
489 hRAL_TriMuon_monitor_->Fill(sumPt, MET);
493 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
496 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
MonitorElement * hRAL_Iso_elecs_
MonitorElement * hRAL_OSemu_monitor_
T getParameter(std::string const &) const
static AlgebraicMatrix initialize()
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
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
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_
MonitorElement * hRAL_mass_SS_emu_
MonitorElement * hRAL_OSee_monitor_
edm::EDGetTokenT< std::vector< reco::CaloJet > > jets_
edm::EDGetTokenT< std::vector< reco::CaloMET > > met_
MonitorElement * hRAL_mass_OS_emu_
MonitorElement * hRAL_mass_OS_mumu_
MonitorElement * hRAL_OSmumu_monitor_
virtual bool goodSusyElectron(const Ele *)
void endRun(const edm::Run &)
MonitorElement * hRAL_Muon_monitor_
MonitorElement * hRAL_pt_elecs_
MonitorElement * hRAL_eta_muons_
MonitorElement * hRAL_phi_elecs_
edm::ParameterSet parameters_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * hRAL_pt_muons_
MonitorElement * hRAL_N_elecs_
double deltaR(double eta1, double eta2, double phi1, double phi2)
MonitorElement * hRAL_Electron_monitor_
void beginRun(const edm::Run &)
MonitorElement * hRAL_Met_
XYZPointD XYZPoint
point in space with cartesian internal representation
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_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
bool operator()(const T &i, const T &j)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * hRAL_dR_emu_
SusyDQM< reco::Muon, reco::GsfElectron, reco::CaloJet, reco::CaloMET > RecoSusyDQM