46 return (
i.pt() >
j.pt());
50 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
134 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
139 muons_ = consumes<std::vector<reco::Muon> >(
pset.getParameter<
edm::InputTag>(
"muonCollection"));
140 electrons_ = consumes<std::vector<reco::GsfElectron> >(
pset.getParameter<
edm::InputTag>(
"electronCollection"));
141 jets_ = consumes<std::vector<reco::CaloJet> >(
pset.getParameter<
edm::InputTag>(
"jetCollection"));
142 met_ = consumes<std::vector<reco::CaloMET> >(
pset.getParameter<
edm::InputTag>(
"metCollection"));
143 vertex_ = consumes<reco::VertexCollection>(
pset.getParameter<
edm::InputTag>(
"vertexCollection"));
145 muon_eta_cut_ =
pset.getParameter<
double>(
"muon_eta_cut");
146 muon_nHits_cut_ =
pset.getParameter<
double>(
"muon_nHits_cut");
147 muon_nChi2_cut_ =
pset.getParameter<
double>(
"muon_nChi2_cut");
148 muon_d0_cut_ =
pset.getParameter<
double>(
"muon_d0_cut");
150 elec_eta_cut_ =
pset.getParameter<
double>(
"elec_eta_cut");
151 elec_mva_cut_ =
pset.getParameter<
double>(
"elec_mva_cut");
152 elec_d0_cut_ =
pset.getParameter<
double>(
"elec_d0_cut");
154 RAL_muon_pt_cut_ =
pset.getParameter<
double>(
"RAL_muon_pt_cut");
155 RAL_muon_iso_cut_ =
pset.getParameter<
double>(
"RAL_muon_iso_cut");
157 RAL_elec_pt_cut_ =
pset.getParameter<
double>(
"RAL_elec_pt_cut");
158 RAL_elec_iso_cut_ =
pset.getParameter<
double>(
"RAL_elec_iso_cut");
160 RAL_jet_pt_cut_ =
pset.getParameter<
double>(
"RAL_jet_pt_cut");
161 RAL_jet_sum_pt_cut_ =
pset.getParameter<
double>(
"RAL_jet_sum_pt_cut");
162 RAL_jet_eta_cut_ =
pset.getParameter<
double>(
"RAL_jet_eta_cut");
163 RAL_jet_min_emf_cut_ =
pset.getParameter<
double>(
"RAL_jet_min_emf_cut");
164 RAL_jet_max_emf_cut_ =
pset.getParameter<
double>(
"RAL_jet_max_emf_cut");
166 RAL_met_cut_ =
pset.getParameter<
double>(
"RAL_met_cut");
168 hRAL_N_muons_ =
nullptr;
169 hRAL_pt_muons_ =
nullptr;
170 hRAL_eta_muons_ =
nullptr;
171 hRAL_phi_muons_ =
nullptr;
172 hRAL_Iso_muons_ =
nullptr;
173 hRAL_N_elecs_ =
nullptr;
174 hRAL_pt_elecs_ =
nullptr;
175 hRAL_eta_elecs_ =
nullptr;
176 hRAL_phi_elecs_ =
nullptr;
177 hRAL_Iso_elecs_ =
nullptr;
178 hRAL_Sum_pt_jets_ =
nullptr;
180 hRAL_dR_emu_ =
nullptr;
181 hRAL_mass_OS_mumu_ =
nullptr;
182 hRAL_mass_OS_ee_ =
nullptr;
183 hRAL_mass_OS_emu_ =
nullptr;
184 hRAL_mass_SS_mumu_ =
nullptr;
185 hRAL_mass_SS_ee_ =
nullptr;
186 hRAL_mass_SS_emu_ =
nullptr;
187 hRAL_Muon_monitor_ =
nullptr;
188 hRAL_Electron_monitor_ =
nullptr;
189 hRAL_OSee_monitor_ =
nullptr;
190 hRAL_OSemu_monitor_ =
nullptr;
191 hRAL_OSmumu_monitor_ =
nullptr;
192 hRAL_SSee_monitor_ =
nullptr;
193 hRAL_SSemu_monitor_ =
nullptr;
194 hRAL_SSmumu_monitor_ =
nullptr;
195 hRAL_TriMuon_monitor_ =
nullptr;
198 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
201 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
205 hRAL_N_muons_ = iBooker.
book1D(
"RAL_N_muons",
"RAL_N_muons", 10, 0., 10.);
206 hRAL_pt_muons_ = iBooker.
book1D(
"RAL_pt_muons",
"RAL_pt_muons", 50, 0., 300.);
207 hRAL_eta_muons_ = iBooker.
book1D(
"RAL_eta_muons",
"RAL_eta_muons", 50, -2.5, 2.5);
208 hRAL_phi_muons_ = iBooker.
book1D(
"RAL_phi_muons",
"RAL_phi_muons", 50, -4., 4.);
209 hRAL_Iso_muons_ = iBooker.
book1D(
"RAL_Iso_muons",
"RAL_Iso_muons", 50, 0., 25.);
211 hRAL_N_elecs_ = iBooker.
book1D(
"RAL_N_elecs",
"RAL_N_elecs", 10, 0., 10.);
212 hRAL_pt_elecs_ = iBooker.
book1D(
"RAL_pt_elecs",
"RAL_pt_elecs", 50, 0., 300.);
213 hRAL_eta_elecs_ = iBooker.
book1D(
"RAL_eta_elecs",
"RAL_eta_elecs", 50, -2.5, 2.5);
214 hRAL_phi_elecs_ = iBooker.
book1D(
"RAL_phi_elecs",
"RAL_phi_elecs", 50, -4., 4.);
215 hRAL_Iso_elecs_ = iBooker.
book1D(
"RAL_Iso_elecs",
"RAL_Iso_elecs", 50, 0., 25.);
217 hRAL_Sum_pt_jets_ = iBooker.
book1D(
"RAL_Sum_pt_jets",
"RAL_Sum_pt_jets", 50, 0., 2000.);
218 hRAL_Met_ = iBooker.
book1D(
"RAL_Met",
"RAL_Met", 50, 0., 1000.);
220 hRAL_dR_emu_ = iBooker.
book1D(
"RAL_deltaR_emu",
"RAL_deltaR_emu", 50, 0., 10.);
222 hRAL_mass_OS_mumu_ = iBooker.
book1D(
"RAL_mass_OS_mumu",
"RAL_mass_OS_mumu", 50, 0., 300.);
223 hRAL_mass_OS_ee_ = iBooker.
book1D(
"RAL_mass_OS_ee",
"RAL_mass_OS_ee", 50, 0., 300.);
224 hRAL_mass_OS_emu_ = iBooker.
book1D(
"RAL_mass_OS_emu",
"RAL_mass_OS_emu", 50, 0., 300.);
225 hRAL_mass_SS_mumu_ = iBooker.
book1D(
"RAL_mass_SS_mumu",
"RAL_mass_SS_mumu", 50, 0., 300.);
226 hRAL_mass_SS_ee_ = iBooker.
book1D(
"RAL_mass_SS_ee",
"RAL_mass_SS_ee", 50, 0., 300.);
227 hRAL_mass_SS_emu_ = iBooker.
book1D(
"RAL_mass_SS_emu",
"RAL_mass_SS_emu", 50, 0., 300.);
230 iBooker.
book2D(
"RAL_Single_Muon_Selection",
"RAL_Single_Muon_Selection", 50, 0., 1000., 50, 0., 1000.);
231 hRAL_Electron_monitor_ =
232 iBooker.
book2D(
"RAL_Single_Electron_Selection",
"RAL_Single_Electron_Selection", 50, 0., 1000., 50, 0., 1000.);
234 iBooker.
book2D(
"RAL_OS_Electron_Selection",
"RAL_OS_Electron_Selection", 50, 0., 1000., 50, 0., 1000.);
235 hRAL_OSemu_monitor_ =
236 iBooker.
book2D(
"RAL_OS_ElectronMuon_Selection",
"RAL_OS_ElectronMuon_Selection", 50, 0., 1000., 50, 0., 1000.);
237 hRAL_OSmumu_monitor_ = iBooker.
book2D(
"RAL_OS_Muon_Selection",
"RAL_OS_Muon_Selection", 50, 0., 1000., 50, 0., 1000.);
239 iBooker.
book2D(
"RAL_SS_Electron_Selection",
"RAL_SS_Electron_Selection", 50, 0., 1000., 50, 0., 1000.);
240 hRAL_SSemu_monitor_ =
241 iBooker.
book2D(
"RAL_SS_ElectronMuon_Selection",
"RAL_SS_ElectronMuon_Selection", 50, 0., 1000., 50, 0., 1000.);
242 hRAL_SSmumu_monitor_ = iBooker.
book2D(
"RAL_SS_Muon_Selection",
"RAL_SS_Muon_Selection", 50, 0., 1000., 50, 0., 1000.);
243 hRAL_TriMuon_monitor_ =
244 iBooker.
book2D(
"RAL_Tri_Muon_Selection",
"RAL_Tri_Muon_Selection", 50, 0., 1000., 50, 0., 1000.);
247 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
251 if (fabs(ele->eta()) > elec_eta_cut_)
255 if (fabs(ele->gsfTrack()->dxy(
bs)) > elec_d0_cut_)
260 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
264 if (fabs(
mu->eta()) > muon_eta_cut_)
266 if (!
mu->isGlobalMuon())
268 if (
mu->innerTrack()->numberOfValidHits() < muon_nHits_cut_)
270 if (
mu->globalTrack()->normalizedChi2() > muon_nChi2_cut_)
272 if (fabs(
mu->innerTrack()->dxy(
bs)) > muon_d0_cut_)
277 template <
typename Mu,
typename Ele,
typename Jet,
typename Met>
294 std::vector<Jet>
jets = *cJets;
312 for (
typename std::vector<Jet>::const_iterator jet_i =
jets.begin(); jet_i !=
jets.end(); ++jet_i) {
313 if (jet_i->pt() < RAL_jet_pt_cut_)
315 if (fabs(jet_i->eta()) > RAL_jet_eta_cut_)
317 if (fabs(jet_i->eta()) > RAL_jet_eta_cut_)
319 if (jet_i->emEnergyFraction() < RAL_jet_min_emf_cut_)
321 if (jet_i->emEnergyFraction() > RAL_jet_max_emf_cut_)
323 sumPt += jet_i->pt();
326 hRAL_Sum_pt_jets_->Fill(
sumPt);
329 for (
typename std::vector<Met>::const_iterator met_i =
mets->begin(); met_i !=
mets->end(); ++met_i) {
334 hRAL_Met_->Fill(
MET);
344 for (
typename std::vector<Mu>::const_iterator mu_i =
muons->begin(); mu_i !=
muons->end(); ++mu_i) {
345 if (!(goodSusyMuon(&(*mu_i)) && mu_i->pt() > RAL_muon_pt_cut_))
349 hRAL_pt_muons_->Fill(mu_i->pt());
350 hRAL_eta_muons_->Fill(mu_i->eta());
351 hRAL_phi_muons_->Fill(mu_i->phi());
357 for (
typename std::vector<Mu>::const_iterator mu_j =
muons->begin(); mu_j !=
muons->end(); ++mu_j) {
360 if (!(goodSusyMuon(&(*mu_j)) && mu_j->pt() > RAL_muon_pt_cut_))
363 inv = (mu_i->p4() + mu_j->p4()).M();
364 if (mu_i->charge() * mu_j->charge() > 0) {
366 hRAL_mass_SS_mumu_->Fill(inv);
368 if (mu_i->charge() * mu_j->charge() < 0) {
370 hRAL_mass_OS_mumu_->Fill(inv);
375 for (
typename std::vector<Ele>::const_iterator ele_j =
elecs->begin(); ele_j !=
elecs->end(); ++ele_j) {
376 if (!(goodSusyElectron(&(*ele_j)) && ele_j->pt() > RAL_elec_pt_cut_))
378 inv = (mu_i->p4() + ele_j->p4()).M();
380 hRAL_dR_emu_->Fill(
dR);
381 if (mu_i->charge() * ele_j->charge() > 0) {
383 hRAL_mass_SS_emu_->Fill(inv);
385 if (mu_i->charge() * ele_j->charge() < 0) {
387 hRAL_mass_OS_emu_->Fill(inv);
392 hRAL_N_muons_->Fill(
nMuons);
397 for (
typename std::vector<Ele>::const_iterator ele_i =
elecs->begin(); ele_i !=
elecs->end(); ++ele_i) {
398 if (!(goodSusyElectron(&(*ele_i)) && ele_i->pt() > RAL_elec_pt_cut_))
402 hRAL_pt_elecs_->Fill(ele_i->pt());
403 hRAL_eta_elecs_->Fill(ele_i->eta());
404 hRAL_phi_elecs_->Fill(ele_i->phi());
406 hRAL_Iso_elecs_->Fill(ele_i->dr03TkSumPt() + ele_i->dr03EcalRecHitSumEt() + ele_i->dr03HcalTowerSumEt());
409 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_))
415 inv = (ele_i->p4() + ele_j->p4()).M();
416 if (ele_i->charge() * ele_j->charge() > 0) {
418 hRAL_mass_SS_ee_->Fill(inv);
420 if (ele_i->charge() * ele_j->charge() < 0) {
422 hRAL_mass_OS_ee_->Fill(inv);
429 if (
MET > RAL_met_cut_ &&
sumPt > RAL_jet_sum_pt_cut_) {
431 hRAL_Muon_monitor_->Fill(
sumPt,
MET);
434 hRAL_Electron_monitor_->Fill(
sumPt,
MET);
437 hRAL_OSee_monitor_->Fill(
sumPt,
MET);
440 hRAL_OSemu_monitor_->Fill(
sumPt,
MET);
443 hRAL_OSmumu_monitor_->Fill(
sumPt,
MET);
446 hRAL_SSee_monitor_->Fill(
sumPt,
MET);
449 hRAL_SSemu_monitor_->Fill(
sumPt,
MET);
452 hRAL_SSmumu_monitor_->Fill(
sumPt,
MET);
456 hRAL_TriMuon_monitor_->Fill(
sumPt,
MET);
MonitorElement * hRAL_Iso_elecs_
MonitorElement * hRAL_OSemu_monitor_
MonitorElement * hRAL_N_muons_
edm::EDGetTokenT< std::vector< reco::GsfElectron > > electrons_
float sumPt
sum-pt of tracks
SusyDQM(const edm::ParameterSet &)
virtual void setCurrentFolder(std::string const &fullpath)
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_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< std::vector< reco::Muon > > muons_
double RAL_jet_max_emf_cut_
MonitorElement * hRAL_mass_SS_mumu_
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
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 *)
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_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
XYZPointD XYZPoint
point in space with cartesian internal representation
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
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 * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
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