CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ExoticaDQM.cc
Go to the documentation of this file.
2 
3 #include <memory>
4 
5 // DQM
8 
9 // Framework
18 
19 // Candidate handling
37 
38 // Vertex utilities
41 
42 // Other
46 
47 // Math
55 
58 // Transient tracks
66 
67 //JetCorrection
69 
70 // ROOT
71 #include "TLorentzVector.h"
72 
73 // STDLIB
74 #include <iostream>
75 #include <iomanip>
76 #include <stdio.h>
77 #include <string>
78 #include <sstream>
79 #include <math.h>
80 
81 using namespace edm;
82 using namespace std;
83 using namespace reco;
84 using namespace trigger;
85 
86 typedef vector<string> vstring;
87 
88 
89 //
90 // -- Constructor
91 //
93 
94  edm::LogInfo("ExoticaDQM") << " Starting ExoticaDQM " << "\n" ;
95 
96  typedef std::vector<edm::InputTag> vtag;
97 
98  // Get parameters from configuration file
99  // Trigger
100  TriggerToken_ = consumes<TriggerResults>(
101  ps.getParameter<edm::InputTag>("TriggerResults"));
102  HltPaths_ = ps.getParameter<vector<string> >("HltPaths");
103 
104  VertexToken_ = consumes<reco::VertexCollection>(
105  ps.getParameter<InputTag>("vertexCollection"));
106  //
107  ElectronToken_ = consumes<reco::GsfElectronCollection>(
108  ps.getParameter<InputTag>("electronCollection"));
109  //
110  MuonToken_ = consumes<reco::MuonCollection>(
111  ps.getParameter<InputTag>("muonCollection"));
112  //
113  PhotonToken_ = consumes<reco::PhotonCollection>(
114  ps.getParameter<InputTag>("photonCollection"));
115  //
116  PFJetToken_ = consumes<reco::PFJetCollection>(
117  ps.getParameter<InputTag>("pfJetCollection"));
118  //
119  DiJetPFJetCollection_ = ps.getParameter<std::vector<edm::InputTag> >("DiJetPFJetCollection");
120  for (std::vector<edm::InputTag>::const_iterator jetlabel = DiJetPFJetCollection_.begin(), jetlabelEnd = DiJetPFJetCollection_.end(); jetlabel != jetlabelEnd; ++jetlabel) {
121  DiJetPFJetToken_.push_back(consumes<reco::PFJetCollection>(*jetlabel));
122  }
123  //
124  PFMETToken_ = consumes<reco::PFMETCollection>(
125  ps.getParameter<InputTag>("pfMETCollection"));
126  ecalBarrelRecHitToken_ = consumes<EBRecHitCollection>(
127  ps.getUntrackedParameter<InputTag>("ecalBarrelRecHit", InputTag("reducedEcalRecHitsEB")));
128  ecalEndcapRecHitToken_ = consumes<EERecHitCollection>(
129  ps.getUntrackedParameter<InputTag>("ecalEndcapRecHit", InputTag("reducedEcalRecHitsEE")));
130 
131  //Cuts - MultiJets
132  jetID = new reco::helper::JetIDHelper(ps.getParameter<ParameterSet>("JetIDParams"), consumesCollector());
133  PFJetCorService_ = ps.getParameter<std::string>("PFJetCorService");
134 
135  //Varibles and Cuts for each Module:
136  //Dijet
137  dijet_PFJet1_pt_cut_ = ps.getParameter<double>("dijet_PFJet1_pt_cut");
138  dijet_PFJet2_pt_cut_ = ps.getParameter<double>("dijet_PFJet2_pt_cut");
139  //DiMuon
140  dimuon_Muon1_pt_cut_ = ps.getParameter<double>("dimuon_Muon1_pt_cut");
141  dimuon_Muon2_pt_cut_ = ps.getParameter<double>("dimuon_Muon2_pt_cut");
142  //DiElectron
143  dielectron_Electron1_pt_cut_ = ps.getParameter<double>("dielectron_Electron2_pt_cut");
144  dielectron_Electron2_pt_cut_ = ps.getParameter<double>("dielectron_Electron2_pt_cut");
145  //DiPhoton
146  diphoton_Photon1_pt_cut_ = ps.getParameter<double>("diphoton_Photon2_pt_cut");
147  diphoton_Photon2_pt_cut_ = ps.getParameter<double>("diphoton_Photon2_pt_cut");
148  //MonoJet
149  monojet_PFJet_pt_cut_ = ps.getParameter<double>("monojet_PFJet_pt_cut");
150  monojet_PFJet_met_cut_ = ps.getParameter<double>("monojet_PFJet_met_cut");
151  //MonoMuon
152  monomuon_Muon_pt_cut_ = ps.getParameter<double>("monomuon_Muon_pt_cut");
153  monomuon_Muon_met_cut_ = ps.getParameter<double>("monomuon_Muon_met_cut");
154  //MonoElectron
155  monoelectron_Electron_pt_cut_ = ps.getParameter<double>("monoelectron_Electron_pt_cut");
156  monoelectron_Electron_met_cut_ = ps.getParameter<double>("monoelectron_Electron_met_cut");
157  //MonoPhoton
158  monophoton_Photon_pt_cut_ = ps.getParameter<double>("monophoton_Photon_pt_cut");
159  monophoton_Photon_met_cut_ = ps.getParameter<double>("monophoton_Photon_met_cut");
160 
161 }
162 
163 
164 //
165 // -- Destructor
166 //
168  edm::LogInfo("ExoticaDQM") << " Deleting ExoticaDQM " << "\n" ;
169 }
170 
171 
172 //
173 // -- Book histograms
174 //
176  edm::EventSetup const&) {
177  bei.cd();
178 
179  //--- DiJet
180  for (unsigned int icoll = 0; icoll < DiJetPFJetCollection_.size(); ++icoll) {
181  std::stringstream ss;
182  ss << "Physics/Exotica/Dijets/" << DiJetPFJetCollection_[icoll].label();
183  bei.setCurrentFolder(ss.str().c_str());
184  //bei.setCurrentFolder("Physics/Exotica/Dijets");
185  dijet_PFJet_pt.push_back(bei.book1D("dijet_PFJet_pt", "Pt of PFJet (GeV)", 50, 30.0 , 5000));
186  dijet_PFJet_eta.push_back(bei.book1D("dijet_PFJet_eta", "#eta (PFJet)", 50, -2.5, 2.5));
187  dijet_PFJet_phi.push_back(bei.book1D("dijet_PFJet_phi", "#phi (PFJet)", 50, -3.14,3.14));
188  dijet_PFJet_rapidity.push_back(bei.book1D("dijet_PFJet_rapidity", "Rapidity (PFJet)", 50, -6.0,6.0));
189  dijet_PFJet_mass.push_back(bei.book1D("dijet_PFJet_mass", "Mass (PFJets)", 50, 0., 500.));
190  dijet_deltaPhiPFJet1PFJet2.push_back(bei.book1D("dijet_deltaPhiPFJet1PFJet2", "#Delta#phi(Leading PFJet, Sub PFJet)", 40, 0., 3.15));
191  dijet_deltaEtaPFJet1PFJet2.push_back(bei.book1D("dijet_deltaEtaPFJet1PFJet2", "#Delta#eta(Leading PFJet, Sub PFJet)", 40, -5., 5.));
192  dijet_deltaRPFJet1PFJet2.push_back(bei.book1D("dijet_deltaRPFJet1PFJet2", "#DeltaR(Leading PFJet, Sub PFJet)", 50, 0., 6.));
193  dijet_invMassPFJet1PFJet2.push_back(bei.book1D("dijet_invMassPFJet1PFJet2", "Leading PFJet, SubLeading PFJet Invariant mass (GeV)", 50, 0. , 8000.));
194  dijet_PFchef.push_back(bei.book1D("dijet_PFchef", "Leading PFJet CHEF", 50, 0.0 , 1.0));
195  dijet_PFnhef.push_back(bei.book1D("dijet_PFnhef", "Leading PFJet NHEF", 50, 0.0 , 1.0));
196  dijet_PFcemf.push_back(bei.book1D("dijet_PFcemf", "Leading PFJet CEMF", 50, 0.0 , 1.0));
197  dijet_PFnemf.push_back(bei.book1D("dijet_PFnemf", "Leading PFJEt NEMF", 50, 0.0 , 1.0));
198  dijet_PFJetMulti.push_back(bei.book1D("dijet_PFJetMulti", "No. of PFJets", 10, 0., 10.));
199  }
200  //--- DiMuon
201  bei.setCurrentFolder("Physics/Exotica/DiMuons");
202  dimuon_Muon_pt = bei.book1D("dimuon_Muon_pt", "Pt of Muon (GeV)", 50, 30.0 , 2000);
203  dimuon_Muon_eta = bei.book1D("dimuon_Muon_eta", "#eta (Muon)", 50, -2.5, 2.5);
204  dimuon_Muon_phi = bei.book1D("dimuon_Muon_phi", "#phi (Muon)", 50, -3.14,3.14);
205  dimuon_Charge = bei.book1D("dimuon_Charge", "Charge of the Muon", 10, -5., 5.);
206  dimuon_deltaEtaMuon1Muon2 = bei.book1D("dimuon_deltaEtaMuon1Muon2", "#Delta#eta(Leading Muon, Sub Muon)", 40, -5., 5.);
207  dimuon_deltaPhiMuon1Muon2 = bei.book1D("dimuon_deltaPhiMuon1Muon2", "#Delta#phi(Leading Muon, Sub Muon)", 40, 0., 3.15);
208  dimuon_deltaRMuon1Muon2 = bei.book1D("dimuon_deltaRMuon1Muon2", "#DeltaR(Leading Muon, Sub Muon)", 50, 0., 6.);
209  dimuon_invMassMuon1Muon2 = bei.book1D("dimuon_invMassMuon1Muon2", "Leading Muon, SubLeading Muon Low Invariant mass (GeV)", 50, 1000. , 4000.);
210  dimuon_MuonMulti = bei.book1D("dimuon_MuonMulti", "No. of Muons", 10, 0., 10.);
211  //--- DiElectrons
212  bei.setCurrentFolder("Physics/Exotica/DiElectrons");
213  dielectron_Electron_pt = bei.book1D("dielectron_Electron_pt", "Pt of Electron (GeV)", 50, 30.0 , 2000);
214  dielectron_Electron_eta = bei.book1D("dielectron_Electron_eta", "#eta (Electron)", 50, -2.5, 2.5);
215  dielectron_Electron_phi = bei.book1D("dielectron_Electron_phi", "#phi (Electron)", 50, -3.14,3.14);
216  dielectron_Charge = bei.book1D("dielectron_Charge", "Charge of the Electron", 10, -5., 5.);
217  dielectron_deltaEtaElectron1Electron2 = bei.book1D("dielectron_deltaEtaElectron1Electron2", "#Delta#eta(Leading Electron, Sub Electron)", 40, -5., 5.);
218  dielectron_deltaPhiElectron1Electron2 = bei.book1D("dielectron_deltaPhiElectron1Electron2", "#Delta#phi(Leading Electron, Sub Electron)", 40, 0., 3.15);
219  dielectron_deltaRElectron1Electron2 = bei.book1D("dielectron_deltaRElectron1Electron2", "#DeltaR(Leading Electron, Sub Electron)", 50, 0., 6.);
220  dielectron_invMassElectron1Electron2 = bei.book1D("dielectron_invMassElectron1Electron2", "Leading Electron, SubLeading Electron Invariant mass (GeV)", 50, 1000. , 4000.);
221  dielectron_ElectronMulti = bei.book1D("dielectron_ElectronMulti", "No. of Electrons", 10, 0., 10.);
222  //--- DiPhotons
223  bei.setCurrentFolder("Physics/Exotica/DiPhotons");
224  diphoton_Photon_energy = bei.book1D("diphoton_Photon_energy", "Energy of Photon (GeV)", 50, 30.0 , 300);
225  diphoton_Photon_et = bei.book1D("diphoton_Photon_et", "Et of Photon (GeV)", 50, 30.0 , 300);
226  diphoton_Photon_pt = bei.book1D("diphoton_Photon_pt", "Pt of Photon (GeV)", 50, 30.0 , 300);
227  diphoton_Photon_eta = bei.book1D("diphoton_Photon_eta", "#eta (Photon)", 50, -2.5, 2.5);
228  diphoton_Photon_etasc = bei.book1D("diphoton_Photon_etasc", "#eta sc(Photon)", 50, -2.5, 2.5);
229  diphoton_Photon_phi = bei.book1D("diphoton_Photon_phi", "#phi (Photon)", 50, -3.14,3.14);
230  diphoton_Photon_hovere_eb = bei.book1D("diphoton_Photon_hovere_eb", "H/E (Photon) EB", 50, 0., 0.50);
231  diphoton_Photon_hovere_ee = bei.book1D("diphoton_Photon_hovere_ee", "H/E (Photon) EE", 50, 0., 0.50);
232  diphoton_Photon_sigmaietaieta_eb = bei.book1D("diphoton_Photon_sigmaietaieta_eb", "#sigma_{i #eta i #eta} (Photon) EB", 50, 0., 0.03);
233  diphoton_Photon_sigmaietaieta_ee = bei.book1D("diphoton_Photon_sigmaietaieta_ee", "#sigma_{i #eta i #eta} (Photon) EE", 50, 0., 0.03);
234  diphoton_Photon_trksumptsolidconedr03_eb = bei.book1D("diphoton_Photon_trksumptsolidconedr03_eb", "TrkSumPtDr03 (Photon) EB", 50, 0., 15.);
235  diphoton_Photon_trksumptsolidconedr03_ee = bei.book1D("diphoton_Photon_trksumptsolidconedr03_ee", "TrkSumPtDr03 (Photon) EE", 50, 0., 15.);
236  diphoton_Photon_e1x5e5x5_eb = bei.book1D("diphoton_Photon_e1x5e5x5_eb", "E_{1x5}/E_{5x5} (Photon) EB", 50, 0., 1.);
237  diphoton_Photon_e1x5e5x5_ee = bei.book1D("diphoton_Photon_e1x5e5x5_ee", "E_{1x5}/E_{5x5} (Photon) EE", 50, 0., 1.);
238  diphoton_Photon_e2x5e5x5_eb = bei.book1D("diphoton_Photon_e2x5e5x5_eb", "E_{2x5}/E_{5x5} (Photon) EB", 50, 0., 1.);
239  diphoton_Photon_e2x5e5x5_ee = bei.book1D("diphoton_Photon_e2x5e5x5_ee", "E_{2x5}/E_{5x5} (Photon) EE", 50, 0., 1.);
240  diphoton_deltaEtaPhoton1Photon2 = bei.book1D("diphoton_deltaEtaPhoton1Photon2", "#Delta#eta(SubLeading Photon, Sub Photon)", 40, -5., 5.);
241  diphoton_deltaPhiPhoton1Photon2 = bei.book1D("diphoton_deltaPhiPhoton1Photon2", "#Delta#phi(SubLeading Photon, Sub Photon)", 40, 0., 3.15);
242  diphoton_deltaRPhoton1Photon2 = bei.book1D("diphoton_deltaRPhoton1Photon2", "#DeltaR(SubLeading Photon, Sub Photon)", 50, 0., 6.);
243  diphoton_invMassPhoton1Photon2 = bei.book1D("diphoton_invMassPhoton1Photon2", "SubLeading Photon, SubSubLeading Photon Invariant mass (GeV)", 50, 100. , 150.);
244  diphoton_PhotonMulti = bei.book1D("diphoton_PhotonMulti", "No. of Photons", 10, 0., 10.);
245  //--- MonoJet
246  bei.setCurrentFolder("Physics/Exotica/MonoJet");
247  monojet_PFJet_pt = bei.book1D("monojet_PFJet_pt", "Pt of MonoJet (GeV)", 50, 30.0 , 1000);
248  monojet_PFJet_eta = bei.book1D("monojet_PFJet_eta", "#eta(MonoJet)", 50, -2.5, 2.5);
249  monojet_PFJet_phi = bei.book1D("monojet_PFJet_phi", "#phi(MonoJet)", 50, -3.14,3.14);
250  monojet_PFMet = bei.book1D("monojet_PFMet", "Pt of PFMET (GeV)", 40, 0.0 , 1000);
251  monojet_PFMet_phi = bei.book1D("monojet_PFMet_phi", "#phi(PFMET #phi)", 50, -3.14,3.14);
252  monojet_PFJetPtOverPFMet = bei.book1D("monojet_PFJetPtOverPFMet", "Pt of MonoJet/MET (GeV)", 40, 0.0 , 5.);
253  monojet_deltaPhiPFJetPFMet = bei.book1D("monojet_deltaPhiPFJetPFMet", "#Delta#phi(MonoJet, PFMet)", 40, 0., 3.15);
254  monojet_PFchef = bei.book1D("monojet_PFchef", "MonojetJet CHEF", 50, 0.0 , 1.0);
255  monojet_PFnhef = bei.book1D("monojet_PFnhef", "MonojetJet NHEF", 50, 0.0 , 1.0);
256  monojet_PFcemf = bei.book1D("monojet_PFcemf", "MonojetJet CEMF", 50, 0.0 , 1.0);
257  monojet_PFnemf = bei.book1D("monojet_PFnemf", "MonojetJet NEMF", 50, 0.0 , 1.0);
258  monojet_PFJetMulti = bei.book1D("monojet_PFJetMulti", "No. of PFJets", 10, 0., 10.);
259  //--- MonoMuon
260  bei.setCurrentFolder("Physics/Exotica/MonoMuon");
261  monomuon_Muon_pt = bei.book1D("monomuon_Muon_pt", "Pt of Monomuon (GeV)", 50, 30.0 , 2000);
262  monomuon_Muon_eta = bei.book1D("monomuon_Muon_eta", "#eta(Monomuon)", 50, -2.5, 2.5);
263  monomuon_Muon_phi = bei.book1D("monomuon_Muon_phi", "#phi(Monomuon)", 50, -3.14,3.14);
264  monomuon_Charge = bei.book1D("monomuon_Charge", "Charge of the MonoMuon", 10, -5., 5.);
265  monomuon_PFMet = bei.book1D("monomuon_PFMet", "Pt of PFMET (GeV)", 40, 0.0 , 2000);
266  monomuon_PFMet_phi = bei.book1D("monomuon_PFMet_phi", "PFMET #phi", 50, -3.14,3.14);
267  monomuon_MuonPtOverPFMet = bei.book1D("monomuon_MuonPtOverPFMet", "Pt of Monomuon/PFMet", 40, 0.0 , 5.);
268  monomuon_deltaPhiMuonPFMet = bei.book1D("monomuon_deltaPhiMuonPFMet", "#Delta#phi(Monomuon, PFMet)", 40, 0., 3.15);
269  monomuon_TransverseMass = bei.book1D("monomuon_TransverseMass", "Transverse Mass M_{T} GeV", 40, 200., 3000.);
270  monomuon_MuonMulti = bei.book1D("monomuon_MuonMulti", "No. of Muons", 10, 0., 10.);
271  //--- MonoElectron
272  bei.setCurrentFolder("Physics/Exotica/MonoElectron");
273  monoelectron_Electron_pt = bei.book1D("monoelectron_Electron_pt", "Pt of Monoelectron (GeV)", 50, 30.0 , 4000);
274  monoelectron_Electron_eta = bei.book1D("monoelectron_Electron_eta", "#eta(MonoElectron)", 50, -2.5, 2.5);
275  monoelectron_Electron_phi = bei.book1D("monoelectron_Electron_phi", "#phi(MonoElectron)", 50, -3.14,3.14);
276  monoelectron_Charge = bei.book1D("monoelectron_Charge", "Charge of the MonoElectron", 10, -5., 5.);
277  monoelectron_PFMet = bei.book1D("monoelectron_PFMet", "Pt of PFMET (GeV)", 40, 0.0 , 4000);
278  monoelectron_PFMet_phi = bei.book1D("monoelectron_PFMet_phi", "PFMET #phi", 50, -3.14,3.14);
279  monoelectron_ElectronPtOverPFMet = bei.book1D("monoelectron_ElectronPtOverPFMet", "Pt of Monoelectron/PFMet", 40, 0.0 , 5.);
280  monoelectron_deltaPhiElectronPFMet = bei.book1D("monoelectron_deltaPhiElectronPFMet", "#Delta#phi(MonoElectron, PFMet)", 40, 0., 3.15);
281  monoelectron_TransverseMass = bei.book1D("monoelectron_TransverseMass", "Transverse Mass M_{T} GeV", 40, 200., 4000.);
282  monoelectron_ElectronMulti = bei.book1D("monoelectron_ElectronMulti", "No. of Electrons", 10, 0., 10.);
283 
284  //--- DiPhotons
285  bei.setCurrentFolder("Physics/Exotica/MonoPhotons");
286  monophoton_Photon_energy = bei.book1D("monophoton_Photon_energy", "Energy of Leading Photon (GeV)", 50, 30.0 , 1000);
287  monophoton_Photon_et = bei.book1D("monophoton_Photon_et", "Et of Leading Photon (GeV)", 50, 30.0 , 1000);
288  monophoton_Photon_pt = bei.book1D("monophoton_Photon_pt", "Pt of Leading Photon (GeV)", 50, 30.0 , 1000);
289  monophoton_Photon_eta = bei.book1D("monophoton_Photon_eta", "#eta (Leading Photon)", 50, -2.5, 2.5);
290  monophoton_Photon_etasc = bei.book1D("monophoton_Photon_etasc", "#eta sc(Leading Photon)", 50, -2.5, 2.5);
291  monophoton_Photon_phi = bei.book1D("monophoton_Photon_phi", "#phi(Leading Photon)", 50, -3.14,3.14);
292  monophoton_Photon_hovere = bei.book1D("monophoton_Photon_hovere", "H/E (Leading Photon)", 50, 0., 0.50);
293  monophoton_Photon_sigmaietaieta = bei.book1D("monophoton_Photon_sigmaietaieta", "#sigma_{i #eta i #eta} (Leading Photon)", 50, 0., 0.03);
294  monophoton_Photon_trksumptsolidconedr03 = bei.book1D("monophoton_Photon_trksumptsolidconedr03", "TrkSumPtDr03 (Leading Photon)", 50, 0., 15.);
295  monophoton_Photon_e1x5e5x5 = bei.book1D("monophoton_Photon_e1x5e5x5", "E_{1x5}/E_{5x5} (Leading Photon)", 50, 0., 1.);
296  monophoton_Photon_e2x5e5x5 = bei.book1D("monophoton_Photon_e2x5e5x5", "E_{2x5}/E_{5x5} (Leading Photon)", 50, 0., 1.);
297  monophoton_PFMet = bei.book1D("monophoton_PFMet", "Pt of PFMET (GeV)", 40, 0.0 , 1000);
298  monophoton_PFMet_phi = bei.book1D("monophoton_PFMet_phi", "PFMET #phi", 50, -3.14,3.14);
299  monophoton_PhotonPtOverPFMet = bei.book1D("monophoton_PhotonPtOverPFMet", "Pt of Monophoton/PFMet", 40, 0.0 , 5.);
300  monophoton_deltaPhiPhotonPFMet = bei.book1D("monophoton_deltaPhiPhotonPFMet", "#Delta#phi(SubLeading Photon, PFMet)", 40, 0., 3.15);
301  monophoton_PhotonMulti = bei.book1D("monophoton_PhotonMulti", "No. of Photons", 10, 0., 10.);
302 
303  bei.cd();
304 }
305 
306 
307 //
308 // -- Analyze
309 //
311 
312  // objects
313 
314  //Trigger
315  bool ValidTriggers = iEvent.getByToken(TriggerToken_, TriggerResults_);
316  if (!ValidTriggers) return;
317 
318  // Vertices
319  bool ValidVertices = iEvent.getByToken(VertexToken_, VertexCollection_);
320  if (!ValidVertices) return;
321 
322  // Electrons
323  bool ValidGedGsfElectron = iEvent.getByToken(ElectronToken_, ElectronCollection_);
324  if(!ValidGedGsfElectron) return;
325 
326  // Muons
327  bool ValidPFMuon = iEvent.getByToken(MuonToken_, MuonCollection_);
328  if(!ValidPFMuon) return;
329 
330  // Jets
331  bool ValidPFJet = iEvent.getByToken(PFJetToken_, pfJetCollection_);
332  if(!ValidPFJet) return;
333  pfjets = *pfJetCollection_;
334 
335  // MET
336  //bool ValidCaloMET = iEvent.getByToken(CaloMETToken_, caloMETCollection_);
337  //if(!ValidCaloMET) return;
338 
339  // PFMETs
340  bool ValidPFMET = iEvent.getByToken(PFMETToken_, pfMETCollection_);
341  if(!ValidPFMET) return;
342 
343  // Photons
344  bool ValidCaloPhoton = iEvent.getByToken(PhotonToken_, PhotonCollection_);
345  if(!ValidCaloPhoton) return;
346 
347  //Trigger
348 
349  int N_Triggers = TriggerResults_->size();
350  int N_GoodTriggerPaths = HltPaths_.size();
351  bool triggered_event = false;
352  const edm::TriggerNames& trigName = iEvent.triggerNames(*TriggerResults_);
353  for (int i_Trig = 0; i_Trig < N_Triggers; ++i_Trig) {
354  if (TriggerResults_.product()->accept(i_Trig)) {
355  for (int n = 0; n < N_GoodTriggerPaths; n++) {
356  if (trigName.triggerName(i_Trig).find(HltPaths_[n])!=std::string::npos){
357  //printf("Triggers fired? %i %s \n",i_Trig, trigName.triggerName(i_Trig).data());
358  triggered_event = true;
359  }
360  }
361  }
362  }
363  if (triggered_event == false) return;
364 
365  // if (triggered_event == false) {
366  // printf("NO TRIGGER!!!!! \n");
367  // for (int i_Trig = 0; i_Trig < N_Triggers; ++i_Trig) {
368  // if (TriggerResults_.product()->accept(i_Trig)) {
369  // printf("Triggers fired? %i %s \n",i_Trig, trigName.triggerName(i_Trig).data());
370  // }
371  // }
372  // }
373 
374  for(int i=0; i<2; i++){
375  //Jets
376  PFJetPx[i] = 0.; PFJetPy[i] = 0.; PFJetPt[i] = 0.; PFJetEta[i] = 0.; PFJetPhi[i] = 0.;
377  PFJetNHEF[i] = 0.; PFJetCHEF[i] = 0.; PFJetNEMF[i] = 0.; PFJetCEMF[i] = 0.;
378  //Muons
379  MuonPx[i] = 0.; MuonPy[i] = 0.; MuonPt[i] = 0.;
380  MuonEta[i] = 0.; MuonPhi[i] = 0.; MuonCharge[i] = 0.;
381  //Electrons
382  ElectronPx[i] = 0.; ElectronPy[i] = 0.; ElectronPt[i] = 0.;
383  ElectronEta[i] = 0.; ElectronPhi[i] = 0.; ElectronCharge[i] = 0.;
384  //Photons
385  PhotonEnergy[i] = 0.; PhotonPt[i] = 0.; PhotonEt[i] = 0.; PhotonEta[i] = 0.; PhotonEtaSc[i] = 0.; PhotonPhi[i] = 0.; PhotonHoverE[i] = 0.;
386  PhotonSigmaIetaIeta[i] = 0.; PhotonTrkSumPtSolidConeDR03[i] = 0.; PhotonE1x5E5x5[i] = 0.; PhotonE2x5E5x5[i] = 0.;
387  }
388 
389  //Getting information from the RecoObjects
390  dijet_countPFJet_=0;
391  monojet_countPFJet_=0;
392  const JetCorrector* pfcorrector = JetCorrector::getJetCorrector(PFJetCorService_,iSetup);
393  PFJetCollection::const_iterator pfjet_ = pfjets.begin();
394  for(; pfjet_ != pfjets.end(); ++pfjet_){
395  double scale = pfcorrector->correction(*pfjet_,iEvent, iSetup);
396  if(scale*pfjet_->pt()>PFJetPt[0]){
397  PFJetPt[1] = PFJetPt[0];
398  PFJetPx[1] = PFJetPx[0];
399  PFJetPy[1] = PFJetPy[0];
400  PFJetEta[1] = PFJetEta[0];
401  PFJetPhi[1] = PFJetPhi[0];
402  PFJetRapidity[1] = PFJetRapidity[0];
403  PFJetMass[1] = PFJetMass[0];
404  PFJetNHEF[1] = PFJetNHEF[0];
405  PFJetCHEF[1] = PFJetCHEF[0];
406  PFJetNEMF[1] = PFJetNEMF[0];
407  PFJetCEMF[1] = PFJetCEMF[0];
408  //
409  PFJetPt[0] = scale*pfjet_->pt();
410  PFJetPx[0] = scale*pfjet_->px();
411  PFJetPy[0] = scale*pfjet_->py();
412  PFJetEta[0] = pfjet_->eta();
413  PFJetPhi[0] = pfjet_->phi();
414  PFJetRapidity[0] = pfjet_->rapidity();
415  PFJetMass[0] = pfjet_->mass();
416  PFJetNHEF[0] = pfjet_->neutralHadronEnergyFraction();
417  PFJetCHEF[0] = pfjet_->chargedHadronEnergyFraction();
418  PFJetNEMF[0] = pfjet_->neutralEmEnergyFraction();
419  PFJetCEMF[0] = pfjet_->chargedEmEnergyFraction();
420  }
421  else if(scale*pfjet_->pt()<PFJetPt[0] && scale*pfjet_->pt()>PFJetPt[1] ){
422  PFJetPt[1] = scale*pfjet_->pt();
423  PFJetPx[1] = scale*pfjet_->px();
424  PFJetPy[1] = scale*pfjet_->py();
425  PFJetEta[1] = pfjet_->eta();
426  PFJetPhi[1] = pfjet_->phi();
427  PFJetRapidity[1] = pfjet_->rapidity();
428  PFJetMass[1] = pfjet_->mass();
429  PFJetNHEF[1] = pfjet_->neutralHadronEnergyFraction();
430  PFJetCHEF[1] = pfjet_->chargedHadronEnergyFraction();
431  PFJetNEMF[1] = pfjet_->neutralEmEnergyFraction();
432  PFJetCEMF[1] = pfjet_->chargedEmEnergyFraction();
433  }
434  else{}
435  if(scale*pfjet_->pt()>dijet_PFJet1_pt_cut_) dijet_countPFJet_++;
436  if(scale*pfjet_->pt()>dijet_PFJet1_pt_cut_) monojet_countPFJet_++;
437  }
438 
439  VertexCollection vertexCollection = *(VertexCollection_.product());
440  reco::VertexCollection::const_iterator primaryVertex_ = vertexCollection.begin();
441 
442  dimuon_countMuon_ = 0;
443  monomuon_countMuon_ = 0;
444  reco::MuonCollection::const_iterator muon_ = MuonCollection_->begin();
445  for(; muon_ != MuonCollection_->end(); muon_++){
446  // Muon High Pt ID
447  bool HighPt = false;
448  if (muon_->isGlobalMuon() && muon_->globalTrack()->hitPattern().numberOfValidMuonHits() >0 && muon_->numberOfMatchedStations() > 1 &&
449  muon_->innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 && muon_->innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
450  muon_->muonBestTrack()->ptError()/muon_->muonBestTrack()->pt() < 0.3 &&
451  fabs(muon_->muonBestTrack()->dxy(primaryVertex_->position())) < 0.2 && fabs(muon_->bestTrack()->dz(primaryVertex_->position())) < 0.5
452  && fabs(muon_->eta()) <2.1) HighPt = true;
453 
454  if (HighPt == true ){
455  if(muon_->pt()>MuonPt[0]){
456  MuonPt[1] = MuonPt[0];
457  MuonPx[1] = MuonPx[0];
458  MuonPy[1] = MuonPy[0];
459  MuonEta[1] = MuonEta[0];
460  MuonPhi[1] = MuonPhi[0];
461  MuonCharge[1] = MuonCharge[0];
462  //
463  MuonPt[0] = muon_->pt();
464  MuonPx[0] = muon_->px();
465  MuonPy[0] = muon_->py();
466  MuonEta[0] = muon_->eta();
467  MuonPhi[0] = muon_->phi();
468  MuonCharge[0] = muon_->charge();
469  }
470  }
471  if (muon_->pt() > dimuon_Muon1_pt_cut_) dimuon_countMuon_++;
472  if (muon_->pt() > dimuon_Muon1_pt_cut_) monomuon_countMuon_++;
473  }
474 
475  dielectron_countElectron_ = 0;
476  monoelectron_countElectron_ = 0;
477  reco::GsfElectronCollection::const_iterator electron_ = ElectronCollection_->begin();
478  for(; electron_ != ElectronCollection_->end(); electron_++){
479  //HEEP Selection 4.1 (some cuts)
480  if (electron_->e5x5()<=0) continue;
481  if (electron_->gsfTrack().isNull()) continue;
482  bool HEPP_ele = false;
483  double sceta = electron_->caloPosition().eta();
484  double dEtaIn = fabs(electron_->deltaEtaSuperClusterTrackAtVtx());
485  double dPhiIn = fabs(electron_->deltaPhiSuperClusterTrackAtVtx());
486  double HoverE = electron_->hadronicOverEm();
487  // double depth1Iso = electron_->dr03EcalRecHitSumEt()+electron_->dr03HcalDepth1TowerSumEt();
488  // double hoDensity = (*rhoHandle);
489  int missingHits = electron_->gsfTrack()->hitPattern().numberOfLostTrackerHits(HitPattern::MISSING_INNER_HITS);
490  double dxy = electron_->gsfTrack()->dxy(primaryVertex_->position());
491  double tkIso = electron_->dr03TkSumPt();
492  double e2x5Fraction = electron_->e2x5Max()/electron_->e5x5();
493  double e1x5Fraction = electron_->e1x5()/electron_->e5x5();
494  double scSigmaIetaIeta = electron_->scSigmaIEtaIEta();
495  if (electron_->ecalDriven() && electron_->pt()>35.) {
496  if (fabs(sceta)<1.442) { // barrel
497  if (fabs(dEtaIn)<0.005 && fabs(dPhiIn)<0.06 && HoverE<0.05 && tkIso<5. && missingHits<=1 && fabs(dxy)<0.02
498  && (e2x5Fraction>0.94 || e1x5Fraction>0.83)) HEPP_ele =true;
499  }else if (fabs(sceta)>1.56 && fabs(sceta)<2.5) { // endcap
500  if (fabs(dEtaIn)<0.007 && fabs(dPhiIn)<0.06 && HoverE<0.05 && tkIso<5. && missingHits<=1 && fabs(dxy)<0.02
501  && scSigmaIetaIeta<0.03) HEPP_ele =true;
502  }
503  }
504  //
505  if (HEPP_ele == false) continue;
506  if(electron_->pt()>ElectronPt[0] ){
507  ElectronPt[1] = ElectronPt[0];
508  ElectronPx[1] = ElectronPx[0];
509  ElectronPy[1] = ElectronPy[0];
510  ElectronEta[1] = ElectronEta[0];
511  ElectronPhi[1] = ElectronPhi[0];
512  ElectronCharge[1] = ElectronCharge[0];
513  //
514  ElectronPt[0] = electron_->pt();
515  ElectronPx[0] = electron_->px();
516  ElectronPy[0] = electron_->py();
517  ElectronEta[0] = electron_->eta();
518  ElectronPhi[0] = electron_->phi();
519  ElectronCharge[0] = electron_->charge();
520  }
521  if (electron_->pt() > dielectron_Electron1_pt_cut_) dielectron_countElectron_++;
522  if (electron_->pt() > dielectron_Electron1_pt_cut_) monoelectron_countElectron_++;
523  }
524 
525 
526  diphoton_countPhoton_ = 0.;
527  reco::PhotonCollection::const_iterator photon_ = PhotonCollection_->begin();
528  for(; photon_ != PhotonCollection_->end(); ++photon_){
529  if(photon_->pt()>PhotonPt[0] ){
530  PhotonEnergy[1] = PhotonEnergy[0];
531  PhotonPt[1] = PhotonPt[0];
532  PhotonEt[1] = PhotonEt[0];
533  PhotonEta[1] = PhotonEta[0];
534  PhotonEtaSc[1] = PhotonEtaSc[0];
535  PhotonPhi[1] = PhotonPhi[0];
536  PhotonHoverE[1] = PhotonHoverE[0];
537  PhotonSigmaIetaIeta[1] = PhotonSigmaIetaIeta[0];
538  PhotonTrkSumPtSolidConeDR03[1] = PhotonTrkSumPtSolidConeDR03[0];
539  PhotonE1x5E5x5[1] = PhotonE1x5E5x5[0];
540  PhotonE2x5E5x5[1] = PhotonE2x5E5x5[0];
541 
542  PhotonEnergy[0] = photon_->energy();
543  PhotonPt[0] = photon_->pt();
544  PhotonEt[0] = photon_->et();
545  PhotonEta[0] = photon_->eta();
546  PhotonEtaSc[0] = photon_->caloPosition().eta();
547  PhotonPhi[0] = photon_->phi();
548  PhotonHoverE[0] = photon_->hadronicOverEm();
549  PhotonSigmaIetaIeta[0] = photon_->sigmaIetaIeta();
550  PhotonTrkSumPtSolidConeDR03[0] = photon_->trkSumPtSolidConeDR03();
551  PhotonE1x5E5x5[0] = photon_->e1x5()/photon_->e5x5();
552  PhotonE2x5E5x5[0] = photon_->e2x5()/photon_->e5x5();
553 
554  if (photon_->pt() > dielectron_Electron1_pt_cut_) diphoton_countPhoton_ ++;
555  }
556  }
557  //#######################################################
558  // Analyze
559  //
560 
561  //Resonances
562  analyzeDiJets(iEvent);
563  analyzeDiMuons(iEvent);
564  analyzeDiElectrons(iEvent);
565  analyzeDiPhotons(iEvent);
566 
567  //MonoSearches
568  analyzeMonoJets(iEvent);
569  analyzeMonoMuons(iEvent);
570  analyzeMonoElectrons(iEvent);
571 
572  //
573  //analyzeMultiJetsTrigger(iEvent);
574  //analyzeLongLivedTrigger(iEvent);
575 
576 }
578  for (unsigned int icoll = 0; icoll < DiJetPFJetCollection_.size(); ++icoll) {
579  dijet_countPFJet_=0;
580  bool ValidDiJetPFJets = iEvent.getByToken(DiJetPFJetToken_[icoll], DiJetpfJetCollection_);
581  if (!ValidDiJetPFJets) continue;
582  DiJetpfjets = *DiJetpfJetCollection_;
583  for(int i=0; i<2; i++){
584  PFJetPx[i] = 0.; PFJetPy[i] = 0.; PFJetPt[i] = 0.; PFJetEta[i] = 0.; PFJetPhi[i] = 0.;
585  PFJetNHEF[i] = 0.; PFJetCHEF[i] = 0.; PFJetNEMF[i] = 0.; PFJetCEMF[i] = 0.;
586  }
587  //const JetCorrector* pfcorrector = JetCorrector::getJetCorrector(PFJetCorService_,iSetup);
588  PFJetCollection::const_iterator DiJetpfjet_ = DiJetpfjets.begin();
589  for(; DiJetpfjet_ != DiJetpfjets.end(); ++DiJetpfjet_){
590  //double scale = pfcorrector->correction(*pfjet_,iEvent, iSetup);
591  //if (icoll == 0.) continue; // info already saved
592  double scale = 1.;
593  if(scale*DiJetpfjet_->pt()>PFJetPt[0]){
594  PFJetPt[1] = PFJetPt[0];
595  PFJetPx[1] = PFJetPx[0];
596  PFJetPy[1] = PFJetPy[0];
597  PFJetEta[1] = PFJetEta[0];
598  PFJetPhi[1] = PFJetPhi[0];
599  PFJetRapidity[1] = DiJetpfjet_->rapidity();
600  PFJetMass[1] = DiJetpfjet_->mass();
601  PFJetNHEF[1] = PFJetNHEF[0];
602  PFJetCHEF[1] = PFJetCHEF[0];
603  PFJetNEMF[1] = PFJetNEMF[0];
604  PFJetCEMF[1] = PFJetCEMF[0];
605  //
606  PFJetPt[0] = scale*DiJetpfjet_->pt();
607  PFJetPx[0] = scale*DiJetpfjet_->px();
608  PFJetPy[0] = scale*DiJetpfjet_->py();
609  PFJetEta[0] = DiJetpfjet_->eta();
610  PFJetPhi[0] = DiJetpfjet_->phi();
611  PFJetRapidity[0] = DiJetpfjet_->rapidity();
612  PFJetMass[0] = DiJetpfjet_->mass();
613  PFJetNHEF[0] = DiJetpfjet_->neutralHadronEnergyFraction();
614  PFJetCHEF[0] = DiJetpfjet_->chargedHadronEnergyFraction();
615  PFJetNEMF[0] = DiJetpfjet_->neutralEmEnergyFraction();
616  PFJetCEMF[0] = DiJetpfjet_->chargedEmEnergyFraction();
617  }else if(scale*DiJetpfjet_->pt()<PFJetPt[0] && scale*DiJetpfjet_->pt()>PFJetPt[1] ){
618  PFJetPt[1] = scale*DiJetpfjet_->pt();
619  PFJetPx[1] = scale*DiJetpfjet_->px();
620  PFJetPy[1] = scale*DiJetpfjet_->py();
621  PFJetEta[1] = DiJetpfjet_->eta();
622  PFJetPhi[1] = DiJetpfjet_->phi();
623  PFJetRapidity[1] = DiJetpfjet_->rapidity();
624  PFJetMass[1] = DiJetpfjet_->mass();
625  PFJetNHEF[1] = DiJetpfjet_->neutralHadronEnergyFraction();
626  PFJetCHEF[1] = DiJetpfjet_->chargedHadronEnergyFraction();
627  PFJetNEMF[1] = DiJetpfjet_->neutralEmEnergyFraction();
628  PFJetCEMF[1] = DiJetpfjet_->chargedEmEnergyFraction();
629  }else{}
630  if(scale*DiJetpfjet_->pt()>dijet_PFJet1_pt_cut_) dijet_countPFJet_++;
631  }
632  if(PFJetPt[0]> dijet_PFJet1_pt_cut_ && PFJetPt[1]> dijet_PFJet2_pt_cut_){
633  dijet_PFJet_pt[icoll]->Fill(PFJetPt[0]);
634  dijet_PFJet_eta[icoll]->Fill(PFJetEta[0]);
635  dijet_PFJet_phi[icoll]->Fill(PFJetPhi[0]);
636  dijet_PFJet_rapidity[icoll]->Fill(PFJetRapidity[0]);
637  dijet_PFJet_mass[icoll]->Fill(PFJetMass[0]);
638  dijet_PFJet_pt[icoll]->Fill(PFJetPt[1]);
639  dijet_PFJet_eta[icoll]->Fill(PFJetEta[1]);
640  dijet_PFJet_phi[icoll]->Fill(PFJetPhi[1]);
641  dijet_PFJet_rapidity[icoll]->Fill(PFJetRapidity[1]);
642  dijet_PFJet_mass[icoll]->Fill(PFJetMass[1]);
643  dijet_deltaPhiPFJet1PFJet2[icoll]->Fill(deltaPhi(PFJetPhi[0],PFJetPhi[1]));
644  dijet_deltaEtaPFJet1PFJet2[icoll]->Fill(PFJetEta[0]-PFJetEta[1]);
645  dijet_deltaRPFJet1PFJet2[icoll]->Fill(deltaR(PFJetEta[0],PFJetPhi[0],PFJetEta[1],PFJetPhi[1]));
646  dijet_invMassPFJet1PFJet2[icoll]->Fill(sqrt(2*PFJetPt[0]*PFJetPt[1]*(cosh(PFJetEta[0]-PFJetEta[1])-cos(PFJetPhi[0]-PFJetPhi[1]))));
647  dijet_PFchef[icoll]->Fill(PFJetCHEF[0]);
648  dijet_PFnhef[icoll]->Fill(PFJetNHEF[0]);
649  dijet_PFcemf[icoll]->Fill(PFJetCEMF[0]);
650  dijet_PFnemf[icoll]->Fill(PFJetNEMF[0]);
651  dijet_PFJetMulti[icoll]->Fill(dijet_countPFJet_);
652  }
653  }
654 }
656  if(MuonPt[0] > dimuon_Muon1_pt_cut_ && MuonPt[1]> dimuon_Muon2_pt_cut_ && MuonCharge[0]*MuonCharge[1] == -1){
657  dimuon_Muon_pt->Fill(MuonPt[0]);
658  dimuon_Muon_eta->Fill(MuonEta[0]);
659  dimuon_Muon_phi->Fill(MuonPhi[0]);
660  dimuon_Muon_pt->Fill(MuonPt[1]);
661  dimuon_Muon_eta->Fill(MuonEta[1]);
662  dimuon_Muon_phi->Fill(MuonPhi[1]);
663  dimuon_Charge->Fill(MuonCharge[0]);
664  dimuon_Charge->Fill(MuonCharge[1]);
665  dimuon_deltaPhiMuon1Muon2->Fill(deltaPhi(MuonPhi[0],MuonPhi[1]));
666  dimuon_deltaEtaMuon1Muon2->Fill(MuonEta[0]-MuonEta[1]);
667  dimuon_deltaRMuon1Muon2->Fill(deltaR(MuonEta[0],MuonPhi[0],MuonEta[1],MuonPhi[1]));
668  dimuon_invMassMuon1Muon2->Fill(sqrt(2*MuonPt[0]*MuonPt[1]*(cosh(MuonEta[0]-MuonEta[1])-cos(MuonPhi[0]-MuonPhi[1]))));
669  dimuon_MuonMulti->Fill(dimuon_countMuon_);
670  }
671 }
673  if(ElectronPt[0] > dielectron_Electron1_pt_cut_ && ElectronPt[1]> dielectron_Electron2_pt_cut_ && ElectronCharge[0]*ElectronCharge[1] == -1.){
674  dielectron_Electron_pt->Fill(ElectronPt[0]);
675  dielectron_Electron_eta->Fill(ElectronEta[0]);
676  dielectron_Electron_phi->Fill(ElectronPhi[0]);
677  dielectron_Electron_pt->Fill(ElectronPt[1]);
678  dielectron_Electron_eta->Fill(ElectronEta[1]);
679  dielectron_Electron_phi->Fill(ElectronPhi[1]);
680  dielectron_Charge->Fill(ElectronCharge[0]);
681  dielectron_Charge->Fill(ElectronCharge[1]);
682  dielectron_deltaPhiElectron1Electron2->Fill(deltaPhi(ElectronPhi[0],ElectronPhi[1]));
683  dielectron_deltaEtaElectron1Electron2->Fill(ElectronEta[0]-ElectronEta[1]);
684  dielectron_deltaRElectron1Electron2->Fill(deltaR(ElectronEta[0],ElectronPhi[0],ElectronEta[1],ElectronPhi[1]));
685  dielectron_invMassElectron1Electron2->Fill(sqrt(2*ElectronPt[0]*ElectronPt[1]*(cosh(ElectronEta[0]-ElectronEta[1])-cos(ElectronPhi[0]-ElectronPhi[1]))));
686  dielectron_ElectronMulti->Fill(dielectron_countElectron_);
687  }
688 }
690  if(PhotonPt[0] > diphoton_Photon1_pt_cut_ && PhotonPt[1]> diphoton_Photon2_pt_cut_ ){
691  diphoton_Photon_energy->Fill(PhotonEnergy[0]);
692  diphoton_Photon_pt->Fill(PhotonPt[0]);
693  diphoton_Photon_et->Fill(PhotonEt[0]);
694  diphoton_Photon_eta->Fill(PhotonEta[0]);
695  diphoton_Photon_etasc->Fill(PhotonEtaSc[0]);
696  diphoton_Photon_phi->Fill(PhotonPhi[0]);
697  if (fabs(PhotonEtaSc[0]) < 1.442){
698  diphoton_Photon_hovere_eb->Fill(PhotonHoverE[0]);
699  diphoton_Photon_sigmaietaieta_eb->Fill(PhotonSigmaIetaIeta[0]);
700  diphoton_Photon_trksumptsolidconedr03_eb->Fill(PhotonTrkSumPtSolidConeDR03[0]);
701  diphoton_Photon_e1x5e5x5_eb->Fill(PhotonE1x5E5x5[0]);
702  diphoton_Photon_e2x5e5x5_eb->Fill(PhotonE2x5E5x5[0]);
703  }
704  if (fabs(PhotonEtaSc[0]) > 1.566 && fabs(PhotonEtaSc[0]) < 2.5){
705  diphoton_Photon_hovere_ee->Fill(PhotonHoverE[0]);
706  diphoton_Photon_sigmaietaieta_ee->Fill(PhotonSigmaIetaIeta[0]);
707  diphoton_Photon_trksumptsolidconedr03_ee->Fill(PhotonTrkSumPtSolidConeDR03[0]);
708  diphoton_Photon_e1x5e5x5_ee->Fill(PhotonE1x5E5x5[0]);
709  diphoton_Photon_e2x5e5x5_ee->Fill(PhotonE2x5E5x5[0]);
710  }
711  diphoton_Photon_energy->Fill(PhotonEnergy[1]);
712  diphoton_Photon_pt->Fill(PhotonPt[1]);
713  diphoton_Photon_et->Fill(PhotonEt[1]);
714  diphoton_Photon_eta->Fill(PhotonEta[1]);
715  diphoton_Photon_etasc->Fill(PhotonEtaSc[1]);
716  diphoton_Photon_phi->Fill(PhotonPhi[1]);
717  if (fabs(PhotonEtaSc[1]) < 1.4442){
718  diphoton_Photon_hovere_eb->Fill(PhotonHoverE[1]);
719  diphoton_Photon_sigmaietaieta_eb->Fill(PhotonSigmaIetaIeta[1]);
720  diphoton_Photon_trksumptsolidconedr03_eb->Fill(PhotonTrkSumPtSolidConeDR03[1]);
721  diphoton_Photon_e1x5e5x5_eb->Fill(PhotonE1x5E5x5[1]);
722  diphoton_Photon_e2x5e5x5_eb->Fill(PhotonE2x5E5x5[1]);
723  }
724  if (fabs(PhotonEtaSc[1]) > 1.566 && fabs(PhotonEtaSc[1]) < 2.5){
725  diphoton_Photon_hovere_ee->Fill(PhotonHoverE[1]);
726  diphoton_Photon_sigmaietaieta_ee->Fill(PhotonSigmaIetaIeta[1]);
727  diphoton_Photon_trksumptsolidconedr03_ee->Fill(PhotonTrkSumPtSolidConeDR03[1]);
728  diphoton_Photon_e1x5e5x5_ee->Fill(PhotonE1x5E5x5[1]);
729  diphoton_Photon_e2x5e5x5_ee->Fill(PhotonE2x5E5x5[1]);
730  }
731  diphoton_deltaPhiPhoton1Photon2->Fill(deltaPhi(PhotonPhi[0],PhotonPhi[1]));
732  diphoton_deltaEtaPhoton1Photon2->Fill(PhotonEta[0]-PhotonEta[1]);
733  diphoton_deltaRPhoton1Photon2->Fill(deltaR(PhotonEta[0],PhotonPhi[0],PhotonEta[1],PhotonPhi[1]));
734  diphoton_invMassPhoton1Photon2->Fill(sqrt(2*PhotonPt[0]*PhotonPt[1]*(cosh(PhotonEta[0]-PhotonEta[1])-cos(PhotonPhi[0]-PhotonPhi[1]))));
735  diphoton_PhotonMulti->Fill(diphoton_countPhoton_);
736  }
737 }
739  const PFMETCollection *pfmetcol = pfMETCollection_.product();
740  const PFMET pfmet = pfmetcol->front();
741  if(PFJetPt[0]> monojet_PFJet_pt_cut_ && pfmet.et() > monojet_PFJet_met_cut_){
742  monojet_PFJet_pt->Fill(PFJetPt[0]);
743  monojet_PFJet_eta->Fill(PFJetEta[0]);
744  monojet_PFJet_phi->Fill(PFJetPhi[0]);
745  monojet_PFMet->Fill(pfmet.et());
746  monojet_PFMet_phi->Fill(pfmet.phi());
747  monojet_PFJetPtOverPFMet->Fill(PFJetPt[0]/pfmet.et());
748  monojet_deltaPhiPFJetPFMet->Fill(deltaPhi(PFJetPhi[0],pfmet.phi()));
749  monojet_PFchef->Fill(PFJetCHEF[0]);
750  monojet_PFnhef->Fill(PFJetNHEF[0]);
751  monojet_PFcemf->Fill(PFJetCEMF[0]);
752  monojet_PFnemf->Fill(PFJetNEMF[0]);
753  monojet_PFJetMulti->Fill(monojet_countPFJet_);
754  }
755 }
757  const PFMETCollection *pfmetcol = pfMETCollection_.product();
758  const PFMET pfmet = pfmetcol->front();
759  if(MuonPt[0]> monomuon_Muon_pt_cut_ && pfmet.et() > monomuon_Muon_met_cut_){
760  monomuon_Muon_pt->Fill(MuonPt[0]);
761  monomuon_Muon_eta->Fill(MuonEta[0]);
762  monomuon_Muon_phi->Fill(MuonPhi[0]);
763  monomuon_Charge->Fill(MuonCharge[0]);
764  monomuon_PFMet->Fill(pfmet.et());
765  monomuon_PFMet_phi->Fill(pfmet.phi());
766  monomuon_MuonPtOverPFMet->Fill(MuonPt[0]/pfmet.et());
767  monomuon_deltaPhiMuonPFMet->Fill(deltaPhi(MuonPhi[0],pfmet.phi()));
768  monomuon_TransverseMass->Fill(sqrt(2*MuonPt[0]*pfmet.et()*(1-cos(deltaPhi(MuonPhi[0],pfmet.phi())))));
769  monomuon_MuonMulti->Fill(monomuon_countMuon_);
770  }
771 }
773  const PFMETCollection *pfmetcol = pfMETCollection_.product();
774  const PFMET pfmet = pfmetcol->front();
775  if(ElectronPt[0]> monoelectron_Electron_pt_cut_ && pfmet.et() > monoelectron_Electron_met_cut_){
776  monoelectron_Electron_pt->Fill(ElectronPt[0]);
777  monoelectron_Electron_eta->Fill(ElectronEta[0]);
778  monoelectron_Electron_phi->Fill(ElectronPhi[0]);
779  monoelectron_Charge->Fill(ElectronCharge[0]);
780  monoelectron_PFMet->Fill(pfmet.et());
781  monoelectron_PFMet_phi->Fill(pfmet.phi());
782  monoelectron_ElectronPtOverPFMet->Fill(ElectronPt[0]/pfmet.et());
783  monoelectron_deltaPhiElectronPFMet->Fill(deltaPhi(ElectronPhi[0],pfmet.phi()));
784  monoelectron_TransverseMass->Fill(sqrt(2*ElectronPt[0]*pfmet.et()*(1-cos(deltaPhi(ElectronPhi[0],pfmet.phi())))));
785  monoelectron_ElectronMulti->Fill(monoelectron_countElectron_);
786  }
787 }
789  const PFMETCollection *pfmetcol = pfMETCollection_.product();
790  const PFMET pfmet = pfmetcol->front();
791  if(PhotonPt[0]> monophoton_Photon_pt_cut_ && pfmet.et() > monophoton_Photon_met_cut_){
792  monophoton_Photon_energy->Fill(PhotonEnergy[0]);
793  monophoton_Photon_pt->Fill(PhotonPt[0]);
794  monophoton_Photon_et->Fill(PhotonEt[0]);
795  monophoton_Photon_eta->Fill(PhotonEta[0]);
796  monophoton_Photon_etasc->Fill(PhotonEtaSc[0]);
797  monophoton_Photon_phi->Fill(PhotonPhi[0]);
798  monophoton_Photon_hovere->Fill(PhotonHoverE[0]);
799  monophoton_Photon_sigmaietaieta->Fill(PhotonSigmaIetaIeta[0]);
800  monophoton_Photon_trksumptsolidconedr03->Fill(PhotonTrkSumPtSolidConeDR03[0]);
801  monophoton_Photon_e1x5e5x5->Fill(PhotonE1x5E5x5[0]);
802  monophoton_Photon_e2x5e5x5->Fill(PhotonE2x5E5x5[0]);
803  monophoton_PFMet->Fill(pfmet.et());
804  monophoton_PFMet_phi->Fill(pfmet.phi());
805  monophoton_PhotonPtOverPFMet->Fill(PhotonPt[0]/pfmet.et());
806  monophoton_deltaPhiPhotonPFMet->Fill(deltaPhi(PhotonPhi[0],pfmet.phi()));
807  monophoton_PhotonMulti->Fill(monophoton_countPhoton_);
808  }
809 }
810 
811 
virtual void analyzeMonoElectrons(edm::Event const &e)
Definition: ExoticaDQM.cc:772
virtual void analyzeDiJets(edm::Event const &e)
Definition: ExoticaDQM.cc:577
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:208
virtual void analyzeMonoMuons(edm::Event const &e)
Definition: ExoticaDQM.cc:756
ExoticaDQM(const edm::ParameterSet &ps)
Definition: ExoticaDQM.cc:92
virtual double et() const
transverse energy
virtual void analyzeMonoJets(edm::Event const &e)
Definition: ExoticaDQM.cc:738
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
void cd(void)
Definition: DQMStore.cc:266
virtual void analyzeDiMuons(edm::Event const &e)
Definition: ExoticaDQM.cc:655
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
void bookHistograms(DQMStore::IBooker &bei, edm::Run const &, edm::EventSetup const &) override
Definition: ExoticaDQM.cc:175
double correction(const LorentzVector &fJet) const
get correction using Jet information only
Definition: JetCorrector.h:47
tuple vertexCollection
int iEvent
Definition: GenABIO.cc:230
T sqrt(T t)
Definition: SSEVec.h:48
virtual void analyzeDiPhotons(edm::Event const &e)
Definition: ExoticaDQM.cc:689
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
virtual void analyzeMonoPhotons(edm::Event const &e)
Definition: ExoticaDQM.cc:788
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
virtual void analyze(edm::Event const &e, edm::EventSetup const &eSetup)
Definition: ExoticaDQM.cc:310
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
virtual ~ExoticaDQM()
Definition: ExoticaDQM.cc:167
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:27
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
Definition: JetCorrector.cc:50
virtual void analyzeDiElectrons(edm::Event const &e)
Definition: ExoticaDQM.cc:672
virtual double phi() const
momentum azimuthal angle
std::vector< std::string > vstring
Definition: Schedule.cc:354
Definition: Run.h:41
Collection of PF MET.
int icoll
Definition: AMPTWrapper.h:136