ATLAS Offline Software
Loading...
Searching...
No Matches
ReconElectronsPlots.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8using CLHEP::GeV;
9
10namespace ZeeValidation{
11
12 ReconElectronsPlots::ReconElectronsPlots(PlotBase* pParent, const std::string& sDir, const 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),
36 h_n_si_hits(NULL), h_n_trt_hits(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 //-------------------------------------------------
180 void ReconElectronsPlots::fill(const xAOD::Electron* electron, int level){
181 h_electron_eta[level] -> Fill(electron -> eta());
182 }
183 //-------------------------------------------------
184 void ReconElectronsPlots::fillinAcc(const xAOD::Electron* electron, int level){
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);
202 if (electron -> showerShapeValue(r33over37allcalo, xAOD::EgammaParameters::r33over37allcalo)) h_iso -> Fill(r33over37allcalo);
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 //-------------------------------------------------
320 //-------------------------------------------------
321 void ReconElectronsPlots::makeEfficiencyPlot(TH1* hDenom, TH1* hNom, TProfile* hEff){
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}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define y
#define x
#define z
TH1D * 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:94
PlotBase(PlotBase *parent, const std::string &sDir)
Definition PlotBase.cxx:29
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:186
void fillinAcc(const xAOD::Electron *electron, int level)
void fill(const xAOD::Electron *electron, int level)
ReconElectronsPlots(PlotBase *pParent, const std::string &sDir, const std::string &sParticleType)
static const std::string cLevelLabel[nLevels]
void fillShowerShape(const xAOD::Electron *electron)
void fillIsolation(const xAOD::Electron *electron)
void fillTrackCaloMatch(const xAOD::Electron *electron, const xAOD::TrackParticle *track)
void makeEfficiencyPlot(TH1 *hDenom, TH1 *hNom, TProfile *hEff)
void fillHitInfo(const xAOD::Electron *electron)
@ deltaPhi1
difference between the cluster eta (1st sampling) and the eta of the track extrapolated to the 1st sa...
@ deltaEta2
difference between the cluster eta (second sampling) and the eta of the track extrapolated to the sec...
@ deltaPhiRescaled2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
@ deltaPhi2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
@ deltaEta1
difference between the cluster eta (first sampling) and the eta of the track extrapolated to the firs...
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
@ f3core
E3(3x3)/E fraction of the energy reconstructed in the third compartment of the electromagnetic calori...
Definition EgammaEnums.h:66
@ ethad1
transverse energy in the first sampling of the hadronic calorimeters behind the cluster calculated fr...
Definition EgammaEnums.h:43
@ e277
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
Definition EgammaEnums.h:81
@ e237
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x7
Definition EgammaEnums.h:78
@ ethad
ET leakage into hadronic calorimeter with exclusion of energy in CaloSampling::TileGap3.
Definition EgammaEnums.h:46
@ f3
fraction of energy reconstructed in 3rd sampling
Definition EgammaEnums.h:55
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
Definition EgammaEnums.h:53
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
@ emaxs1
energy of strip with maximal energy deposit
@ e233
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x3 (in cell units e...
Definition EgammaEnums.h:69
@ fracs1
shower shape in the shower core : [E(+/-3)-E(+/-1)]/E(+/-1), where E(+/-n) is the energy in ± n strip...
@ r33over37allcalo
1-ratio of energy in 3x3 over 3x7 cells; E(3x3) = E0(1x1) + E1(3x1) + E2(3x3) + E3(3x3); E(3x7) = E0(...
@ weta2
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...
@ weta1
shower width using +/-3 strips around the one with the maximal energy deposit: w3 strips = sqrt{sum(E...
Definition EgammaEnums.h:98
@ e2tsts1
energy of the cell corresponding to second energy maximum in the first sampling
@ emins1
energy reconstructed in the strip with the minimal value between the first and second maximum
@ f1core
E1(3x1)/E = fraction of the energy reconstructed in the first longitudinal compartment of the electro...
Definition EgammaEnums.h:61
@ etcone20
Calorimeter isolation.
@ ptcone20
Track isolation.
@ PriVtx
Primary vertex.
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
EventInfo_v1 EventInfo
Definition of the latest event info version.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
@ numberOfTRTHighThresholdOutliers
number of TRT high threshold outliers (only xenon counted) [unit8_t].
@ numberOfPixelOutliers
these are the pixel outliers, including the b-layer [unit8_t].
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ numberOfInnermostPixelLayerOutliers
number of 0th layer barrel outliers
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfSCTOutliers
number of SCT outliers [unit8_t].
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ numberOfTRTHighThresholdHits
number of TRT hits which pass the high threshold (only xenon counted) [unit8_t].
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
Electron_v1 Electron
Definition of the current "egamma version".