ATLAS Offline Software
ReconElectronsPlots.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 using CLHEP::GeV;
9 
10 namespace ZeeValidation{
11 
12  ReconElectronsPlots::ReconElectronsPlots(PlotBase* pParent, std::string sDir, std::string sParticleType):
13  PlotBase(pParent, sDir),
14  m_sParticleType(sParticleType),
15  h_electron_n(NULL), h_photon_n(NULL),
16  h_electron_author(NULL), h_nvtx(NULL),
17  h_mu(NULL), h_bcid(NULL),
18  h_track_n(NULL),
19  h_pv_x(NULL), h_pv_y(NULL), h_pv_z(NULL),
20  h_f1(NULL), h_f3(NULL), h_f1core(NULL), h_f3core(NULL),
21  h_e233(NULL), h_e237(NULL), h_e277(NULL), h_reta(NULL), h_rphi(NULL),
22  h_weta1(NULL), h_weta2(NULL), h_wtots1(NULL),
23  h_ethad(NULL), h_ethad1(NULL),
24  h_fethad(NULL), h_fethad1(NULL),
25  h_e2tsts1(NULL), h_fracs1(NULL),
26  h_emins1(NULL), h_emaxs1(NULL),
27  h_demm1(NULL), h_iso(NULL),
28  h_eratio(NULL),
29  h_deta1(NULL), h_deta2(NULL),
30  h_dphi1(NULL), h_dphi2(NULL),
31  h_dphires2(NULL),
32  h_etcone20(NULL), h_etcone30(NULL), h_etcone40(NULL),
33  h_fetcone20(NULL), h_fetcone30(NULL), h_fetcone40(NULL),
34  h_ptcone20(NULL), h_ptcone30(NULL), h_ptcone40(NULL),
35  h_n_blayer_hits(NULL), h_n_pixel_hits(NULL),
36  h_n_si_hits(NULL), h_n_trt_hits(NULL),
37  h_n_trt_hits_high(NULL), h_r_trt_hits(NULL),
38  h_n_blayer_hits_outliers(NULL), h_n_pixel_hits_outliers(NULL),
39  h_n_si_hits_outliers(NULL), h_n_trt_hits_outliers(NULL),
40  h_n_trt_hits_high_outliers(NULL), h_r_trt_hits_outliers(NULL),
41  h_d0(NULL), h_sigmad0(NULL), h_eoverp(NULL), h_eoverpq(NULL)
42  {
43  for (int i = 0; i < nLevels; i++) {
44  h_electron_pt[i] = NULL;
45  h_electron_eta[i] = NULL;
46  h_electron_phi[i] = NULL;
47  }
48  for (int i = 0; i < nLevels-1; i++) {
49  h_electron_eff_pt[i] = NULL;
50  h_electron_eff_eta[i] = NULL;
51  h_electron_eff_phi[i] = NULL;
52  }
53  }
54 
55  const std::string ReconElectronsPlots::cLevelLabel[nLevels] = {
56  "Reco",
57  "OQ",
58  "Loose",
59  "Medium",
60  "Tight",
61  "LHLoose",
62  "LHMedium",
63  "LHTight"
64  };
65  //-------------------------------------------------
67  TH1::SetDefaultSumw2(kTRUE);
68 
69  h_electron_n = Book1D("NElectrons", "Number of Electrons; n ;Events", 20, 0., 20);
70  h_photon_n = Book1D("NPhotons", "Number of Photons; n ;Events", 20, 0., 20);
71  h_electron_author = Book1D("Author", "author of " + m_sParticleType +";author;Events ", 10 , 0.0, 10.0);
72  h_nvtx = Book1D("Nvtx", "Nvtx distribution;n_{vtx};Events ", 30, 0, 30);
73  h_mu = Book1D("Mu", "<#mu> distribution;<mu>;Events", 40, 0, 40);
74  h_bcid = Book1D("BCID", "BCID distribution;BCID;Events", 3500, 0, 3500);
75  h_track_n = Book1D("NTracks", "#Tracks on primary vtx;N_{tracks};Events", 80, 0, 200);
76  h_pv_x = Book1D("Pv_x", "Primary Vertex X Position;x_{vtx};Events", 100, -.5, .5);
77  h_pv_y = Book1D("Pv_y", "Primary Vertex Y Position;y_{vtx};Events", 100, -1.5, 1.5);
78  h_pv_z = Book1D("Pv_z", "Primary Vertex Z Position;z_{vtx};Events", 100, -250, 250);
79 
80  for (int i = 0; i < nLevels; i++) {
81  h_electron_pt[i] = Book1D("Pt" + cLevelLabel[i], "P_{T} of "+ m_sParticleType + "; E_{T} (GeV);Events", 60, 20., 140.);
82  h_electron_eta[i] = Book1D("Eta" + cLevelLabel[i], "#eta of " + m_sParticleType + ";#eta;Events", 50, -2.5, 2.5);
83  h_electron_phi[i] = Book1D("Phi" + cLevelLabel[i], "#varphi of " + m_sParticleType + ";#varphi;Events", 60, -TMath::Pi(), TMath::Pi());
84  }
85 
86  for (int i = 0; i < nLevels-1; i++) {
87  h_electron_eff_pt[i] = BookTProfile("PtEff" + cLevelLabel[i+1] + cLevelLabel[0], cLevelLabel[i+1] + " Efficiency vs P_{T} of "+ m_sParticleType + "; E_{T} (GeV);" + cLevelLabel[i+1] + "/" + cLevelLabel[0], 60, 20., 140.);
88  h_electron_eff_eta[i] = BookTProfile("EtaEff" + cLevelLabel[i+1] + cLevelLabel[0], cLevelLabel[i+1] + " Efficiency vs #eta of " + m_sParticleType + ";#eta;" + cLevelLabel[i+1] + "/" + cLevelLabel[0], 50, -2.5, 2.5);
89  h_electron_eff_phi[i] = BookTProfile("PhiEff" + cLevelLabel[i+1] + cLevelLabel[0], cLevelLabel[i+1] + " Efficiency vs #varphi of " + m_sParticleType + ";#varphi;" + cLevelLabel[i+1] + "/" + cLevelLabel[0], 60, -TMath::Pi(), TMath::Pi());
90  }
91 
92  //showerShapeValue
93  h_f1 = Book1D("F1", "E_{1}/E (f1); E_{1}/E (f1); Events", 50, 0., 1.); //+
94  h_f3 = Book1D("F3", "E_{3}/E (f3); E_{3}/E (f3); Events", 50, 0., .1); //+
95  h_f1core = Book1D("F1Core", "E_{1}(3x1)/E (f1core); E_{1}(3x1)/E (f1core); Events", 50, 0., 1.); //+
96  h_f3core = Book1D("F3Core", "E_{3}(3x3)/E (f3core); E_{3}(3x3)/E (f3core); Events", 50, 0., .1); //+
97 
98  h_e233 = Book1D("E233", "E_{2}(3x3)/GeV; E_{2}(3x3)/GeV; Events", 100, 0., 500.);
99  h_e237 = Book1D("E237", "E_{2}(3x7)/GeV; E_{2}(3x7)/GeV; Events", 100, 0., 500.);
100  h_e277 = Book1D("E277", "E_{2}(7x7)/GeV; E_{2}(7x7)/GeV; Events", 100, 0., 500.);
101  h_reta = Book1D("REta", "R_{#eta} (E_{2}(3x7)/E_{2}(7x7));R_{#eta}; Events", 50, 0.5, 1.);
102  h_rphi = Book1D("RPhi", "R_{#phi} (E_{2}(3x3)/E_{2}(3x7));R_{#phi}; Events", 50, 0.5, 1.);
103 
104  h_weta1 = Book1D("WEta1", "w_{#eta 1} (weta1, shower width); w_{#eta 1}; Events", 70, 0.2, .9);
105  h_weta2 = Book1D("WEta2", "w_{#eta 2} (weta2, lateral width); w_{#eta 2}; Events", 100, 0.005, .02);
106  h_wtots1 = Book1D("WTots1", "w_{tot1} (wtots1, shower width); w_{tot1}; Events", 100, 0., 6.);
107 
108  h_ethad = Book1D("EtHad", "E^{had}_{T}/GeV;E^{had}_{T}/GeV; Events", 100, -1., 9.);
109  h_ethad1 = Book1D("EtHad1", "E^{had1}_{T}/GeV;E^{had1}_{T}/GeV; Events", 100, -1., 9.);
110  h_fethad = Book1D("FracEtHad", "E^{had}_{T}/E_{T};E^{had}_{T}/E_{T}; Events", 100, -0.05, .45);
111  h_fethad1 = Book1D("FracEtHad1", "E^{had1}_{T}/E_{T};E^{had1}_{T}/E_{T}; Events", 100, -0.05, .45);
112 
113  h_e2tsts1 = Book1D("E2tsts1", "E_{1}^{max2}/GeV (E of 2^{nd} maximum); E_{1}^{max2}/GeV; Events", 100, 0., 3.);
114  h_fracs1 = Book1D("Fracs1", "fracs1 (shower shape core); fracs1; Events", 50, 0., 1.);
115  h_emins1 = Book1D("Emins1", "E_{1}^{min}/GeV (E^{min} betw. maximum); E_{1}^{min}/GeV; Events", 100, 0., 3.);
116  h_emaxs1 = Book1D("Emaxs1", "E_{1}^{max}/GeV; E_{1}^{max}/GeV; Events", 100, 0., 3.);
117  h_demm1 = Book1D("dEmm1", "#Delta E^{sep}_{1}/GeV (2^{nd} max. separation); #Delta E^{sep}_{1}/GeV; Events", 50, 0., 1.);
118  h_iso = Book1D("Iso", "1 - E(3x3)/E(3x7)(iso); 1 - E(3x3)/E(3x7); Events", 100, 0., 1.);
119  h_eratio = Book1D("Eratio", "(E_{1}^{max}/GeV - E_{1}^{max2}/GeV )/(E_{1}^{max}/GeV + E_{1}^{max2}/GeV ); E_{ratio}; Events", 50, 0., 1.);
120 
121  //TrackCaloMatchType
122  h_deta1 = Book1D("dEta1", "#Delta #eta_{1} Cluster-Track; #Delta #eta_{1}; Events", 100, -.05, .05);
123  h_deta2 = Book1D("dEta2", "#Delta #eta_{2} Cluster-Track; #Delta #eta_{2}; Events", 100, -.05, .05);
124  h_dphi1 = Book1D("dPhi1", "#Delta #phi_{1} Cluster-Track; #Delta #phi_{1}; Events", 100, -.05, .05);
125  h_dphi2 = Book1D("dPhi2", "#Delta #phi_{2} Cluster-Track; #Delta #phi_{2}; Events", 100, -.05, .05);
126  h_dphires2 = Book1D("dPhiRes2", "#Delta #phi_{2} Cluster-Track (Rescaled); #Delta #phi_{2} (rescaled); Events", 100, -.05, .05);
127 
128  //isolationValue
129  h_etcone20 = Book1D("EtCone20", "E_{T}^{cone20}/GeV; E_{T}^{cone20}/GeV; Events", 120, -4., 20.);
130  h_etcone30 = Book1D("EtCone30", "E_{T}^{cone30}/GeV; E_{T}^{cone30}/GeV; Events", 120, -4., 20.);
131  h_etcone40 = Book1D("EtCone40", "E_{T}^{cone40}/GeV; E_{T}^{cone40}/GeV; Events", 120, -4., 20.);
132  h_fetcone20 = Book1D("FracEtCone20", "E_{T}^{cone20}/E_{T}; E_{T}^{cone20}/E_{T}; Events", 120, -.1, .5);
133  h_fetcone30 = Book1D("FracEtCone30", "E_{T}^{cone30}/E_{T}; E_{T}^{cone30}/E_{T}; Events", 120, -.1, .5);
134  h_fetcone40 = Book1D("FracEtCone40", "E_{T}^{cone40}/E_{T}; E_{T}^{cone40}/E_{T}; Events", 120, -.1, .5);
135 
136  h_ptcone20 = Book1D("Ptcone20", "p_{T}^{cone20}/GeV; p_{T}^{cone20}/GeV; Events", 80, 0., 20.);
137  h_ptcone30 = Book1D("Ptcone30", "p_{T}^{cone30}/GeV; p_{T}^{cone30}/GeV; Events", 80, 0., 20.);
138  h_ptcone40 = Book1D("Ptcone40", "p_{T}^{cone40}/GeV; p_{T}^{cone40}/GeV; Events", 80, 0., 20.);
139 
140  //RetrieveHitInfo
141  h_n_blayer_hits = Book1D("NBlayerHits", "N^{hits}_{BLayer}; N^{hits}; Events", 10, 0., 10.);
142  h_n_pixel_hits = Book1D("NPixelHits", "N^{hits}_{Pixels}; N^{hits}; Events", 10, 0., 10.);
143  h_n_si_hits = Book1D("NSiHits", "N^{hits}_{Si}; N^{hits}; Events", 30, 0., 30.);
144  h_n_trt_hits = Book1D("NTRTHits", "N^{hits}_{TRT}; N^{hits}; Events", 50, 0., 50.);
145  h_n_trt_hits_high = Book1D("NTRTHitsHighThreshold", "N^{hits}_{TRT} High Threshold; N^{hits}; Events", 50, 0., 50.);
146  h_r_trt_hits = Book1D("RTRTHits", "N^{hits}_{TRT,HT} / N^{hits}_{TRT}; N^{hits}; Events", 50, 0., 1.);
147 
148  h_n_blayer_hits_outliers = Book1D("NBlayerHitsOutliers", "N^{hits}_{BLayer} incl. Outliers; N^{hits}; Events", 10, 0., 10.);
149  h_n_pixel_hits_outliers = Book1D("NPixelHitsOutliers", "N^{hits}_{Pixels} incl. Outliers; N^{hits}; Events", 10, 0., 10.);
150  h_n_si_hits_outliers = Book1D("NSiHitsOutliers", "N^{hits}_{Si} incl. Outliers; N^{hits}; Events", 30, 0., 30.);
151  h_n_trt_hits_outliers = Book1D("NTRTHitsOutliers", "N^{hits}_{TRT} incl. Outliers; N^{hits}; Events", 50, 0., 50.);
152  h_n_trt_hits_high_outliers = Book1D("NTRTHitsHighThresholdOutliers", "N^{hits}_{TRT} High Threshold incl. Outliers; N^{hits}; Events", 50, 0., 50.);
153  h_r_trt_hits_outliers = Book1D("RTRTHitsOutliers", "N^{hits}_{TRT,HT} / N^{hits}_{TRT} incl. Outliers; N^{hits}; Events", 50, 0., 1.);
154 
155  h_d0 = Book1D("TrackD0", "Track d0; d0; Events", 20, -1., 1.);
156  h_sigmad0 = Book1D("TrackSigmaD0", "Track #sigma_{d0}; #sigma_{d0}; Events", 20, 0., 0.1);
157  h_eoverp = Book1D("EoverP", "E/p; E/p; Events", 50, 0., 10.);
158  h_eoverpq = Book1D("EoverPQ", "E/p * q; E/p * q; Events", 50, -5., 5.);
159 
160  }
161  //-------------------------------------------------
162  void ReconElectronsPlots::fill(const xAOD::EventInfo* eventInfo, const xAOD::VertexContainer* vertices){
163 
164  int nGoodVertices = 0;
165  for (const auto* vtx : vertices -> stdcont()){
166  if (vtx -> vertexType() == xAOD::VxType::PriVtx){
167  h_pv_x -> Fill(vtx -> x());
168  h_pv_y -> Fill(vtx -> y());
169  h_pv_z -> Fill(vtx -> z());
170  h_track_n ->Fill(vtx -> nTrackParticles());
171  }
172  if (vtx -> vertexType() == xAOD::VxType::NoVtx) continue;
173  nGoodVertices++;
174  }
175  h_nvtx -> Fill(nGoodVertices);
176  h_mu -> Fill(eventInfo -> averageInteractionsPerCrossing());
177  h_bcid -> Fill(eventInfo -> bcid());
178  }
179  //-------------------------------------------------
181  h_electron_eta[level] -> Fill(electron -> eta());
182  }
183  //-------------------------------------------------
185  h_electron_pt[level] -> Fill(electron -> pt()*(1./GeV));
186  h_electron_phi[level] -> Fill(electron -> phi());
187  }
188  //-------------------------------------------------
190 
191  float f1(0), f3(0), f1core(0), f3core(0), fracs1(0), emaxs1(0), weta1(0), weta2(0), wtots1(0), r33over37allcalo(0), eratio(0);
192 
193  if (electron -> showerShapeValue(f1, xAOD::EgammaParameters::f1)) h_f1 -> Fill(f1);
194  if (electron -> showerShapeValue(f1core, xAOD::EgammaParameters::f1core)) h_f1core -> Fill(f1core);
195  if (electron -> showerShapeValue(f3, xAOD::EgammaParameters::f3)) h_f3 -> Fill(f3);
196  if (electron -> showerShapeValue(f3core, xAOD::EgammaParameters::f3core)) h_f3core -> Fill(f3core);
197  if (electron -> showerShapeValue(emaxs1, xAOD::EgammaParameters::emaxs1)) h_emaxs1 -> Fill(emaxs1*(1./GeV));
198  if (electron -> showerShapeValue(fracs1, xAOD::EgammaParameters::fracs1)) h_fracs1 -> Fill(fracs1);
199  if (electron -> showerShapeValue(weta1, xAOD::EgammaParameters::weta1)) h_weta1 -> Fill(weta1);
200  if (electron -> showerShapeValue(weta2, xAOD::EgammaParameters::weta2)) h_weta2 -> Fill(weta2);
201  if (electron -> showerShapeValue(wtots1, xAOD::EgammaParameters::wtots1)) h_wtots1 -> Fill(wtots1);
203 
204  if (electron -> showerShapeValue(eratio, xAOD::EgammaParameters::Eratio)) h_eratio -> Fill(eratio);
205  float e2tsts1(0), emins1(0);
206  if (electron -> showerShapeValue(e2tsts1, xAOD::EgammaParameters::e2tsts1) &&
207  electron->showerShapeValue(emins1, xAOD::EgammaParameters::emins1)){
208  h_e2tsts1 -> Fill(e2tsts1*(1./GeV));
209  h_emins1 -> Fill(emins1*(1./GeV));
210  h_demm1 -> Fill((e2tsts1 - emins1)*(1./GeV));
211  }
212  float e233(0), e237(0), e277(0), reta(0), rphi(0);
213  if ( electron -> showerShapeValue(e233, xAOD::EgammaParameters::e233) &&
214  electron -> showerShapeValue(e237, xAOD::EgammaParameters::e237) &&
215  electron -> showerShapeValue(e277, xAOD::EgammaParameters::e277) &&
216  electron -> showerShapeValue(reta, xAOD::EgammaParameters::Reta) &&
217  electron -> showerShapeValue(rphi, xAOD::EgammaParameters::Rphi)){
218  h_e233 -> Fill(e233*(1./GeV));
219  h_e237 -> Fill(e237*(1./GeV));
220  h_e277 -> Fill(e277*(1./GeV));
221  h_reta -> Fill(reta);
222  h_rphi -> Fill(rphi);
223  }
224  float ethad(0), ethad1(0);
225  if ( electron -> showerShapeValue(ethad, xAOD::EgammaParameters::ethad) &&
226  electron -> showerShapeValue(ethad1, xAOD::EgammaParameters::ethad1) ){
227  h_ethad -> Fill(ethad*(1./GeV));
228  h_ethad1 -> Fill(ethad1*(1./GeV));
229  h_fethad -> Fill(ethad/electron -> pt());
230  h_fethad1 -> Fill(ethad1/electron -> pt());
231  }
232 
233  }
234  //-------------------------------------------------
236 
237  float deta1(0), deta2(0), dphi1(0), dphi2(0), dphires2(0);
238  if ( electron -> trackCaloMatchValue(deta1, xAOD::EgammaParameters::deltaEta1 )) h_deta1 -> Fill(deta1);
239  if ( electron -> trackCaloMatchValue(deta2, xAOD::EgammaParameters::deltaEta2 )) h_deta2 -> Fill(deta2);
240  if ( electron -> trackCaloMatchValue(dphi1, xAOD::EgammaParameters::deltaPhi1 )) h_dphi1 -> Fill(dphi1);
241  if ( electron -> trackCaloMatchValue(dphi2, xAOD::EgammaParameters::deltaPhi2 )) h_dphi2 -> Fill(dphi2);
242  if ( electron -> trackCaloMatchValue(dphires2, xAOD::EgammaParameters::deltaPhiRescaled2 )) h_dphires2 -> Fill(dphires2);
243 
244  h_d0 -> Fill(track -> d0());
245  float sigmad0 = -99.;
246  float vard0 = track -> definingParametersCovMatrix()(0, 0);
247  if (vard0 > 0) sigmad0 = sqrtf(vard0);
248  h_sigmad0 -> Fill(sigmad0);
249 
250  h_eoverp -> Fill(electron -> e() * TMath::Abs(track -> qOverP()));
251  h_eoverpq -> Fill(electron -> e() * track -> qOverP());
252 
253  }
254  //-------------------------------------------------
256 
257  float etcone20(0), etcone30(0), etcone40(0), ptcone20(0), ptcone30(0), ptcone40(0);
258 
259  if ( electron->isolationValue(etcone20, xAOD::Iso::etcone20) ){
260  h_etcone20 -> Fill(etcone20*(1./GeV));
261  h_fetcone20 -> Fill(etcone20/electron -> pt());
262  }
263  if ( electron->isolationValue(etcone30, xAOD::Iso::etcone30) ){
264  h_etcone30 -> Fill(etcone30*(1./GeV));
265  h_fetcone30 -> Fill(etcone30/electron -> pt());
266  }
267  if ( electron->isolationValue(etcone40, xAOD::Iso::etcone40) ){
268  h_etcone40 -> Fill(etcone40*(1./GeV));
269  h_fetcone40 -> Fill(etcone40/electron -> pt());
270  }
271  if ( electron->isolationValue(ptcone20, xAOD::Iso::ptcone20) ) h_ptcone20 -> Fill(ptcone20*(1./GeV));
272  if ( electron->isolationValue(ptcone30, xAOD::Iso::ptcone30) ) h_ptcone30 -> Fill(ptcone30*(1./GeV));
273  if ( electron->isolationValue(ptcone40, xAOD::Iso::ptcone40) ) h_ptcone40 -> Fill(ptcone40*(1./GeV));
274 
275 }
276  //-------------------------------------------------
278 
279  uint8_t blayerh(0), pixelh(0), scth(0), trth(0), trthighh(0), blayero(0), pixelo(0), scto(0), trto(0), trthigho(0);
280  if( electron -> trackParticleSummaryValue(blayerh, xAOD::numberOfInnermostPixelLayerHits ) &&
281  electron -> trackParticleSummaryValue(blayero, xAOD::numberOfInnermostPixelLayerOutliers) ){
282  h_n_blayer_hits -> Fill(blayerh);
283  h_n_blayer_hits_outliers -> Fill(blayerh + blayero);
284  }
285  if( electron -> trackParticleSummaryValue(pixelh, xAOD::numberOfPixelHits) &&
286  electron -> trackParticleSummaryValue(scth, xAOD::numberOfSCTHits ) &&
287  electron -> trackParticleSummaryValue(pixelo, xAOD::numberOfPixelOutliers) &&
288  electron -> trackParticleSummaryValue(scto, xAOD::numberOfSCTOutliers) ){
289  h_n_pixel_hits -> Fill(pixelh);
290  h_n_si_hits -> Fill(pixelh + scth);
291  h_n_pixel_hits_outliers -> Fill(pixelh + pixelo);
292  h_n_si_hits_outliers -> Fill(pixelh + scth + pixelo + scto);
293 
294  }
295  if( electron -> trackParticleSummaryValue(trth, xAOD::numberOfTRTHits ) &&
296  electron -> trackParticleSummaryValue(trthighh, xAOD::numberOfTRTHighThresholdHits ) &&
297  electron -> trackParticleSummaryValue(trto, xAOD::numberOfTRTOutliers) &&
298  electron -> trackParticleSummaryValue(trthigho, xAOD::numberOfTRTHighThresholdOutliers)){
299  h_n_trt_hits -> Fill(trth);
300  h_n_trt_hits_high -> Fill(trthighh);
301  double rtrt = (trth) > 0 ? ((double) (trthighh)/(trth) ) : 0.;
302  h_r_trt_hits -> Fill(rtrt);
303 
304  h_n_trt_hits_outliers -> Fill(trth + trto);
305  h_n_trt_hits_high_outliers -> Fill(trthighh + trthigho);
306  double rtrto = (trth + trto) > 0 ? ((double) (trthigho + trthighh)/(trth + trto) ) : 0.;
307  h_r_trt_hits_outliers -> Fill(rtrto);
308  }
309 
310  }
311  //-------------------------------------------------
313 
314  for (int i = 0; i < nLevels-1; i++) {
318  }
319  }
320  //-------------------------------------------------
322 
323  if (hDenom->GetNbinsX() != hNom->GetNbinsX()) return;
324  else{
325  for (int bin_i = 1; bin_i <= hDenom -> GetNbinsX(); ++bin_i){
326  if(hDenom -> GetBinContent(bin_i) == 0) continue;
327  double binContent = hNom -> GetBinContent(bin_i) / hDenom -> GetBinContent(bin_i);
328  double binCenter = hNom -> GetBinCenter(bin_i);
329 
330  hEff -> Fill(binCenter, binContent);
331  }
332  }
333 
334  }
335  //-------------------------------------------------
336 }
xAOD::EgammaParameters::e233
@ e233
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x3 (in cell units e...
Definition: EgammaEnums.h:68
xAOD::eratio
setCharge setNTRTHiThresholdHits eratio
Definition: TrigElectron_v1.cxx:96
ZeeValidation::ReconElectronsPlots::h_d0
TH1 * h_d0
Definition: ReconElectronsPlots.h:112
ZeeValidation::ReconElectronsPlots::h_electron_author
TH1 * h_electron_author
Definition: ReconElectronsPlots.h:41
PlotBase::Book1D
TH1F * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition: PlotBase.cxx:88
ZeeValidation::ReconElectronsPlots::h_n_trt_hits_high
TH1 * h_n_trt_hits_high
Definition: ReconElectronsPlots.h:102
ZeeValidation::ReconElectronsPlots::h_n_pixel_hits
TH1 * h_n_pixel_hits
Definition: ReconElectronsPlots.h:99
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
PlotBase
Definition: PlotBase.h:33
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
xAOD::EgammaParameters::Reta
@ Reta
e237/e277
Definition: EgammaEnums.h:154
ZeeValidation::ReconElectronsPlots::m_sParticleType
std::string m_sParticleType
Definition: ReconElectronsPlots.h:37
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
ZeeValidation::ReconElectronsPlots::makeEfficiencyPlot
void makeEfficiencyPlot(TH1 *hDenom, TH1 *hNom, TProfile *hEff)
Definition: ReconElectronsPlots.cxx:321
ZeeValidation::ReconElectronsPlots::h_e233
TH1 * h_e233
Definition: ReconElectronsPlots.h:62
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
ZeeValidation::ReconElectronsPlots::h_n_si_hits
TH1 * h_n_si_hits
Definition: ReconElectronsPlots.h:100
ZeeValidation::ReconElectronsPlots::h_iso
TH1 * h_iso
Definition: ReconElectronsPlots.h:79
ZeeValidation::ReconElectronsPlots::h_eoverpq
TH1 * h_eoverpq
Definition: ReconElectronsPlots.h:115
ZeeValidation::ReconElectronsPlots::h_pv_x
TH1 * h_pv_x
Definition: ReconElectronsPlots.h:46
ZeeValidation::ReconElectronsPlots::h_ptcone40
TH1 * h_ptcone40
Definition: ReconElectronsPlots.h:96
xAOD::Iso::ptcone30
@ ptcone30
Definition: IsolationType.h:41
test_pyathena.pt
pt
Definition: test_pyathena.py:11
xAOD::EgammaParameters::deltaEta2
@ deltaEta2
difference between the cluster eta (second sampling) and the eta of the track extrapolated to the sec...
Definition: EgammaEnums.h:187
ZeeValidation::ReconElectronsPlots::h_f1core
TH1 * h_f1core
Definition: ReconElectronsPlots.h:60
xAOD::Iso::ptcone20
@ ptcone20
Track isolation.
Definition: IsolationType.h:40
xAOD::Iso::etcone40
@ etcone40
Definition: IsolationType.h:34
xAOD::EgammaParameters::ethad1
@ ethad1
transverse energy in the first sampling of the hadronic calorimeters behind the cluster calculated fr...
Definition: EgammaEnums.h:42
ZeeValidation::ReconElectronsPlots::h_eratio
TH1 * h_eratio
Definition: ReconElectronsPlots.h:80
ZeeValidation::ReconElectronsPlots::h_wtots1
TH1 * h_wtots1
Definition: ReconElectronsPlots.h:69
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
xAOD::numberOfTRTHits
@ numberOfTRTHits
number of TRT hits [unit8_t].
Definition: TrackingPrimitives.h:275
ZeeValidation::ReconElectronsPlots::h_emins1
TH1 * h_emins1
Definition: ReconElectronsPlots.h:76
ZeeValidation::ReconElectronsPlots::h_f3
TH1 * h_f3
Definition: ReconElectronsPlots.h:59
ZeeValidation::ReconElectronsPlots::h_etcone30
TH1 * h_etcone30
Definition: ReconElectronsPlots.h:89
xAOD::Iso::etcone30
@ etcone30
Definition: IsolationType.h:33
xAOD::EgammaParameters::Rphi
@ Rphi
e233/e237
Definition: EgammaEnums.h:156
ZeeValidation::ReconElectronsPlots::h_fetcone40
TH1 * h_fetcone40
Definition: ReconElectronsPlots.h:93
xAOD::EgammaParameters::f1core
@ f1core
E1(3x1)/E = fraction of the energy reconstructed in the first longitudinal compartment of the electro...
Definition: EgammaEnums.h:60
InDetAccessor::qOverP
@ qOverP
perigee
Definition: InDetAccessor.h:35
x
#define x
ZeeValidation::ReconElectronsPlots::h_eoverp
TH1 * h_eoverp
Definition: ReconElectronsPlots.h:114
ZeeValidation::ReconElectronsPlots::h_f1
TH1 * h_f1
Definition: ReconElectronsPlots.h:58
xAOD::VxType::NoVtx
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
Definition: TrackingPrimitives.h:570
xAOD::EgammaParameters::wtots1
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
Definition: EgammaEnums.h:140
ZeeValidation::ReconElectronsPlots::fillTrackCaloMatch
void fillTrackCaloMatch(const xAOD::Electron *electron, const xAOD::TrackParticle *track)
Definition: ReconElectronsPlots.cxx:235
ReconElectronsPlots.h
xAOD::numberOfTRTHighThresholdHits
@ numberOfTRTHighThresholdHits
number of TRT hits which pass the high threshold (only xenon counted) [unit8_t].
Definition: TrackingPrimitives.h:278
ZeeValidation::ReconElectronsPlots::fillIsolation
void fillIsolation(const xAOD::Electron *electron)
Definition: ReconElectronsPlots.cxx:255
ZeeValidation::ReconElectronsPlots::fillShowerShape
void fillShowerShape(const xAOD::Electron *electron)
Definition: ReconElectronsPlots.cxx:189
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
xAOD::EgammaParameters::deltaPhi1
@ deltaPhi1
difference between the cluster eta (1st sampling) and the eta of the track extrapolated to the 1st sa...
Definition: EgammaEnums.h:196
ZeeValidation::ReconElectronsPlots::h_nvtx
TH1 * h_nvtx
Definition: ReconElectronsPlots.h:42
xAOD::EgammaParameters::f3
@ f3
fraction of energy reconstructed in 3rd sampling
Definition: EgammaEnums.h:54
ZeeValidation::ReconElectronsPlots::h_fethad1
TH1 * h_fethad1
Definition: ReconElectronsPlots.h:73
xAOD::numberOfInnermostPixelLayerOutliers
@ numberOfInnermostPixelLayerOutliers
number of 0th layer barrel outliers
Definition: TrackingPrimitives.h:238
ZeeValidation::ReconElectronsPlots::h_fethad
TH1 * h_fethad
Definition: ReconElectronsPlots.h:72
xAOD::EgammaParameters::ethad
@ ethad
ET leakage into hadronic calorimeter with exclusion of energy in CaloSampling::TileGap3.
Definition: EgammaEnums.h:45
ZeeValidation::ReconElectronsPlots::h_pv_y
TH1 * h_pv_y
Definition: ReconElectronsPlots.h:47
xAOD::numberOfTRTHighThresholdOutliers
@ numberOfTRTHighThresholdOutliers
number of TRT high threshold outliers (only xenon counted) [unit8_t].
Definition: TrackingPrimitives.h:281
ZeeValidation::ReconElectronsPlots::h_ethad
TH1 * h_ethad
Definition: ReconElectronsPlots.h:70
ZeeValidation::ReconElectronsPlots::h_electron_pt
TH1 * h_electron_pt[nLevels]
Definition: ReconElectronsPlots.h:50
ZeeValidation::ReconElectronsPlots::h_electron_eta
TH1 * h_electron_eta[nLevels]
Definition: ReconElectronsPlots.h:51
ZeeValidation::ReconElectronsPlots::h_electron_eff_pt
TProfile * h_electron_eff_pt[nLevels-1]
Definition: ReconElectronsPlots.h:54
ZeeValidation::ReconElectronsPlots::h_mu
TH1 * h_mu
Definition: ReconElectronsPlots.h:43
xAOD::EgammaParameters::f1
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
Definition: EgammaEnums.h:52
lumiFormat.i
int i
Definition: lumiFormat.py:92
ZeeValidation::ReconElectronsPlots::h_n_blayer_hits
TH1 * h_n_blayer_hits
Definition: ReconElectronsPlots.h:98
z
#define z
ZeeValidation::ReconElectronsPlots::h_electron_eff_eta
TProfile * h_electron_eff_eta[nLevels-1]
Definition: ReconElectronsPlots.h:55
xAOD::Iso::etcone20
@ etcone20
Calorimeter isolation.
Definition: IsolationType.h:32
ZeeValidation::ReconElectronsPlots::h_deta1
TH1 * h_deta1
Definition: ReconElectronsPlots.h:82
xAOD::EgammaParameters::emins1
@ emins1
energy reconstructed in the strip with the minimal value between the first and second maximum
Definition: EgammaEnums.h:143
ZeeValidation
Definition: FWDZeePlots.cxx:9
ZeeValidation::ReconElectronsPlots::h_weta1
TH1 * h_weta1
Definition: ReconElectronsPlots.h:67
ZeeValidation::ReconElectronsPlots::h_rphi
TH1 * h_rphi
Definition: ReconElectronsPlots.h:66
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
ZeeValidation::ReconElectronsPlots::cLevelLabel
static const std::string cLevelLabel[nLevels]
Definition: ReconElectronsPlots.h:34
ZeeValidation::ReconElectronsPlots::h_pv_z
TH1 * h_pv_z
Definition: ReconElectronsPlots.h:48
ZeeValidation::ReconElectronsPlots::ReconElectronsPlots
ReconElectronsPlots(PlotBase *pParent, std::string sDir, std::string sParticleType)
Definition: ReconElectronsPlots.cxx:12
ZeeValidation::ReconElectronsPlots::h_n_pixel_hits_outliers
TH1 * h_n_pixel_hits_outliers
Definition: ReconElectronsPlots.h:106
xAOD::numberOfPixelOutliers
@ numberOfPixelOutliers
these are the pixel outliers, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:260
xAOD::EgammaParameters::deltaPhiRescaled2
@ deltaPhiRescaled2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
Definition: EgammaEnums.h:225
ZeeValidation::ReconElectronsPlots::h_ptcone20
TH1 * h_ptcone20
Definition: ReconElectronsPlots.h:94
ZeeValidation::ReconElectronsPlots::h_r_trt_hits_outliers
TH1 * h_r_trt_hits_outliers
Definition: ReconElectronsPlots.h:110
ZeeValidation::ReconElectronsPlots::nLevels
static const int nLevels
Definition: ReconElectronsPlots.h:33
TH1::Fill
int Fill(double)
Definition: rootspy.cxx:285
ZeeValidation::ReconElectronsPlots::h_dphires2
TH1 * h_dphires2
Definition: ReconElectronsPlots.h:86
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ZeeValidation::ReconElectronsPlots::h_f3core
TH1 * h_f3core
Definition: ReconElectronsPlots.h:61
ZeeValidation::ReconElectronsPlots::h_r_trt_hits
TH1 * h_r_trt_hits
Definition: ReconElectronsPlots.h:103
ZeeValidation::ReconElectronsPlots::h_ptcone30
TH1 * h_ptcone30
Definition: ReconElectronsPlots.h:95
ZeeValidation::ReconElectronsPlots::h_bcid
TH1 * h_bcid
Definition: ReconElectronsPlots.h:44
ZeeValidation::ReconElectronsPlots::h_electron_eff_phi
TProfile * h_electron_eff_phi[nLevels-1]
Definition: ReconElectronsPlots.h:56
ZeeValidation::ReconElectronsPlots::h_demm1
TH1 * h_demm1
Definition: ReconElectronsPlots.h:78
ZeeValidation::ReconElectronsPlots::h_e277
TH1 * h_e277
Definition: ReconElectronsPlots.h:64
ZeeValidation::ReconElectronsPlots::h_e237
TH1 * h_e237
Definition: ReconElectronsPlots.h:63
xAOD::EgammaParameters::deltaPhi2
@ deltaPhi2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
Definition: EgammaEnums.h:204
xAOD::vertexType
vertexType
Definition: Vertex_v1.cxx:166
TProfile
Definition: rootspy.cxx:515
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
ZeeValidation::ReconElectronsPlots::fillinAcc
void fillinAcc(const xAOD::Electron *electron, int level)
Definition: ReconElectronsPlots.cxx:184
xAOD::Electron_v1
Definition: Electron_v1.h:34
ZeeValidation::ReconElectronsPlots::h_emaxs1
TH1 * h_emaxs1
Definition: ReconElectronsPlots.h:77
ZeeValidation::ReconElectronsPlots::h_etcone20
TH1 * h_etcone20
Definition: ReconElectronsPlots.h:88
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
ZeeValidation::ReconElectronsPlots::h_e2tsts1
TH1 * h_e2tsts1
Definition: ReconElectronsPlots.h:74
xAOD::Iso::ptcone40
@ ptcone40
Definition: IsolationType.h:42
xAOD::numberOfTRTOutliers
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
Definition: TrackingPrimitives.h:276
ZeeValidation::ReconElectronsPlots::h_fracs1
TH1 * h_fracs1
Definition: ReconElectronsPlots.h:75
ZeeValidation::ReconElectronsPlots::fill
void fill(const xAOD::Electron *electron, int level)
Definition: ReconElectronsPlots.cxx:180
ZeeValidation::ReconElectronsPlots::h_n_si_hits_outliers
TH1 * h_n_si_hits_outliers
Definition: ReconElectronsPlots.h:107
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
ZeeValidation::ReconElectronsPlots::h_etcone40
TH1 * h_etcone40
Definition: ReconElectronsPlots.h:90
y
#define y
ZeeValidation::ReconElectronsPlots::finalizePlots
virtual void finalizePlots()
Definition: ReconElectronsPlots.cxx:312
ZeeValidation::ReconElectronsPlots::h_fetcone30
TH1 * h_fetcone30
Definition: ReconElectronsPlots.h:92
xAOD::numberOfSCTOutliers
@ numberOfSCTOutliers
number of SCT outliers [unit8_t].
Definition: TrackingPrimitives.h:269
ZeeValidation::ReconElectronsPlots::h_sigmad0
TH1 * h_sigmad0
Definition: ReconElectronsPlots.h:113
ZeeValidation::ReconElectronsPlots::h_weta2
TH1 * h_weta2
Definition: ReconElectronsPlots.h:68
TH1
Definition: rootspy.cxx:268
xAOD::EgammaParameters::r33over37allcalo
@ r33over37allcalo
1-ratio of energy in 3x3 over 3x7 cells; E(3x3) = E0(1x1) + E1(3x1) + E2(3x3) + E3(3x3); E(3x7) = E0(...
Definition: EgammaEnums.h:149
EgammaDefs.h
ZeeValidation::ReconElectronsPlots::h_n_trt_hits
TH1 * h_n_trt_hits
Definition: ReconElectronsPlots.h:101
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
PlotBase::BookTProfile
TProfile * BookTProfile(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, float startY=-1, float endY=-1, bool prependDir=true, bool useRMS=false)
Book a TProfile histogram.
Definition: PlotBase.cxx:180
ZeeValidation::ReconElectronsPlots::h_dphi2
TH1 * h_dphi2
Definition: ReconElectronsPlots.h:85
ZeeValidation::ReconElectronsPlots::h_n_trt_hits_outliers
TH1 * h_n_trt_hits_outliers
Definition: ReconElectronsPlots.h:108
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
xAOD::EgammaParameters::e277
@ e277
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
Definition: EgammaEnums.h:80
ZeeValidation::ReconElectronsPlots::fillHitInfo
void fillHitInfo(const xAOD::Electron *electron)
Definition: ReconElectronsPlots.cxx:277
ZeeValidation::ReconElectronsPlots::h_reta
TH1 * h_reta
Definition: ReconElectronsPlots.h:65
xAOD::EgammaParameters::weta1
@ weta1
shower width using +/-3 strips around the one with the maximal energy deposit: w3 strips = sqrt{sum(E...
Definition: EgammaEnums.h:97
ZeeValidation::ReconElectronsPlots::h_track_n
TH1 * h_track_n
Definition: ReconElectronsPlots.h:45
xAOD::EgammaParameters::Eratio
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
Definition: EgammaEnums.h:158
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
ZeeValidation::ReconElectronsPlots::h_ethad1
TH1 * h_ethad1
Definition: ReconElectronsPlots.h:71
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
ZeeValidation::ReconElectronsPlots::h_electron_n
TH1 * h_electron_n
Definition: ReconElectronsPlots.h:39
xAOD::EgammaParameters::e237
@ e237
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x7
Definition: EgammaEnums.h:77
xAOD::EgammaParameters::deltaEta1
@ deltaEta1
difference between the cluster eta (first sampling) and the eta of the track extrapolated to the firs...
Definition: EgammaEnums.h:184
xAOD::EgammaParameters::f3core
@ f3core
E3(3x3)/E fraction of the energy reconstructed in the third compartment of the electromagnetic calori...
Definition: EgammaEnums.h:65
ZeeValidation::ReconElectronsPlots::h_fetcone20
TH1 * h_fetcone20
Definition: ReconElectronsPlots.h:91
ZeeValidation::ReconElectronsPlots::h_deta2
TH1 * h_deta2
Definition: ReconElectronsPlots.h:83
xAOD::EgammaParameters::e2tsts1
@ e2tsts1
energy of the cell corresponding to second energy maximum in the first sampling
Definition: EgammaEnums.h:108
ZeeValidation::ReconElectronsPlots::h_photon_n
TH1 * h_photon_n
Definition: ReconElectronsPlots.h:40
ZeeValidation::ReconElectronsPlots::h_n_trt_hits_high_outliers
TH1 * h_n_trt_hits_high_outliers
Definition: ReconElectronsPlots.h:109
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
xAOD::EgammaParameters::emaxs1
@ emaxs1
energy of strip with maximal energy deposit
Definition: EgammaEnums.h:145
ZeeValidation::ReconElectronsPlots::h_dphi1
TH1 * h_dphi1
Definition: ReconElectronsPlots.h:84
ZeeValidation::ReconElectronsPlots::h_electron_phi
TH1 * h_electron_phi[nLevels]
Definition: ReconElectronsPlots.h:52
ZeeValidation::ReconElectronsPlots::h_n_blayer_hits_outliers
TH1 * h_n_blayer_hits_outliers
Definition: ReconElectronsPlots.h:105
xAOD::EgammaParameters::fracs1
@ fracs1
shower shape in the shower core : [E(+/-3)-E(+/-1)]/E(+/-1), where E(+/-n) is the energy in ± n strip...
Definition: EgammaEnums.h:111
xAOD::numberOfInnermostPixelLayerHits
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
Definition: TrackingPrimitives.h:237
read_hist_ntuple.f1
f1
Definition: read_hist_ntuple.py:4
xAOD::EgammaParameters::weta2
@ weta2
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...
Definition: EgammaEnums.h:103
ZeeValidation::ReconElectronsPlots::initializePlots
virtual void initializePlots()
Definition: ReconElectronsPlots.cxx:66