20 prescaleFactor_ =
pset.getUntrackedParameter<
int>(
"prescaleFactor", 1);
21 use2DHistos_ =
pset.getParameter<
bool>(
"use2DHistos");
22 makeProfiles_ =
pset.getParameter<
bool>(
"makeProfiles");
24 triggerEvent_token_ = consumes<trigger::TriggerEvent>(
pset.getParameter<
edm::InputTag>(
"triggerEvent"));
25 offline_pvToken_ = consumes<reco::VertexCollection>(
27 photon_token_ = consumes<vector<reco::Photon> >(
pset.getParameter<
edm::InputTag>(
"phoProducer"));
28 muon_token_ = consumes<vector<reco::Muon> >(
pset.getParameter<
edm::InputTag>(
"muonProducer"));
29 pfCandidates_ = consumes<reco::PFCandidateCollection>(
pset.getParameter<
edm::InputTag>(
"pfCandidates"));
30 photonIsoValmap_token_ = consumes<edm::ValueMap<std::vector<reco::PFCandidateRef> > >(
32 barrelRecHit_token_ = consumes<edm::SortedCollection<EcalRecHit, edm::StrictWeakOrdering<EcalRecHit> > >(
34 endcapRecHit_token_ = consumes<edm::SortedCollection<EcalRecHit, edm::StrictWeakOrdering<EcalRecHit> > >(
36 beamSpot_token_ = consumes<reco::BeamSpot>(
pset.getParameter<
edm::InputTag>(
"beamSpot"));
41 muonMinPt_ =
pset.getParameter<
double>(
"muonMinPt");
42 minPixStripHits_ =
pset.getParameter<
int>(
"minPixStripHits");
43 muonMaxChi2_ =
pset.getParameter<
double>(
"muonMaxChi2");
44 muonMaxDxy_ =
pset.getParameter<
double>(
"muonMaxDxy");
45 muonMatches_ =
pset.getParameter<
int>(
"muonMatches");
46 validPixHits_ =
pset.getParameter<
int>(
"validPixHits");
47 validMuonHits_ =
pset.getParameter<
int>(
"validMuonHits");
48 muonTrackIso_ =
pset.getParameter<
double>(
"muonTrackIso");
49 muonTightEta_ =
pset.getParameter<
double>(
"muonTightEta");
51 minMumuInvMass_ =
pset.getParameter<
double>(
"minMumuInvMass");
52 maxMumuInvMass_ =
pset.getParameter<
double>(
"maxMumuInvMass");
54 photonMinEt_ =
pset.getParameter<
double>(
"photonMinEt");
55 photonMaxEta_ =
pset.getParameter<
double>(
"photonMaxEta");
56 photonTrackIso_ =
pset.getParameter<
double>(
"photonTrackIso");
58 nearMuonDr_ =
pset.getParameter<
double>(
"nearMuonDr");
59 nearMuonHcalIso_ =
pset.getParameter<
double>(
"nearMuonHcalIso");
60 farMuonEcalIso_ =
pset.getParameter<
double>(
"farMuonEcalIso");
61 farMuonTrackIso_ =
pset.getParameter<
double>(
"farMuonTrackIso");
62 farMuonMinPt_ =
pset.getParameter<
double>(
"farMuonMinPt");
63 minMumuGammaInvMass_ =
pset.getParameter<
double>(
"minMumuGammaInvMass");
64 maxMumuGammaInvMass_ =
pset.getParameter<
double>(
"maxMumuGammaInvMass");
67 eMin_ =
pset.getParameter<
double>(
"eMin");
68 eMax_ =
pset.getParameter<
double>(
"eMax");
69 eBin_ =
pset.getParameter<
int>(
"eBin");
71 etMin_ =
pset.getParameter<
double>(
"etMin");
72 etMax_ =
pset.getParameter<
double>(
"etMax");
73 etBin_ =
pset.getParameter<
int>(
"etBin");
75 sumMin_ =
pset.getParameter<
double>(
"sumMin");
76 sumMax_ =
pset.getParameter<
double>(
"sumMax");
77 sumBin_ =
pset.getParameter<
int>(
"sumBin");
79 etaMin_ =
pset.getParameter<
double>(
"etaMin");
80 etaMax_ =
pset.getParameter<
double>(
"etaMax");
81 etaBin_ =
pset.getParameter<
int>(
"etaBin");
83 phiMin_ =
pset.getParameter<
double>(
"phiMin");
84 phiMax_ =
pset.getParameter<
double>(
"phiMax");
85 phiBin_ =
pset.getParameter<
int>(
"phiBin");
87 r9Min_ =
pset.getParameter<
double>(
"r9Min");
88 r9Max_ =
pset.getParameter<
double>(
"r9Max");
89 r9Bin_ =
pset.getParameter<
int>(
"r9Bin");
91 hOverEMin_ =
pset.getParameter<
double>(
"hOverEMin");
92 hOverEMax_ =
pset.getParameter<
double>(
"hOverEMax");
93 hOverEBin_ =
pset.getParameter<
int>(
"hOverEBin");
95 numberMin_ =
pset.getParameter<
double>(
"numberMin");
96 numberMax_ =
pset.getParameter<
double>(
"numberMax");
97 numberBin_ =
pset.getParameter<
int>(
"numberBin");
99 sigmaIetaMin_ =
pset.getParameter<
double>(
"sigmaIetaMin");
100 sigmaIetaMax_ =
pset.getParameter<
double>(
"sigmaIetaMax");
101 sigmaIetaBin_ =
pset.getParameter<
int>(
"sigmaIetaBin");
103 reducedEtBin_ = etBin_ / 4;
104 reducedEtaBin_ = etaBin_ / 4;
105 reducedSumBin_ = sumBin_ / 4;
106 reducedR9Bin_ = r9Bin_ / 4;
117 h1_mumuInvMass_[0] = iBooker.
book1D(
"mumuInvMass",
"Two muon invariant mass: M (GeV)", etBin_, etMin_, etMax_);
118 h1_mumuGammaInvMass_[0] =
119 iBooker.
book1D(
"mumuGammaInvMass",
"Two-muon plus gamma invariant mass: M (GeV)", etBin_, etMin_, etMax_);
120 h1_mumuGammaInvMass_[1] =
121 iBooker.
book1D(
"mumuGammaInvMassBarrel",
"Two-muon plus gamma invariant mass: M (GeV)", etBin_, etMin_, etMax_);
122 h1_mumuGammaInvMass_[2] =
123 iBooker.
book1D(
"mumuGammaInvMassEndcap",
"Two-muon plus gamma invariant mass: M (GeV)", etBin_, etMin_, etMax_);
127 h_nRecoVtx_ = iBooker.
book1D(
"nOfflineVtx",
"# of Offline Vertices", 200, -0.5, 199.5);
130 h_phoE_[0] = iBooker.
book1D(
"phoE",
"Energy;E (GeV)", eBin_, eMin_, eMax_);
131 h_phoSigmaEoverE_[0] = iBooker.
book1D(
"phoSigmaEoverE",
"All Ecal: #sigma_{E}/E;#sigma_{E}/E", eBin_, eMin_, eMax_);
132 h_phoEt_[0] = iBooker.
book1D(
"phoEt",
"E_{T};E_{T} (GeV)", etBin_, etMin_, etMax_);
135 h_nPho_[0] = iBooker.
book1D(
"nPho",
"Number of Photons per Event;# #gamma", numberBin_, numberMin_, numberMax_);
138 h_phoEta_[0] = iBooker.
book1D(
"phoEta",
"#eta;#eta", etaBin_, etaMin_, etaMax_);
139 h_phoPhi_[0] = iBooker.
book1D(
"phoPhi",
"#phi;#phi", phiBin_, phiMin_, phiMax_);
141 h_scEta_[0] = iBooker.
book1D(
"scEta",
"SuperCluster #eta;#eta", etaBin_, etaMin_, etaMax_);
142 h_scPhi_[0] = iBooker.
book1D(
"scPhi",
"SuperCluster #phi;#phi", phiBin_, phiMin_, phiMax_);
145 h_r9_[0] = iBooker.
book1D(
"r9",
"R9;R9", r9Bin_, r9Min_, r9Max_);
146 h_e1x5_[0] = iBooker.
book1D(
"e1x5",
"E1x5;E1X5 (GeV)", reducedEtBin_, etMin_, etMax_);
147 h_e2x5_[0] = iBooker.
book1D(
"e2x5",
"E2x5;E2X5 (GeV)", reducedEtBin_, etMin_, etMax_);
148 h_r1x5_[0] = iBooker.
book1D(
"r1x5",
"r1x5;r1X5 (GeV)", reducedEtBin_, etMin_, etMax_);
149 h_r2x5_[0] = iBooker.
book1D(
"r2x5",
"r2x5;r2X5 (GeV)", reducedEtBin_, etMin_, etMax_);
150 h_phoSigmaIetaIeta_[0] = iBooker.
book1D(
151 "phoSigmaIetaIeta",
"#sigma_{i#etai#eta};#sigma_{i#etai#eta}", sigmaIetaBin_, sigmaIetaMin_, sigmaIetaMax_);
153 h_nTrackIsolSolid_[0] = iBooker.
book1D(
154 "nIsoTracksSolid",
"Number Of Tracks in the Solid Iso Cone;# tracks", numberBin_, numberMin_, numberMax_);
155 h_nTrackIsolHollow_[0] = iBooker.
book1D(
156 "nIsoTracksHollow",
"Number Of Tracks in the Hollow Iso Cone;# tracks", numberBin_, numberMin_, numberMax_);
157 h_trackPtSumSolid_[0] =
158 iBooker.
book1D(
"isoPtSumSolid",
"Track P_{T} Sum in the Solid Iso Cone;P_{T} (GeV)", sumBin_, sumMin_, sumMax_);
159 h_trackPtSumHollow_[0] =
160 iBooker.
book1D(
"isoPtSumHollow",
"Track P_{T} Sum in the Hollow Iso Cone;P_{T} (GeV)", sumBin_, sumMin_, sumMax_);
162 h_ecalSum_[0] = iBooker.
book1D(
"ecalSum",
"Ecal Sum in the Iso Cone;E (GeV)", sumBin_, sumMin_, sumMax_);
163 h_hcalSum_[0] = iBooker.
book1D(
"hcalSum",
"Hcal Sum in the Iso Cone;E (GeV)", sumBin_, sumMin_, sumMax_);
164 h_hOverE_[0] = iBooker.
book1D(
"hOverE",
"H/E;H/E", hOverEBin_, hOverEMin_, hOverEMax_);
165 h_h1OverE_[0] = iBooker.
book1D(
"h1OverE",
"H/E for Depth 1;H/E", hOverEBin_, hOverEMin_, hOverEMax_);
166 h_h2OverE_[0] = iBooker.
book1D(
"h2OverE",
"H/E for Depth 2;H/E", hOverEBin_, hOverEMin_, hOverEMax_);
167 string histname =
"newhOverE";
168 h_newhOverE_[0] = iBooker.
book1D(histname +
"All",
"new H/E: All Ecal", 100, 0., 0.1);
170 histname =
"chargedHadIso";
171 h_chHadIso_[0] = iBooker.
book1D(histname +
"All",
"PF chargedHadIso: All Ecal", etBin_, etMin_, 20.);
172 histname =
"neutralHadIso";
173 h_nHadIso_[0] = iBooker.
book1D(histname +
"All",
"PF neutralHadIso: All Ecal", etBin_, etMin_, 20.);
174 histname =
"photonIso";
175 h_phoIso_[0] = iBooker.
book1D(histname +
"All",
"PF photonIso: All Ecal", etBin_, etMin_, 20.);
176 histname =
"nCluOutMustache";
177 h_nCluOutsideMustache_[0] =
178 iBooker.
book1D(histname +
"All",
"PF number of clusters outside Mustache: All Ecal", 50, 0., 50.);
179 histname =
"etOutMustache";
180 h_etOutsideMustache_[0] = iBooker.
book1D(histname +
"All",
"PF et outside Mustache: All Ecal", etBin_, etMin_, 20.);
182 h_pfMva_[0] = iBooker.
book1D(histname +
"All",
"PF MVA output: All Ecal", 50, -1., 2.);
184 histname =
"SumPtOverPhoPt_ChHad_Cleaned";
185 h_SumPtOverPhoPt_ChHad_Cleaned_[0] =
186 iBooker.
book1D(histname +
"All",
"Pf Cand Sum Pt Over photon pt Charged Hadrons: All Ecal", etBin_, etMin_, 2.);
187 histname =
"SumPtOverPhoPt_NeuHad_Cleaned";
188 h_SumPtOverPhoPt_NeuHad_Cleaned_[0] =
189 iBooker.
book1D(histname +
"All",
"Pf Cand Sum Pt Over photon pt Neutral Hadrons: All Ecal", etBin_, etMin_, 2.);
190 histname =
"SumPtOverPhoPt_Pho_Cleaned";
191 h_SumPtOverPhoPt_Pho_Cleaned_[0] =
192 iBooker.
book1D(histname +
"All",
"Pf Cand Sum Pt Over photon pt Photons Hadrons: All Ecal", etBin_, etMin_, 2.);
193 histname =
"dRPhoPFcand_ChHad_Cleaned";
194 h_dRPhoPFcand_ChHad_Cleaned_[0] =
195 iBooker.
book1D(histname +
"All",
"dR(pho,cand) Charged Hadrons : All Ecal", etBin_, etMin_, 0.7);
196 histname =
"dRPhoPFcand_NeuHad_Cleaned";
197 h_dRPhoPFcand_NeuHad_Cleaned_[0] =
198 iBooker.
book1D(histname +
"All",
"dR(pho,cand) Neutral Hadrons : All Ecal", etBin_, etMin_, 0.7);
199 histname =
"dRPhoPFcand_Pho_Cleaned";
200 h_dRPhoPFcand_Pho_Cleaned_[0] =
201 iBooker.
book1D(histname +
"All",
"dR(pho,cand) Photons : All Ecal", etBin_, etMin_, 0.7);
203 histname =
"SumPtOverPhoPt_ChHad_unCleaned";
204 h_SumPtOverPhoPt_ChHad_unCleaned_[0] =
205 iBooker.
book1D(histname +
"All",
"Pf Cand Sum Pt Over photon pt Charged Hadrons : All Ecal", etBin_, etMin_, 2.);
206 histname =
"SumPtOverPhoPt_NeuHad_unCleaned";
207 h_SumPtOverPhoPt_NeuHad_unCleaned_[0] =
208 iBooker.
book1D(histname +
"All",
"Pf Cand Sum Pt Over photon pt Neutral Hadrons : All Ecal", etBin_, etMin_, 2.);
209 histname =
"SumPtOverPhoPt_Pho_unCleaned";
210 h_SumPtOverPhoPt_Pho_unCleaned_[0] =
211 iBooker.
book1D(histname +
"All",
"Pf Cand Sum Pt Over photon pt Photons: All Ecal", etBin_, etMin_, 2.);
212 histname =
"dRPhoPFcand_ChHad_unCleaned";
213 h_dRPhoPFcand_ChHad_unCleaned_[0] =
214 iBooker.
book1D(histname +
"All",
"dR(pho,cand) Charged Hadrons : All Ecal", etBin_, etMin_, 0.7);
215 histname =
"dRPhoPFcand_NeuHad_unCleaned";
216 h_dRPhoPFcand_NeuHad_unCleaned_[0] =
217 iBooker.
book1D(histname +
"All",
"dR(pho,cand) Neutral Hadrons : All Ecal", etBin_, etMin_, 0.7);
218 histname =
"dRPhoPFcand_Pho_unCleaned";
219 h_dRPhoPFcand_Pho_unCleaned_[0] =
220 iBooker.
book1D(histname +
"All",
"dR(pho,cand) Photons: All Ecal", etBin_, etMin_, 0.7);
223 h_nPho_[1] = iBooker.
book1D(
"nPhoBarrel",
"Number of Photons per Event;# #gamma", numberBin_, numberMin_, numberMax_);
224 h_nPho_[2] = iBooker.
book1D(
"nPhoEndcap",
"Number of Photons per Event;# #gamma", numberBin_, numberMin_, numberMax_);
226 h_phoE_[1] = iBooker.
book1D(
"phoEBarrel",
"Energy for Barrel;E (GeV)", eBin_, eMin_, eMax_);
227 h_phoSigmaEoverE_[1] = iBooker.
book1D(
"phoSigmaEoverEBarrel",
"Barrel: #sigma_E/E;#sigma_{E}/E", eBin_, eMin_, eMax_);
228 h_phoEt_[1] = iBooker.
book1D(
"phoEtBarrel",
"E_{T};E_{T} (GeV)", etBin_, etMin_, etMax_);
230 h_phoEt_[2] = iBooker.
book1D(
"phoEtEndcap",
"E_{T};E_{T} (GeV)", etBin_, etMin_, etMax_);
231 h_phoE_[2] = iBooker.
book1D(
"phoEEndcap",
"Energy for Endcap;E (GeV)", eBin_, eMin_, eMax_);
232 h_phoSigmaEoverE_[2] =
233 iBooker.
book1D(
"phoSigmaEoverEEndcap",
"Endcap: #sigma_{E}/E;#sigma_{E}/E", eBin_, eMin_, eMax_);
235 h_phoEta_[1] = iBooker.
book1D(
"phoEtaBarrel",
"#eta;#eta", etaBin_, etaMin_, etaMax_);
236 h_phoPhi_[1] = iBooker.
book1D(
"phoPhiBarrel",
"#phi;#phi", phiBin_, phiMin_, phiMax_);
237 h_scEta_[1] = iBooker.
book1D(
"scEtaBarrel",
"SuperCluster #eta;#eta", etaBin_, etaMin_, etaMax_);
238 h_scPhi_[1] = iBooker.
book1D(
"scPhiBarrel",
"SuperCluster #phi;#phi", phiBin_, phiMin_, phiMax_);
240 h_phoEta_[2] = iBooker.
book1D(
"phoEtaEndcap",
"#eta;#eta", etaBin_, etaMin_, etaMax_);
241 h_phoPhi_[2] = iBooker.
book1D(
"phoPhiEndcap",
"#phi;#phi", phiBin_, phiMin_, phiMax_);
242 h_scEta_[2] = iBooker.
book1D(
"scEtaEndcap",
"SuperCluster #eta;#eta", etaBin_, etaMin_, etaMax_);
243 h_scPhi_[2] = iBooker.
book1D(
"scPhiEndcap",
"SuperCluster #phi;#phi", phiBin_, phiMin_, phiMax_);
245 h_r9_[1] = iBooker.
book1D(
"r9Barrel",
"R9;R9", r9Bin_, r9Min_, r9Max_);
246 h_r9_[2] = iBooker.
book1D(
"r9Endcap",
"R9;R9", r9Bin_, r9Min_, r9Max_);
247 h_e1x5_[1] = iBooker.
book1D(
"e1x5Barrel",
"E1x5;E1X5 (GeV)", reducedEtBin_, etMin_, etMax_);
248 h_e1x5_[2] = iBooker.
book1D(
"e1x5Endcap",
"E1x5;E1X5 (GeV)", reducedEtBin_, etMin_, etMax_);
249 h_e2x5_[1] = iBooker.
book1D(
"e2x5Barrel",
"E2x5;E2X5 (GeV)", reducedEtBin_, etMin_, etMax_);
250 h_e2x5_[2] = iBooker.
book1D(
"e2x5Endcap",
"E2x5;E2X5 (GeV)", reducedEtBin_, etMin_, etMax_);
251 h_r1x5_[1] = iBooker.
book1D(
"r1x5Barrel",
"r1x5;r1X5 (GeV)", reducedEtBin_, etMin_, etMax_);
252 h_r1x5_[2] = iBooker.
book1D(
"r1x5Endcap",
"r1x5;r1X5 (GeV)", reducedEtBin_, etMin_, etMax_);
253 h_r2x5_[1] = iBooker.
book1D(
"r2x5Barrel",
"r2x5;r2X5 (GeV)", reducedEtBin_, etMin_, etMax_);
254 h_r2x5_[2] = iBooker.
book1D(
"r2x5Endcap",
"r2x5;r2X5 (GeV)", reducedEtBin_, etMin_, etMax_);
255 h_phoSigmaIetaIeta_[1] = iBooker.
book1D(
256 "phoSigmaIetaIetaBarrel",
"#sigma_{i#etai#eta};#sigma_{i#etai#eta}", sigmaIetaBin_, sigmaIetaMin_, sigmaIetaMax_);
257 h_phoSigmaIetaIeta_[2] = iBooker.
book1D(
258 "phoSigmaIetaIetaEndcap",
"#sigma_{i#etai#eta};#sigma_{i#etai#eta}", sigmaIetaBin_, sigmaIetaMin_, sigmaIetaMax_);
260 h_nTrackIsolSolid_[1] = iBooker.
book1D(
261 "nIsoTracksSolidBarrel",
"Number Of Tracks in the Solid Iso Cone;# tracks", numberBin_, numberMin_, numberMax_);
262 h_nTrackIsolSolid_[2] = iBooker.
book1D(
263 "nIsoTracksSolidEndcap",
"Number Of Tracks in the Solid Iso Cone;# tracks", numberBin_, numberMin_, numberMax_);
264 h_nTrackIsolHollow_[1] = iBooker.
book1D(
265 "nIsoTracksHollowBarrel",
"Number Of Tracks in the Hollow Iso Cone;# tracks", numberBin_, numberMin_, numberMax_);
266 h_nTrackIsolHollow_[2] = iBooker.
book1D(
267 "nIsoTracksHollowEndcap",
"Number Of Tracks in the Hollow Iso Cone;# tracks", numberBin_, numberMin_, numberMax_);
268 h_trackPtSumSolid_[1] = iBooker.
book1D(
269 "isoPtSumSolidBarrel",
"Track P_{T} Sum in the Solid Iso Cone;P_{T} (GeV)", sumBin_, sumMin_, sumMax_);
270 h_trackPtSumSolid_[2] = iBooker.
book1D(
271 "isoPtSumSolidEndcap",
"Track P_{T} Sum in the Solid Iso Cone;P_{T} (GeV)", sumBin_, sumMin_, sumMax_);
272 h_trackPtSumHollow_[1] = iBooker.
book1D(
273 "isoPtSumHollowBarrel",
"Track P_{T} Sum in the Hollow Iso Cone;P_{T} (GeV)", sumBin_, sumMin_, sumMax_);
274 h_trackPtSumHollow_[2] = iBooker.
book1D(
275 "isoPtSumHollowEndcap",
"Track P_{T} Sum in the Hollow Iso Cone;P_{T} (GeV)", sumBin_, sumMin_, sumMax_);
277 h_ecalSum_[1] = iBooker.
book1D(
"ecalSumBarrel",
"Ecal Sum in the Iso Cone;E (GeV)", sumBin_, sumMin_, sumMax_);
278 h_ecalSum_[2] = iBooker.
book1D(
"ecalSumEndcap",
"Ecal Sum in the Iso Cone;E (GeV)", sumBin_, sumMin_, sumMax_);
279 h_hcalSum_[1] = iBooker.
book1D(
"hcalSumBarrel",
"Hcal Sum in the Iso Cone;E (GeV)", sumBin_, sumMin_, sumMax_);
280 h_hcalSum_[2] = iBooker.
book1D(
"hcalSumEndcap",
"Hcal Sum in the Iso Cone;E (GeV)", sumBin_, sumMin_, sumMax_);
283 h_hOverE_[1] = iBooker.
book1D(
"hOverEBarrel",
"H/E;H/E", hOverEBin_, hOverEMin_, hOverEMax_);
284 h_h1OverE_[1] = iBooker.
book1D(
"h1OverEBarrel",
"H/E for Depth 1;H/E", hOverEBin_, hOverEMin_, hOverEMax_);
285 h_h2OverE_[1] = iBooker.
book1D(
"h2OverEBarrel",
"H/E for Depth 2;H/E", hOverEBin_, hOverEMin_, hOverEMax_);
286 histname =
"newhOverE";
287 h_newhOverE_[1] = iBooker.
book1D(histname +
"Barrel",
"new H/E: Barrel", 100, 0., 0.1);
289 h_hOverE_[2] = iBooker.
book1D(
"hOverEEndcap",
"H/E;H/E", hOverEBin_, hOverEMin_, hOverEMax_);
290 h_h1OverE_[2] = iBooker.
book1D(
"h1OverEEndcap",
"H/E for Depth 1;H/E", hOverEBin_, hOverEMin_, hOverEMax_);
291 h_h2OverE_[2] = iBooker.
book1D(
"h2OverEEndcap",
"H/E for Depth 2;H/E", hOverEBin_, hOverEMin_, hOverEMax_);
292 histname =
"newhOverE";
293 h_newhOverE_[2] = iBooker.
book1D(histname +
"Endcap",
"new H/E: Endcap", 100, 0., 0.1);
295 histname =
"chargedHadIso";
296 h_chHadIso_[1] = iBooker.
book1D(histname +
"Barrel",
"PF chargedHadIso: Barrel", etBin_, etMin_, 20.);
297 h_chHadIso_[2] = iBooker.
book1D(histname +
"Endcap",
"PF chargedHadIso: Endcap", etBin_, etMin_, 20.);
298 histname =
"neutralHadIso";
299 h_nHadIso_[1] = iBooker.
book1D(histname +
"Barrel",
"PF neutralHadIso: Barrel", etBin_, etMin_, 20.);
300 h_nHadIso_[2] = iBooker.
book1D(histname +
"Endcap",
"PF neutralHadIso: Endcap", etBin_, etMin_, 20.);
301 histname =
"photonIso";
302 h_phoIso_[1] = iBooker.
book1D(histname +
"Barrel",
"PF photonIso: Barrel", etBin_, etMin_, 20.);
303 h_phoIso_[2] = iBooker.
book1D(histname +
"Endcap",
"PF photonIso: Endcap", etBin_, etMin_, 20.);
304 histname =
"nCluOutMustache";
305 h_nCluOutsideMustache_[1] =
306 iBooker.
book1D(histname +
"Barrel",
"PF number of clusters outside Mustache: Barrel", 50, 0., 50.);
307 h_nCluOutsideMustache_[2] =
308 iBooker.
book1D(histname +
"Endcap",
"PF number of clusters outside Mustache: Endcap", 50, 0., 50.);
309 histname =
"etOutMustache";
310 h_etOutsideMustache_[1] = iBooker.
book1D(histname +
"Barrel",
"PF et outside Mustache: Barrel", etBin_, etMin_, 20.);
311 h_etOutsideMustache_[2] = iBooker.
book1D(histname +
"Endcap",
"PF et outside Mustache: Endcap", etBin_, etMin_, 20.);
313 h_pfMva_[1] = iBooker.
book1D(histname +
"Barrel",
"PF MVA output: Barrel", 50, -1., 2.);
314 h_pfMva_[2] = iBooker.
book1D(histname +
"Endcap",
"PF MVA output: Endcap", 50, -1, 2.);
316 histname =
"SumPtOverPhoPt_ChHad_Cleaned";
317 h_SumPtOverPhoPt_ChHad_Cleaned_[1] =
318 iBooker.
book1D(histname +
"Barrel",
"PF Cand Sum Pt Over photon pt Charged Hadrons: Barrel", etBin_, etMin_, 2.);
319 h_SumPtOverPhoPt_ChHad_Cleaned_[2] =
320 iBooker.
book1D(histname +
"Endcap",
"PF Cand Sum Pt Over photon pt Charged Hadrons: Endcap", etBin_, etMin_, 2.);
321 histname =
"SumPtOverPhoPt_NeuHad_Cleaned";
322 h_SumPtOverPhoPt_NeuHad_Cleaned_[1] =
323 iBooker.
book1D(histname +
"Barrel",
"PF Cand Sum Pt Over photon pt Neutral Hadrons: Barrel", etBin_, etMin_, 2.);
324 h_SumPtOverPhoPt_NeuHad_Cleaned_[2] =
325 iBooker.
book1D(histname +
"Endcap",
"PF Cand Sum Pt Over photon pt Neutral Hadrons: Endcap", etBin_, etMin_, 2.);
326 histname =
"SumPtOverPhoPt_Pho_Cleaned";
327 h_SumPtOverPhoPt_Pho_Cleaned_[1] =
328 iBooker.
book1D(histname +
"Barrel",
"PF Cand Sum Pt Over photon pt Photons Hadrons: Barrel", etBin_, etMin_, 2.);
329 h_SumPtOverPhoPt_Pho_Cleaned_[2] =
330 iBooker.
book1D(histname +
"Endcap",
"PF Cand Sum Pt Over photon pt Photons Hadrons: Endcap", etBin_, etMin_, 2.);
331 histname =
"dRPhoPFcand_ChHad_Cleaned";
332 h_dRPhoPFcand_ChHad_Cleaned_[1] =
333 iBooker.
book1D(histname +
"Barrel",
"dR(pho,cand) Charged Hadrons : Barrel", etBin_, etMin_, 0.7);
334 h_dRPhoPFcand_ChHad_Cleaned_[2] =
335 iBooker.
book1D(histname +
"Endcap",
"dR(pho,cand) Charged Hadrons : Endcap", etBin_, etMin_, 0.7);
336 histname =
"dRPhoPFcand_NeuHad_Cleaned";
337 h_dRPhoPFcand_NeuHad_Cleaned_[1] =
338 iBooker.
book1D(histname +
"Barrel",
"dR(pho,cand) Neutral Hadrons : Barrel", etBin_, etMin_, 0.7);
339 h_dRPhoPFcand_NeuHad_Cleaned_[2] =
340 iBooker.
book1D(histname +
"Endcap",
"dR(pho,cand) Neutral Hadrons : Endcap", etBin_, etMin_, 0.7);
341 histname =
"dRPhoPFcand_Pho_Cleaned";
342 h_dRPhoPFcand_Pho_Cleaned_[1] =
343 iBooker.
book1D(histname +
"Barrel",
"dR(pho,cand) Photons : Barrel", etBin_, etMin_, 0.7);
344 h_dRPhoPFcand_Pho_Cleaned_[2] =
345 iBooker.
book1D(histname +
"Endcap",
"dR(pho,cand) Photons : Endcap", etBin_, etMin_, 0.7);
347 histname =
"SumPtOverPhoPt_ChHad_unCleaned";
348 h_SumPtOverPhoPt_ChHad_unCleaned_[1] =
349 iBooker.
book1D(histname +
"Barrel",
"PF Cand Sum Pt Over photon pt Charged Hadrons: Barrel", etBin_, etMin_, 2.);
350 h_SumPtOverPhoPt_ChHad_unCleaned_[2] =
351 iBooker.
book1D(histname +
"Endcap",
"PF Cand Sum Pt Over photon pt Charged Hadrons: Endcap", etBin_, etMin_, 2.);
352 histname =
"SumPtOverPhoPt_NeuHad_unCleaned";
353 h_SumPtOverPhoPt_NeuHad_unCleaned_[1] =
354 iBooker.
book1D(histname +
"Barrel",
"PF Cand Sum Pt Over photon pt Neutral Hadrons: Barrel", etBin_, etMin_, 2.);
355 h_SumPtOverPhoPt_NeuHad_unCleaned_[2] =
356 iBooker.
book1D(histname +
"Endcap",
"PF Cand Sum Pt Over photon pt Neutral Hadrons: Endcap", etBin_, etMin_, 2.);
357 histname =
"SumPtOverPhoPt_Pho_unCleaned";
358 h_SumPtOverPhoPt_Pho_unCleaned_[1] =
359 iBooker.
book1D(histname +
"Barrel",
"PF Cand Sum Pt Over photon pt Photons: Barrel", etBin_, etMin_, 2.);
360 h_SumPtOverPhoPt_Pho_unCleaned_[2] =
361 iBooker.
book1D(histname +
"Endcap",
"PF Cand Sum Pt Over photon pt Photons: Endcap", etBin_, etMin_, 2.);
362 histname =
"dRPhoPFcand_ChHad_unCleaned";
363 h_dRPhoPFcand_ChHad_unCleaned_[1] =
364 iBooker.
book1D(histname +
"Barrel",
"dR(pho,cand) Charged Hadrons : Barrel", etBin_, etMin_, 0.7);
365 h_dRPhoPFcand_ChHad_unCleaned_[2] =
366 iBooker.
book1D(histname +
"Endcap",
"dR(pho,cand) Charged Hadrons : Endcap", etBin_, etMin_, 0.7);
367 histname =
"dRPhoPFcand_NeuHad_unCleaned";
368 h_dRPhoPFcand_NeuHad_unCleaned_[1] =
369 iBooker.
book1D(histname +
"Barrel",
"dR(pho,cand) Neutral Hadrons : Barrel", etBin_, etMin_, 0.7);
370 h_dRPhoPFcand_NeuHad_unCleaned_[2] =
371 iBooker.
book1D(histname +
"Endcap",
"dR(pho,cand) Neutral Hadrons : Endcap", etBin_, etMin_, 0.7);
372 histname =
"dRPhoPFcand_Pho_unCleaned";
373 h_dRPhoPFcand_Pho_unCleaned_[1] =
374 iBooker.
book1D(histname +
"Barrel",
"dR(pho,cand) Photons: Barrel", etBin_, etMin_, 0.7);
375 h_dRPhoPFcand_Pho_unCleaned_[2] =
376 iBooker.
book1D(histname +
"Endcap",
"dR(pho,cand) Photons: Endcap", etBin_, etMin_, 0.7);
382 "r9VsEtBarrel",
"Avg R9 vs E_{T};E_{T} (GeV);R9", etBin_, etMin_, etMax_, r9Bin_, r9Min_, r9Max_);
384 "r9VsEtEndcap",
"Avg R9 vs E_{T};E_{T} (GeV);R9", etBin_, etMin_, etMax_, r9Bin_, r9Min_, r9Max_);
386 iBooker.
bookProfile(
"r9VsEta",
"Avg R9 vs #eta;#eta;R9", etaBin_, etaMin_, etaMax_, r9Bin_, r9Min_, r9Max_);
388 p_sigmaIetaIetaVsEta_[0] = iBooker.
bookProfile(
"sigmaIetaIetaVsEta",
389 "Avg #sigma_{i#etai#eta} vs #eta;#eta;#sigma_{i#etai#eta}",
397 "e1x5VsEtBarrel",
"Avg E1x5 vs E_{T};E_{T} (GeV);E1X5 (GeV)", etBin_, etMin_, etMax_, etBin_, etMin_, etMax_);
399 "e1x5VsEtEndcap",
"Avg E1x5 vs E_{T};E_{T} (GeV);E1X5 (GeV)", etBin_, etMin_, etMax_, etBin_, etMin_, etMax_);
401 "e1x5VsEta",
"Avg E1x5 vs #eta;#eta;E1X5 (GeV)", etaBin_, etaMin_, etaMax_, etBin_, etMin_, etMax_);
403 "e2x5VsEtBarrel",
"Avg E2x5 vs E_{T};E_{T} (GeV);E2X5 (GeV)", etBin_, etMin_, etMax_, etBin_, etMin_, etMax_);
405 "e2x5VsEtEndcap",
"Avg E2x5 vs E_{T};E_{T} (GeV);E2X5 (GeV)", etBin_, etMin_, etMax_, etBin_, etMin_, etMax_);
407 "e2x5VsEta",
"Avg E2x5 vs #eta;#eta;E2X5 (GeV)", etaBin_, etaMin_, etaMax_, etBin_, etMin_, etMax_);
409 "r1x5VsEtBarrel",
"Avg R1x5 vs E_{T};E_{T} (GeV);R1X5", etBin_, etMin_, etMax_, r9Bin_, r9Min_, r9Max_);
411 "r1x5VsEtEndcap",
"Avg R1x5 vs E_{T};E_{T} (GeV);R1X5", etBin_, etMin_, etMax_, r9Bin_, r9Min_, r9Max_);
413 "r1x5VsEta",
"Avg R1x5 vs #eta;#eta;R1X5", etaBin_, etaMin_, etaMax_, r9Bin_, r9Min_, r9Max_);
415 "r2x5VsEtBarrel",
"Avg R2x5 vs E_{T};E_{T} (GeV);R2X5", etBin_, etMin_, etMax_, r9Bin_, r9Min_, r9Max_);
417 "r2x5VsEtEndcap",
"Avg R2x5 vs E_{T};E_{T} (GeV);R2X5", etBin_, etMin_, etMax_, r9Bin_, r9Min_, r9Max_);
419 "r2x5VsEta",
"Avg R2x5 vs #eta;#eta;R2X5", etaBin_, etaMin_, etaMax_, r9Bin_, r9Min_, r9Max_);
420 p_nTrackIsolSolidVsEt_[1] =
422 "Avg Number Of Tracks in the Solid Iso Cone vs E_{T};E_{T};# tracks",
429 p_nTrackIsolSolidVsEt_[2] =
431 "Avg Number Of Tracks in the Solid Iso Cone vs E_{T};E_{T};# tracks",
438 p_nTrackIsolSolidVsEta_[0] = iBooker.
bookProfile(
"nIsoTracksSolidVsEta",
439 "Avg Number Of Tracks in the Solid Iso Cone vs #eta;#eta;# tracks",
446 p_nTrackIsolHollowVsEt_[1] =
448 "Avg Number Of Tracks in the Hollow Iso Cone vs E_{T};E_{T};# tracks",
455 p_nTrackIsolHollowVsEt_[2] =
457 "Avg Number Of Tracks in the Hollow Iso Cone vs E_{T};E_{T};# tracks",
464 p_nTrackIsolHollowVsEta_[0] =
466 "Avg Number Of Tracks in the Hollow Iso Cone vs #eta;#eta;# tracks",
473 p_trackPtSumSolidVsEt_[1] =
475 "Avg Track P_{T} Sum in the Solid Iso Cone vs E_{T};E_{T} (GeV);P_{T} (GeV)",
482 p_trackPtSumSolidVsEt_[2] =
484 "Avg Track P_{T} Sum in the Solid Iso Cone vs E_{T};E_{T} (GeV);P_{T} (GeV)",
491 p_trackPtSumSolidVsEta_[0] =
493 "Avg Track P_{T} Sum in the Solid Iso Cone vs #eta;#eta;P_{T} (GeV)",
500 p_trackPtSumHollowVsEt_[1] =
502 "Avg Track P_{T} Sum in the Hollow Iso Cone vs E_{T};E_{T} (GeV);P_{T} (GeV)",
509 p_trackPtSumHollowVsEt_[2] =
511 "Avg Track P_{T} Sum in the Hollow Iso Cone vs E_{T};E_{T} (GeV);P_{T} (GeV)",
518 p_trackPtSumHollowVsEta_[0] =
520 "Avg Track P_{T} Sum in the Hollow Iso Cone vs #eta;#eta;P_{T} (GeV)",
527 p_ecalSumVsEt_[1] = iBooker.
bookProfile(
"ecalSumVsEtBarrel",
528 "Avg Ecal Sum in the Iso Cone vs E_{T};E_{T} (GeV);E (GeV)",
535 p_ecalSumVsEt_[2] = iBooker.
bookProfile(
"ecalSumVsEtEndcap",
536 "Avg Ecal Sum in the Iso Cone vs E_{T};E_{T} (GeV);E (GeV)",
543 p_ecalSumVsEta_[0] = iBooker.
bookProfile(
"ecalSumVsEta",
544 "Avg Ecal Sum in the Iso Cone vs #eta;#eta;E (GeV)",
551 p_hcalSumVsEt_[1] = iBooker.
bookProfile(
"hcalSumVsEtBarrel",
552 "Avg Hcal Sum in the Iso Cone vs E_{T};E_{T} (GeV);E (GeV)",
559 p_hcalSumVsEt_[2] = iBooker.
bookProfile(
"hcalSumVsEtEndcap",
560 "Avg Hcal Sum in the Iso Cone vs E_{T};E_{T} (GeV);E (GeV)",
567 p_hcalSumVsEta_[0] = iBooker.
bookProfile(
"hcalSumVsEta",
568 "Avg Hcal Sum in the Iso Cone vs #eta;#eta;E (GeV)",
575 p_hOverEVsEt_[1] = iBooker.
bookProfile(
"p_hOverEVsEtBarrel",
576 "Avg H/E vs Et;E_{T} (GeV);H/E",
583 p_hOverEVsEt_[2] = iBooker.
bookProfile(
"p_hOverEVsEtEndcap",
584 "Avg H/E vs Et;E_{T} (GeV);H/E",
592 "p_hOverEVsEta",
"Avg H/E vs #eta;#eta;H/E", etaBin_, etaMin_, etaMax_, hOverEBin_, hOverEMin_, hOverEMax_);
595 histname =
"sigmaEoverEVsNVtx";
596 p_phoSigmaEoverEVsNVtx_[1] = iBooker.
bookProfile(histname +
"Barrel",
597 "Photons #sigma_{E}/E vs N_{vtx}: Barrel; N_{vtx}; #sigma_{E}/E ",
605 p_phoSigmaEoverEVsNVtx_[2] = iBooker.
bookProfile(histname +
"Endcap",
606 "Photons #sigma_{E}/E vs N_{vtx}: Endcap; N_{vtx}; #sigma_{E}/E",
620 h2_r9VsEt_[0] = iBooker.
book2D(
621 "r9VsEt2D",
"R9 vs E_{T};E_{T} (GeV);R9", reducedEtBin_, etMin_, etMax_, reducedR9Bin_, r9Min_, r9Max_);
622 h2_r9VsEt_[1] = iBooker.
book2D(
623 "r9VsEt2DBarrel",
"R9 vs E_{T};E_{T} (GeV);R9", reducedEtBin_, etMin_, etMax_, reducedR9Bin_, r9Min_, r9Max_);
624 h2_r9VsEt_[2] = iBooker.
book2D(
625 "r9VsEt2DEndcap",
"R9 vs E_{T};E_{T} (GeV);R9", reducedEtBin_, etMin_, etMax_, reducedR9Bin_, r9Min_, r9Max_);
626 h2_r9VsEta_[0] = iBooker.
book2D(
627 "r9VsEta2D",
"R9 vs #eta;#eta;R9", reducedEtaBin_, etaMin_, etaMax_, reducedR9Bin_, r9Min_, r9Max_);
629 h2_sigmaIetaIetaVsEta_[0] = iBooker.
book2D(
"sigmaIetaIetaVsEta2D",
630 "#sigma_{i#etai#eta} vs #eta;#eta;#sigma_{i#etai#eta}",
638 h2_e1x5VsEt_[0] = iBooker.
book2D(
"e1x5VsEt2D",
639 "E1x5 vs E_{T};E_{T} (GeV);E1X5 (GeV)",
646 h2_e1x5VsEt_[1] = iBooker.
book2D(
"e1x5VsEt2DBarrel",
647 "E1x5 vs E_{T};E_{T} (GeV);E1X5 (GeV)",
654 h2_e1x5VsEt_[2] = iBooker.
book2D(
"e1x5VsEt2DEndcap",
655 "E1x5 vs E_{T};E_{T} (GeV);E1X5 (GeV)",
662 h2_e1x5VsEta_[0] = iBooker.
book2D(
663 "e1x5VsEta2D",
"E1x5 vs #eta;#eta;E1X5 (GeV)", reducedEtaBin_, etaMin_, etaMax_, reducedEtBin_, etMin_, etMax_);
665 h2_e2x5VsEt_[0] = iBooker.
book2D(
"e2x5VsEt2D",
666 "E2x5 vs E_{T};E_{T} (GeV);E2X5 (GeV)",
673 h2_e2x5VsEt_[1] = iBooker.
book2D(
"e2x5VsEt2DBarrel",
674 "E2x5 vs E_{T};E_{T} (GeV);E2X5 (GeV)",
681 h2_e2x5VsEt_[2] = iBooker.
book2D(
"e2x5VsEt2DEndcap",
682 "E2x5 vs E_{T};E_{T} (GeV);E2X5 (GeV)",
689 h2_e2x5VsEta_[0] = iBooker.
book2D(
690 "e2x5VsEta2D",
"E2x5 vs #eta;#eta;E2X5 (GeV)", reducedEtaBin_, etaMin_, etaMax_, reducedEtBin_, etMin_, etMax_);
692 h2_r1x5VsEt_[0] = iBooker.
book2D(
693 "r1x5VsEt2D",
"R1x5 vs E_{T};E_{T} (GeV);R1X5", reducedEtBin_, etMin_, etMax_, reducedR9Bin_, r9Min_, r9Max_);
694 h2_r1x5VsEt_[1] = iBooker.
book2D(
"r1x5VsEt2DBarrel",
695 "R1x5 vs E_{T};E_{T} (GeV);R1X5",
702 h2_r1x5VsEt_[2] = iBooker.
book2D(
"r1x5VsEt2DEndcap",
703 "R1x5 vs E_{T};E_{T} (GeV);R1X5",
710 h2_r1x5VsEta_[0] = iBooker.
book2D(
711 "r1x5VsEta2D",
"R1x5 vs #eta;#eta;R1X5", reducedEtaBin_, etaMin_, etaMax_, reducedR9Bin_, r9Min_, r9Max_);
713 h2_r2x5VsEt_[0] = iBooker.
book2D(
714 "r2x5VsEt2D",
"R2x5 vs E_{T};E_{T} (GeV);R2X5", reducedEtBin_, etMin_, etMax_, reducedR9Bin_, r9Min_, r9Max_);
715 h2_r2x5VsEt_[1] = iBooker.
book2D(
"r2x5VsEt2DBarrel",
716 "R2x5 vs E_{T};E_{T} (GeV);R2X5",
723 h2_r2x5VsEt_[2] = iBooker.
book2D(
"r2x5VsEt2DEndcap",
724 "R2x5 vs E_{T};E_{T} (GeV);R2X5",
731 h2_r2x5VsEta_[0] = iBooker.
book2D(
732 "r2x5VsEta2D",
"R2x5 vs #eta;#eta;R2X5", reducedEtaBin_, etaMin_, etaMax_, reducedR9Bin_, r9Min_, r9Max_);
735 h2_nTrackIsolSolidVsEt_[0] = iBooker.
book2D(
"nIsoTracksSolidVsEt2D",
736 "Number Of Tracks in the Solid Iso Cone vs E_{T};E_{T};# tracks",
743 h2_nTrackIsolSolidVsEta_[0] = iBooker.
book2D(
"nIsoTracksSolidVsEta2D",
744 "Number Of Tracks in the Solid Iso Cone vs #eta;#eta;# tracks",
752 h2_nTrackIsolHollowVsEt_[0] = iBooker.
book2D(
"nIsoTracksHollowVsEt2D",
753 "Number Of Tracks in the Hollow Iso Cone vs E_{T};E_{T};# tracks",
760 h2_nTrackIsolHollowVsEta_[0] = iBooker.
book2D(
"nIsoTracksHollowVsEta2D",
761 "Number Of Tracks in the Hollow Iso Cone vs #eta;#eta;# tracks",
769 h2_trackPtSumSolidVsEt_[0] = iBooker.
book2D(
"isoPtSumSolidVsEt2D",
770 "Track P_{T} Sum in the Solid Iso Cone;E_{T} (GeV);P_{T} (GeV)",
777 h2_trackPtSumSolidVsEta_[0] = iBooker.
book2D(
"isoPtSumSolidVsEta2D",
778 "Track P_{T} Sum in the Solid Iso Cone;#eta;P_{T} (GeV)",
786 h2_trackPtSumHollowVsEt_[0] = iBooker.
book2D(
"isoPtSumHollowVsEt2D",
787 "Track P_{T} Sum in the Hollow Iso Cone;E_{T} (GeV);P_{T} (GeV)",
794 h2_trackPtSumHollowVsEta_[0] = iBooker.
book2D(
"isoPtSumHollowVsEta2D",
795 "Track P_{T} Sum in the Hollow Iso Cone;#eta;P_{T} (GeV)",
804 h2_ecalSumVsEt_[0] = iBooker.
book2D(
"ecalSumVsEt2D",
805 "Ecal Sum in the Iso Cone;E_{T} (GeV);E (GeV)",
812 h2_ecalSumVsEta_[0] = iBooker.
book2D(
"ecalSumVsEta2D",
813 "Ecal Sum in the Iso Cone;#eta;E (GeV)",
821 h2_hcalSumVsEt_[0] = iBooker.
book2D(
"hcalSumVsEt2D",
822 "Hcal Sum in the Iso Cone;E_{T} (GeV);E (GeV)",
829 h2_hcalSumVsEta_[0] = iBooker.
book2D(
"hcalSumVsEta2D",
830 "Hcal Sum in the Iso Cone;#eta;E (GeV)",
843 if (nEvt_ % prescaleFactor_)
846 LogInfo(
"ZToMuMuGammaAnalyzer") <<
"ZToMuMuGammaAnalyzer Analyzing event number: " <<
e.id() <<
" Global Counter "
850 bool validTriggerEvent =
true;
853 e.getByToken(triggerEvent_token_, triggerEventHandle);
854 if (!triggerEventHandle.
isValid()) {
855 edm::LogInfo(
"PhotonAnalyzer") <<
"Error! Can't get the product: triggerEvent_token_" << endl;
856 validTriggerEvent =
false;
858 if (validTriggerEvent)
865 e.getByToken(photon_token_, photonHandle);
867 edm::LogInfo(
"ZToMuMuGammaAnalyzer") <<
"Error! Can't get the product: photon_token_" << endl;
874 e.getByToken(pfCandidates_, pfCandidateHandle);
875 if (!pfCandidateHandle.
isValid()) {
876 edm::LogError(
"PhotonValidator") <<
"Error! Can't get the product pfCandidates " << std::endl;
881 if (fName_ ==
"zmumugammaGedValidation") {
882 e.getByToken(photonIsoValmap_token_, phoToParticleBasedIsoMapHandle);
884 if (!phoToParticleBasedIsoMapHandle.
isValid()) {
885 edm::LogInfo(
"PhotonValidator") <<
"Error! Can't get the product: valueMap photons to particle based iso "
888 phoToParticleBasedIsoMap = *(phoToParticleBasedIsoMapHandle.
product());
892 bool validMuons =
true;
895 e.getByToken(muon_token_, muonHandle);
897 edm::LogInfo(
"ZToMuMuGammaAnalyzer") <<
"Error! Can't get the product: muon_token_" << endl;
905 e.getByToken(beamSpot_token_, bsHandle);
907 edm::LogError(
"TrackerOnlyConversionProducer") <<
"Error! Can't get the product primary Vertex Collection "
918 if (
label.find(
"Photon") != string::npos) {
919 for (
uint filterKeyIndex = 0; filterKeyIndex <
triggerEvent.filterKeys(filterIndex).size();
931 if (
i != (
Keys.size() - 1)) {
943 e.getByToken(offline_pvToken_, vtxH);
944 h_nRecoVtx_->Fill(
float(vtxH->size()));
956 if (!basicMuonSelection(*iMu))
959 for (reco::MuonCollection::const_iterator iMu2 = iMu + 1; iMu2 !=
muonCollection.end(); iMu2++) {
960 if (!basicMuonSelection(*iMu2))
962 if (iMu->charge() * iMu2->charge() > 0)
968 float mumuMass = mumuInvMass(*iMu, *iMu2);
969 if (mumuMass < minMumuInvMass_ || mumuMass > maxMumuInvMass_)
972 h1_mumuInvMass_[0]->Fill(mumuMass);
974 if (photonHandle->empty())
979 for (
unsigned int iPho = 0; iPho < photonHandle->size(); iPho++) {
982 double dr1 =
deltaR((*iMu).eta(), aPho->eta(), (*iMu).phi(), aPho->phi());
983 double dr2 =
deltaR((*iMu2).eta(), aPho->eta(), (*iMu2).phi(), aPho->phi());
1001 if (farMuon.
pt() < farMuonMinPt_)
1003 if (drNear > nearMuonDr_)
1008 float mumuGammaMass = mumuGammaInvMass(*iMu, *iMu2, aPho);
1009 if (mumuGammaMass < minMumuGammaInvMass_ || mumuGammaMass > maxMumuGammaInvMass_)
1014 if (aPho->isEB() || aPho->isEE()) {
1027 h1_mumuGammaInvMass_[0]->Fill(mumuGammaMass);
1028 h1_mumuGammaInvMass_[iDet]->Fill(mumuGammaMass);
1030 h_phoE_[0]->Fill(aPho->energy());
1031 h_phoSigmaEoverE_[0]->Fill(aPho->getCorrectedEnergyError(aPho->getCandidateP4type()) / aPho->energy());
1032 h_phoEt_[0]->Fill(aPho->et());
1033 h_phoE_[iDet]->Fill(aPho->energy());
1034 h_phoSigmaEoverE_[iDet]->Fill(aPho->getCorrectedEnergyError(aPho->getCandidateP4type()) / aPho->energy());
1035 p_phoSigmaEoverEVsNVtx_[iDet]->Fill(
float(vtxH->size()),
1036 aPho->getCorrectedEnergyError(aPho->getCandidateP4type()) / aPho->energy());
1037 h_phoEt_[iDet]->Fill(aPho->et());
1039 h_phoEta_[0]->Fill(aPho->eta());
1040 h_phoPhi_[0]->Fill(aPho->phi());
1041 h_scEta_[0]->Fill(aPho->superCluster()->eta());
1042 h_scPhi_[0]->Fill(aPho->superCluster()->phi());
1043 h_phoEta_[iDet]->Fill(aPho->eta());
1044 h_phoPhi_[iDet]->Fill(aPho->phi());
1045 h_scEta_[iDet]->Fill(aPho->superCluster()->eta());
1046 h_scPhi_[iDet]->Fill(aPho->superCluster()->phi());
1048 h_r9_[0]->Fill(aPho->r9());
1049 h_e1x5_[0]->Fill(aPho->e1x5());
1050 h_e2x5_[0]->Fill(aPho->e2x5());
1051 h_r1x5_[0]->Fill(aPho->r1x5());
1052 h_r2x5_[0]->Fill(aPho->r2x5());
1053 h_phoSigmaIetaIeta_[0]->Fill(aPho->sigmaIetaIeta());
1055 h_r9_[iDet]->Fill(aPho->r9());
1056 h_e1x5_[iDet]->Fill(aPho->e1x5());
1057 h_e2x5_[iDet]->Fill(aPho->e2x5());
1058 h_r1x5_[iDet]->Fill(aPho->r1x5());
1059 h_r2x5_[iDet]->Fill(aPho->r2x5());
1060 h_phoSigmaIetaIeta_[iDet]->Fill(aPho->sigmaIetaIeta());
1062 h_nTrackIsolSolid_[0]->Fill(aPho->nTrkSolidConeDR04());
1063 h_nTrackIsolHollow_[0]->Fill(aPho->nTrkHollowConeDR04());
1064 h_trackPtSumSolid_[0]->Fill(aPho->trkSumPtSolidConeDR04());
1065 h_trackPtSumHollow_[0]->Fill(aPho->trkSumPtSolidConeDR04());
1066 h_nTrackIsolSolid_[iDet]->Fill(aPho->nTrkSolidConeDR04());
1067 h_nTrackIsolHollow_[iDet]->Fill(aPho->nTrkHollowConeDR04());
1068 h_trackPtSumSolid_[iDet]->Fill(aPho->trkSumPtSolidConeDR04());
1069 h_trackPtSumHollow_[iDet]->Fill(aPho->trkSumPtSolidConeDR04());
1071 h_ecalSum_[0]->Fill(aPho->ecalRecHitSumEtConeDR04());
1072 h_hcalSum_[0]->Fill(aPho->hcalTowerSumEtConeDR04());
1073 h_hOverE_[0]->Fill(aPho->hadTowOverEm());
1074 h_h1OverE_[0]->Fill(aPho->hadTowDepth1OverEm());
1075 h_h2OverE_[0]->Fill(aPho->hadTowDepth2OverEm());
1076 h_newhOverE_[0]->Fill(aPho->hadTowOverEm());
1077 h_ecalSum_[iDet]->Fill(aPho->ecalRecHitSumEtConeDR04());
1078 h_hcalSum_[iDet]->Fill(aPho->hcalTowerSumEtConeDR04());
1079 h_hOverE_[iDet]->Fill(aPho->hadTowOverEm());
1080 h_h1OverE_[iDet]->Fill(aPho->hadTowDepth1OverEm());
1081 h_h2OverE_[iDet]->Fill(aPho->hadTowDepth2OverEm());
1082 h_newhOverE_[iDet]->Fill(aPho->hadTowOverEm());
1084 h_chHadIso_[0]->Fill(aPho->chargedHadronIso());
1085 h_nHadIso_[0]->Fill(aPho->neutralHadronIso());
1086 h_phoIso_[0]->Fill(aPho->photonIso());
1087 h_nCluOutsideMustache_[0]->Fill(
float(aPho->nClusterOutsideMustache()));
1088 h_etOutsideMustache_[0]->Fill(aPho->etOutsideMustache());
1089 h_pfMva_[0]->Fill(aPho->pfMVA());
1090 h_chHadIso_[iDet]->Fill(aPho->chargedHadronIso());
1091 h_nHadIso_[iDet]->Fill(aPho->neutralHadronIso());
1092 h_phoIso_[iDet]->Fill(aPho->photonIso());
1093 h_nCluOutsideMustache_[iDet]->Fill(
float(aPho->nClusterOutsideMustache()));
1094 h_etOutsideMustache_[iDet]->Fill(aPho->etOutsideMustache());
1095 h_pfMva_[iDet]->Fill(aPho->pfMVA());
1098 if (fName_ ==
"zmumugammaGedValidation") {
1099 float SumPtIsoValCh = 0.;
1100 float SumPtIsoValNh = 0.;
1101 float SumPtIsoValPh = 0.;
1103 float SumPtIsoValCleanCh = 0.;
1104 float SumPtIsoValCleanNh = 0.;
1105 float SumPtIsoValCleanPh = 0.;
1107 for (
unsigned int lCand = 0; lCand < pfCandidateHandle->size(); lCand++) {
1109 float dR =
deltaR(aPho->eta(), aPho->phi(), pfCandRef->eta(), pfCandRef->phi());
1119 SumPtIsoValCh += pfCandRef->pt();
1120 h_dRPhoPFcand_ChHad_unCleaned_[0]->Fill(
dR);
1121 h_dRPhoPFcand_ChHad_unCleaned_[iDet]->Fill(
dR);
1124 SumPtIsoValNh += pfCandRef->pt();
1125 h_dRPhoPFcand_NeuHad_unCleaned_[0]->Fill(
dR);
1126 h_dRPhoPFcand_NeuHad_unCleaned_[iDet]->Fill(
dR);
1129 SumPtIsoValPh += pfCandRef->pt();
1130 h_dRPhoPFcand_Pho_unCleaned_[0]->Fill(
dR);
1131 h_dRPhoPFcand_Pho_unCleaned_[iDet]->Fill(
dR);
1135 for (std::vector<reco::PFCandidateRef>::const_iterator
i = phoToParticleBasedIsoMap[aPho].begin();
1136 i != phoToParticleBasedIsoMap[aPho].
end();
1139 if ((*
i) == pfCandRef) {
1147 SumPtIsoValCleanCh += pfCandRef->pt();
1148 h_dRPhoPFcand_ChHad_Cleaned_[0]->Fill(
dR);
1149 h_dRPhoPFcand_ChHad_Cleaned_[iDet]->Fill(
dR);
1152 SumPtIsoValCleanNh += pfCandRef->pt();
1153 h_dRPhoPFcand_NeuHad_Cleaned_[0]->Fill(
dR);
1154 h_dRPhoPFcand_NeuHad_Cleaned_[iDet]->Fill(
dR);
1157 SumPtIsoValCleanPh += pfCandRef->pt();
1158 h_dRPhoPFcand_Pho_Cleaned_[0]->Fill(
dR);
1159 h_dRPhoPFcand_Pho_Cleaned_[iDet]->Fill(
dR);
1164 h_SumPtOverPhoPt_ChHad_Cleaned_[0]->Fill(SumPtIsoValCleanCh / aPho->pt());
1165 h_SumPtOverPhoPt_NeuHad_Cleaned_[0]->Fill(SumPtIsoValCleanNh / aPho->pt());
1166 h_SumPtOverPhoPt_Pho_Cleaned_[0]->Fill(SumPtIsoValCleanPh / aPho->pt());
1167 h_SumPtOverPhoPt_ChHad_unCleaned_[0]->Fill(SumPtIsoValCh / aPho->pt());
1168 h_SumPtOverPhoPt_NeuHad_unCleaned_[0]->Fill(SumPtIsoValNh / aPho->pt());
1169 h_SumPtOverPhoPt_Pho_unCleaned_[0]->Fill(SumPtIsoValPh / aPho->pt());
1171 h_SumPtOverPhoPt_ChHad_Cleaned_[iDet]->Fill(SumPtIsoValCleanCh / aPho->pt());
1172 h_SumPtOverPhoPt_NeuHad_Cleaned_[iDet]->Fill(SumPtIsoValCleanNh / aPho->pt());
1173 h_SumPtOverPhoPt_Pho_Cleaned_[iDet]->Fill(SumPtIsoValCleanPh / aPho->pt());
1174 h_SumPtOverPhoPt_ChHad_unCleaned_[iDet]->Fill(SumPtIsoValCh / aPho->pt());
1175 h_SumPtOverPhoPt_NeuHad_unCleaned_[iDet]->Fill(SumPtIsoValNh / aPho->pt());
1176 h_SumPtOverPhoPt_Pho_unCleaned_[iDet]->Fill(SumPtIsoValPh / aPho->pt());
1179 if (makeProfiles_) {
1180 p_r9VsEt_[iDet]->Fill(aPho->et(), aPho->r9());
1181 p_r9VsEta_[0]->Fill(aPho->eta(), aPho->r9());
1182 p_e1x5VsEt_[iDet]->Fill(aPho->et(), aPho->e1x5());
1183 p_e1x5VsEta_[0]->Fill(aPho->eta(), aPho->e1x5());
1184 p_e2x5VsEt_[iDet]->Fill(aPho->et(), aPho->e2x5());
1185 p_e2x5VsEta_[0]->Fill(aPho->eta(), aPho->e2x5());
1186 p_r1x5VsEt_[iDet]->Fill(aPho->et(), aPho->r1x5());
1187 p_r1x5VsEta_[0]->Fill(aPho->eta(), aPho->r1x5());
1188 p_r2x5VsEt_[iDet]->Fill(aPho->et(), aPho->r2x5());
1189 p_r2x5VsEta_[0]->Fill(aPho->eta(), aPho->r2x5());
1191 p_sigmaIetaIetaVsEta_[0]->Fill(aPho->eta(), aPho->sigmaIetaIeta());
1192 p_nTrackIsolSolidVsEt_[iDet]->Fill(aPho->et(), aPho->nTrkSolidConeDR04());
1193 p_nTrackIsolSolidVsEta_[0]->Fill(aPho->eta(), aPho->nTrkSolidConeDR04());
1194 p_nTrackIsolHollowVsEt_[iDet]->Fill(aPho->et(), aPho->nTrkHollowConeDR04());
1195 p_nTrackIsolHollowVsEta_[0]->Fill(aPho->eta(), aPho->nTrkHollowConeDR04());
1196 p_trackPtSumSolidVsEt_[iDet]->Fill(aPho->et(), aPho->trkSumPtSolidConeDR04());
1197 p_trackPtSumSolidVsEta_[0]->Fill(aPho->eta(), aPho->trkSumPtSolidConeDR04());
1198 p_trackPtSumHollowVsEt_[iDet]->Fill(aPho->et(), aPho->trkSumPtHollowConeDR04());
1199 p_trackPtSumHollowVsEta_[0]->Fill(aPho->eta(), aPho->trkSumPtHollowConeDR04());
1201 p_ecalSumVsEt_[iDet]->Fill(aPho->et(), aPho->ecalRecHitSumEtConeDR04());
1202 p_ecalSumVsEta_[0]->Fill(aPho->eta(), aPho->ecalRecHitSumEtConeDR04());
1203 p_hcalSumVsEt_[iDet]->Fill(aPho->et(), aPho->hcalTowerSumEtConeDR04());
1204 p_hcalSumVsEta_[0]->Fill(aPho->eta(), aPho->hcalTowerSumEtConeDR04());
1205 p_hOverEVsEt_[iDet]->Fill(aPho->et(), aPho->hadTowOverEm());
1206 p_hOverEVsEta_[0]->Fill(aPho->eta(), aPho->hadTowOverEm());
1212 h2_r9VsEt_[iDet]->Fill(aPho->et(), aPho->r9());
1213 h2_r9VsEta_[0]->Fill(aPho->eta(), aPho->r9());
1214 h2_e1x5VsEt_[iDet]->Fill(aPho->et(), aPho->e1x5());
1215 h2_e1x5VsEta_[0]->Fill(aPho->eta(), aPho->e1x5());
1216 h2_e2x5VsEta_[0]->Fill(aPho->eta(), aPho->e2x5());
1217 h2_e2x5VsEt_[iDet]->Fill(aPho->et(), aPho->e2x5());
1218 h2_r1x5VsEta_[0]->Fill(aPho->eta(), aPho->r1x5());
1219 h2_r1x5VsEt_[iDet]->Fill(aPho->et(), aPho->r1x5());
1220 h2_r2x5VsEt_[iDet]->Fill(aPho->et(), aPho->r2x5());
1221 h2_r2x5VsEta_[0]->Fill(aPho->eta(), aPho->r2x5());
1222 h2_sigmaIetaIetaVsEta_[0]->Fill(aPho->eta(), aPho->sigmaIetaIeta());
1224 h2_nTrackIsolSolidVsEt_[0]->Fill(aPho->et(), aPho->nTrkSolidConeDR04());
1225 h2_nTrackIsolSolidVsEta_[0]->Fill(aPho->eta(), aPho->nTrkSolidConeDR04());
1226 h2_nTrackIsolHollowVsEt_[0]->Fill(aPho->et(), aPho->nTrkHollowConeDR04());
1227 h2_nTrackIsolHollowVsEta_[0]->Fill(aPho->eta(), aPho->nTrkHollowConeDR04());
1228 h2_trackPtSumSolidVsEt_[0]->Fill(aPho->et(), aPho->trkSumPtSolidConeDR04());
1229 h2_trackPtSumSolidVsEta_[0]->Fill(aPho->eta(), aPho->trkSumPtSolidConeDR04());
1230 h2_trackPtSumHollowVsEt_[0]->Fill(aPho->et(), aPho->trkSumPtHollowConeDR04());
1231 h2_trackPtSumHollowVsEta_[0]->Fill(aPho->eta(), aPho->trkSumPtHollowConeDR04());
1233 h2_ecalSumVsEt_[iDet]->Fill(aPho->et(), aPho->ecalRecHitSumEtConeDR04());
1234 h2_ecalSumVsEta_[0]->Fill(aPho->eta(), aPho->ecalRecHitSumEtConeDR04());
1235 h2_hcalSumVsEt_[iDet]->Fill(aPho->et(), aPho->hcalTowerSumEtConeDR04());
1236 h2_hcalSumVsEta_[0]->Fill(aPho->eta(), aPho->hcalTowerSumEtConeDR04());
1240 h_nPho_[0]->Fill(
float(nPho));
1241 h_nPho_[1]->Fill(
float(nPhoBarrel));
1242 h_nPho_[2]->Fill(
float(nPhoEndcap));
1249 if (!
mu.innerTrack().isNonnull())
1251 if (!
mu.globalTrack().isNonnull())
1253 if (!
mu.isGlobalMuon())
1255 if (
mu.pt() < muonMinPt_)
1257 if (fabs(
mu.eta()) > 2.4)
1262 if (
mu.innerTrack().isNonnull()) {
1263 pixHits =
mu.innerTrack()->hitPattern().numberOfValidPixelHits();
1264 tkHits =
mu.innerTrack()->hitPattern().numberOfValidStripHits();
1267 if (pixHits + tkHits < minPixStripHits_)
1275 if (
mu.globalTrack()->normalizedChi2() > muonMaxChi2_)
1277 if (fabs(
mu.globalTrack()->dxy(
beamSpot)) > muonMaxDxy_)
1279 if (
mu.numberOfMatches() < muonMatches_)
1282 if (
mu.track()->hitPattern().numberOfValidPixelHits() < validPixHits_)
1284 if (
mu.globalTrack()->hitPattern().numberOfValidMuonHits() < validMuonHits_)
1286 if (!
mu.isTrackerMuon())
1289 if (
mu.isolationR03().sumPt > muonTrackIso_)
1291 if (fabs(
mu.eta()) > muonTightEta_)
1299 if (pho->pt() < photonMinEt_)
1301 if (fabs(pho->eta()) > photonMaxEta_)
1303 if (pho->isEBEEGap())
1306 double EtCorrHcalIso = pho->hcalTowerSumEtConeDR03() - 0.005 * pho->pt();
1307 double EtCorrTrkIso = pho->trkSumPtHollowConeDR03() - 0.002 * pho->pt();
1309 if (pho->r9() <= 0.9) {
1310 if (pho->isEB() && (pho->hadTowOverEm() > 0.075 || pho->sigmaIetaIeta() > 0.014))
1312 if (pho->isEE() && (pho->hadTowOverEm() > 0.075 || pho->sigmaIetaIeta() > 0.034))
1315 if (EtCorrHcalIso > 4.0)
1317 if (EtCorrTrkIso > 4.0)
1319 if (pho->chargedHadronIso() > 4)
1322 if (pho->isEB() && (pho->hadTowOverEm() > 0.082 || pho->sigmaIetaIeta() > 0.014))
1324 if (pho->isEE() && (pho->hadTowOverEm() > 0.075 || pho->sigmaIetaIeta() > 0.034))
1327 if (EtCorrHcalIso > 50.0)
1329 if (EtCorrTrkIso > 50.0)
1331 if (pho->chargedHadronIso() > 4)
1339 float mumuMass2 = p12.Dot(p12);
1340 float invMass =
sqrt(mumuMass2);
1346 float Mass2 = p12.Dot(p12);
1347 float invMass =
sqrt(Mass2);