CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ZToMuMuGammaAnalyzer.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <iomanip>
3 //
4 
7 
8 
20 using namespace std;
21 
22 
24 {
25 
26  fName_ = pset.getUntrackedParameter<string>("Name");
27  verbosity_ = pset.getUntrackedParameter<int>("Verbosity");
28  prescaleFactor_ = pset.getUntrackedParameter<int>("prescaleFactor",1);
29  standAlone_ = pset.getParameter<bool>("standAlone");
30  outputFileName_ = pset.getParameter<string>("OutputFileName");
31  isHeavyIon_ = pset.getUntrackedParameter<bool>("isHeavyIon",false);
32  triggerEvent_ = pset.getParameter<edm::InputTag>("triggerEvent");
33  useTriggerFiltering_ = pset.getParameter<bool>("useTriggerFiltering");
34  splitHistosEBEE_ = pset.getParameter<bool>("splitHistosEBEE");
35  use2DHistos_ = pset.getParameter<bool>("use2DHistos");
36 
37  photonProducer_ = pset.getParameter<string>("phoProducer");
38  photonCollection_ = pset.getParameter<string>("photonCollection");
39 
40  barrelRecHitProducer_ = pset.getParameter<string>("barrelRecHitProducer");
41  barrelRecHitCollection_ = pset.getParameter<string>("barrelRecHitCollection");
42 
43  endcapRecHitProducer_ = pset.getParameter<string>("endcapRecHitProducer");
44  endcapRecHitCollection_ = pset.getParameter<string>("endcapRecHitCollection");
45 
46  muonProducer_ = pset.getParameter<string>("muonProducer");
47  muonCollection_ = pset.getParameter<string>("muonCollection");
48  // Muon selection
49  muonMinPt_ = pset.getParameter<double>("muonMinPt");
50  minPixStripHits_ = pset.getParameter<int>("minPixStripHits");
51  muonMaxChi2_ = pset.getParameter<double>("muonMaxChi2");
52  muonMaxDxy_ = pset.getParameter<double>("muonMaxDxy");
53  muonMatches_ = pset.getParameter<int>("muonMatches");
54  validPixHits_ = pset.getParameter<int>("validPixHits");
55  validMuonHits_ = pset.getParameter<int>("validMuonHits");
56  muonTrackIso_ = pset.getParameter<double>("muonTrackIso");
57  muonTightEta_ = pset.getParameter<double>("muonTightEta");
58  // Dimuon selection
59  minMumuInvMass_ = pset.getParameter<double>("minMumuInvMass");
60  maxMumuInvMass_ = pset.getParameter<double>("maxMumuInvMass");
61  // Photon selection
62  photonMinEt_ = pset.getParameter<double>("photonMinEt");
63  photonMaxEta_ = pset.getParameter<double>("photonMaxEta");
64  photonTrackIso_ = pset.getParameter<double>("photonTrackIso");
65  // mumuGamma selection
66  nearMuonDr_ = pset.getParameter<double>("nearMuonDr");
67  nearMuonHcalIso_ = pset.getParameter<double>("nearMuonHcalIso");
68  farMuonEcalIso_ = pset.getParameter<double>("farMuonEcalIso");
69  farMuonTrackIso_ = pset.getParameter<double>("farMuonTrackIso");
70  farMuonMinPt_ = pset.getParameter<double>("farMuonMinPt");
71  minMumuGammaInvMass_ = pset.getParameter<double>("minMumuGammaInvMass");
72  maxMumuGammaInvMass_ = pset.getParameter<double>("maxMumuGammaInvMass");
73 
74  parameters_ = pset;
75 
76 }
77 
79 
81 {
82  nEvt_=0;
83  nEntry_=0;
84 
85  dbe_ = 0;
87 
88  double eMin = parameters_.getParameter<double>("eMin");
89  double eMax = parameters_.getParameter<double>("eMax");
90  int eBin = parameters_.getParameter<int>("eBin");
91 
92  double etMin = parameters_.getParameter<double>("etMin");
93  double etMax = parameters_.getParameter<double>("etMax");
94  int etBin = parameters_.getParameter<int>("etBin");
95 
96  double sumMin = parameters_.getParameter<double>("sumMin");
97  double sumMax = parameters_.getParameter<double>("sumMax");
98  int sumBin = parameters_.getParameter<int>("sumBin");
99 
100  double etaMin = parameters_.getParameter<double>("etaMin");
101  double etaMax = parameters_.getParameter<double>("etaMax");
102  int etaBin = parameters_.getParameter<int>("etaBin");
103 
104  double phiMin = parameters_.getParameter<double>("phiMin");
105  double phiMax = parameters_.getParameter<double>("phiMax");
106  int phiBin = parameters_.getParameter<int>("phiBin");
107 
108  double r9Min = parameters_.getParameter<double>("r9Min");
109  double r9Max = parameters_.getParameter<double>("r9Max");
110  int r9Bin = parameters_.getParameter<int>("r9Bin");
111 
112  double hOverEMin = parameters_.getParameter<double>("hOverEMin");
113  double hOverEMax = parameters_.getParameter<double>("hOverEMax");
114  int hOverEBin = parameters_.getParameter<int>("hOverEBin");
115 
116 // double xMin = parameters_.getParameter<double>("xMin");
117 // double xMax = parameters_.getParameter<double>("xMax");
118 // int xBin = parameters_.getParameter<int>("xBin");
119 
120 // double yMin = parameters_.getParameter<double>("yMin");
121 // double yMax = parameters_.getParameter<double>("yMax");
122 // int yBin = parameters_.getParameter<int>("yBin");
123 
124  double numberMin = parameters_.getParameter<double>("numberMin");
125  double numberMax = parameters_.getParameter<double>("numberMax");
126  int numberBin = parameters_.getParameter<int>("numberBin");
127 
128 // double zMin = parameters_.getParameter<double>("zMin");
129 // double zMax = parameters_.getParameter<double>("zMax");
130 // int zBin = parameters_.getParameter<int>("zBin");
131 
132 // double rMin = parameters_.getParameter<double>("rMin");
133 // double rMax = parameters_.getParameter<double>("rMax");
134 // int rBin = parameters_.getParameter<int>("rBin");
135 
136 // double dPhiTracksMin = parameters_.getParameter<double>("dPhiTracksMin");
137 // double dPhiTracksMax = parameters_.getParameter<double>("dPhiTracksMax");
138 // int dPhiTracksBin = parameters_.getParameter<int>("dPhiTracksBin");
139 
140 // double dEtaTracksMin = parameters_.getParameter<double>("dEtaTracksMin");
141 // double dEtaTracksMax = parameters_.getParameter<double>("dEtaTracksMax");
142 // int dEtaTracksBin = parameters_.getParameter<int>("dEtaTracksBin");
143 
144  double sigmaIetaMin = parameters_.getParameter<double>("sigmaIetaMin");
145  double sigmaIetaMax = parameters_.getParameter<double>("sigmaIetaMax");
146  int sigmaIetaBin = parameters_.getParameter<int>("sigmaIetaBin");
147 
148 // double eOverPMin = parameters_.getParameter<double>("eOverPMin");
149 // double eOverPMax = parameters_.getParameter<double>("eOverPMax");
150 // int eOverPBin = parameters_.getParameter<int>("eOverPBin");
151 
152 // double chi2Min = parameters_.getParameter<double>("chi2Min");
153 // double chi2Max = parameters_.getParameter<double>("chi2Max");
154 // int chi2Bin = parameters_.getParameter<int>("chi2Bin");
155 
156 
157  int reducedEtBin = etBin/4;
158  int reducedEtaBin = etaBin/4;
159  int reducedSumBin = sumBin/4;
160  int reducedR9Bin = r9Bin/4;
161 
163 
164  if (dbe_) {
165 
166 
167  dbe_->setCurrentFolder("Egamma/PhotonAnalyzer/ZToMuMuGamma");
168 
169  h1_mumuInvMass_ = dbe_->book1D("mumuInvMass","Two muon invariant mass: M (GeV)",etBin,etMin,etMax);
170  h1_mumuGammaInvMass_ = dbe_->book1D("mumuGammaInvMass","Two-muon plus gamma invariant mass: M (GeV)",etBin,etMin,etMax);
171 
173 
175 
176  //ENERGY
177  h_phoE_ = dbe_->book1D("phoE","Energy;E (GeV)",eBin,eMin,eMax);
178  h_phoEt_ = dbe_->book1D("phoEt","E_{T};E_{T} (GeV)", etBin,etMin,etMax);
179 
180  //NUMBER OF PHOTONS
181  h_nPho_ = dbe_->book1D("nPho", "Number of Photons per Event;# #gamma", numberBin,numberMin,numberMax);
182 
183  //GEOMETRICAL
184  h_phoEta_ = dbe_->book1D("phoEta", "#eta;#eta",etaBin,etaMin,etaMax);
185  h_phoPhi_ = dbe_->book1D("phoPhi", "#phi;#phi",phiBin,phiMin,phiMax);
186 
187  h_scEta_ = dbe_->book1D("scEta", "SuperCluster #eta;#eta",etaBin,etaMin,etaMax);
188  h_scPhi_ = dbe_->book1D("scPhi", "SuperCluster #phi;#phi",phiBin,phiMin,phiMax);
189 
190  //SHOWER SHAPE
191  //r9
192  h_r9_ = dbe_->book1D("r9","R9;R9",r9Bin,r9Min, r9Max);
193 
194  //sigmaIetaIeta
195  h_phoSigmaIetaIeta_ = dbe_->book1D("phoSigmaIetaIeta","#sigma_{i#etai#eta};#sigma_{i#etai#eta}",sigmaIetaBin,sigmaIetaMin,sigmaIetaMax);
196 
197  //TRACK ISOLATION
198 
199  //nTrackIsolSolid
200  h_nTrackIsolSolid_ = dbe_->book1D("nIsoTracksSolid","Number Of Tracks in the Solid Iso Cone;# tracks",numberBin,numberMin,numberMax);
201 
202  //nTrackIsolHollow
203  h_nTrackIsolHollow_ = dbe_->book1D("nIsoTracksHollow","Number Of Tracks in the Hollow Iso Cone;# tracks",numberBin,numberMin,numberMax);
204 
205  //trackPtSumSolid
206  h_trackPtSumSolid_ = dbe_->book1D("isoPtSumSolid","Track P_{T} Sum in the Solid Iso Cone;P_{T} (GeV)",sumBin,sumMin,sumMax);
207 
208  //trackPtSumHollow
209  h_trackPtSumHollow_ = dbe_->book1D("isoPtSumHollow","Track P_{T} Sum in the Hollow Iso Cone;P_{T} (GeV)",sumBin,sumMin,sumMax);
210 
211  //CALORIMETER ISOLATION VARIABLES
212 
213  //ecal sum
214  h_ecalSum_ = dbe_->book1D("ecalSum","Ecal Sum in the Iso Cone;E (GeV)",sumBin,sumMin,sumMax);
215 
216  //hcal sum
217  h_hcalSum_ = dbe_->book1D("hcalSum","Hcal Sum in the Iso Cone;E (GeV)",sumBin,sumMin,sumMax);
218 
219  //h over e
220  h_hOverE_ = dbe_->book1D("hOverE","H/E;H/E",hOverEBin,hOverEMin,hOverEMax);
221  h_h1OverE_ = dbe_->book1D("h1OverE","H/E for Depth 1;H/E",hOverEBin,hOverEMin,hOverEMax);
222  h_h2OverE_ = dbe_->book1D("h2OverE","H/E for Depth 2;H/E",hOverEBin,hOverEMin,hOverEMax);
223 
224 
226 
227  if(use2DHistos_){
228 
229  //SHOWER SHAPE
230  //r9
231  h_r9VsEt_ = dbe_->book2D("r9VsEt2D","R9 vs E_{T};E_{T} (GeV);R9",reducedEtBin,etMin,etMax,reducedR9Bin,r9Min,r9Max);
232  p_r9VsEt_ = dbe_->bookProfile("r9VsEt","Avg R9 vs E_{T};E_{T} (GeV);R9",etBin,etMin,etMax,r9Bin,r9Min,r9Max);
233  h_r9VsEta_ = dbe_->book2D("r9VsEta2D","R9 vs #eta;#eta;R9",reducedEtaBin,etaMin,etaMax,reducedR9Bin,r9Min,r9Max);
234  p_r9VsEta_ = dbe_->bookProfile("r9VsEta","Avg R9 vs #eta;#eta;R9",etaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
235 
236  //sigmaIetaIeta
237  h_sigmaIetaIetaVsEta_ = dbe_->book2D("sigmaIetaIetaVsEta2D","#sigma_{i#etai#eta} vs #eta;#eta;#sigma_{i#etai#eta}",reducedEtaBin,etaMin,etaMax,sigmaIetaBin,sigmaIetaMin,sigmaIetaMax);
238  p_sigmaIetaIetaVsEta_ = dbe_->bookProfile("sigmaIetaIetaVsEta","Avg #sigma_{i#etai#eta} vs #eta;#eta;#sigma_{i#etai#eta}",etaBin,etaMin,etaMax,sigmaIetaBin,sigmaIetaMin,sigmaIetaMax);
239 
240  //e1x5
241  h_e1x5VsEt_ = dbe_->book2D("e1x5VsEt2D","E1x5 vs E_{T};E_{T} (GeV);E1X5 (GeV)",reducedEtBin,etMin,etMax,reducedEtBin,etMin,etMax);
242  p_e1x5VsEt_ = dbe_->bookProfile("e1x5VsEt","Avg E1x5 vs E_{T};E_{T} (GeV);E1X5 (GeV)",etBin,etMin,etMax,etBin,etMin,etMax);
243  h_e1x5VsEta_ = dbe_->book2D("e1x5VsEta2D","E1x5 vs #eta;#eta;E1X5 (GeV)",reducedEtaBin,etaMin,etaMax,reducedEtBin,etMin,etMax);
244  p_e1x5VsEta_ = dbe_->bookProfile("e1x5VsEta","Avg E1x5 vs #eta;#eta;E1X5 (GeV)",etaBin,etaMin,etaMax,etBin,etMin,etMax);
245 
246  //e2x5
247  h_e2x5VsEt_ = dbe_->book2D("e2x5VsEt2D","E2x5 vs E_{T};E_{T} (GeV);E2X5 (GeV)",reducedEtBin,etMin,etMax,reducedEtBin,etMin,etMax);
248  p_e2x5VsEt_ = dbe_->bookProfile("e2x5VsEt","Avg E2x5 vs E_{T};E_{T} (GeV);E2X5 (GeV)",etBin,etMin,etMax,etBin,etMin,etMax);
249  h_e2x5VsEta_ = dbe_->book2D("e2x5VsEta2D","E2x5 vs #eta;#eta;E2X5 (GeV)",reducedEtaBin,etaMin,etaMax,reducedEtBin,etMin,etMax);
250  p_e2x5VsEta_ = dbe_->bookProfile("e2x5VsEta","Avg E2x5 vs #eta;#eta;E2X5 (GeV)",etaBin,etaMin,etaMax,etBin,etMin,etMax);
251 
252  //r1x5
253  h_r1x5VsEt_ = dbe_->book2D("r1x5VsEt2D","R1x5 vs E_{T};E_{T} (GeV);R1X5",reducedEtBin,etMin,etMax,reducedR9Bin,r9Min,r9Max);
254  p_r1x5VsEt_ = dbe_->bookProfile("r1x5VsEt","Avg R1x5 vs E_{T};E_{T} (GeV);R1X5",etBin,etMin,etMax,r9Bin,r9Min,r9Max);
255  h_r1x5VsEta_ = dbe_->book2D("r1x5VsEta2D","R1x5 vs #eta;#eta;R1X5",reducedEtaBin,etaMin,etaMax,reducedR9Bin,r9Min,r9Max);
256  p_r1x5VsEta_ = dbe_->bookProfile("r1x5VsEta","Avg R1x5 vs #eta;#eta;R1X5",etaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
257 
258  //r2x5
259  h_r2x5VsEt_ = dbe_->book2D("r2x5VsEt2D","R2x5 vs E_{T};E_{T} (GeV);R2X5",reducedEtBin,etMin,etMax,reducedR9Bin,r9Min,r9Max);
260  p_r2x5VsEt_ = dbe_->bookProfile("r2x5VsEt","Avg R2x5 vs E_{T};E_{T} (GeV);R2X5",etBin,etMin,etMax,r9Bin,r9Min,r9Max);
261  h_r2x5VsEta_ = dbe_->book2D("r2x5VsEta2D","R2x5 vs #eta;#eta;R2X5",reducedEtaBin,etaMin,etaMax,reducedR9Bin,r9Min,r9Max);
262  p_r2x5VsEta_ = dbe_->bookProfile("r2x5VsEta","Avg R2x5 vs #eta;#eta;R2X5",etaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
263 
264  //maxEXtalOver3x3
265  h_maxEXtalOver3x3VsEt_ = dbe_->book2D("maxEXtalOver3x3VsEt2D","(Max Xtal E)/E3x3 vs E_{T};E_{T} (GeV);(Max Xtal E)/E3x3",reducedEtBin,etMin,etMax,r9Bin,r9Min,r9Max);
266  p_maxEXtalOver3x3VsEt_ = dbe_->bookProfile("maxEXtalOver3x3VsEt","Avg (Max Xtal E)/E3x3 vs E_{T};E_{T} (GeV);(Max Xtal E)/E3x3",etBin,etMin,etMax,r9Bin,r9Min,r9Max);
267  h_maxEXtalOver3x3VsEta_ = dbe_->book2D("maxEXtalOver3x3VsEta2D","(Max Xtal E)/E3x3 vs #eta;#eta;(Max Xtal E)/E3x3",reducedEtaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
268  p_maxEXtalOver3x3VsEta_ = dbe_->bookProfile("maxEXtalOver3x3VsEta","Avg (Max Xtal E)/E3x3 vs #eta;#eta;(Max Xtal E)/E3x3",etaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
269 
270  //TRACK ISOLATION
271 
272  //nTrackIsolSolid
273  h_nTrackIsolSolidVsEt_ = dbe_->book2D("nIsoTracksSolidVsEt2D","Number Of Tracks in the Solid Iso Cone vs E_{T};E_{T};# tracks",reducedEtBin,etMin, etMax,numberBin,numberMin,numberMax);
274  p_nTrackIsolSolidVsEt_ = dbe_->bookProfile("nIsoTracksSolidVsEt","Avg Number Of Tracks in the Solid Iso Cone vs E_{T};E_{T};# tracks",etBin,etMin,etMax,numberBin,numberMin,numberMax);
275  h_nTrackIsolSolidVsEta_ = dbe_->book2D("nIsoTracksSolidVsEta2D","Number Of Tracks in the Solid Iso Cone vs #eta;#eta;# tracks",reducedEtaBin,etaMin, etaMax,numberBin,numberMin,numberMax);
276  p_nTrackIsolSolidVsEta_ = dbe_->bookProfile("nIsoTracksSolidVsEta","Avg Number Of Tracks in the Solid Iso Cone vs #eta;#eta;# tracks",etaBin,etaMin, etaMax,numberBin,numberMin,numberMax);
277 
278  //nTrackIsolHollow
279  h_nTrackIsolHollowVsEt_ = dbe_->book2D("nIsoTracksHollowVsEt2D","Number Of Tracks in the Hollow Iso Cone vs E_{T};E_{T};# tracks",reducedEtBin,etMin, etMax,numberBin,numberMin,numberMax);
280  p_nTrackIsolHollowVsEt_ = dbe_->bookProfile("nIsoTracksHollowVsEt","Avg Number Of Tracks in the Hollow Iso Cone vs E_{T};E_{T};# tracks",etBin,etMin,etMax,numberBin,numberMin,numberMax);
281  h_nTrackIsolHollowVsEta_ = dbe_->book2D("nIsoTracksHollowVsEta2D","Number Of Tracks in the Hollow Iso Cone vs #eta;#eta;# tracks",reducedEtaBin,etaMin, etaMax,numberBin,numberMin,numberMax);
282  p_nTrackIsolHollowVsEta_ = dbe_->bookProfile("nIsoTracksHollowVsEta","Avg Number Of Tracks in the Hollow Iso Cone vs #eta;#eta;# tracks",etaBin,etaMin, etaMax,numberBin,numberMin,numberMax);
283 
284  //trackPtSumSolid
285  h_trackPtSumSolidVsEt_ = dbe_->book2D("isoPtSumSolidVsEt2D","Track P_{T} Sum in the Solid Iso Cone;E_{T} (GeV);P_{T} (GeV)",reducedEtBin,etMin, etMax,reducedSumBin,sumMin,sumMax);
286  p_trackPtSumSolidVsEt_ = dbe_->bookProfile("isoPtSumSolidVsEt","Avg Track P_{T} Sum in the Solid Iso Cone vs E_{T};E_{T} (GeV);P_{T} (GeV)",etBin,etMin,etMax,sumBin,sumMin,sumMax);
287  h_trackPtSumSolidVsEta_ = dbe_->book2D("isoPtSumSolidVsEta2D","Track P_{T} Sum in the Solid Iso Cone;#eta;P_{T} (GeV)",reducedEtaBin,etaMin, etaMax,reducedSumBin,sumMin,sumMax);
288  p_trackPtSumSolidVsEta_ = dbe_->bookProfile("isoPtSumSolidVsEta","Avg Track P_{T} Sum in the Solid Iso Cone vs #eta;#eta;P_{T} (GeV)",etaBin,etaMin, etaMax,sumBin,sumMin,sumMax);
289 
290  //trackPtSumHollow
291  h_trackPtSumHollowVsEt_ = dbe_->book2D("isoPtSumHollowVsEt2D","Track P_{T} Sum in the Hollow Iso Cone;E_{T} (GeV);P_{T} (GeV)",reducedEtBin,etMin, etMax,reducedSumBin,sumMin,sumMax);
292  p_trackPtSumHollowVsEt_ = dbe_->bookProfile("isoPtSumHollowVsEt","Avg Track P_{T} Sum in the Hollow Iso Cone vs E_{T};E_{T} (GeV);P_{T} (GeV)",etBin,etMin,etMax,sumBin,sumMin,sumMax);
293  h_trackPtSumHollowVsEta_ = dbe_->book2D("isoPtSumHollowVsEta2D","Track P_{T} Sum in the Hollow Iso Cone;#eta;P_{T} (GeV)",reducedEtaBin,etaMin, etaMax,reducedSumBin,sumMin,sumMax);
294  p_trackPtSumHollowVsEta_ = dbe_->bookProfile("isoPtSumHollowVsEta","Avg Track P_{T} Sum in the Hollow Iso Cone vs #eta;#eta;P_{T} (GeV)",etaBin,etaMin, etaMax,sumBin,sumMin,sumMax);
295 
296  //CALORIMETER ISOLATION VARIABLES
297 
298  //ecal sum
299  h_ecalSumVsEt_ = dbe_->book2D("ecalSumVsEt2D","Ecal Sum in the Iso Cone;E_{T} (GeV);E (GeV)",reducedEtBin,etMin, etMax,reducedSumBin,sumMin,sumMax);
300  p_ecalSumVsEt_ = dbe_->bookProfile("ecalSumVsEt","Avg Ecal Sum in the Iso Cone vs E_{T};E_{T} (GeV);E (GeV)",etBin,etMin, etMax,sumBin,sumMin,sumMax);
301  h_ecalSumVsEta_ = dbe_->book2D("ecalSumVsEta2D","Ecal Sum in the Iso Cone;#eta;E (GeV)",reducedEtaBin,etaMin, etaMax,reducedSumBin,sumMin,sumMax);
302  p_ecalSumVsEta_ = dbe_->bookProfile("ecalSumVsEta","Avg Ecal Sum in the Iso Cone vs #eta;#eta;E (GeV)",etaBin,etaMin, etaMax,sumBin,sumMin,sumMax);
303 
304  //hcal sum
305  h_hcalSumVsEt_ = dbe_->book2D("hcalSumVsEt2D","Hcal Sum in the Iso Cone;E_{T} (GeV);E (GeV)",reducedEtBin,etMin, etMax,reducedSumBin,sumMin,sumMax);
306  p_hcalSumVsEt_ = dbe_->bookProfile("hcalSumVsEt","Avg Hcal Sum in the Iso Cone vs E_{T};E_{T} (GeV);E (GeV)",etBin,etMin, etMax,sumBin,sumMin,sumMax);
307  h_hcalSumVsEta_ = dbe_->book2D("hcalSumVsEta2D","Hcal Sum in the Iso Cone;#eta;E (GeV)",reducedEtaBin,etaMin, etaMax,reducedSumBin,sumMin,sumMax);
308  p_hcalSumVsEta_ = dbe_->bookProfile("hcalSumVsEta","Avg Hcal Sum in the Iso Cone vs #eta;#eta;E (GeV)",etaBin,etaMin, etaMax,sumBin,sumMin,sumMax);
309 
310  //h over e
311  p_hOverEVsEt_ = dbe_->bookProfile("hOverEVsEt","Avg H/E vs Et;E_{T} (GeV);H/E",etBin,etMin,etMax,hOverEBin,hOverEMin,hOverEMax);
312  p_hOverEVsEta_ = dbe_->bookProfile("hOverEVsEta","Avg H/E vs #eta;#eta;H/E",etaBin,etaMin,etaMax,hOverEBin,hOverEMin,hOverEMax);
313 
314  }
315 
317 
318  if(splitHistosEBEE_){
319 
320  //EB ENERGY
321  h_phoEBarrel_ = dbe_->book1D("phoEBarrel","Energy for Barrel;E (GeV)",eBin,eMin,eMax);
322  h_phoEtBarrel_ = dbe_->book1D("phoEtBarrel","E_{T};E_{T} (GeV)", etBin,etMin,etMax);
323 
324  //EB NUMBER OF PHOTONS
325  h_nPhoBarrel_ = dbe_->book1D("nPhoBarrel","Number of Photons per Event;# #gamma", numberBin,numberMin,numberMax);
326 
327  //EB GEOMETRICAL
328  h_phoEtaBarrel_ = dbe_->book1D("phoEtaBarrel","#eta;#eta",etaBin,etaMin,etaMax);
329  h_phoPhiBarrel_ = dbe_->book1D("phoPhiBarrel","#phi;#phi",phiBin,phiMin,phiMax);
330 
331  h_scEtaBarrel_ = dbe_->book1D("scEtaBarrel","SuperCluster #eta;#eta",etaBin,etaMin,etaMax);
332  h_scPhiBarrel_ = dbe_->book1D("scPhiBarrel","SuperCluster #phi;#phi",phiBin,phiMin,phiMax);
333 
334  //EB SHOWER SHAPE
335  //EB r9
336  h_r9Barrel_ = dbe_->book1D("r9Barrel","R9;R9",r9Bin,r9Min, r9Max);
337  h_r9VsEtBarrel_ = dbe_->book2D("r9VsEt2DBarrel","R9 vs E_{T};E_{T} (GeV);R9",reducedEtBin,etMin,etMax,reducedR9Bin,r9Min,r9Max);
338  p_r9VsEtBarrel_ = dbe_->bookProfile("r9VsEtBarrel","Avg R9 vs E_{T};E_{T} (GeV);R9",etBin,etMin,etMax,r9Bin,r9Min,r9Max);
339  h_r9VsEtaBarrel_ = dbe_->book2D("r9VsEta2DBarrel","R9 vs #eta;#eta;R9",reducedEtaBin,etaMin,etaMax,reducedR9Bin,r9Min,r9Max);
340  p_r9VsEtaBarrel_ = dbe_->bookProfile("r9VsEtaBarrel","Avg R9 vs #eta;#eta;R9",etaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
341 
342  //EB sigmaIetaIeta
343  h_phoSigmaIetaIetaBarrel_ = dbe_->book1D("phoSigmaIetaIetaBarrel","#sigma_{i#etai#eta};#sigma_{i#etai#eta}",sigmaIetaBin,sigmaIetaMin,sigmaIetaMax);
344  h_sigmaIetaIetaVsEtaBarrel_ = dbe_->book2D("sigmaIetaIetaVsEta2DBarrel","#sigma_{i#etai#eta} vs #eta;#eta;#sigma_{i#etai#eta}",reducedEtaBin,etaMin,etaMax,sigmaIetaBin,sigmaIetaMin,sigmaIetaMax);
345  p_sigmaIetaIetaVsEtaBarrel_ = dbe_->bookProfile("sigmaIetaIetaVsEtaBarrel","Avg #sigma_{i#etai#eta} vs #eta;#eta;#sigma_{i#etai#eta}",etaBin,etaMin,etaMax,sigmaIetaBin,sigmaIetaMin,sigmaIetaMax);
346 
347  //EB e1x5
348  h_e1x5VsEtBarrel_ = dbe_->book2D("e1x5VsEt2DBarrel","E1x5 vs E_{T};E_{T} (GeV);E1X5 (GeV)",reducedEtBin,etMin,etMax,reducedEtBin,etMin,etMax);
349  p_e1x5VsEtBarrel_ = dbe_->bookProfile("e1x5VsEtBarrel","Avg E1x5 vs E_{T};E_{T} (GeV);E1X5 (GeV)",etBin,etMin,etMax,etBin,etMin,etMax);
350  h_e1x5VsEtaBarrel_ = dbe_->book2D("e1x5VsEta2DBarrel","E1x5 vs #eta;#eta;E1X5 (GeV)",reducedEtaBin,etaMin,etaMax,reducedEtBin,etMin,etMax);
351  p_e1x5VsEtaBarrel_ = dbe_->bookProfile("e1x5VsEtaBarrel","Avg E1x5 vs #eta;#eta;E1X5 (GeV)",etaBin,etaMin,etaMax,etBin,etMin,etMax);
352 
353  //EB e2x5
354  h_e2x5VsEtBarrel_ = dbe_->book2D("e2x5VsEt2DBarrel","E2x5 vs E_{T};E_{T} (GeV);E2X5 (GeV)",reducedEtBin,etMin,etMax,reducedEtBin,etMin,etMax);
355  p_e2x5VsEtBarrel_ = dbe_->bookProfile("e2x5VsEtBarrel","Avg E2x5 vs E_{T};E_{T} (GeV);E2X5 (GeV)",etBin,etMin,etMax,etBin,etMin,etMax);
356  h_e2x5VsEtaBarrel_ = dbe_->book2D("e2x5VsEta2DBarrel","E2x5 vs #eta;#eta;E2X5 (GeV)",reducedEtaBin,etaMin,etaMax,reducedEtBin,etMin,etMax);
357  p_e2x5VsEtaBarrel_ = dbe_->bookProfile("e2x5VsEtaBarrel","Avg E2x5 vs #eta;#eta;E2X5 (GeV)",etaBin,etaMin,etaMax,etBin,etMin,etMax);
358 
359  //EB r1x5
360  h_r1x5VsEtBarrel_ = dbe_->book2D("r1x5VsEt2DBarrel","R1x5 vs E_{T};E_{T} (GeV);R1X5",reducedEtBin,etMin,etMax,reducedR9Bin,r9Min,r9Max);
361  p_r1x5VsEtBarrel_ = dbe_->bookProfile("r1x5VsEtBarrel","Avg R1x5 vs E_{T};E_{T} (GeV);R1X5",etBin,etMin,etMax,r9Bin,r9Min,r9Max);
362  h_r1x5VsEtaBarrel_ = dbe_->book2D("r1x5VsEta2DBarrel","R1x5 vs #eta;#eta;R1X5",reducedEtaBin,etaMin,etaMax,reducedR9Bin,r9Min,r9Max);
363  p_r1x5VsEtaBarrel_ = dbe_->bookProfile("r1x5VsEtaBarrel","Avg R1x5 vs #eta;#eta;R1X5",etaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
364 
365  //EB r2x5
366  h_r2x5VsEtBarrel_ = dbe_->book2D("r2x5VsEt2DBarrel","R2x5 vs E_{T};E_{T} (GeV);R2X5",reducedEtBin,etMin,etMax,reducedR9Bin,r9Min,r9Max);
367  p_r2x5VsEtBarrel_ = dbe_->bookProfile("r2x5VsEtBarrel","Avg R2x5 vs E_{T};E_{T} (GeV);R2X5",etBin,etMin,etMax,r9Bin,r9Min,r9Max);
368  h_r2x5VsEtaBarrel_ = dbe_->book2D("r2x5VsEta2DBarrel","R2x5 vs #eta;#eta;R2X5",reducedEtaBin,etaMin,etaMax,reducedR9Bin,r9Min,r9Max);
369  p_r2x5VsEtaBarrel_ = dbe_->bookProfile("r2x5VsEtaBarrel","Avg R2x5 vs #eta;#eta;R2X5",etaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
370 
371  //EB maxEXtalOver3x3
372  h_maxEXtalOver3x3VsEtBarrel_ = dbe_->book2D("maxEXtalOver3x3VsEt2DBarrel","(Max Xtal E)/E3x3 vs E_{T};E_{T} (GeV);(Max Xtal E)/E3x3",reducedEtBin,etMin,etMax,r9Bin,r9Min,r9Max);
373  p_maxEXtalOver3x3VsEtBarrel_ = dbe_->bookProfile("maxEXtalOver3x3VsEtBarrel","Avg (Max Xtal E)/E3x3 vs E_{T};E_{T} (GeV);(Max Xtal E)/E3x3",etBin,etMin,etMax,r9Bin,r9Min,r9Max);
374  h_maxEXtalOver3x3VsEtaBarrel_ = dbe_->book2D("maxEXtalOver3x3VsEta2DBarrel","(Max Xtal E)/E3x3 vs #eta;#eta;(Max Xtal E)/E3x3",reducedEtaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
375  p_maxEXtalOver3x3VsEtaBarrel_ = dbe_->bookProfile("maxEXtalOver3x3VsEtaBarrel","Avg (Max Xtal E)/E3x3 vs #eta;#eta;(Max Xtal E)/E3x3",etaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
376 
377  //EB TRACK ISOLATION
378 
379  //EB nTrackIsolSolid
380  h_nTrackIsolSolidBarrel_ = dbe_->book1D("nIsoTracksSolidBarrel","Number Of Tracks in the Solid Iso Cone;# tracks",numberBin,numberMin,numberMax);
381  h_nTrackIsolSolidVsEtBarrel_ = dbe_->book2D("nIsoTracksSolidVsEt2DBarrel","Number Of Tracks in the Solid Iso Cone vs E_{T};E_{T};# tracks",reducedEtBin,etMin, etMax,numberBin,numberMin,numberMax);
382  p_nTrackIsolSolidVsEtBarrel_ = dbe_->bookProfile("nIsoTracksSolidVsEtBarrel","Avg Number Of Tracks in the Solid Iso Cone vs E_{T};E_{T};# tracks",etBin,etMin,etMax,numberBin,numberMin,numberMax);
383  h_nTrackIsolSolidVsEtaBarrel_ = dbe_->book2D("nIsoTracksSolidVsEta2DBarrel","Number Of Tracks in the Solid Iso Cone vs #eta;#eta;# tracks",reducedEtaBin,etaMin, etaMax,numberBin,numberMin,numberMax);
384  p_nTrackIsolSolidVsEtaBarrel_ = dbe_->bookProfile("nIsoTracksSolidVsEtaBarrel","Avg Number Of Tracks in the Solid Iso Cone vs #eta;#eta;# tracks",etaBin,etaMin, etaMax,numberBin,numberMin,numberMax);
385 
386  //EB nTrackIsolHollow
387  h_nTrackIsolHollowBarrel_ = dbe_->book1D("nIsoTracksHollowBarrel","Number Of Tracks in the Hollow Iso Cone;# tracks",numberBin,numberMin,numberMax);
388  h_nTrackIsolHollowVsEtBarrel_ = dbe_->book2D("nIsoTracksHollowVsEt2DBarrel","Number Of Tracks in the Hollow Iso Cone vs E_{T};E_{T};# tracks",reducedEtBin,etMin, etMax,numberBin,numberMin,numberMax);
389  p_nTrackIsolHollowVsEtBarrel_ = dbe_->bookProfile("nIsoTracksHollowVsEtBarrel","Avg Number Of Tracks in the Hollow Iso Cone vs E_{T};E_{T};# tracks",etBin,etMin,etMax,numberBin,numberMin,numberMax);
390  h_nTrackIsolHollowVsEtaBarrel_ = dbe_->book2D("nIsoTracksHollowVsEta2DBarrel","Number Of Tracks in the Hollow Iso Cone vs #eta;#eta;# tracks",reducedEtaBin,etaMin, etaMax,numberBin,numberMin,numberMax);
391  p_nTrackIsolHollowVsEtaBarrel_ = dbe_->bookProfile("nIsoTracksHollowVsEtaBarrel","Avg Number Of Tracks in the Hollow Iso Cone vs #eta;#eta;# tracks",etaBin,etaMin, etaMax,numberBin,numberMin,numberMax);
392 
393  //EB trackPtSumSolid
394  h_trackPtSumSolidBarrel_ = dbe_->book1D("isoPtSumSolidBarrel","Track P_{T} Sum in the Solid Iso Cone;P_{T} (GeV)",sumBin,sumMin,sumMax);
395  h_trackPtSumSolidVsEtBarrel_ = dbe_->book2D("isoPtSumSolidVsEt2DBarrel","Track P_{T} Sum in the Solid Iso Cone;E_{T} (GeV);P_{T} (GeV)",reducedEtBin,etMin, etMax,reducedSumBin,sumMin,sumMax);
396  p_trackPtSumSolidVsEtBarrel_ = dbe_->bookProfile("isoPtSumSolidVsEtBarrel","Avg Track P_{T} Sum in the Solid Iso Cone vs E_{T};E_{T} (GeV);P_{T} (GeV)",etBin,etMin,etMax,sumBin,sumMin,sumMax);
397  h_trackPtSumSolidVsEtaBarrel_ = dbe_->book2D("isoPtSumSolidVsEta2DBarrel","Track P_{T} Sum in the Solid Iso Cone;#eta;P_{T} (GeV)",reducedEtaBin,etaMin, etaMax,reducedSumBin,sumMin,sumMax);
398  p_trackPtSumSolidVsEtaBarrel_ = dbe_->bookProfile("isoPtSumSolidVsEtaBarrel","Avg Track P_{T} Sum in the Solid Iso Cone vs #eta;#eta;P_{T} (GeV)",etaBin,etaMin, etaMax,sumBin,sumMin,sumMax);
399 
400  //EB trackPtSumHollow
401  h_trackPtSumHollowBarrel_ = dbe_->book1D("isoPtSumHollowBarrel","Track P_{T} Sum in the Hollow Iso Cone;P_{T} (GeV)",sumBin,sumMin,sumMax);
402  h_trackPtSumHollowVsEtBarrel_ = dbe_->book2D("isoPtSumHollowVsEt2DBarrel","Track P_{T} Sum in the Hollow Iso Cone;E_{T} (GeV);P_{T} (GeV)",reducedEtBin,etMin, etMax,reducedSumBin,sumMin,sumMax);
403  p_trackPtSumHollowVsEtBarrel_ = dbe_->bookProfile("isoPtSumHollowVsEtBarrel","Avg Track P_{T} Sum in the Hollow Iso Cone vs E_{T};E_{T} (GeV);P_{T} (GeV)",etBin,etMin,etMax,sumBin,sumMin,sumMax);
404  h_trackPtSumHollowVsEtaBarrel_ = dbe_->book2D("isoPtSumHollowVsEta2DBarrel","Track P_{T} Sum in the Hollow Iso Cone;#eta;P_{T} (GeV)",reducedEtaBin,etaMin, etaMax,reducedSumBin,sumMin,sumMax);
405  p_trackPtSumHollowVsEtaBarrel_ = dbe_->bookProfile("isoPtSumHollowVsEtaBarrel","Avg Track P_{T} Sum in the Hollow Iso Cone vs #eta;#eta;P_{T} (GeV)",etaBin,etaMin, etaMax,sumBin,sumMin,sumMax);
406 
407  //EB CALORIMETER ISOLATION VARIABLES
408 
409  //EB ecal sum
410  h_ecalSumBarrel_ = dbe_->book1D("ecalSumBarrel","Ecal Sum in the Iso Cone;E (GeV)",sumBin,sumMin,sumMax);
411  h_ecalSumVsEtBarrel_ = dbe_->book2D("ecalSumVsEt2DBarrel","Ecal Sum in the Iso Cone;E_{T} (GeV);E (GeV)",reducedEtBin,etMin, etMax,reducedSumBin,sumMin,sumMax);
412  p_ecalSumVsEtBarrel_ = dbe_->bookProfile("ecalSumVsEtBarrel","Avg Ecal Sum in the Iso Cone vs E_{T};E_{T} (GeV);E (GeV)",etBin,etMin, etMax,sumBin,sumMin,sumMax);
413  h_ecalSumVsEtaBarrel_ = dbe_->book2D("ecalSumVsEta2DBarrel","Ecal Sum in the Iso Cone;#eta;E (GeV)",reducedEtaBin,etaMin, etaMax,reducedSumBin,sumMin,sumMax);
414  p_ecalSumVsEtaBarrel_ = dbe_->bookProfile("ecalSumVsEtaBarrel","Avg Ecal Sum in the Iso Cone vs #eta;#eta;E (GeV)",etaBin,etaMin, etaMax,sumBin,sumMin,sumMax);
415 
416  //EB hcal sum
417  h_hcalSumBarrel_ = dbe_->book1D("hcalSumBarrel","Hcal Sum in the Iso Cone;E (GeV)",sumBin,sumMin,sumMax);
418  h_hcalSumVsEtBarrel_ = dbe_->book2D("hcalSumVsEt2DBarrel","Hcal Sum in the Iso Cone;E_{T} (GeV);E (GeV)",reducedEtBin,etMin, etMax,reducedSumBin,sumMin,sumMax);
419  p_hcalSumVsEtBarrel_ = dbe_->bookProfile("hcalSumVsEtBarrel","Avg Hcal Sum in the Iso Cone vs E_{T};E_{T} (GeV);E (GeV)",etBin,etMin, etMax,sumBin,sumMin,sumMax);
420  h_hcalSumVsEtaBarrel_ = dbe_->book2D("hcalSumVsEta2DBarrel","Hcal Sum in the Iso Cone;#eta;E (GeV)",reducedEtaBin,etaMin, etaMax,reducedSumBin,sumMin,sumMax);
421  p_hcalSumVsEtaBarrel_ = dbe_->bookProfile("hcalSumVsEtaBarrel","Avg Hcal Sum in the Iso Cone vs #eta;#eta;E (GeV)",etaBin,etaMin, etaMax,sumBin,sumMin,sumMax);
422 
423  //EB h over e
424  h_hOverEBarrel_ = dbe_->book1D("hOverEBarrel","H/E;H/E",hOverEBin,hOverEMin,hOverEMax);
425  p_hOverEVsEtBarrel_ = dbe_->bookProfile("hOverEVsEtBarrel","Avg H/E vs Et;E_{T} (GeV);H/E",etBin,etMin,etMax,hOverEBin,hOverEMin,hOverEMax);
426  p_hOverEVsEtaBarrel_ = dbe_->bookProfile("hOverEVsEtaBarrel","Avg H/E vs #eta;#eta;H/E",etaBin,etaMin,etaMax,hOverEBin,hOverEMin,hOverEMax);
427  h_h1OverEBarrel_ = dbe_->book1D("h1OverEBarrel","H/E for Depth 1;H/E",hOverEBin,hOverEMin,hOverEMax);
428  h_h2OverEBarrel_ = dbe_->book1D("h2OverEBarrel","H/E for Depth 2;H/E",hOverEBin,hOverEMin,hOverEMax);
429 
430 
432 
433  //EE ENERGY
434  h_phoEtEndcap_ = dbe_->book1D("phoEtEndcap","E_{T};E_{T} (GeV)", etBin,etMin,etMax);
435  h_phoEEndcap_ = dbe_->book1D("phoEEndcap","Energy for Endcap;E (GeV)",eBin,eMin,eMax);
436 
437  //EE NUMBER OF PHOTONS
438  h_nPhoEndcap_ = dbe_->book1D("nPhoEndcap","Number of Photons per Event;# #gamma", numberBin,numberMin,numberMax);
439 
440  //EE GEOMETRICAL
441  h_phoEtaEndcap_ = dbe_->book1D("phoEtaEndcap","#eta;#eta",etaBin,etaMin,etaMax);
442  h_phoPhiEndcap_ = dbe_->book1D("phoPhiEndcap","#phi;#phi",phiBin,phiMin,phiMax);
443 
444  h_scEtaEndcap_ = dbe_->book1D("scEtaEndcap","SuperCluster #eta;#eta",etaBin,etaMin,etaMax);
445  h_scPhiEndcap_ = dbe_->book1D("scPhiEndcap","SuperCluster #phi;#phi",phiBin,phiMin,phiMax);
446 
447  //EE SHOWER SHAPE
448  //EE r9
449  h_r9Endcap_ = dbe_->book1D("r9Endcap","R9;R9",r9Bin,r9Min, r9Max);
450  h_r9VsEtEndcap_ = dbe_->book2D("r9VsEt2DEndcap","R9 vs E_{T};E_{T} (GeV);R9",reducedEtBin,etMin,etMax,reducedR9Bin,r9Min,r9Max);
451  p_r9VsEtEndcap_ = dbe_->bookProfile("r9VsEtEndcap","Avg R9 vs E_{T};E_{T} (GeV);R9",etBin,etMin,etMax,r9Bin,r9Min,r9Max);
452  h_r9VsEtaEndcap_ = dbe_->book2D("r9VsEta2DEndcap","R9 vs #eta;#eta;R9",reducedEtaBin,etaMin,etaMax,reducedR9Bin,r9Min,r9Max);
453  p_r9VsEtaEndcap_ = dbe_->bookProfile("r9VsEtaEndcap","Avg R9 vs #eta;#eta;R9",etaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
454 
455  //EE sigmaIetaIeta
456  h_phoSigmaIetaIetaEndcap_ = dbe_->book1D("phoSigmaIetaIetaEndcap","#sigma_{i#etai#eta};#sigma_{i#etai#eta}",sigmaIetaBin,sigmaIetaMin,sigmaIetaMax);
457  h_sigmaIetaIetaVsEtaEndcap_ = dbe_->book2D("sigmaIetaIetaVsEta2DEndcap","#sigma_{i#etai#eta} vs #eta;#eta;#sigma_{i#etai#eta}",reducedEtaBin,etaMin,etaMax,sigmaIetaBin,sigmaIetaMin,sigmaIetaMax);
458  p_sigmaIetaIetaVsEtaEndcap_ = dbe_->bookProfile("sigmaIetaIetaVsEtaEndcap","Avg #sigma_{i#etai#eta} vs #eta;#eta;#sigma_{i#etai#eta}",etaBin,etaMin,etaMax,sigmaIetaBin,sigmaIetaMin,sigmaIetaMax);
459 
460  //EE e1x5
461  h_e1x5VsEtEndcap_ = dbe_->book2D("e1x5VsEt2DEndcap","E1x5 vs E_{T};E_{T} (GeV);E1X5 (GeV)",reducedEtBin,etMin,etMax,reducedEtBin,etMin,etMax);
462  p_e1x5VsEtEndcap_ = dbe_->bookProfile("e1x5VsEtEndcap","Avg E1x5 vs E_{T};E_{T} (GeV);E1X5 (GeV)",etBin,etMin,etMax,etBin,etMin,etMax);
463  h_e1x5VsEtaEndcap_ = dbe_->book2D("e1x5VsEta2DEndcap","E1x5 vs #eta;#eta;E1X5 (GeV)",reducedEtaBin,etaMin,etaMax,reducedEtBin,etMin,etMax);
464  p_e1x5VsEtaEndcap_ = dbe_->bookProfile("e1x5VsEtaEndcap","Avg E1x5 vs #eta;#eta;E1X5 (GeV)",etaBin,etaMin,etaMax,etBin,etMin,etMax);
465 
466  //EE e2x5
467  h_e2x5VsEtEndcap_ = dbe_->book2D("e2x5VsEt2DEndcap","E2x5 vs E_{T};E_{T} (GeV);E2X5 (GeV)",reducedEtBin,etMin,etMax,reducedEtBin,etMin,etMax);
468  p_e2x5VsEtEndcap_ = dbe_->bookProfile("e2x5VsEtEndcap","Avg E2x5 vs E_{T};E_{T} (GeV);E2X5 (GeV)",etBin,etMin,etMax,etBin,etMin,etMax);
469  h_e2x5VsEtaEndcap_ = dbe_->book2D("e2x5VsEta2DEndcap","E2x5 vs #eta;#eta;E2X5 (GeV)",reducedEtaBin,etaMin,etaMax,reducedEtBin,etMin,etMax);
470  p_e2x5VsEtaEndcap_ = dbe_->bookProfile("e2x5VsEtaEndcap","Avg E2x5 vs #eta;#eta;E2X5 (GeV)",etaBin,etaMin,etaMax,etBin,etMin,etMax);
471 
472  //EE r1x5
473  h_r1x5VsEtEndcap_ = dbe_->book2D("r1x5VsEt2DEndcap","R1x5 vs E_{T};E_{T} (GeV);R1X5",reducedEtBin,etMin,etMax,reducedR9Bin,r9Min,r9Max);
474  p_r1x5VsEtEndcap_ = dbe_->bookProfile("r1x5VsEtEndcap","Avg R1x5 vs E_{T};E_{T} (GeV);R1X5",etBin,etMin,etMax,r9Bin,r9Min,r9Max);
475  h_r1x5VsEtaEndcap_ = dbe_->book2D("r1x5VsEta2DEndcap","R1x5 vs #eta;#eta;R1X5",reducedEtaBin,etaMin,etaMax,reducedR9Bin,r9Min,r9Max);
476  p_r1x5VsEtaEndcap_ = dbe_->bookProfile("r1x5VsEtaEndcap","Avg R1x5 vs #eta;#eta;R1X5",etaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
477 
478  //EE r2x5
479  h_r2x5VsEtEndcap_ = dbe_->book2D("r2x5VsEt2DEndcap","R2x5 vs E_{T};E_{T} (GeV);R2X5",reducedEtBin,etMin,etMax,reducedR9Bin,r9Min,r9Max);
480  p_r2x5VsEtEndcap_ = dbe_->bookProfile("r2x5VsEtEndcap","Avg R2x5 vs E_{T};E_{T} (GeV);R2X5",etBin,etMin,etMax,r9Bin,r9Min,r9Max);
481  h_r2x5VsEtaEndcap_ = dbe_->book2D("r2x5VsEta2DEndcap","R2x5 vs #eta;#eta;R2X5",reducedEtaBin,etaMin,etaMax,reducedR9Bin,r9Min,r9Max);
482  p_r2x5VsEtaEndcap_ = dbe_->bookProfile("r2x5VsEtaEndcap","Avg R2x5 vs #eta;#eta;R2X5",etaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
483 
484  //EE maxEXtalOver3x3
485  h_maxEXtalOver3x3VsEtEndcap_ = dbe_->book2D("maxEXtalOver3x3VsEt2DEndcap","(Max Xtal E)/E3x3 vs E_{T};E_{T} (GeV);(Max Xtal E)/E3x3",reducedEtBin,etMin,etMax,r9Bin,r9Min,r9Max);
486  p_maxEXtalOver3x3VsEtEndcap_ = dbe_->bookProfile("maxEXtalOver3x3VsEtEndcap","Avg (Max Xtal E)/E3x3 vs E_{T};E_{T} (GeV);(Max Xtal E)/E3x3",etBin,etMin,etMax,r9Bin,r9Min,r9Max);
487  h_maxEXtalOver3x3VsEtaEndcap_ = dbe_->book2D("maxEXtalOver3x3VsEta2DEndcap","(Max Xtal E)/E3x3 vs #eta;#eta;(Max Xtal E)/E3x3",reducedEtaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
488  p_maxEXtalOver3x3VsEtaEndcap_ = dbe_->bookProfile("maxEXtalOver3x3VsEtaEndcap","Avg (Max Xtal E)/E3x3 vs #eta;#eta;(Max Xtal E)/E3x3",etaBin,etaMin,etaMax,r9Bin,r9Min,r9Max);
489 
490  //EE TRACK ISOLATION
491 
492  //EE nTrackIsolSolid
493  h_nTrackIsolSolidEndcap_ = dbe_->book1D("nIsoTracksSolidEndcap","Number Of Tracks in the Solid Iso Cone;# tracks",numberBin,numberMin,numberMax);
494  h_nTrackIsolSolidVsEtEndcap_ = dbe_->book2D("nIsoTracksSolidVsEt2DEndcap","Number Of Tracks in the Solid Iso Cone vs E_{T};E_{T};# tracks",reducedEtBin,etMin, etMax,numberBin,numberMin,numberMax);
495  p_nTrackIsolSolidVsEtEndcap_ = dbe_->bookProfile("nIsoTracksSolidVsEtEndcap","Avg Number Of Tracks in the Solid Iso Cone vs E_{T};E_{T};# tracks",etBin,etMin,etMax,numberBin,numberMin,numberMax);
496  h_nTrackIsolSolidVsEtaEndcap_ = dbe_->book2D("nIsoTracksSolidVsEta2DEndcap","Number Of Tracks in the Solid Iso Cone vs #eta;#eta;# tracks",reducedEtaBin,etaMin, etaMax,numberBin,numberMin,numberMax);
497  p_nTrackIsolSolidVsEtaEndcap_ = dbe_->bookProfile("nIsoTracksSolidVsEtaEndcap","Avg Number Of Tracks in the Solid Iso Cone vs #eta;#eta;# tracks",etaBin,etaMin, etaMax,numberBin,numberMin,numberMax);
498 
499  //EE nTrackIsolHollow
500  h_nTrackIsolHollowEndcap_ = dbe_->book1D("nIsoTracksHollowEndcap","Number Of Tracks in the Hollow Iso Cone;# tracks",numberBin,numberMin,numberMax);
501  h_nTrackIsolHollowVsEtEndcap_ = dbe_->book2D("nIsoTracksHollowVsEt2DEndcap","Number Of Tracks in the Hollow Iso Cone vs E_{T};E_{T};# tracks",reducedEtBin,etMin, etMax,numberBin,numberMin,numberMax);
502  p_nTrackIsolHollowVsEtEndcap_ = dbe_->bookProfile("nIsoTracksHollowVsEtEndcap","Avg Number Of Tracks in the Hollow Iso Cone vs E_{T};E_{T};# tracks",etBin,etMin,etMax,numberBin,numberMin,numberMax);
503  h_nTrackIsolHollowVsEtaEndcap_ = dbe_->book2D("nIsoTracksHollowVsEta2DEndcap","Number Of Tracks in the Hollow Iso Cone vs #eta;#eta;# tracks",reducedEtaBin,etaMin, etaMax,numberBin,numberMin,numberMax);
504  p_nTrackIsolHollowVsEtaEndcap_ = dbe_->bookProfile("nIsoTracksHollowVsEtaEndcap","Avg Number Of Tracks in the Hollow Iso Cone vs #eta;#eta;# tracks",etaBin,etaMin, etaMax,numberBin,numberMin,numberMax);
505 
506  //EE trackPtSumSolid
507  h_trackPtSumSolidEndcap_ = dbe_->book1D("isoPtSumSolidEndcap","Track P_{T} Sum in the Solid Iso Cone;P_{T} (GeV)",sumBin,sumMin,sumMax);
508  h_trackPtSumSolidVsEtEndcap_ = dbe_->book2D("isoPtSumSolidVsEt2DEndcap","Track P_{T} Sum in the Solid Iso Cone;E_{T} (GeV);P_{T} (GeV)",reducedEtBin,etMin, etMax,reducedSumBin,sumMin,sumMax);
509  p_trackPtSumSolidVsEtEndcap_ = dbe_->bookProfile("isoPtSumSolidVsEtEndcap","Avg Track P_{T} Sum in the Solid Iso Cone vs E_{T};E_{T} (GeV);P_{T} (GeV)",etBin,etMin,etMax,sumBin,sumMin,sumMax);
510  h_trackPtSumSolidVsEtaEndcap_ = dbe_->book2D("isoPtSumSolidVsEta2DEndcap","Track P_{T} Sum in the Solid Iso Cone;#eta;P_{T} (GeV)",reducedEtaBin,etaMin, etaMax,reducedSumBin,sumMin,sumMax);
511  p_trackPtSumSolidVsEtaEndcap_ = dbe_->bookProfile("isoPtSumSolidVsEtaEndcap","Avg Track P_{T} Sum in the Solid Iso Cone vs #eta;#eta;P_{T} (GeV)",etaBin,etaMin, etaMax,sumBin,sumMin,sumMax);
512 
513  //EE trackPtSumHollow
514  h_trackPtSumHollowEndcap_ = dbe_->book1D("isoPtSumHollowEndcap","Track P_{T} Sum in the Hollow Iso Cone;P_{T} (GeV)",sumBin,sumMin,sumMax);
515  h_trackPtSumHollowVsEtEndcap_ = dbe_->book2D("isoPtSumHollowVsEt2DEndcap","Track P_{T} Sum in the Hollow Iso Cone;E_{T} (GeV);P_{T} (GeV)",reducedEtBin,etMin, etMax,reducedSumBin,sumMin,sumMax);
516  p_trackPtSumHollowVsEtEndcap_ = dbe_->bookProfile("isoPtSumHollowVsEtEndcap","Avg Track P_{T} Sum in the Hollow Iso Cone vs E_{T};E_{T} (GeV);P_{T} (GeV)",etBin,etMin,etMax,sumBin,sumMin,sumMax);
517  h_trackPtSumHollowVsEtaEndcap_ = dbe_->book2D("isoPtSumHollowVsEta2DEndcap","Track P_{T} Sum in the Hollow Iso Cone;#eta;P_{T} (GeV)",reducedEtaBin,etaMin, etaMax,reducedSumBin,sumMin,sumMax);
518  p_trackPtSumHollowVsEtaEndcap_ = dbe_->bookProfile("isoPtSumHollowVsEtaEndcap","Avg Track P_{T} Sum in the Hollow Iso Cone vs #eta;#eta;P_{T} (GeV)",etaBin,etaMin, etaMax,sumBin,sumMin,sumMax);
519 
520  //EE CALORIMETER ISOLATION VARIABLES
521 
522  //EE ecal sum
523  h_ecalSumEndcap_ = dbe_->book1D("ecalSumEndcap","Ecal Sum in the Iso Cone;E (GeV)",sumBin,sumMin,sumMax);
524  h_ecalSumVsEtEndcap_ = dbe_->book2D("ecalSumVsEt2DEndcap","Ecal Sum in the Iso Cone;E_{T} (GeV);E (GeV)",reducedEtBin,etMin, etMax,reducedSumBin,sumMin,sumMax);
525  p_ecalSumVsEtEndcap_ = dbe_->bookProfile("ecalSumVsEtEndcap","Avg Ecal Sum in the Iso Cone vs E_{T};E_{T} (GeV);E (GeV)",etBin,etMin, etMax,sumBin,sumMin,sumMax);
526  h_ecalSumVsEtaEndcap_ = dbe_->book2D("ecalSumVsEta2DEndcap","Ecal Sum in the Iso Cone;#eta;E (GeV)",reducedEtaBin,etaMin, etaMax,reducedSumBin,sumMin,sumMax);
527  p_ecalSumVsEtaEndcap_ = dbe_->bookProfile("ecalSumVsEtaEndcap","Avg Ecal Sum in the Iso Cone vs #eta;#eta;E (GeV)",etaBin,etaMin, etaMax,sumBin,sumMin,sumMax);
528 
529  //EE hcal sum
530  h_hcalSumEndcap_ = dbe_->book1D("hcalSumEndcap","Hcal Sum in the Iso Cone;E (GeV)",sumBin,sumMin,sumMax);
531  h_hcalSumVsEtEndcap_ = dbe_->book2D("hcalSumVsEt2DEndcap","Hcal Sum in the Iso Cone;E_{T} (GeV);E (GeV)",reducedEtBin,etMin, etMax,reducedSumBin,sumMin,sumMax);
532  p_hcalSumVsEtEndcap_ = dbe_->bookProfile("hcalSumVsEtEndcap","Avg Hcal Sum in the Iso Cone vs E_{T};E_{T} (GeV);E (GeV)",etBin,etMin, etMax,sumBin,sumMin,sumMax);
533  h_hcalSumVsEtaEndcap_ = dbe_->book2D("hcalSumVsEta2DEndcap","Hcal Sum in the Iso Cone;#eta;E (GeV)",reducedEtaBin,etaMin, etaMax,reducedSumBin,sumMin,sumMax);
534  p_hcalSumVsEtaEndcap_ = dbe_->bookProfile("hcalSumVsEtaEndcap","Avg Hcal Sum in the Iso Cone vs #eta;#eta;E (GeV)",etaBin,etaMin, etaMax,sumBin,sumMin,sumMax);
535 
536  //EE h over e
537  h_hOverEEndcap_ = dbe_->book1D("hOverEEndcap","H/E;H/E",hOverEBin,hOverEMin,hOverEMax);
538  p_hOverEVsEtEndcap_ = dbe_->bookProfile("hOverEVsEtEndcap","Avg H/E vs Et;E_{T} (GeV);H/E",etBin,etMin,etMax,hOverEBin,hOverEMin,hOverEMax);
539  p_hOverEVsEtaEndcap_ = dbe_->bookProfile("hOverEVsEtaEndcap","Avg H/E vs #eta;#eta;H/E",etaBin,etaMin,etaMax,hOverEBin,hOverEMin,hOverEMax);
540  h_h1OverEEndcap_ = dbe_->book1D("h1OverEEndcap","H/E for Depth 1;H/E",hOverEBin,hOverEMin,hOverEMax);
541  h_h2OverEEndcap_ = dbe_->book1D("h2OverEEndcap","H/E for Depth 2;H/E",hOverEBin,hOverEMin,hOverEMax);
542 
543  }//end if(splitHistosEBEE)
544 
545  }//end if(dbe_)
546 
547 }//end BeginJob
548 
550 {
551  using namespace edm;
552 
553  if (nEvt_% prescaleFactor_ ) return;
554  nEvt_++;
555  LogInfo("ZToMuMuGammaAnalyzer") << "ZToMuMuGammaAnalyzer Analyzing event number: " << e.id() << " Global Counter " << nEvt_ <<"\n";
556 
557  // Get the trigger results
558  bool validTriggerEvent=true;
559  edm::Handle<trigger::TriggerEvent> triggerEventHandle;
560  trigger::TriggerEvent triggerEvent;
561  e.getByLabel(triggerEvent_,triggerEventHandle);
562  if(!triggerEventHandle.isValid()) {
563  edm::LogInfo("PhotonAnalyzer") << "Error! Can't get the product "<< triggerEvent_.label() << endl;
564  validTriggerEvent=false;
565  }
566  if(validTriggerEvent) triggerEvent = *(triggerEventHandle.product());
567 
568  // Get the reconstructed photons
569  bool validPhotons=true;
570  Handle<reco::PhotonCollection> photonHandle;
571  reco::PhotonCollection photonCollection;
572  e.getByLabel(photonProducer_, photonCollection_ , photonHandle);
573  if ( !photonHandle.isValid()) {
574  edm::LogInfo("ZToMuMuGammaAnalyzer") << "Error! Can't get the product "<< photonCollection_ << endl;
575  validPhotons=false;
576  }
577  if(validPhotons) photonCollection = *(photonHandle.product());
578 
579  // Get the PhotonId objects
580  bool validloosePhotonID=true;
581  Handle<edm::ValueMap<bool> > loosePhotonFlag;
582  edm::ValueMap<bool> loosePhotonID;
583  e.getByLabel("PhotonIDProd", "PhotonCutBasedIDLoose", loosePhotonFlag);
584  if ( !loosePhotonFlag.isValid()) {
585  edm::LogInfo("ZToMuMuGammaAnalyzer") << "Error! Can't get the product "<< "PhotonCutBasedIDLoose" << endl;
586  validloosePhotonID=false;
587  }
588  if (validloosePhotonID) loosePhotonID = *(loosePhotonFlag.product());
589 
590  bool validtightPhotonID=true;
591  Handle<edm::ValueMap<bool> > tightPhotonFlag;
592  edm::ValueMap<bool> tightPhotonID;
593  e.getByLabel("PhotonIDProd", "PhotonCutBasedIDTight", tightPhotonFlag);
594  if ( !tightPhotonFlag.isValid()) {
595  edm::LogInfo("ZToMuMuGammaAnalyzer") << "Error! Can't get the product "<< "PhotonCutBasedIDTight" << endl;
596  validtightPhotonID=false;
597  }
598  if (validtightPhotonID) tightPhotonID = *(tightPhotonFlag.product());
599 
600  // Get the reconstructed muons
601  bool validMuons=true;
602  Handle<reco::MuonCollection> muonHandle;
603  reco::MuonCollection muonCollection;
604  e.getByLabel(muonProducer_, muonCollection_ , muonHandle);
605  if ( !muonHandle.isValid()) {
606  edm::LogInfo("ZToMuMuGammaAnalyzer") << "Error! Can't get the product "<< muonCollection_ << endl;
607  validMuons=false;
608  }
609  if(validMuons) muonCollection = *(muonHandle.product());
610 
611  // Get the beam spot
613  e.getByLabel("offlineBeamSpot", bsHandle);
614  if (!bsHandle.isValid()) {
615  edm::LogError("TrackerOnlyConversionProducer") << "Error! Can't get the product primary Vertex Collection "<< "\n";
616  return;
617  }
618  const reco::BeamSpot &thebs = *bsHandle.product();
619 
620  //Prepare list of photon-related HLT filter names
621  vector<int> Keys;
622  for(uint filterIndex=0;filterIndex<triggerEvent.sizeFilters();++filterIndex){ //loop over all trigger filters in event (i.e. filters passed)
623  string label = triggerEvent.filterTag(filterIndex).label();
624  if(label.find( "Photon" ) != string::npos ) { //get photon-related filters
625  for(uint filterKeyIndex=0;filterKeyIndex<triggerEvent.filterKeys(filterIndex).size();++filterKeyIndex){ //loop over keys to objects passing this filter
626  Keys.push_back(triggerEvent.filterKeys(filterIndex)[filterKeyIndex]); //add keys to a vector for later reference
627  }
628  }
629  }
630 
631  // sort Keys vector in ascending order
632  // and erases duplicate entries from the vector
633  sort(Keys.begin(),Keys.end());
634  for ( uint i=0 ; i<Keys.size() ; )
635  {
636  if (i!=(Keys.size()-1))
637  {
638  if (Keys[i]==Keys[i+1]) Keys.erase(Keys.begin()+i+1) ;
639  else ++i ;
640  }
641  else ++i ;
642  }
643 
644  //photon counters
645  int nPho = 0;
646  int nPhoBarrel = 0;
647  int nPhoEndcap = 0;
648 
650  if ( muonCollection.size() < 2 ) return;
651 
652  for( reco::MuonCollection::const_iterator iMu = muonCollection.begin(); iMu != muonCollection.end(); iMu++) {
653  if ( !basicMuonSelection (*iMu) ) continue;
654 
655  for( reco::MuonCollection::const_iterator iMu2 = iMu+1; iMu2 != muonCollection.end(); iMu2++) {
656  if ( !basicMuonSelection (*iMu2) ) continue;
657  if ( iMu->charge()*iMu2->charge() > 0) continue;
658 
659  if ( !muonSelection(*iMu,thebs) && !muonSelection(*iMu2,thebs) ) continue;
660 
661  float mumuMass = mumuInvMass(*iMu,*iMu2) ;
662  if ( mumuMass < minMumuInvMass_ || mumuMass > maxMumuInvMass_ ) continue;
663 
664  h1_mumuInvMass_ -> Fill (mumuMass);
665 
666  if ( photonCollection.size() < 1 ) continue;
667 
668  reco::Muon nearMuon;
669  reco::Muon farMuon;
670  for( reco::PhotonCollection::const_iterator iPho = photonCollection.begin(); iPho != photonCollection.end(); iPho++) {
671  if ( !photonSelection (*iPho) ) continue;
672 
674  double dr1 = deltaR(*iMu, *iPho);
675  double dr2 = deltaR(*iMu2,*iPho);
676  double drNear = dr1;
677  if (dr1 < dr2) {
678  nearMuon =*iMu ; farMuon = *iMu2; drNear = dr1;
679  } else {
680  nearMuon = *iMu2; farMuon = *iMu; drNear = dr2;
681  }
682 
683  if ( nearMuon.isolationR03().hadEt > nearMuonHcalIso_ ) continue;
684  if ( farMuon.isolationR03().sumPt > farMuonTrackIso_ ) continue;
685  if ( farMuon.isolationR03().emEt > farMuonEcalIso_ ) continue;
686  if ( farMuon.pt() < farMuonMinPt_ ) continue;
687  if ( drNear > nearMuonDr_) continue;
688 
689  float mumuGammaMass = mumuGammaInvMass(*iMu,*iMu2,*iPho) ;
690  if ( mumuGammaMass < minMumuGammaInvMass_ || mumuGammaMass > maxMumuGammaInvMass_ ) continue;
691 
692  //counter: number of photons
693  nPho++;
694 
695  //PHOTON RELATED HISTOGRAMS
696  h1_mumuGammaInvMass_ ->Fill (mumuGammaMass);
697 
698  //ENERGY
699  h_phoE_ ->Fill ((*iPho).energy());
700  h_phoEt_ ->Fill ((*iPho).et());
701 
702  //GEOMETRICAL
703  h_phoEta_ ->Fill ((*iPho).eta());
704  h_phoPhi_ ->Fill ((*iPho).phi());
705 
706  h_scEta_ ->Fill ((*iPho).superCluster()->eta());
707  h_scPhi_ ->Fill ((*iPho).superCluster()->phi());
708 
709  //SHOWER SHAPE
710  h_r9_ ->Fill ((*iPho).r9());
711 
712  h_phoSigmaIetaIeta_ ->Fill((*iPho).sigmaIetaIeta());
713 
714  //TRACK ISOLATION
715 
716  h_nTrackIsolSolid_ ->Fill((*iPho).nTrkSolidConeDR04());
717 
718  h_nTrackIsolHollow_ ->Fill((*iPho).nTrkHollowConeDR04());
719 
720  h_trackPtSumSolid_ ->Fill((*iPho).trkSumPtSolidConeDR04());
721 
722  h_trackPtSumHollow_ ->Fill((*iPho).trkSumPtSolidConeDR04());
723 
724  //CALORIMETER ISOLATION
725 
726  h_ecalSum_ ->Fill((*iPho).ecalRecHitSumEtConeDR04());
727 
728  h_hcalSum_ ->Fill((*iPho).hcalTowerSumEtConeDR04());
729 
730  h_hOverE_ ->Fill((*iPho).hadTowOverEm());
731  h_h1OverE_ ->Fill((*iPho).hadTowDepth1OverEm());
732  h_h2OverE_ ->Fill((*iPho).hadTowDepth2OverEm());
733 
734 
736 
737  if(use2DHistos_){
738 
739  //SHOWER SHAPE
740  h_r9VsEt_ ->Fill ((*iPho).et(),(*iPho).r9());
741  p_r9VsEt_ ->Fill ((*iPho).et(),(*iPho).r9());
742  h_r9VsEta_->Fill ((*iPho).eta(),(*iPho).r9());
743  p_r9VsEta_->Fill ((*iPho).eta(),(*iPho).r9());
744 
745  h_e1x5VsEta_->Fill((*iPho).eta(),(*iPho).e1x5());
746  p_e1x5VsEta_->Fill((*iPho).eta(),(*iPho).e1x5());
747  h_e1x5VsEt_ ->Fill((*iPho).et(), (*iPho).e1x5());
748  p_e1x5VsEt_ ->Fill((*iPho).et(), (*iPho).e1x5());
749 
750  h_e2x5VsEta_->Fill((*iPho).eta(),(*iPho).e2x5());
751  p_e2x5VsEta_->Fill((*iPho).eta(),(*iPho).e2x5());
752  h_e2x5VsEt_ ->Fill((*iPho).et(), (*iPho).e2x5());
753  p_e2x5VsEt_ ->Fill((*iPho).et(), (*iPho).e2x5());
754 
755  h_r1x5VsEta_->Fill((*iPho).eta(),(*iPho).r1x5());
756  p_r1x5VsEta_->Fill((*iPho).eta(),(*iPho).r1x5());
757  h_r1x5VsEt_ ->Fill((*iPho).et(), (*iPho).r1x5());
758  p_r1x5VsEt_ ->Fill((*iPho).et(), (*iPho).r1x5());
759 
760  h_r2x5VsEta_->Fill((*iPho).eta(),(*iPho).r2x5());
761  p_r2x5VsEta_->Fill((*iPho).eta(),(*iPho).r2x5());
762  h_r2x5VsEt_ ->Fill((*iPho).et(), (*iPho).r2x5());
763  p_r2x5VsEt_ ->Fill((*iPho).et(), (*iPho).r2x5());
764 
765  h_maxEXtalOver3x3VsEta_->Fill((*iPho).eta(),(*iPho).maxEnergyXtal()/(*iPho).e3x3());
766  p_maxEXtalOver3x3VsEta_->Fill((*iPho).eta(),(*iPho).maxEnergyXtal()/(*iPho).e3x3());
767  h_maxEXtalOver3x3VsEt_ ->Fill((*iPho).et(), (*iPho).maxEnergyXtal()/(*iPho).e3x3());
768  p_maxEXtalOver3x3VsEt_ ->Fill((*iPho).et(), (*iPho).maxEnergyXtal()/(*iPho).e3x3());
769 
770  h_sigmaIetaIetaVsEta_ ->Fill((*iPho).eta(),(*iPho).sigmaIetaIeta());
771  p_sigmaIetaIetaVsEta_ ->Fill((*iPho).eta(),(*iPho).sigmaIetaIeta());
772 
773  //TRACK ISOLATION
774  h_nTrackIsolSolidVsEt_ ->Fill((*iPho).et(), (*iPho).nTrkSolidConeDR04());
775  p_nTrackIsolSolidVsEt_ ->Fill((*iPho).et(), (*iPho).nTrkSolidConeDR04());
776  h_nTrackIsolSolidVsEta_ ->Fill((*iPho).eta(),(*iPho).nTrkSolidConeDR04());
777  p_nTrackIsolSolidVsEta_ ->Fill((*iPho).eta(),(*iPho).nTrkSolidConeDR04());
778 
779  h_nTrackIsolHollowVsEt_ ->Fill((*iPho).et(), (*iPho).nTrkHollowConeDR04());
780  p_nTrackIsolHollowVsEt_ ->Fill((*iPho).et(), (*iPho).nTrkHollowConeDR04());
781  h_nTrackIsolHollowVsEta_ ->Fill((*iPho).eta(),(*iPho).nTrkHollowConeDR04());
782  p_nTrackIsolHollowVsEta_ ->Fill((*iPho).eta(),(*iPho).nTrkHollowConeDR04());
783 
784  h_trackPtSumSolidVsEt_ ->Fill((*iPho).et(), (*iPho).trkSumPtSolidConeDR04());
785  p_trackPtSumSolidVsEt_ ->Fill((*iPho).et(), (*iPho).trkSumPtSolidConeDR04());
786  h_trackPtSumSolidVsEta_ ->Fill((*iPho).eta(),(*iPho).trkSumPtSolidConeDR04());
787  p_trackPtSumSolidVsEta_ ->Fill((*iPho).eta(),(*iPho).trkSumPtSolidConeDR04());
788 
789  h_trackPtSumHollowVsEt_ ->Fill((*iPho).et(), (*iPho).trkSumPtHollowConeDR04());
790  p_trackPtSumHollowVsEt_ ->Fill((*iPho).et(), (*iPho).trkSumPtHollowConeDR04());
791  h_trackPtSumHollowVsEta_ ->Fill((*iPho).eta(),(*iPho).trkSumPtHollowConeDR04());
792  p_trackPtSumHollowVsEta_ ->Fill((*iPho).eta(),(*iPho).trkSumPtHollowConeDR04());
793 
794  //CALORIMETER ISOLATION
795  h_ecalSumVsEt_ ->Fill((*iPho).et(), (*iPho).ecalRecHitSumEtConeDR04());
796  p_ecalSumVsEt_ ->Fill((*iPho).et(), (*iPho).ecalRecHitSumEtConeDR04());
797  h_ecalSumVsEta_ ->Fill((*iPho).eta(),(*iPho).ecalRecHitSumEtConeDR04());
798  p_ecalSumVsEta_ ->Fill((*iPho).eta(),(*iPho).ecalRecHitSumEtConeDR04());
799 
800  h_hcalSumVsEt_ ->Fill((*iPho).et(), (*iPho).hcalTowerSumEtConeDR04());
801  p_hcalSumVsEt_ ->Fill((*iPho).et(), (*iPho).hcalTowerSumEtConeDR04());
802  h_hcalSumVsEta_ ->Fill((*iPho).eta(),(*iPho).hcalTowerSumEtConeDR04());
803  p_hcalSumVsEta_ ->Fill((*iPho).eta(),(*iPho).hcalTowerSumEtConeDR04());
804 
805  p_hOverEVsEt_ ->Fill((*iPho).et(), (*iPho).hadTowOverEm());
806  p_hOverEVsEta_ ->Fill((*iPho).eta(),(*iPho).hadTowOverEm());
807 
808  }
809 
810 
812 
813  if(iPho->isEB() && splitHistosEBEE_){
814  //EB photon counter
815  nPhoBarrel++;
816 
817  //EB ENERGY
818  h_phoEBarrel_ ->Fill ((*iPho).energy());
819  h_phoEtBarrel_ ->Fill ((*iPho).et());
820 
821  //EB GEOMETRICAL
822  h_phoEtaBarrel_ ->Fill ((*iPho).eta());
823  h_phoPhiBarrel_ ->Fill ((*iPho).phi());
824 
825  h_scEtaBarrel_ ->Fill ((*iPho).superCluster()->eta());
826  h_scPhiBarrel_ ->Fill ((*iPho).superCluster()->phi());
827 
828  //EB SHOWER SHAPE
829  h_r9Barrel_ ->Fill ((*iPho).r9());
830  h_r9VsEtBarrel_ ->Fill ((*iPho).et(),(*iPho).r9());
831  p_r9VsEtBarrel_ ->Fill ((*iPho).et(),(*iPho).r9());
832  h_r9VsEtaBarrel_ ->Fill ((*iPho).eta(),(*iPho).r9());
833  p_r9VsEtaBarrel_ ->Fill ((*iPho).eta(),(*iPho).r9());
834 
835  h_e1x5VsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).e1x5());
836  p_e1x5VsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).e1x5());
837  h_e1x5VsEtBarrel_ ->Fill((*iPho).et(), (*iPho).e1x5());
838  p_e1x5VsEtBarrel_ ->Fill((*iPho).et(), (*iPho).e1x5());
839 
840  h_e2x5VsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).e2x5());
841  p_e2x5VsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).e2x5());
842  h_e2x5VsEtBarrel_ ->Fill((*iPho).et(), (*iPho).e2x5());
843  p_e2x5VsEtBarrel_ ->Fill((*iPho).et(), (*iPho).e2x5());
844 
845  h_r1x5VsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).r1x5());
846  p_r1x5VsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).r1x5());
847  h_r1x5VsEtBarrel_ ->Fill((*iPho).et(), (*iPho).r1x5());
848  p_r1x5VsEtBarrel_ ->Fill((*iPho).et(), (*iPho).r1x5());
849 
850  h_r2x5VsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).r2x5());
851  p_r2x5VsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).r2x5());
852  h_r2x5VsEtBarrel_ ->Fill((*iPho).et(), (*iPho).r2x5());
853  p_r2x5VsEtBarrel_ ->Fill((*iPho).et(), (*iPho).r2x5());
854 
855  h_maxEXtalOver3x3VsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).maxEnergyXtal()/(*iPho).e3x3());
856  p_maxEXtalOver3x3VsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).maxEnergyXtal()/(*iPho).e3x3());
857  h_maxEXtalOver3x3VsEtBarrel_ ->Fill((*iPho).et(), (*iPho).maxEnergyXtal()/(*iPho).e3x3());
858  p_maxEXtalOver3x3VsEtBarrel_ ->Fill((*iPho).et(), (*iPho).maxEnergyXtal()/(*iPho).e3x3());
859 
860  h_phoSigmaIetaIetaBarrel_ ->Fill((*iPho).sigmaIetaIeta());
861  h_sigmaIetaIetaVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).sigmaIetaIeta());
862  p_sigmaIetaIetaVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).sigmaIetaIeta());
863 
864  //EB TRACK ISOLATION
865 
866  h_nTrackIsolSolidBarrel_ ->Fill((*iPho).nTrkSolidConeDR04());
867  h_nTrackIsolSolidVsEtBarrel_ ->Fill((*iPho).et(), (*iPho).nTrkSolidConeDR04());
868  p_nTrackIsolSolidVsEtBarrel_ ->Fill((*iPho).et(), (*iPho).nTrkSolidConeDR04());
869  h_nTrackIsolSolidVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).nTrkSolidConeDR04());
870  p_nTrackIsolSolidVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).nTrkSolidConeDR04());
871 
872  h_nTrackIsolHollowBarrel_ ->Fill((*iPho).nTrkHollowConeDR04());
873  h_nTrackIsolHollowVsEtBarrel_ ->Fill((*iPho).et(), (*iPho).nTrkHollowConeDR04());
874  p_nTrackIsolHollowVsEtBarrel_ ->Fill((*iPho).et(), (*iPho).nTrkHollowConeDR04());
875  h_nTrackIsolHollowVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).nTrkHollowConeDR04());
876  p_nTrackIsolHollowVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).nTrkHollowConeDR04());
877 
878  h_trackPtSumSolidBarrel_ ->Fill((*iPho).trkSumPtSolidConeDR04());
879  h_trackPtSumSolidVsEtBarrel_ ->Fill((*iPho).et(), (*iPho).trkSumPtSolidConeDR04());
880  p_trackPtSumSolidVsEtBarrel_ ->Fill((*iPho).et(), (*iPho).trkSumPtSolidConeDR04());
881  h_trackPtSumSolidVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).trkSumPtSolidConeDR04());
882  p_trackPtSumSolidVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).trkSumPtSolidConeDR04());
883 
884  h_trackPtSumHollowBarrel_ ->Fill((*iPho).trkSumPtSolidConeDR04());
885  h_trackPtSumHollowVsEtBarrel_ ->Fill((*iPho).et(), (*iPho).trkSumPtHollowConeDR04());
886  p_trackPtSumHollowVsEtBarrel_ ->Fill((*iPho).et(), (*iPho).trkSumPtHollowConeDR04());
887  h_trackPtSumHollowVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).trkSumPtHollowConeDR04());
888  p_trackPtSumHollowVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).trkSumPtHollowConeDR04());
889 
890  //EB CALORIMETER ISOLATION
891 
892  h_ecalSumBarrel_ ->Fill((*iPho).ecalRecHitSumEtConeDR04());
893  h_ecalSumVsEtBarrel_ ->Fill((*iPho).et(), (*iPho).ecalRecHitSumEtConeDR04());
894  p_ecalSumVsEtBarrel_ ->Fill((*iPho).et(), (*iPho).ecalRecHitSumEtConeDR04());
895  h_ecalSumVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).ecalRecHitSumEtConeDR04());
896  p_ecalSumVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).ecalRecHitSumEtConeDR04());
897 
898  h_hcalSumBarrel_ ->Fill((*iPho).hcalTowerSumEtConeDR04());
899  h_hcalSumVsEtBarrel_ ->Fill((*iPho).et(), (*iPho).hcalTowerSumEtConeDR04());
900  p_hcalSumVsEtBarrel_ ->Fill((*iPho).et(), (*iPho).hcalTowerSumEtConeDR04());
901  h_hcalSumVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).hcalTowerSumEtConeDR04());
902  p_hcalSumVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).hcalTowerSumEtConeDR04());
903 
904  h_hOverEBarrel_ ->Fill((*iPho).hadTowOverEm());
905  p_hOverEVsEtBarrel_ ->Fill((*iPho).et(), (*iPho).hadTowOverEm());
906  p_hOverEVsEtaBarrel_ ->Fill((*iPho).eta(),(*iPho).hadTowOverEm());
907  h_h1OverEBarrel_ ->Fill((*iPho).hadTowDepth1OverEm());
908  h_h2OverEBarrel_ ->Fill((*iPho).hadTowDepth2OverEm());
909 
910  }
911 
913 
914  if(iPho->isEE() && splitHistosEBEE_){
915  //EE photon counter
916  nPhoEndcap++;
917 
918  //EE ENERGY
919  h_phoEEndcap_ ->Fill ((*iPho).energy());
920  h_phoEtEndcap_ ->Fill ((*iPho).et());
921 
922  //EE GEOMETRICAL
923  h_phoEtaEndcap_ ->Fill ((*iPho).eta());
924  h_phoPhiEndcap_ ->Fill ((*iPho).phi());
925 
926  h_scEtaEndcap_ ->Fill ((*iPho).superCluster()->eta());
927  h_scPhiEndcap_ ->Fill ((*iPho).superCluster()->phi());
928 
929  //EE SHOWER SHAPE
930  h_r9Endcap_ ->Fill ((*iPho).r9());
931  h_r9VsEtEndcap_ ->Fill ((*iPho).et(),(*iPho).r9());
932  p_r9VsEtEndcap_ ->Fill ((*iPho).et(),(*iPho).r9());
933  h_r9VsEtaEndcap_ ->Fill ((*iPho).eta(),(*iPho).r9());
934  p_r9VsEtaEndcap_ ->Fill ((*iPho).eta(),(*iPho).r9());
935 
936  h_e1x5VsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).e1x5());
937  p_e1x5VsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).e1x5());
938  h_e1x5VsEtEndcap_ ->Fill((*iPho).et(), (*iPho).e1x5());
939  p_e1x5VsEtEndcap_ ->Fill((*iPho).et(), (*iPho).e1x5());
940 
941  h_e2x5VsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).e2x5());
942  p_e2x5VsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).e2x5());
943  h_e2x5VsEtEndcap_ ->Fill((*iPho).et(), (*iPho).e2x5());
944  p_e2x5VsEtEndcap_ ->Fill((*iPho).et(), (*iPho).e2x5());
945 
946  h_r1x5VsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).r1x5());
947  p_r1x5VsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).r1x5());
948  h_r1x5VsEtEndcap_ ->Fill((*iPho).et(), (*iPho).r1x5());
949  p_r1x5VsEtEndcap_ ->Fill((*iPho).et(), (*iPho).r1x5());
950 
951  h_r2x5VsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).r2x5());
952  p_r2x5VsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).r2x5());
953  h_r2x5VsEtEndcap_ ->Fill((*iPho).et(), (*iPho).r2x5());
954  p_r2x5VsEtEndcap_ ->Fill((*iPho).et(), (*iPho).r2x5());
955 
956  h_maxEXtalOver3x3VsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).maxEnergyXtal()/(*iPho).e3x3());
957  p_maxEXtalOver3x3VsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).maxEnergyXtal()/(*iPho).e3x3());
958  h_maxEXtalOver3x3VsEtEndcap_ ->Fill((*iPho).et(), (*iPho).maxEnergyXtal()/(*iPho).e3x3());
959  p_maxEXtalOver3x3VsEtEndcap_ ->Fill((*iPho).et(), (*iPho).maxEnergyXtal()/(*iPho).e3x3());
960 
961  h_phoSigmaIetaIetaEndcap_ ->Fill((*iPho).sigmaIetaIeta());
962  h_sigmaIetaIetaVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).sigmaIetaIeta());
963  p_sigmaIetaIetaVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).sigmaIetaIeta());
964 
965  //EE TRACK ISOLATION
966 
967  h_nTrackIsolSolidEndcap_ ->Fill((*iPho).nTrkSolidConeDR04());
968  h_nTrackIsolSolidVsEtEndcap_ ->Fill((*iPho).et(), (*iPho).nTrkSolidConeDR04());
969  p_nTrackIsolSolidVsEtEndcap_ ->Fill((*iPho).et(), (*iPho).nTrkSolidConeDR04());
970  h_nTrackIsolSolidVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).nTrkSolidConeDR04());
971  p_nTrackIsolSolidVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).nTrkSolidConeDR04());
972 
973  h_nTrackIsolHollowEndcap_ ->Fill((*iPho).nTrkHollowConeDR04());
974  h_nTrackIsolHollowVsEtEndcap_ ->Fill((*iPho).et(), (*iPho).nTrkHollowConeDR04());
975  p_nTrackIsolHollowVsEtEndcap_ ->Fill((*iPho).et(), (*iPho).nTrkHollowConeDR04());
976  h_nTrackIsolHollowVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).nTrkHollowConeDR04());
977  p_nTrackIsolHollowVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).nTrkHollowConeDR04());
978 
979  h_trackPtSumSolidEndcap_ ->Fill((*iPho).trkSumPtSolidConeDR04());
980  h_trackPtSumSolidVsEtEndcap_ ->Fill((*iPho).et(), (*iPho).trkSumPtSolidConeDR04());
981  p_trackPtSumSolidVsEtEndcap_ ->Fill((*iPho).et(), (*iPho).trkSumPtSolidConeDR04());
982  h_trackPtSumSolidVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).trkSumPtSolidConeDR04());
983  p_trackPtSumSolidVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).trkSumPtSolidConeDR04());
984 
985  h_trackPtSumHollowEndcap_ ->Fill((*iPho).trkSumPtSolidConeDR04());
986  h_trackPtSumHollowVsEtEndcap_ ->Fill((*iPho).et(), (*iPho).trkSumPtHollowConeDR04());
987  p_trackPtSumHollowVsEtEndcap_ ->Fill((*iPho).et(), (*iPho).trkSumPtHollowConeDR04());
988  h_trackPtSumHollowVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).trkSumPtHollowConeDR04());
989  p_trackPtSumHollowVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).trkSumPtHollowConeDR04());
990 
991  //EE CALORIMETER ISOLATION
992 
993  h_ecalSumEndcap_ ->Fill((*iPho).ecalRecHitSumEtConeDR04());
994  h_ecalSumVsEtEndcap_ ->Fill((*iPho).et(), (*iPho).ecalRecHitSumEtConeDR04());
995  p_ecalSumVsEtEndcap_ ->Fill((*iPho).et(), (*iPho).ecalRecHitSumEtConeDR04());
996  h_ecalSumVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).ecalRecHitSumEtConeDR04());
997  p_ecalSumVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).ecalRecHitSumEtConeDR04());
998 
999  h_hcalSumEndcap_ ->Fill((*iPho).hcalTowerSumEtConeDR04());
1000  h_hcalSumVsEtEndcap_ ->Fill((*iPho).et(), (*iPho).hcalTowerSumEtConeDR04());
1001  p_hcalSumVsEtEndcap_ ->Fill((*iPho).et(), (*iPho).hcalTowerSumEtConeDR04());
1002  h_hcalSumVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).hcalTowerSumEtConeDR04());
1003  p_hcalSumVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).hcalTowerSumEtConeDR04());
1004 
1005  h_hOverEEndcap_ ->Fill((*iPho).hadTowOverEm());
1006  p_hOverEVsEtEndcap_ ->Fill((*iPho).et(), (*iPho).hadTowOverEm());
1007  p_hOverEVsEtaEndcap_ ->Fill((*iPho).eta(),(*iPho).hadTowOverEm());
1008  h_h1OverEEndcap_ ->Fill((*iPho).hadTowDepth1OverEm());
1009  h_h2OverEEndcap_ ->Fill((*iPho).hadTowDepth2OverEm());
1010 
1011  }
1012 
1013 
1014  } //end photon loop
1015 
1016  h_nPho_ ->Fill (float(nPho));
1017 
1018  if(splitHistosEBEE_){
1019  h_nPhoBarrel_ ->Fill (float(nPhoBarrel));
1020  h_nPhoEndcap_ ->Fill (float(nPhoEndcap));
1021  }
1022  } //end inner muon loop
1023 
1024  } //end outer muon loop
1025 
1026 }//End of Analyze method
1027 
1029 {
1030  if(!standAlone_){dbe_->setCurrentFolder("Egamma/PhotonAnalyzer/ZToMuMuGamma");}
1031 }
1032 
1034 {
1035  //dbe_->showDirStructure();
1036  if(standAlone_){
1037  dbe_->setCurrentFolder("Egamma/PhotonAnalyzer/ZToMuMuGamma");
1038  dbe_->save(outputFileName_);
1039  }
1040 }
1041 
1043  bool result=true;
1044  if (!mu.innerTrack().isNonnull()) result=false;
1045  if (!mu.globalTrack().isNonnull()) result=false;
1046  if ( !mu.isGlobalMuon() ) result=false;
1047  if ( mu.pt() < muonMinPt_ ) result=false;
1048  if ( fabs(mu.eta())>2.4 ) result=false;
1049 
1050  int pixHits=0;
1051  int tkHits=0;
1052  if ( mu.innerTrack().isNonnull() ) {
1053  pixHits=mu.innerTrack()->hitPattern().numberOfValidPixelHits();
1054  tkHits=mu.innerTrack()->hitPattern().numberOfValidStripHits();
1055  }
1056 
1057  if ( pixHits+tkHits < minPixStripHits_ ) result=false;
1058 
1059  return result;
1060 }
1061 
1063  bool result=true;
1064  if ( mu.globalTrack()->normalizedChi2() > muonMaxChi2_ ) result=false;
1065  if ( fabs( mu.globalTrack()->dxy(beamSpot)) > muonMaxDxy_ ) result=false;
1066  if ( mu.numberOfMatches() < muonMatches_ ) result=false;
1067 
1068  if ( mu.track()-> hitPattern().numberOfValidPixelHits() < validPixHits_ ) result=false;
1069  if ( mu.globalTrack()->hitPattern().numberOfValidMuonHits() < validMuonHits_ ) result=false;
1070  if ( !mu.isTrackerMuon() ) result=false;
1071  // track isolation
1072  if ( mu.isolationR03().sumPt > muonTrackIso_ ) result=false;
1073  if ( fabs(mu.eta())> muonTightEta_ ) result=false;
1074 
1075  return result;
1076 }
1077 
1079  bool result=true;
1080  if ( pho.pt() < photonMinEt_ ) result=false;
1081  if ( fabs(pho.eta())> photonMaxEta_ ) result=false;
1082  if ( pho.isEBEEGap() ) result=false;
1083  // if ( pho.trkSumPtHollowConeDR04() > photonTrackIso_ ) result=false; // check how to exclude the muon track (which muon track).
1084 
1085  return result;
1086 }
1087 
1089  {
1090  math::XYZTLorentzVector p12 = mu1.p4()+mu2.p4() ;
1091  float mumuMass2 = p12.Dot(p12) ;
1092  float invMass = sqrt(mumuMass2) ;
1093  return invMass ;
1094  }
1095 
1097  {
1098  math::XYZTLorentzVector p12 = mu1.p4()+mu2.p4()+pho.p4() ;
1099  float Mass2 = p12.Dot(p12) ;
1100  float invMass = sqrt(Mass2) ;
1101  return invMass ;
1102  }
1103 
float hadEt
hcal sum-Et
Definition: MuonIsolation.h:9
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
float sumPt
sum-pt of tracks
Definition: MuonIsolation.h:7
bool muonSelection(const reco::Muon &m, const reco::BeamSpot &bs)
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:27
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
Definition: deltaR.h:79
virtual TrackRef innerTrack() const
Definition: Muon.h:49
bool isTrackerMuon() const
Definition: Muon.h:220
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2118
bool isEBEEGap() const
true if photon is in boundary between EB and EE
Definition: Photon.h:130
virtual TrackRef track() const
reference to a Track
Definition: Muon.h:50
bool isGlobalMuon() const
Definition: Muon.h:219
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
virtual void analyze(const edm::Event &, const edm::EventSetup &)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
const LorentzVector & p4(P4type type) const
Definition: Photon.cc:197
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
T sqrt(T t)
Definition: SSEVec.h:48
float emEt
ecal sum-Et
Definition: MuonIsolation.h:8
tuple result
Definition: query.py:137
float mumuInvMass(const reco::Muon &m1, const reco::Muon &m2)
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1036
const int mu
Definition: Constants.h:23
ZToMuMuGammaAnalyzer(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
DQMStore * dbe_
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
Definition: Muon.cc:60
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
bool etMin(const PFCandidate &cand, double cut)
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
bool photonSelection(const reco::Photon &p)
std::vector< size_type > Keys
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
edm::EventID id() const
Definition: EventBase.h:56
bool basicMuonSelection(const reco::Muon &m)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:850
virtual float pt() const GCC11_FINAL
transverse momentum
virtual void endRun(const edm::Run &, const edm::EventSetup &)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
float mumuGammaInvMass(const reco::Muon &mu1, const reco::Muon &mu2, const reco::Photon &pho)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
const MuonIsolation & isolationR03() const
Definition: Muon.h:159
Definition: Run.h:36
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:55