46 return (i.pt() > j.pt());
50 template<
typename Mu,
typename Ele,
typename Jet,
typename Met>
144 template<
typename Mu,
typename Ele,
typename Jet,
typename Met>
152 muons_ = consumes<std::vector<reco::Muon> > (
154 electrons_ = consumes<std::vector<reco::GsfElectron> > (
156 jets_ = consumes<std::vector<reco::CaloJet> > (
158 met_ = consumes<std::vector<reco::CaloMET> > (
160 vertex_ = consumes<reco::VertexCollection> (
163 muon_eta_cut_ = pset.
getParameter<
double> (
"muon_eta_cut");
164 muon_nHits_cut_ = pset.
getParameter<
double> (
"muon_nHits_cut");
165 muon_nChi2_cut_ = pset.
getParameter<
double> (
"muon_nChi2_cut");
166 muon_d0_cut_ = pset.
getParameter<
double> (
"muon_d0_cut");
168 elec_eta_cut_ = pset.
getParameter<
double> (
"elec_eta_cut");
169 elec_mva_cut_ = pset.
getParameter<
double> (
"elec_mva_cut");
170 elec_d0_cut_ = pset.
getParameter<
double> (
"elec_d0_cut");
172 RAL_muon_pt_cut_ = pset.
getParameter<
double> (
"RAL_muon_pt_cut");
173 RAL_muon_iso_cut_ = pset.
getParameter<
double> (
"RAL_muon_iso_cut");
175 RAL_elec_pt_cut_ = pset.
getParameter<
double> (
"RAL_elec_pt_cut");
176 RAL_elec_iso_cut_ = pset.
getParameter<
double> (
"RAL_elec_iso_cut");
178 RAL_jet_pt_cut_ = pset.
getParameter<
double> (
"RAL_jet_pt_cut");
179 RAL_jet_sum_pt_cut_ = pset.
getParameter<
double> (
"RAL_jet_sum_pt_cut");
180 RAL_jet_eta_cut_ = pset.
getParameter<
double> (
"RAL_jet_eta_cut");
181 RAL_jet_min_emf_cut_ = pset.
getParameter<
double> (
"RAL_jet_min_emf_cut");
182 RAL_jet_max_emf_cut_ = pset.
getParameter<
double> (
"RAL_jet_max_emf_cut");
184 RAL_met_cut_ = pset.
getParameter<
double> (
"RAL_met_cut");
198 hRAL_Sum_pt_jets_ = 0;
201 hRAL_mass_OS_mumu_ = 0;
202 hRAL_mass_OS_ee_ = 0;
203 hRAL_mass_OS_emu_ = 0;
204 hRAL_mass_SS_mumu_ = 0;
205 hRAL_mass_SS_ee_ = 0;
206 hRAL_mass_SS_emu_ = 0;
207 hRAL_Muon_monitor_ = 0;
208 hRAL_Electron_monitor_ = 0;
209 hRAL_OSee_monitor_ = 0;
210 hRAL_OSemu_monitor_ = 0;
211 hRAL_OSmumu_monitor_ = 0;
212 hRAL_SSee_monitor_ = 0;
213 hRAL_SSemu_monitor_ = 0;
214 hRAL_SSmumu_monitor_ = 0;
215 hRAL_TriMuon_monitor_ = 0;
219 template<
typename Mu,
typename Ele,
typename Jet,
typename Met>
224 template<
typename Mu,
typename Ele,
typename Jet,
typename Met>
229 template<
typename Mu,
typename Ele,
typename Jet,
typename Met>
234 hRAL_N_muons_ =
dbe_->
book1D(
"RAL_N_muons",
"RAL_N_muons", 10, 0., 10.);
235 hRAL_pt_muons_ =
dbe_->
book1D(
"RAL_pt_muons",
"RAL_pt_muons", 50, 0., 300.);
236 hRAL_eta_muons_ =
dbe_->
book1D(
"RAL_eta_muons",
"RAL_eta_muons", 50, -2.5, 2.5);
237 hRAL_phi_muons_ =
dbe_->
book1D(
"RAL_phi_muons",
"RAL_phi_muons", 50, -4., 4.);
238 hRAL_Iso_muons_ =
dbe_->
book1D(
"RAL_Iso_muons",
"RAL_Iso_muons", 50, 0., 25.);
240 hRAL_N_elecs_ =
dbe_->
book1D(
"RAL_N_elecs",
"RAL_N_elecs", 10, 0., 10.);
241 hRAL_pt_elecs_ =
dbe_->
book1D(
"RAL_pt_elecs",
"RAL_pt_elecs", 50, 0., 300.);
242 hRAL_eta_elecs_ =
dbe_->
book1D(
"RAL_eta_elecs",
"RAL_eta_elecs", 50, -2.5, 2.5);
243 hRAL_phi_elecs_ =
dbe_->
book1D(
"RAL_phi_elecs",
"RAL_phi_elecs", 50, -4., 4.);
244 hRAL_Iso_elecs_ =
dbe_->
book1D(
"RAL_Iso_elecs",
"RAL_Iso_elecs", 50, 0., 25.);
246 hRAL_Sum_pt_jets_ =
dbe_->
book1D(
"RAL_Sum_pt_jets",
"RAL_Sum_pt_jets", 50, 0., 2000.);
247 hRAL_Met_ =
dbe_->
book1D(
"RAL_Met",
"RAL_Met", 50, 0., 1000.);
249 hRAL_dR_emu_ =
dbe_->
book1D(
"RAL_deltaR_emu",
"RAL_deltaR_emu", 50, 0., 10.);
251 hRAL_mass_OS_mumu_ =
dbe_->
book1D(
"RAL_mass_OS_mumu",
"RAL_mass_OS_mumu", 50, 0., 300.);
252 hRAL_mass_OS_ee_ =
dbe_->
book1D(
"RAL_mass_OS_ee",
"RAL_mass_OS_ee", 50, 0., 300.);
253 hRAL_mass_OS_emu_ =
dbe_->
book1D(
"RAL_mass_OS_emu",
"RAL_mass_OS_emu", 50, 0., 300.);
254 hRAL_mass_SS_mumu_ =
dbe_->
book1D(
"RAL_mass_SS_mumu",
"RAL_mass_SS_mumu", 50, 0., 300.);
255 hRAL_mass_SS_ee_ =
dbe_->
book1D(
"RAL_mass_SS_ee",
"RAL_mass_SS_ee", 50, 0., 300.);
256 hRAL_mass_SS_emu_ =
dbe_->
book1D(
"RAL_mass_SS_emu",
"RAL_mass_SS_emu", 50, 0., 300.);
258 hRAL_Muon_monitor_ =
dbe_->
book2D(
"RAL_Single_Muon_Selection",
"RAL_Single_Muon_Selection", 50, 0., 1000., 50, 0.,
260 hRAL_Electron_monitor_ =
dbe_->
book2D(
"RAL_Single_Electron_Selection",
"RAL_Single_Electron_Selection", 50, 0.,
261 1000., 50, 0., 1000.);
262 hRAL_OSee_monitor_ =
dbe_->
book2D(
"RAL_OS_Electron_Selection",
"RAL_OS_Electron_Selection", 50, 0., 1000., 50, 0.,
264 hRAL_OSemu_monitor_ =
dbe_->
book2D(
"RAL_OS_ElectronMuon_Selection",
"RAL_OS_ElectronMuon_Selection", 50, 0., 1000.,
266 hRAL_OSmumu_monitor_ =
dbe_->
book2D(
"RAL_OS_Muon_Selection",
"RAL_OS_Muon_Selection", 50, 0., 1000., 50, 0., 1000.);
267 hRAL_SSee_monitor_ =
dbe_->
book2D(
"RAL_SS_Electron_Selection",
"RAL_SS_Electron_Selection", 50, 0., 1000., 50, 0.,
269 hRAL_SSemu_monitor_ =
dbe_->
book2D(
"RAL_SS_ElectronMuon_Selection",
"RAL_SS_ElectronMuon_Selection", 50, 0., 1000.,
271 hRAL_SSmumu_monitor_ =
dbe_->
book2D(
"RAL_SS_Muon_Selection",
"RAL_SS_Muon_Selection", 50, 0., 1000., 50, 0., 1000.);
272 hRAL_TriMuon_monitor_ =
dbe_->
book2D(
"RAL_Tri_Muon_Selection",
"RAL_Tri_Muon_Selection", 50, 0., 1000., 50, 0.,
277 template<
typename Mu,
typename Ele,
typename Jet,
typename Met>
282 template<
typename Mu,
typename Ele,
typename Jet,
typename Met>
286 if (fabs(ele->eta()) > elec_eta_cut_)
290 if (fabs(ele->gsfTrack()->dxy(bs)) > elec_d0_cut_)
295 template<
typename Mu,
typename Ele,
typename Jet,
typename Met>
299 if (fabs(mu->eta()) > muon_eta_cut_)
301 if (!mu->isGlobalMuon())
303 if (mu->innerTrack()->numberOfValidHits() < muon_nHits_cut_)
305 if (mu->globalTrack()->normalizedChi2() > muon_nChi2_cut_)
307 if (fabs(mu->innerTrack()->dxy(bs)) > muon_d0_cut_)
312 template<
typename Mu,
typename Ele,
typename Jet,
typename Met>
330 std::vector<Jet>
jets = *cJets;
348 for (
typename std::vector<Jet>::const_iterator jet_i = jets.begin(); jet_i != jets.end(); ++jet_i) {
349 if (jet_i->pt() < RAL_jet_pt_cut_)
351 if (fabs(jet_i->eta()) > RAL_jet_eta_cut_)
353 if (fabs(jet_i->eta()) > RAL_jet_eta_cut_)
355 if (jet_i->emEnergyFraction() < RAL_jet_min_emf_cut_)
357 if (jet_i->emEnergyFraction() > RAL_jet_max_emf_cut_)
359 sumPt += jet_i->pt();
362 hRAL_Sum_pt_jets_->Fill(sumPt);
365 for (
typename std::vector<Met>::const_iterator met_i = mets->begin(); met_i != mets->end(); ++met_i) {
370 hRAL_Met_->Fill(MET);
380 for (
typename std::vector<Mu>::const_iterator mu_i = muons->begin(); mu_i != muons->end(); ++mu_i) {
381 if (!(goodSusyMuon(&(*mu_i)) && mu_i->pt() > RAL_muon_pt_cut_))
385 hRAL_pt_muons_->Fill(mu_i->pt());
386 hRAL_eta_muons_->Fill(mu_i->eta());
387 hRAL_phi_muons_->Fill(mu_i->phi());
393 for (
typename std::vector<Mu>::const_iterator mu_j = muons->begin(); mu_j != muons->end(); ++mu_j) {
396 if (!(goodSusyMuon(&(*mu_j)) && mu_j->pt() > RAL_muon_pt_cut_))
399 inv = (mu_i->p4() + mu_j->p4()).M();
400 if (mu_i->charge() * mu_j->charge() > 0) {
402 hRAL_mass_SS_mumu_->Fill(inv);
404 if (mu_i->charge() * mu_j->charge() < 0) {
406 hRAL_mass_OS_mumu_->Fill(inv);
411 for (
typename std::vector<Ele>::const_iterator ele_j = elecs->begin(); ele_j != elecs->end(); ++ele_j) {
412 if (!(goodSusyElectron(&(*ele_j)) && ele_j->pt() > RAL_elec_pt_cut_))
414 inv = (mu_i->p4() + ele_j->p4()).M();
415 dR =
deltaR(*mu_i, *ele_j);
416 hRAL_dR_emu_->Fill(dR);
417 if (mu_i->charge() * ele_j->charge() > 0) {
419 hRAL_mass_SS_emu_->Fill(inv);
421 if (mu_i->charge() * ele_j->charge() < 0) {
423 hRAL_mass_OS_emu_->Fill(inv);
428 hRAL_N_muons_->Fill(nMuons);
433 for (
typename std::vector<Ele>::const_iterator ele_i = elecs->begin(); ele_i != elecs->end(); ++ele_i) {
434 if (!(goodSusyElectron(&(*ele_i)) && ele_i->pt() > RAL_elec_pt_cut_))
438 hRAL_pt_elecs_->Fill(ele_i->pt());
439 hRAL_eta_elecs_->Fill(ele_i->eta());
440 hRAL_phi_elecs_->Fill(ele_i->phi());
442 hRAL_Iso_elecs_->Fill(ele_i->dr03TkSumPt() + ele_i->dr03EcalRecHitSumEt() + ele_i->dr03HcalTowerSumEt());
445 for (
typename std::vector<Ele>::const_iterator ele_j = elecs->begin(); ele_j != elecs->end(); ++ele_j) {
448 if (!(goodSusyElectron(&(*ele_j)) && ele_j->pt() > RAL_elec_pt_cut_))
451 inv = (ele_i->p4() + ele_j->p4()).M();
452 if (ele_i->charge() * ele_j->charge() > 0) {
454 hRAL_mass_SS_ee_->Fill(inv);
456 if (ele_i->charge() * ele_j->charge() < 0) {
458 hRAL_mass_OS_ee_->Fill(inv);
463 hRAL_N_elecs_->Fill(nElectrons);
465 if (MET > RAL_met_cut_ && sumPt > RAL_jet_sum_pt_cut_) {
467 hRAL_Muon_monitor_->Fill(sumPt, MET);
469 if (nElectrons >= 1) {
470 hRAL_Electron_monitor_->Fill(sumPt, MET);
473 hRAL_OSee_monitor_->Fill(sumPt, MET);
476 hRAL_OSemu_monitor_->Fill(sumPt, MET);
479 hRAL_OSmumu_monitor_->Fill(sumPt, MET);
482 hRAL_SSee_monitor_->Fill(sumPt, MET);
485 hRAL_SSemu_monitor_->Fill(sumPt, MET);
488 hRAL_SSmumu_monitor_->Fill(sumPt, MET);
492 hRAL_TriMuon_monitor_->Fill(sumPt, MET);
497 template<
typename Mu,
typename Ele,
typename Jet,
typename Met>
502 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