ATLAS Offline Software
Loading...
Searching...
No Matches
IsolationCorrection.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Header for the ROOT tool of this package
7#include "TFile.h"
8#include "TGraphAsymmErrors.h"
9#include "TRandom3.h"
10#include "TTree.h"
11#include "TVector.h"
12// xAOD
14#include "xAODEgamma/Electron.h"
15#include "xAODEgamma/Photon.h"
19
21
22#include <typeinfo>
23#include <utility>
24#include <cmath>
25
26
27namespace{
28const float GeV(1000);
29}
30
31namespace CP {
32
38 m_corr_file(""),
40 m_corr_ddsmearing_file(""), // in run I, there was a shift and a smearing
41 m_is_mc(false),
42 m_AFII_corr(false),
43 m_set_mc(false),
44 m_correct_etcone(false),
46 m_useLogLogFit(false),
48 m_shower(nullptr),
49 m_previousYear("2000")
50 {
51 // 3 possible periods
52 for (int i = 0; i < 3; i++) {
53 // 2 simulation flavour
54 for (int j = 0; j < 2; j++)
55 m_corrInitialized[i][j] = false;
56 }
57 }
58
59 void IsolationCorrection::SetCorrectionFile(const std::string& corr_file, const std::string& corr_ddshift_file, const std::string& corr_ddsmearing_file) {
60 // the leakage parameterisation
62 // the DD shifts (for photons)
64 // And an eventual smearing (run I)
66 }
67
69
70 setEtaBins();
73 return StatusCode::SUCCESS;
74 }
75
79
80
82 float corrected_isolation = input.isolationValue(isol) - GetPtCorrection(input, isol);
83 return corrected_isolation;
84
85 }
86
87
89 /*
90 - nPV: number of primary vertices (corrections were derived requiring >= 2 tracks/vertex in 2011 data)
91
92 - Etcone40: (ph_Etcone40) *** in MeV!
93 - Etcone40_ED_corrected: ED corrected version of Etcone40 (ph_Etcone40_ED_corrected) *** in Mev!
94
95 - energy: cluster energy (ph_cl_E) *** in MeV!
96 - etaS2: eta in the 2nd calo sampling (ph_etas2)
97 - etaPointing: pointing eta -> from 1st and 2nd calo samplings (ph_etap)
98 - etaCluster: cluster eta (ph_cl_eta)
99 - radius: radius of the input EtconeXX variable. Can be given as, e.g., .20 or 20
100 - is_mc: set to true if running on MC
101 - Etcone_value: value of uncorrected EtconeXX variable (ph_EtconeXX) *** in MeV!
102 - isConversion: photons only: conversion flag (ph_isConv)
103 - parttype: ELECTRON or PHOTON, enum defined below
104 - version: REL22, REL21, REL20_2, REL17_2, REL17 or REL16, enum defined below
105 */
106 float isolation_ptcorrection = 0;
107 float energy = 0;
108
109 //energy = input.caloCluster()->energyBE(1) + input.caloCluster()->energyBE(2) + input.caloCluster()->energyBE(3); //input.e()
110 if (input.caloCluster() == nullptr) {
111 ATH_MSG_WARNING("The associated cluster of the object does not exist ! Maybe the thinning was too agressive... No leakage correction computed.");
112 return 0.;
113 }
115 energy = input.caloCluster()->energyBE(1) + input.caloCluster()->energyBE(2) + input.caloCluster()->energyBE(3);
116 else
117 energy = input.caloCluster()->e();
118
119 bool is_mc = m_is_mc;
121 bool convFlag = false;
122
123 float etaS2 = input.caloCluster()->etaBE(2);
124 float etaS1 = input.caloCluster()->etaBE(1);
125 float etaCluster = input.caloCluster()->eta();
126 float phiCluster = input.caloCluster()->phi();
127
128 if(part_type == IsolationCorrection::PHOTON && fabs(etaS2) > 2.37) return 0.;
129 if(part_type == IsolationCorrection::ELECTRON && fabs(etaS2) > 2.47) return 0.;
130
131 if(fabs(etaS1) > 2.5) return 0.;
132 if(fabs(phiCluster) > float(M_PI)) return 0.;
133
134 if (part_type == IsolationCorrection::ELECTRON && energy > 15e3)
135 ATH_MSG_VERBOSE("Electron ? " << (part_type == IsolationCorrection::ELECTRON) << " Input E = " << input.caloCluster()->e() << " E used " << energy << " author = " << input.author() << " pT = " << input.pt() << " phi = " << input.phi());
136
137 int convFlag_int = 0;
138 float conv_radius = 0.;
139 float conv_ratio = 0.;
140
141 if(part_type == IsolationCorrection::PHOTON){
142 const xAOD::Photon* ph_input = static_cast<const xAOD::Photon_v1*> (&input);
143
144 convFlag_int = xAOD::EgammaHelpers::conversionType(ph_input);
145 if(convFlag_int == 3 ) convFlag_int = 2;
146 else if(convFlag_int != 0) convFlag_int = 1;
147
148 if(convFlag_int != 0) convFlag = true;
149 conv_radius = xAOD::EgammaHelpers::conversionRadius(ph_input);
150
151 if(convFlag_int == 2){
152 const xAOD::Vertex* phVertex = ph_input->vertex();
153
154 static const SG::AuxElement::Accessor<float> accPt1("pt1");
155 static const SG::AuxElement::Accessor<float> accPt2("pt2");
156 const xAOD::TrackParticle* tp0 = phVertex->trackParticle(0);
157 const xAOD::TrackParticle* tp1 = phVertex->trackParticle(1);
158
159 float pt1conv, pt2conv;
160 if (accPt1.isAvailable(*phVertex) && accPt2.isAvailable(*phVertex) ){
161 pt1conv = accPt1(*phVertex);
162 pt2conv = accPt2(*phVertex);
163 }else{
164 pt1conv = getPtAtFirstMeasurement( tp0 );
165 pt2conv = getPtAtFirstMeasurement( tp1 );
166 }
167
168 if(pt1conv > pt2conv) conv_ratio = pt2conv/pt1conv;
169 else conv_ratio = pt1conv/pt2conv;
170 }
171 }
172 int author = input.author();
173
174 // for test
176 if (input.phi() > 0)
177 author = 1;
178 else
179 author = 16;
180 }
181
182 //using std::optional
183 auto etaPointing = m_shower->getCaloPointingEta(etaS1, etaS2, phiCluster, is_mc);
184 if (!etaPointing.has_value()) return 0.;
185
186 float radius = xAOD::Iso::coneSize(isol);
188
189 if(is_topo){
190
191 isolation_ptcorrection = GetPtCorrectionTopo( energy,
192 etaS2,
193 etaPointing.value(),
194 etaCluster,
195 radius,
196 is_mc,
197 convFlag,
198 part_type,
200 convFlag_int,
201 author,
202 conv_radius,
203 conv_ratio);
204 }else{
205 isolation_ptcorrection = GetPtCorrection( energy,
206 etaS2,
207 etaPointing.value(),
208 etaCluster,
209 radius,
210 is_mc,
211 convFlag,
212 part_type);
213 }
214
215 return isolation_ptcorrection;
216 }
217
219 {
220 if (!tp) return 0;
221 for (unsigned int i = 0; i < tp->numberOfParameters(); ++i)
222 if (tp->parameterPosition(i) == xAOD::FirstMeasurement)
223 return hypot(tp->parameterPX(i), tp->parameterPY(i));
224 return tp->pt();
225 }
226
227 // I also include the DD from 2015 study because it is done in the same way as 2015-2016 or 2017
228StatusCode IsolationCorrection::setupDD(const std::string& year) {
229
230 if (m_corr_ddshift_file.empty()){
231 ATH_MSG_WARNING("IsolationCorrection::GetDDCorrection " << year << ", unknown correction file name.\nNo correction is applied.\n");
232 return StatusCode::FAILURE;
233 }
234
235 int ii = year == "2017" ? 2 : (year == "2015_2016" ? 1 : 0);
236 int jj = m_AFII_corr ? 1 : 0;
237
238 if (year == m_previousYear && m_corrInitialized[ii][jj])
239 return StatusCode::SUCCESS;
240
241 ATH_MSG_VERBOSE("Will setup the tool to retrieve " << year << " DD corrections");
242
243 m_previousYear = year;
244 if (year == "2015") {
246 m_crackBin = 2;
251 } else if (year == "2015_2016") {
253 m_crackBin = 4;
258 } else if (year == "2017") {
260 m_crackBin = 4;
265 } else {
266 ATH_MSG_WARNING("Year " << year << " is not known in IsolationCorrection ! Check your input ! No correction is applied");
267 return StatusCode::FAILURE;
268 }
269
270 if (!m_corrInitialized[ii][jj]) {
271
272 ATH_MSG_VERBOSE("DD corrections for year " << year << " not loaded yet. Doing it know");
273
274 std::unique_ptr< TFile > file_ptleakagecorr( TFile::Open( m_corr_ddshift_file.c_str(), "READ" ) );
275 if (!file_ptleakagecorr) {
276 ATH_MSG_ERROR("file " << m_corr_ddshift_file << " not found ! Check your inputs");
277 return StatusCode::FAILURE;
278 }
279 TString baseN = year + "/" + (m_AFII_corr ? "AF2/" : "FullSim/");
280 TVector *veta = (TVector*)file_ptleakagecorr->Get(baseN+"/etaBinning");
281 m_feta_bins_dd->resize(veta->GetNrows());
282 for (int ieta = 0; ieta < veta->GetNrows(); ieta++) m_feta_bins_dd->at(ieta) = (*veta)[ieta];
283 TTree *tbinLabel = (TTree*)file_ptleakagecorr->Get(baseN+"tbinLabel");
284 TBranch *bbinLabel(nullptr);
285 TString *binLabel(nullptr); tbinLabel->SetBranchAddress("binLabel",&binLabel,&bbinLabel);
286 for (unsigned int ieta = 0; ieta < m_feta_bins_dd->size()-2; ieta++) {
287 tbinLabel->GetEntry(ieta);
288 TString gN = "topoETcone40_DataDriven_unconverted_photon_eta_";
289 gN += (*binLabel);
290 m_graph_dd_cone40_unconv_photon_shift->push_back( (TGraph*) file_ptleakagecorr->Get(baseN+gN));
291 gN = "topoETcone40_DataDriven_converted_photon_eta_";
292 gN += (*binLabel);
293 m_graph_dd_cone40_conv_photon_shift->push_back( (TGraph*) file_ptleakagecorr->Get(baseN+gN));
294 gN = "topoETcone20_DataDriven_unconverted_photon_eta_";
295 gN += (*binLabel);
296 m_graph_dd_cone20_unconv_photon_shift->push_back( (TGraph*) file_ptleakagecorr->Get(baseN+gN));
297 gN = "topoETcone20_DataDriven_converted_photon_eta_";
298 gN += (*binLabel);
299 m_graph_dd_cone20_conv_photon_shift->push_back( (TGraph*) file_ptleakagecorr->Get(baseN+gN));
300 ATH_MSG_VERBOSE("Got graphs \n"
301 << " dR = 0.4, unconv " << m_graph_dd_cone40_unconv_photon_shift->at(ieta)->GetName() << "\n"
302 << " dR = 0.4, conv " << m_graph_dd_cone40_conv_photon_shift->at(ieta)->GetName() << "\n"
303 << " dR = 0.2, unconv " << m_graph_dd_cone20_unconv_photon_shift->at(ieta)->GetName() << "\n"
304 << " dR = 0.2, conv " << m_graph_dd_cone20_conv_photon_shift->at(ieta)->GetName());
305
306 }
307 m_corrInitialized[ii][jj] = true;
308 }
309
310 return StatusCode::SUCCESS;
311}
312
313 float IsolationCorrection::GetDDCorrection(const xAOD::Egamma& input, const xAOD::Iso::IsolationType isol, const std::string& year) {
314
315 ATH_MSG_VERBOSE("Getting DD correction");
316 if (setupDD(year) == StatusCode::FAILURE) {
317 return 0;
318 }
319
320 // corrections only for MC and photon
321 if(!m_is_mc || input.type() == xAOD::Type::Electron) return 0;
322
323 const xAOD::Photon* ph_input = static_cast<const xAOD::Photon_v1*> (&input);
324 int convFlag_int = xAOD::EgammaHelpers::conversionType(ph_input);
325
326 bool converted = false;
327 if(convFlag_int > 0) converted = true;
328
329 float etaS2 = input.eta();
330 int eta_bin = 0;
331
332 double feta = fabs(etaS2);
333 for (unsigned int i = 0; i < m_feta_bins_dd->size()-1; i++) {
334 if (feta >= m_feta_bins_dd->at(i) && feta < m_feta_bins_dd->at(i+1))
335 eta_bin = i;
336 }
337 if (eta_bin == m_crackBin)
338 return 0;
339 else if (eta_bin > m_crackBin)
340 eta_bin -= 1;
341
342 if (eta_bin < 0) {
343 ATH_MSG_WARNING("Strange cluster S2 eta for photon isolation DD correction ! eta = " << etaS2 << ". No correction");
344 return 0;
345 }
346
347 if (input.pt() > 25e3)
348 ATH_MSG_VERBOSE("Getting correction for photon pt: " <<input.pt()
349 << " eta: " << etaS2 << " etabin: " << eta_bin);
350
351 float pt_gev = input.pt()*0.001;
352 if (pt_gev > 999.) pt_gev = 999. ;
353
354 float isolation_ddcorrection = 0;
355 if (isol==xAOD::Iso::topoetcone40) {
356 if (!converted)
357 isolation_ddcorrection = 1e3*(*m_graph_dd_cone40_unconv_photon_shift)[eta_bin]->Eval(pt_gev);
358 else
359 isolation_ddcorrection = 1e3*(*m_graph_dd_cone40_conv_photon_shift)[eta_bin]->Eval(pt_gev);
360 } else if (isol==xAOD::Iso::topoetcone20) {
361 if (!converted)
362 isolation_ddcorrection = 1e3*(*m_graph_dd_cone20_unconv_photon_shift)[eta_bin]->Eval(pt_gev);
363 else
364 isolation_ddcorrection = 1e3*(*m_graph_dd_cone20_conv_photon_shift)[eta_bin]->Eval(pt_gev);
365 }
366
367 return isolation_ddcorrection;
368 }
369
371 if (input->caloCluster() == nullptr) {
372 ATH_MSG_WARNING("The associated cluster of the object does not exist ! Maybe the thinning was too agressive... use object eta for eta (instead of etaS2 or pointing).");
373 return input->eta();
374 }
375 float etaS1 = input->caloCluster()->etaBE(1);
376 float etaS2 = input->caloCluster()->etaBE(2);
377 float phiCluster = input->caloCluster()->phi();
379
380 if(part_type == IsolationCorrection::PHOTON && fabs(etaS2) > 2.37) return 0.;
381 if(part_type == IsolationCorrection::ELECTRON && fabs(etaS2) > 2.47) return 0.;
382 if(fabs(etaS1) > 2.5) return 0.;
383 if(fabs(phiCluster) > 3.2) return 0.;
384
385 auto etaPointing = m_shower->getCaloPointingEta(etaS1, etaS2, phiCluster);
386 //using std::optional here
387 return etaPointing.value_or(0.);
388 }
389
391 m_is_mc = is_mc;
392 m_set_mc = true;
393 }
394
395 void IsolationCorrection::SetAFII(bool AFII_corr){
396 m_AFII_corr = AFII_corr;
397 }
398
399 // obsolete
400 /*
401 void IsolationCorrection::SetDD(bool apply_dd){
402 ATH_MSG_WARNING("The method SetDD is obsolete and not doing anything");
403 }
404 */
405
406 void IsolationCorrection::SetCorrectEtcone(bool correct_etcone){
407 m_correct_etcone = correct_etcone;
408 }
409
410 void IsolationCorrection::SetTroubleCategories(bool trouble_categories){
411 m_trouble_categories = trouble_categories;
412 }
413
417
421 m_eta_bins_fine = {0.0, 0.10, 0.60, 0.80, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47};
422 m_eta_bins_coarse = {0.0, 0.60, 1.37, 1.52, 1.81, 2.47};
423 }
424
425 // initialize the leakage corrections and DD only for rel17.2.
426 // Other DD are initialized once used for the first time
428 if (m_tool_ver == REL17_2) {
429 set2011Corr(); // in fact, this is for etcone
430 set2012Corr();
431 setDDCorr();
432 } else if (m_tool_ver == REL20_2 || m_tool_ver == REL21 || m_tool_ver == REL22)
433 set2015Corr();
434 }
435
436 // This for etcone !!! From 2011 !
438
439 // -------------------------------------------------------------------------------------------
440 // ------------- full 2011 (rel 17) leakage corrections --------------------------------------
441 // CURRENT isolation corrections: fine grained in eta, derived from MC11
442 m_mc_rel17_leakage_correction_slopes_electron_15 = { 0.01466, 0.01421, 0.01427, 0.01872, 0.02008, 0.02181, 0.02141, 0.02636, 0.03285, 0.03564 };
443 m_mc_rel17_leakage_correction_slopes_electron_20 = { 0.01616, 0.01572, 0.01596, 0.02139, 0.02339, 0.03350, 0.02499, 0.03038, 0.03870, 0.04337 };
444 m_mc_rel17_leakage_correction_slopes_electron_25 = { 0.01663, 0.01616, 0.01667, 0.02223, 0.02445, 0.03852, 0.02611, 0.03174, 0.04093, 0.04692 };
445 m_mc_rel17_leakage_correction_slopes_electron_30 = { 0.01689, 0.01635, 0.01684, 0.02256, 0.02485, 0.04223, 0.02660, 0.03232, 0.04182, 0.04846 };
446 m_mc_rel17_leakage_correction_slopes_electron_35 = { 0.01695, 0.01642, 0.01693, 0.02268, 0.02501, 0.04403, 0.02685, 0.03254, 0.04223, 0.04928 };
447 m_mc_rel17_leakage_correction_slopes_electron_40 = { 0.01701, 0.01646, 0.01702, 0.02272, 0.02517, 0.04550, 0.02698, 0.03267, 0.04242, 0.04964 };
448
449 m_mc_rel17_leakage_correction_offsets_electron_15 = { 21.71, 36.00, 132.56, 191.64, 263.46, 619.58, 288.75, 121.92, 102.35, 175.02 };
450 m_mc_rel17_leakage_correction_offsets_electron_20 = { 76.67, 85.35, 184.90, 276.72, 384.97, 595.60, 657.99, 231.88, 170.48, 312.30 };
451 m_mc_rel17_leakage_correction_offsets_electron_25 = { 90.44, 105.02, 267.95, 420.38, 555.09, 1014.50, 765.83, 283.50, 224.18, 357.30 };
452 m_mc_rel17_leakage_correction_offsets_electron_30 = { 119.55, 127.09, 279.48, 430.96, 571.81, 846.86, 968.01, 354.46, 263.11, 455.21 };
453 m_mc_rel17_leakage_correction_offsets_electron_35 = { 138.79, 161.87, 371.47, 572.08, 754.17, 1249.38, 1000.44, 389.22, 295.72, 464.28 };
454 m_mc_rel17_leakage_correction_offsets_electron_40 = { 180.08, 187.89, 363.31, 553.46, 707.60, 1006.20, 1105.73, 434.21, 312.78, 535.90 };
455
456 // photons: last eta bin isn't used
457 m_mc_rel17_leakage_correction_slopes_photon_converted_15 = { 0.01450, 0.01410, 0.01410, 0.01860, 0.01990, 0.0, 0.02120, 0.02610, 0.03260, 0.0 };
458 m_mc_rel17_leakage_correction_slopes_photon_converted_20 = { 0.01600, 0.01560, 0.01580, 0.02130, 0.02320, 0.0, 0.02450, 0.03000, 0.03840, 0.0 };
459 m_mc_rel17_leakage_correction_slopes_photon_converted_25 = { 0.01630, 0.01600, 0.01620, 0.02210, 0.02420, 0.0, 0.02560, 0.03140, 0.04060, 0.0 };
460 m_mc_rel17_leakage_correction_slopes_photon_converted_30 = { 0.01630, 0.01600, 0.01630, 0.02240, 0.02460, 0.0, 0.02610, 0.03190, 0.04150, 0.0 };
461 m_mc_rel17_leakage_correction_slopes_photon_converted_35 = { 0.01660, 0.01600, 0.01630, 0.02240, 0.02470, 0.0, 0.02640, 0.03210, 0.04190, 0.0 };
462 m_mc_rel17_leakage_correction_slopes_photon_converted_40 = { 0.01610, 0.01590, 0.01620, 0.02250, 0.02480, 0.0, 0.02650, 0.03220, 0.04210, 0.0 };
463
464 m_mc_rel17_leakage_correction_offsets_photon_converted_15 = { 36.50, 61.80, 176.90, 206.40, 300.70, 0.0, 277.40, 91.70, 126.60, 0.0 };
465 m_mc_rel17_leakage_correction_offsets_photon_converted_20 = { 93.30, 101.40, 270.60, 369.10, 514.70, 0.0, 586.10, 160.80, 193.80, 0.0 };
466 m_mc_rel17_leakage_correction_offsets_photon_converted_25 = { 195.80, 166.20, 386.50, 472.30, 637.30, 0.0, 739.40, 207.60, 240.60, 0.0 };
467 m_mc_rel17_leakage_correction_offsets_photon_converted_30 = { 286.60, 241.60, 501.60, 570.70, 739.50, 0.0, 860.00, 264.50, 270.40, 0.0 };
468 m_mc_rel17_leakage_correction_offsets_photon_converted_35 = { 329.90, 314.70, 585.60, 655.60, 835.70, 0.0, 934.30, 291.50, 291.90, 0.0 };
469 m_mc_rel17_leakage_correction_offsets_photon_converted_40 = { 478.70, 383.80, 679.20, 725.70, 938.70, 0.0, 999.30, 322.80, 316.20, 0.0 };
470
471 m_mc_rel17_leakage_correction_slopes_photon_unconverted_15 = { 0.01480, 0.01410, 0.01400, 0.01820, 0.01950, 0.0, 0.02140, 0.02660, 0.03250, 0.0 };
472 m_mc_rel17_leakage_correction_slopes_photon_unconverted_20 = { 0.01630, 0.01560, 0.01560, 0.02060, 0.02240, 0.0, 0.02480, 0.03060, 0.03830, 0.0 };
473 m_mc_rel17_leakage_correction_slopes_photon_unconverted_25 = { 0.01670, 0.01610, 0.01620, 0.02140, 0.02330, 0.0, 0.02590, 0.03200, 0.04050, 0.0 };
474 m_mc_rel17_leakage_correction_slopes_photon_unconverted_30 = { 0.01690, 0.01630, 0.01640, 0.02170, 0.02360, 0.0, 0.02630, 0.03260, 0.04140, 0.0 };
475 m_mc_rel17_leakage_correction_slopes_photon_unconverted_35 = { 0.01700, 0.01640, 0.01650, 0.02180, 0.02380, 0.0, 0.02650, 0.03280, 0.04180, 0.0 };
476 m_mc_rel17_leakage_correction_slopes_photon_unconverted_40 = { 0.01710, 0.01640, 0.01650, 0.02190, 0.02390, 0.0, 0.02660, 0.03290, 0.04200, 0.0 };
477
478 m_mc_rel17_leakage_correction_offsets_photon_unconverted_15 = { -27.80, 3.80, 67.50, 80.90, 114.90, 0.0, 82.60, 2.10, 39.80, 0.0 };
479 m_mc_rel17_leakage_correction_offsets_photon_unconverted_20 = { -17.70, 12.60, 97.80, 126.50, 186.20, 0.0, 200.80, 24.00, 62.30, 0.0 };
480 m_mc_rel17_leakage_correction_offsets_photon_unconverted_25 = { -8.60, 20.30, 118.20, 161.80, 244.30, 0.0, 271.80, 39.80, 79.10, 0.0 };
481 m_mc_rel17_leakage_correction_offsets_photon_unconverted_30 = { 5.40, 33.80, 141.60, 199.50, 295.40, 0.0, 336.50, 64.80, 90.40, 0.0 };
482 m_mc_rel17_leakage_correction_offsets_photon_unconverted_35 = { 9.60, 47.80, 154.10, 231.10, 346.10, 0.0, 384.60, 77.80, 96.90, 0.0 };
483 m_mc_rel17_leakage_correction_offsets_photon_unconverted_40 = { 13.30, 62.00, 177.00, 267.10, 406.20, 0.0, 419.80, 89.40, 105.90, 0.0 };
484 }
485
487 if( !m_corr_file.empty()){
488 load2012Corr();
489 }else{
490 ATH_MSG_WARNING("Correction file for 2017 data/mc not specified, tool not initialized for 2017 corrections\n");
491 }
492 }
493
495 std::unique_ptr<TFile> file_ptleakagecorr(TFile::Open(m_corr_file.c_str(), "READ"));
496 if(!file_ptleakagecorr){
497 ATH_MSG_WARNING("Correction file for 2012 data/mc not found, tool not initialized for 2012 corrections\n");
498 m_corr_file = "";
499 return;
500 }else{
501 m_graph_cone40_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_unconverted_etabin0_extrap") );
502 m_graph_cone40_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_unconverted_etabin1_extrap") );
503 m_graph_cone40_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_unconverted_etabin2_extrap") );
504 m_graph_cone40_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_unconverted_etabin3_extrap") );
505 m_graph_cone40_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_unconverted_etabin4_extrap") );
506 m_graph_cone40_photon_unconverted.push_back( new TGraph() );//No corrections for photons in the crack region
507 m_graph_cone40_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_unconverted_etabin6_extrap") );
508 m_graph_cone40_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_unconverted_etabin7_extrap") );
509 m_graph_cone40_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_unconverted_etabin8_extrap") );
510 m_graph_cone40_photon_unconverted.push_back( new TGraph() );//No corrections for photons with |eta|>2.37
511
512 m_graph_cone40_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_converted_etabin0_extrap") );
513 m_graph_cone40_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_converted_etabin1_extrap") );
514 m_graph_cone40_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_converted_etabin2_extrap") );
515 m_graph_cone40_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_converted_etabin3_extrap") );
516 m_graph_cone40_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_converted_etabin4_extrap") );
517 m_graph_cone40_photon_converted.push_back( new TGraph() );//No corrections for photons in the crack region
518 m_graph_cone40_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_converted_etabin6_extrap") );
519 m_graph_cone40_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_converted_etabin7_extrap") );
520 m_graph_cone40_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_photon_converted_etabin8_extrap") );
521 m_graph_cone40_photon_converted.push_back( new TGraph() );//No corrections for photons with |eta|>2.37
522
523 m_graph_cone40_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_electron_etabin0_extrap") );
524 m_graph_cone40_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_electron_etabin1_extrap") );
525 m_graph_cone40_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_electron_etabin2_extrap") );
526 m_graph_cone40_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_electron_etabin3_extrap") );
527 m_graph_cone40_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_electron_etabin4_extrap") );
528 m_graph_cone40_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_electron_etabin5_extrap") );
529 m_graph_cone40_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_electron_etabin6_extrap") );
530 m_graph_cone40_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_electron_etabin7_extrap") );
531 m_graph_cone40_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_electron_etabin8_extrap") );
532 m_graph_cone40_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone40_electron_etabin9_extrap") );
533
534 m_graph_cone30_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_unconverted_etabin0_extrap") );
535 m_graph_cone30_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_unconverted_etabin1_extrap") );
536 m_graph_cone30_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_unconverted_etabin2_extrap") );
537 m_graph_cone30_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_unconverted_etabin3_extrap") );
538 m_graph_cone30_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_unconverted_etabin4_extrap") );
539 m_graph_cone30_photon_unconverted.push_back( new TGraph() );//No corrections for photons in the crack region
540 m_graph_cone30_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_unconverted_etabin6_extrap") );
541 m_graph_cone30_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_unconverted_etabin7_extrap") );
542 m_graph_cone30_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_unconverted_etabin8_extrap") );
543 m_graph_cone30_photon_unconverted.push_back( new TGraph() );//No corrections for photons with |eta|>2.37
544
545 m_graph_cone30_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_converted_etabin0_extrap") );
546 m_graph_cone30_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_converted_etabin1_extrap") );
547 m_graph_cone30_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_converted_etabin2_extrap") );
548 m_graph_cone30_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_converted_etabin3_extrap") );
549 m_graph_cone30_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_converted_etabin4_extrap") );
550 m_graph_cone30_photon_converted.push_back( new TGraph() );//No corrections for photons in the crack region
551 m_graph_cone30_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_converted_etabin6_extrap") );
552 m_graph_cone30_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_converted_etabin7_extrap") );
553 m_graph_cone30_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_photon_converted_etabin8_extrap") );
554 m_graph_cone30_photon_converted.push_back( new TGraph() );//No corrections for photons with |eta|>2.37
555
556 m_graph_cone30_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_electron_etabin0_extrap") );
557 m_graph_cone30_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_electron_etabin1_extrap") );
558 m_graph_cone30_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_electron_etabin2_extrap") );
559 m_graph_cone30_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_electron_etabin3_extrap") );
560 m_graph_cone30_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_electron_etabin4_extrap") );
561 m_graph_cone30_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_electron_etabin5_extrap") );
562 m_graph_cone30_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_electron_etabin6_extrap") );
563 m_graph_cone30_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_electron_etabin7_extrap") );
564 m_graph_cone30_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_electron_etabin8_extrap") );
565 m_graph_cone30_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone30_electron_etabin9_extrap") );
566
567 m_graph_cone20_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_unconverted_etabin0_extrap") );
568 m_graph_cone20_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_unconverted_etabin1_extrap") );
569 m_graph_cone20_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_unconverted_etabin2_extrap") );
570 m_graph_cone20_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_unconverted_etabin3_extrap") );
571 m_graph_cone20_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_unconverted_etabin4_extrap") );
572 m_graph_cone20_photon_unconverted.push_back( new TGraph() );//No corrections for photons in the crack region
573 m_graph_cone20_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_unconverted_etabin6_extrap") );
574 m_graph_cone20_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_unconverted_etabin7_extrap") );
575 m_graph_cone20_photon_unconverted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_unconverted_etabin8_extrap") );
576 m_graph_cone20_photon_unconverted.push_back( new TGraph() );//No corrections for photons with |eta|>2.37
577
578 m_graph_cone20_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_converted_etabin0_extrap") );
579 m_graph_cone20_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_converted_etabin1_extrap") );
580 m_graph_cone20_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_converted_etabin2_extrap") );
581 m_graph_cone20_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_converted_etabin3_extrap") );
582 m_graph_cone20_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_converted_etabin4_extrap") );
583 m_graph_cone20_photon_converted.push_back( new TGraph() );//No corrections for photons in the crack region
584 m_graph_cone20_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_converted_etabin6_extrap") );
585 m_graph_cone20_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_converted_etabin7_extrap") );
586 m_graph_cone20_photon_converted.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_photon_converted_etabin8_extrap") );
587 m_graph_cone20_photon_converted.push_back( new TGraph() );//No corrections for photons with |eta|>2.37
588
589 m_graph_cone20_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_electron_etabin0_extrap") );
590 m_graph_cone20_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_electron_etabin1_extrap") );
591 m_graph_cone20_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_electron_etabin2_extrap") );
592 m_graph_cone20_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_electron_etabin3_extrap") );
593 m_graph_cone20_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_electron_etabin4_extrap") );
594 m_graph_cone20_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_electron_etabin5_extrap") );
595 m_graph_cone20_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_electron_etabin6_extrap") );
596 m_graph_cone20_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_electron_etabin7_extrap") );
597 m_graph_cone20_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_electron_etabin8_extrap") );
598 m_graph_cone20_electron.push_back( (TGraph*) file_ptleakagecorr->Get("graph_cone20_electron_etabin9_extrap") );
599 }
600 }
601
603 if( !m_corr_file.empty()){
604 load2015Corr();
605 }else{
606 ATH_MSG_WARNING("Correction file for 2015 data/mc not specified, tool not initialized for 2015 corrections\n");
607 }
608 }
609
611 std::unique_ptr<TFile> file_ptleakagecorr(TFile::Open(m_corr_file.c_str(), "READ"));
612 if(!file_ptleakagecorr){
613 ATH_MSG_WARNING("Correction file for 2015 data/mc not found, "<<m_corr_file<<". tool not initialized for 2015 corrections\n");
614 m_corr_file = "";
615 }else{
616 if(!file_ptleakagecorr->GetListOfKeys()->Contains("mean_f_topoetcone40_eta_1.15_1.37_converted_ok")){
617 ATH_MSG_ERROR("Correction file for 2015 data/mc is not right, "<<m_corr_file<<". Tool not initialized for 2015 corrections\n");
618 m_corr_file = "";
619 } else {
620
621 // ******************************
622 // Global fit corrections *******
623 // ******************************
624
625 static const int nEta = 10;
626 static const TString etaLab[nEta] = { "0.0_0.1", "0.1_0.6", "0.6_0.8", "0.8_1.15", "1.15_1.37", "1.37_1.52", "1.52_1.81", "1.81_2.01", "2.01_2.37", "2.37_2.47" };
627 static const TString pLab[5] = { "_unconverted", "_converted_ok", "_converted_trouble", "_author_1_electron", "_author_16_electron" };
628 static const TString dRLab[3] = { "20", "30", "40" };
629
639
646
651
655 }
656
657 for (int iPart = 0; iPart < 5; iPart++) {
658
659 for (int iEta = 0; iEta < 10; iEta++) {
660
661 // No parametrisation in the crack or above |eta| = 2.37 for photons
662 if (iPart < 3 && (iEta == 5 || iEta == 9))
663 continue;
664
665 for (int idR = 0; idR < 3; idR++) {
666 // The LogLog fit is a quick-and-dirty solution to get rid of negative leakage at low ET for unconverted and converted_ok photons
667 TString fN = (m_useLogLogFit && iPart < 2) ? "mean_flog_histo_topoetcone" : "mean_f_topoetcone";
668 fN += dRLab[idR]; fN += "_eta_"; fN += etaLab[iEta]; fN += pLab[iPart];
669 TString gN;
670 // Trouble categories are converted_trouble photons and author 16 electrons. Below 250 GeV, one uses the mean of the leakage histo
671 // instead of a fit to the mean of the CB vs ET
672 if (m_trouble_categories && (iPart == 2 || iPart == 4)) {
673 gN = "mean_g_histo_topoetcone"; gN += dRLab[idR]; gN += "_eta_"; gN += etaLab[iEta]; gN += pLab[iPart];
674 }
675 if (idR == 2) {
676 if (iPart == 0) {
677 m_function_2015_cone40_photon_unconverted.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
678 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone40_photon_unconverted.at(iEta));
679 } else if (iPart == 1) {
680 m_function_2015_cone40_photon_converted_ok.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
681 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone40_photon_converted_ok.at(iEta));
682 } else if (iPart == 2) {
683 m_function_2015_cone40_photon_converted_trouble.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
684 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone40_photon_converted_trouble.at(iEta));
686 m_graph_histoMean_2015_cone40_photon_converted_trouble.at(iEta) = ((TGraph*)file_ptleakagecorr->Get(gN));
687 ATH_MSG_DEBUG("TGraph name (trouble categories at low ET) : " << gN << " ptr = " << m_graph_histoMean_2015_cone40_photon_converted_trouble.at(iEta));
688 }
689 } else if (iPart == 3) {
690 m_function_2015_cone40_author_1_electron.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
691 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone40_author_1_electron.at(iEta));
692 } else if (iPart == 4) {
693 m_function_2015_cone40_author_16_electron.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
694 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone40_author_16_electron.at(iEta));
696 m_graph_histoMean_2015_cone40_author_16_electron.at(iEta) = ((TGraph*)file_ptleakagecorr->Get(gN));
697 ATH_MSG_DEBUG("TGraph name (trouble categories at low ET) : " << gN << " ptr = " << m_graph_histoMean_2015_cone40_author_16_electron.at(iEta));
698 }
699 }
700
701 } else if (idR == 1) {
702 if (iPart == 0) {
703 m_function_2015_cone30_photon_unconverted.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
704 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone30_photon_unconverted.at(iEta));
705 } else if (iPart == 1) {
706 m_function_2015_cone30_photon_converted_ok.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
707 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone30_photon_converted_ok.at(iEta));
708 } else if (iPart == 2) {
709 m_function_2015_cone30_photon_converted_trouble.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
710 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone30_photon_converted_trouble.at(iEta));
712 m_graph_histoMean_2015_cone30_photon_converted_trouble.at(iEta) = ((TGraph*)file_ptleakagecorr->Get(gN));
713 ATH_MSG_DEBUG("TGraph name (trouble categories at low ET) : " << gN << " ptr = " << m_graph_histoMean_2015_cone30_photon_converted_trouble.at(iEta));
714 }
715 } else if (iPart == 3) {
716 m_function_2015_cone30_author_1_electron.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
717 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone30_author_1_electron.at(iEta));
718 } else if (iPart == 4) {
719 m_function_2015_cone30_author_16_electron.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
720 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone30_author_16_electron.at(iEta));
722 m_graph_histoMean_2015_cone30_author_16_electron.at(iEta) = ((TGraph*)file_ptleakagecorr->Get(gN));
723 ATH_MSG_DEBUG("TGraph name (trouble categories at low ET) : " << gN << " ptr = " << m_graph_histoMean_2015_cone30_author_16_electron.at(iEta));
724 }
725 }
726
727 } else {
728 if (iPart == 0) {
729 m_function_2015_cone20_photon_unconverted.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
730 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone20_photon_unconverted.at(iEta));
731 } else if (iPart == 1) {
732 m_function_2015_cone20_photon_converted_ok.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
733 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone20_photon_converted_ok.at(iEta));
734 } else if (iPart == 2) {
735 m_function_2015_cone20_photon_converted_trouble.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
736 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone20_photon_converted_trouble.at(iEta));
738 m_graph_histoMean_2015_cone20_photon_converted_trouble.at(iEta) = ((TGraph*)file_ptleakagecorr->Get(gN));
739 ATH_MSG_DEBUG("TGraph name (trouble categories at low ET) : " << gN << " ptr = " << m_graph_histoMean_2015_cone20_photon_converted_trouble.at(iEta));
740 }
741 } else if (iPart == 3) {
742 m_function_2015_cone20_author_1_electron.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
743 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone20_author_1_electron.at(iEta));
744 } else if (iPart == 4) {
745 m_function_2015_cone20_author_16_electron.at(iEta) = ((TF1*)file_ptleakagecorr->Get(fN));
746 ATH_MSG_DEBUG("TF1 name : " << fN << " ptr = " << m_function_2015_cone20_author_16_electron.at(iEta));
748 m_graph_histoMean_2015_cone20_author_16_electron.at(iEta) = ((TGraph*)file_ptleakagecorr->Get(gN));
749 ATH_MSG_DEBUG("TGraph name (trouble categories at low ET) : " << gN << " ptr = " << m_graph_histoMean_2015_cone20_author_16_electron.at(iEta));
750 }
751 }
752 }
753
754 } // dR bin
755
756 } // eta bin
757
758 } // particle type
759
760 } // root file : no good format
761 } // root file not found
762 }
763
765 if( !m_corr_ddshift_file.empty() && !m_corr_ddsmearing_file.empty()){
766 loadDDCorr();
767 }else{
768 ATH_MSG_WARNING("Data-driven correction files not specified, tool not initialized for data-driven corrections\n");
769 }
770 }
771
773 std::unique_ptr< TFile > file_ddshift_corr( TFile::Open( m_corr_ddshift_file.c_str(), "READ" ) );
774 std::unique_ptr< TFile > file_ddsmearingcorr( TFile::Open( m_corr_ddsmearing_file.c_str(), "READ" ) );
775
776 if(!file_ddshift_corr || !file_ddsmearingcorr){
777 ATH_MSG_WARNING("Correction file for data-driven corrections not found, tool not initialized for data-driven corrections\n");
780 }else{
781
782 // **********************************
783 // Data driven corrections **********
784 // https://cds.cern.ch/record/2008664
785 // **********************************
786
787 // Photon shift corrections
788 std::vector< std::shared_ptr<TGraphAsymmErrors> > graph_shift;
789 // Photon smearing corrections (to be applied in end caps only)
790 std::vector< std::shared_ptr<TGraphAsymmErrors> > graph_smearing;
791 for (int ig = 0; ig <= 13; ig++) {
792 graph_shift.emplace_back( dynamic_cast<TGraphAsymmErrors*>(file_ddshift_corr->Get(Form("graph_%i",ig))) );
793 graph_smearing.emplace_back( dynamic_cast<TGraphAsymmErrors*>(file_ddsmearingcorr->Get(Form("graph_%i",ig))) );
794 }
795 for (int ig = 0; ig <= 13; ig++) {
796 if (ig <= 7)
797 m_graph_dd_cone40_photon_shift.push_back( graph_shift.at(ig)->GetFunction("f") );
798 else
799 m_graph_dd_cone40_photon_shift.push_back( graph_shift.at(ig)->GetFunction("f_2") );
800 m_graph_dd_cone40_photon_smearing.push_back( graph_smearing.at(ig)->GetFunction("f_3") );
801 }
802
803 for (const auto& gr : graph_shift) {
804 if (gr == nullptr)
805 ATH_MSG_ERROR("Null pointer for one of the DD correction graphs");
806 }
807 for (const auto& gr : graph_smearing) {
808 if (gr == nullptr)
809 ATH_MSG_ERROR("Null pointer for one of the smearing graphs");
810 }
811 }
812 }
813
814 template <class T> void IsolationCorrection::FreeClear( T & cntr ) {
815 ATH_MSG_DEBUG("FreeClearing the container " << cntr.size());
816 for ( typename T::iterator it = cntr.begin();
817 it != cntr.end(); ++it ) {
818 if (*it) {
819 if (msgLvl(MSG::DEBUG)) {
820 ATH_MSG_DEBUG("Deleting " << *it << " " << typeid(*it).name());
821 ATH_MSG_DEBUG((*it)->GetName());
822 (*it)->Print();
823 }
824 delete * it;
825 }
826 }
827 cntr.clear();
828 }
829
831 m_eta_bins_fine.clear();
832 m_eta_bins_coarse.clear();
833
834 if (m_tool_ver == REL17_2) {
838
842
846
849
850 } else if (m_tool_ver == REL20_2 || m_tool_ver == REL21 || m_tool_ver == REL22) {
851
852 //---- Rel 20_2 pT leakage correction file
853
857
861
865
869
873
874
875 //---- Rel 20_2 pT leakage correction with histogram mean file
876
880
884
885 }
886
892 }
898 }
899
900 // For etcone, we only have very old corrections...
907
914
915 // photons: last eta bin isn't used
922
929
936
943
944 // -------------------------------------------------------------------------------------------
945 //Delete m_shower instance
946 delete m_shower;
947
948 }
949
950 //-----------------------------------------------------------------------
951 // User function
952 // Returns the pt leakage corrected isolation
953 //
955 float etaS2,
956 float etaPointing,
957 float etaCluster,
958 float radius,
959 bool is_mc,
960 float Etcone_value,
961 bool isConversion,
962 ParticleType parttype){
963
964 float pt_correction = GetPtCorrection(energy, etaS2, etaPointing, etaCluster, radius, is_mc, isConversion, parttype);
965 return Etcone_value - pt_correction;
966 }
967 //-----------------------------------------------------------------------
968
969 //-----------------------------------------------------------------------
970 // User function
971 // Returns the pt leakage corrected topo isolation
972 //
974 float etaS2,
975 float etaPointing,
976 float etaCluster,
977 float radius,
978 bool is_mc,
979 float Etcone_value,
980 bool isConversion,
981 ParticleType parttype,
982 Version ver){
983
984 float pt_correction = GetPtCorrectionTopo(energy, etaS2, etaPointing, etaCluster, radius, is_mc, isConversion, parttype, ver);
985 return Etcone_value - pt_correction;
986 }
987 //-----------------------------------------------------------------------
988
989
990 // ***************************************************************************************************************************
991 // ***************************************************************************************************************************
992 // Internal Functions Below.
993 // ***************************************************************************************************************************
994 // ***************************************************************************************************************************
995
996 //-----------------------------------------------------------------------
997 // Internal function
998 // Gets the pt correction factor
999 //
1001 float etaS2, float etaPointing, float etaCluster,
1002 float radius,
1003 bool is_mc,
1004 bool isConversion, ParticleType parttype) const {
1005
1006 int newrad = GetRadius(radius);
1007 std::vector<float> mc_correction_slopes_ptr;
1008 std::vector<float> mc_correction_offsets_ptr;
1009 std::vector<float> data_correction_slopes_ptr;
1010
1011 //TODO: when implementing ptcorr for etconeXX change this
1012
1013 switch(newrad){
1014 case 20:
1015 if (parttype == PHOTON) {
1016 // photons
1017 if(isConversion) {
1018 // converted
1021 } else {
1022 // unconverted
1025 }
1026 } else {
1027 // electrons
1028 mc_correction_slopes_ptr = m_mc_rel17_leakage_correction_slopes_electron_20;
1029 mc_correction_offsets_ptr = m_mc_rel17_leakage_correction_offsets_electron_20;
1030 }
1031 break;
1032 case 30:
1033 if (parttype == PHOTON) {
1034 // photons
1035 if(isConversion) {
1036 // converted
1039 } else {
1040 // unconverted
1043 }
1044 } else {
1045 // electrons
1046 mc_correction_slopes_ptr = m_mc_rel17_leakage_correction_slopes_electron_30;
1047 mc_correction_offsets_ptr = m_mc_rel17_leakage_correction_offsets_electron_30;
1048 }
1049 break;
1050 case 40:
1051 if (parttype == PHOTON) {
1052 // photons
1053 if(isConversion) {
1054 // converted
1057 } else {
1058 // unconverted
1061 }
1062 } else {
1063 // electrons
1064 mc_correction_slopes_ptr = m_mc_rel17_leakage_correction_slopes_electron_40;
1065 mc_correction_offsets_ptr = m_mc_rel17_leakage_correction_offsets_electron_40;
1066 }
1067 break;
1068 default:
1069 ATH_MSG_WARNING("Unable to retrieve leakage correction for topoIso cone with radius = " << radius << ".\n--- Radii must be one of {.20, .30, .40} OR {20, 30, 40}.\n");
1070 return 0.;
1071 }
1072
1073 float scale_factor = GetPtCorrectionFactor(etaS2, mc_correction_slopes_ptr, data_correction_slopes_ptr);
1074 float offset = 0.;
1075 if (!mc_correction_offsets_ptr.empty()) offset = GetPtCorrectionFactor(etaS2, mc_correction_offsets_ptr);
1076
1077 //avoid warnings
1078 if(is_mc) is_mc = true;
1079 return offset + GetPtCorrectionValue(energy, etaPointing, etaCluster, scale_factor);
1080
1081 }
1082 //-----------------------------------------------------------------------
1083
1084 //-----------------------------------------------------------------------
1085 // Internal function
1086 // Gets the pt correction factor for topoIso
1087 //
1089 float etaS2, float etaPointing, float etaCluster,
1090 float radius,
1091 bool /*is_mc*/,
1092 bool isConversion, ParticleType parttype, Version ver,
1093 int convFlag_int, int author, float conv_radius, float conv_ratio) const {
1094 double correction_value = 0.;
1095 if (ver== REL17_2) {
1096 correction_value = GetPtCorrection_FromGraph(energy,etaS2,etaPointing,etaCluster,radius,isConversion,parttype);
1097 } else if (m_tool_ver == REL20_2 || m_tool_ver == REL21 || m_tool_ver == REL22){
1098 correction_value = GetPtCorrection_FromGraph_2015(energy, etaS2, radius, convFlag_int, author, conv_radius, conv_ratio, parttype);
1099 }
1100
1101 return correction_value;
1102 }
1103 //-----------------------------------------------------------------------
1104
1105
1106 //-----------------------------------------------------------------------
1107 // Internal function
1108 // Used to retrieve the correct radius
1110 int newrad = 0;
1111 // avoid roundoff errors by adding 0.1
1112 if(radius < 1) newrad = (int)(radius * 100 + 0.1);
1113 else newrad = (int)radius;
1114 return newrad;
1115 }
1116 //-----------------------------------------------------------------------
1117
1118
1119 //-----------------------------------------------------------------------
1120 // Internal function
1121 // Used to retrieve the correct (fine) eta bin number
1122 //
1124 int eta_bin=-1;
1125 float fabs_eta = fabs(eta);
1126 for (unsigned int i=0; i < m_nBinsEtaFine; ++i) {
1127 if ((fabs_eta >= m_eta_bins_fine[i]) && (fabs_eta < m_eta_bins_fine[i+1])) {
1128 eta_bin = i;
1129 break;
1130 }
1131 }
1132 return eta_bin;
1133 }
1134 //-----------------------------------------------------------------------
1135
1136
1137 //-----------------------------------------------------------------------
1138 // Internal function
1139 // Used to retrieve the correct (coarse) eta bin number
1140 //
1142 int eta_bin=-1;
1143 float fabs_eta = fabs(eta);
1144 for (unsigned int i=0; i < m_nBinsEtaCoarse; ++i) {
1145 if ((fabs_eta >= m_eta_bins_coarse[i]) && (fabs_eta < m_eta_bins_coarse[i+1])) {
1146 eta_bin = i;
1147 break;
1148 }
1149 }
1150 return eta_bin;
1151 }
1152 //-----------------------------------------------------------------------
1153
1154 //-----------------------------------------------------------------------
1155 // Internal function
1156 // Returns the appropriate corrections value
1157 //
1159 const std::vector<float>& mc_leakage_corrections_ptr,
1160 const std::vector<float>& data_leakage_corrections_ptr) const {
1161 if(mc_leakage_corrections_ptr.empty() && data_leakage_corrections_ptr.empty())
1162 return 0.;
1163
1164 int eta_bin_fine = GetEtaBinFine(eta);
1165 int eta_bin_coarse = GetEtaBinCoarse(eta);
1166
1167 float correction = 0.;
1168 if (!mc_leakage_corrections_ptr.empty() && (eta_bin_fine >= 0)) correction += mc_leakage_corrections_ptr[eta_bin_fine];
1169 if (!data_leakage_corrections_ptr.empty() && (eta_bin_coarse >= 0)) correction += data_leakage_corrections_ptr[eta_bin_coarse];
1170
1171 return correction;
1172 }
1173 //-----------------------------------------------------------------------
1174
1175 //-----------------------------------------------------------------------
1176 // Internal function
1177 // Does the final pt scaling
1178 float IsolationCorrection::GetPtCorrectionValue(float energy, float etaPointing, float etaCluster, float scale_factor) {
1179 // apply the correction to et
1180 double etaForPt = ((fabs(etaPointing - etaCluster) < 0.15) ? etaPointing : etaCluster);
1181 double et = (fabs(etaForPt)<99.) ? energy/cosh(etaForPt) : 0.;
1182
1183 return scale_factor * et;
1184 }
1185 //-----------------------------------------------------------------------
1186
1187
1188 //-----------------------------------------------------------------------
1189 // Internal function
1190 // Does the correction for REL17_2 from TGraph stored into isolation_leakage_corrections.root file
1191 // Returns the correction value in MeV
1192 float IsolationCorrection::GetPtCorrection_FromGraph(float energy,float etaS2,float etaPointing,float etaCluster,float radius,bool isConversion,ParticleType parttype) const
1193 {
1194 int newrad = GetRadius(radius);
1195 double etaForPt = ((fabs(etaPointing - etaCluster) < 0.15) ? etaPointing : etaCluster);
1196 double et = (fabs(etaForPt)<99.) ? energy/cosh(etaForPt) : 0.;
1197 int etabin = GetEtaBinFine(etaS2);
1198 if( m_corr_file.empty() ){
1199 ATH_MSG_WARNING("IsolationCorrection::GetPtCorrection_FromGraph: the file containing the isolation leakage corrections is not initialized.\nNo correction is applied.\n");
1200 return 0;
1201 }
1202 if (etabin < 0) return 0; // must have eta in fiducial region
1203
1204 if( (etabin == 9 || etabin == 5) && parttype == PHOTON ){
1205 //No correction for photons with |etaS2|>2.37 or 1.37<|etaS2|<1.52
1206 return 0.;
1207 }
1208 double correction_value_mev = -1e6;
1209 switch(newrad){
1210 case 20:
1211 if(parttype == ELECTRON)
1212 correction_value_mev = GeV*m_graph_cone20_electron[etabin]->Eval(et/GeV);
1213 else
1214 if(isConversion) correction_value_mev = GeV*m_graph_cone20_photon_converted[etabin]->Eval(et/GeV);
1215 else correction_value_mev = GeV*m_graph_cone20_photon_unconverted[etabin]->Eval(et/GeV);
1216 break;
1217 case 30:
1218 if(parttype == ELECTRON)
1219 correction_value_mev = GeV*m_graph_cone30_electron[etabin]->Eval(et/GeV);
1220 else
1221 if(isConversion) correction_value_mev = GeV*m_graph_cone30_photon_converted[etabin]->Eval(et/GeV);
1222 else correction_value_mev = GeV*m_graph_cone30_photon_unconverted[etabin]->Eval(et/GeV);
1223 break;
1224 case 40:
1225 if(parttype == ELECTRON)
1226 correction_value_mev = GeV*m_graph_cone40_electron[etabin]->Eval(et/GeV);
1227 else
1228 if(isConversion) correction_value_mev = GeV*m_graph_cone40_photon_converted[etabin]->Eval(et/GeV);
1229 else correction_value_mev = GeV*m_graph_cone40_photon_unconverted[etabin]->Eval(et/GeV);
1230 break;
1231 default:
1232 ATH_MSG_WARNING("Unable to retrieve leakage correction for topoIso cone with radius = " << radius << ".\n--- Radii must be one of {.20, .30, .40} OR {20, 30, 40}.\n");
1233 return 0.;
1234 }
1235 return correction_value_mev;
1236
1237 }
1238
1239 //-----------------------------------------------------------------------
1240 // Internal function
1241 // Does the correction for REL18 from TGraph stored into isolation_ptcorrections.root file
1242 // Returns the correction value in MeV
1243
1244 int IsolationCorrection::GetConversionType(int conversion_flag, float conv_radius, float conv_ratio) {
1245 // ph_convFlag==0
1246 if(conversion_flag == 0) return 0;
1247 // ((ph_convFlag==1)||(ph_convFlag==2&&ph_ptconv_ratio>0.3)||(ph_convFlag==2&&ph_ptconv_ratio<0.3&&ph_truth_Rconv>140.))
1248 if( (conversion_flag == 1) || ((conversion_flag == 2 && conv_ratio > 0.3) || (conversion_flag == 2 && conv_ratio < 0.3 && conv_radius > 140.)) ) return 1;
1249 // (ph_convFlag==2&&ph_ptconv_ratio<0.3&&ph_truth_Rconv<140.)
1250 if(conversion_flag == 2 && conv_radius < 140.) return 2;
1251 return 0;
1252 }
1253
1254 float IsolationCorrection::GetPtCorrection_FromGraph_2015(float energy, float etaS2, float radius, int conversion_flag, int author, float conv_radius, float conv_ratio, ParticleType parttype) const {
1255 int newrad = GetRadius(radius);
1256 double etaForPt = etaS2; //((fabs(etaPointing - etaCluster) < 0.15) ? etaPointing : etaCluster);
1257 double et = energy/cosh(etaForPt); //(fabs(etaForPt)<99.) ? energy/cosh(etaForPt) : 0.;
1258 int etabin = GetEtaBinFine(etaS2);
1259
1260 int conversion_type = 0;
1261 if(parttype == PHOTON) conversion_type = GetConversionType(conversion_flag, conv_radius, conv_ratio);
1262
1263 // for test
1264 if (m_forcePartType && parttype == PHOTON) conversion_type = conv_radius > 800 ? 0 : (conv_radius > 140 ? 1 : 2);
1265
1266 if( m_corr_file.empty() ){
1267 ATH_MSG_WARNING("In IsolationCorrection::GetPtCorrection_FromGraph_2015: the file containing the isolation leakage corrections is not initialized.\nNo correction is applied.\n");
1268 return 0;
1269 }
1270
1271 if (etabin < 0) return 0; // must have eta in fiducial region
1272 if(parttype == PHOTON) if( (etabin == 9 || etabin == 5) ) return 0; // No correction for photons with |etaS2|>2.37 or 1.37<|etaS2|<1.52
1273
1274 double correction_value_mev = 0;
1275
1276 float pt_threshold = 250000.;
1277
1278 //if(parttype == PHOTON) ATH_MSG_INFO("Applying 2015 corrections photon etaBin "<<etabin<<" Pt: "<<et<<" || "<< conversion_type <<" "<< author <<" "<< conv_radius <<" "<< conv_ratio <<"\n");
1279 //else ATH_MSG_INFO("Applying 2015 corrections electron etaBin "<<etabin<<" Pt: "<<et<<" || "<< conversion_type <<" "<< author <<" "<< conv_radius <<" "<< conv_ratio <<"\n");
1280 //TODO: switch author_1 with author_16 in the right places, invert function and histomean
1281 switch(newrad){
1282 case 20:
1283 if(parttype == ELECTRON){
1284 if(author == 1) correction_value_mev = m_function_2015_cone20_author_1_electron[etabin]->Eval(et);
1285 if(author == 16){
1286 if(m_trouble_categories && et < pt_threshold) correction_value_mev = m_graph_histoMean_2015_cone20_author_16_electron[etabin]->Eval(et);
1287 else correction_value_mev = m_function_2015_cone20_author_16_electron[etabin]->Eval(et);
1288 }
1289 }else{
1290 if(conversion_type == 0) correction_value_mev = m_function_2015_cone20_photon_unconverted[etabin]->Eval(et);
1291 if(conversion_type == 1) correction_value_mev = m_function_2015_cone20_photon_converted_ok[etabin]->Eval(et);
1292 if(conversion_type == 2){
1293 if(m_trouble_categories && et < pt_threshold) correction_value_mev = m_graph_histoMean_2015_cone20_photon_converted_trouble[etabin]->Eval(et);
1294 else correction_value_mev = m_function_2015_cone20_photon_converted_trouble[etabin]->Eval(et);
1295 }
1296 }
1297 break;
1298 case 30:
1299 if(parttype == ELECTRON){
1300 if(author == 1) correction_value_mev = m_function_2015_cone30_author_1_electron[etabin]->Eval(et);
1301 if(author == 16) {
1302 if(m_trouble_categories && et < pt_threshold) correction_value_mev = m_graph_histoMean_2015_cone30_author_16_electron[etabin]->Eval(et);
1303 else correction_value_mev = m_function_2015_cone30_author_16_electron[etabin]->Eval(et);
1304 }
1305 }else{
1306 if(conversion_type == 0) correction_value_mev = m_function_2015_cone30_photon_unconverted[etabin]->Eval(et);
1307 if(conversion_type == 1) correction_value_mev = m_function_2015_cone30_photon_converted_ok[etabin]->Eval(et);
1308 if(conversion_type == 2){
1309 if(m_trouble_categories && et < pt_threshold) correction_value_mev = m_graph_histoMean_2015_cone30_photon_converted_trouble[etabin]->Eval(et);
1310 else correction_value_mev = m_function_2015_cone30_photon_converted_trouble[etabin]->Eval(et);
1311 }
1312 }
1313 break;
1314 case 40:
1315 if(parttype == ELECTRON){
1316 if(author == 1) correction_value_mev = m_function_2015_cone40_author_1_electron[etabin]->Eval(et);
1317 if(author == 16){
1318 if(m_trouble_categories && et < pt_threshold) correction_value_mev = m_graph_histoMean_2015_cone40_author_16_electron[etabin]->Eval(et);
1319 else correction_value_mev = m_function_2015_cone40_author_16_electron[etabin]->Eval(et);
1320 }
1321 }else{
1322 if(conversion_type == 0) correction_value_mev = m_function_2015_cone40_photon_unconverted[etabin]->Eval(et);
1323 if(conversion_type == 1) correction_value_mev = m_function_2015_cone40_photon_converted_ok[etabin]->Eval(et);
1324 if(conversion_type == 2){
1325 if(m_trouble_categories && et < pt_threshold) correction_value_mev = m_graph_histoMean_2015_cone40_photon_converted_trouble[etabin]->Eval(et);
1326 else correction_value_mev = m_function_2015_cone40_photon_converted_trouble[etabin]->Eval(et);
1327 }
1328 }
1329 break;
1330 default:
1331 ATH_MSG_WARNING("Unable to retrieve leakage correction for topoIso cone with radius = " << radius << ".\n--- Radii must be one of {.20, .30, .40} OR {20, 30, 40}.\n");
1332 return 0.;
1333 }
1334 //ATH_MSG_INFO(" Correction: "<< correction_value_mev <<"\n");
1335 if (et > 20e3)
1336 ATH_MSG_VERBOSE("Electron ? " << (parttype == ELECTRON) << " author / conversion type = " << (parttype == ELECTRON ? author : conversion_type) << " et = " << et << " eta = " << etaS2 << " etabin = " << etabin << " correction: "<< correction_value_mev);
1337 return correction_value_mev;
1338 }
1339
1341 ATH_MSG_INFO("Print properties of the parametrisation");
1343 ATH_MSG_INFO("ptr = " << i);
1344 if (i) {
1345 ATH_MSG_INFO(typeid(i).name());
1346 i->Print();
1347 }
1348 }
1349 }
1350
1351
1352}
#define M_PI
Scalar eta() const
pseudorapidity method
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
#define gr
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
void SetTroubleCategories(bool trouble_categories)
float GetPtCorrection(const xAOD::Egamma &, const xAOD::Iso::IsolationType) const
IsolationCorrection(const std::string &name)
float GetPtCorrectionFactor(float eta, const std::vector< float > &mc_leakage_corrections_ptr=std::vector< float >(), const std::vector< float > &data_leakage_corrections_ptr=std::vector< float >()) const
float GetPtCorrectionTopo(float energy, float etaS2, float etaPointing, float etaCluster, float radius, bool is_mc=true, bool isConversion=false, ParticleType parttype=ELECTRON, Version ver=REL17_2, int convFlag_int=0, int author=0, float conv_radius=0., float conv_ratio=0.) const
void SetToolVer(CP::IsolationCorrection::Version)
static int GetConversionType(int conversion_flag, float conv_radius, float conv_ratio)
float GetPtCorrectedTopoIsolation(float energy, float etaS2, float etaPointing, float etaCluster, float radius, bool is_mc, float Etcone_value, bool isConversion=false, ParticleType parttype=ELECTRON, Version ver=REL17_2)
StatusCode setupDD(const std::string &year)
int GetEtaBinFine(float eta) const
float GetPtCorrectedIsolation(const xAOD::Egamma &, const xAOD::Iso::IsolationType) const
void SetCorrectionFile(const std::string &corr_file, const std::string &corr_ddshift_file, const std::string &corr_ddsmearing_file)
float GetDDCorrection(const xAOD::Egamma &, const xAOD::Iso::IsolationType, const std::string &year)
void SetCorrectEtcone(bool correct_etcone)
int GetEtaBinCoarse(float eta) const
float GetPtCorrection_FromGraph(float energy, float etaS2, float etaPointing, float etaCluster, float radius, bool isConversion, ParticleType parttype) const
float GetEtaPointing(const xAOD::Egamma *)
static float getPtAtFirstMeasurement(const xAOD::TrackParticle *tp)
static int GetRadius(float radius)
static float GetPtCorrectionValue(float energy, float etaPointing, float etaCluster, float scale_factor)
float GetPtCorrection_FromGraph_2015(float energy, float etaS2, float radius, int conversion_flag, int author, float conv_radius, float conv_ratio, ParticleType parttype) const
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
AsgMessaging(const std::string &name)
Constructor with a name.
bool msgLvl(const MSG::Level lvl) const
Test the output level of the object.
bool eventType(EventType type) const
Check for one particular bitmask value.
@ IS_SIMULATION
true: simulation, false: data
const xAOD::Vertex * vertex(size_t index=0) const
Pointer to the xAOD::Vertex/es that match the photon candidate.
Definition Photon_v1.cxx:61
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
Select isolated Photons, Electrons and Muons.
@ Electron
The object is an electron.
Definition ObjectType.h:46
xAOD::EgammaParameters::ConversionType conversionType(const xAOD::Photon *ph)
return the photon conversion type (see EgammaEnums)
float conversionRadius(const xAOD::Vertex *vx)
return the conversion radius or 9999.
IsolationFlavour isolationFlavour(IsolationType type)
convert Isolation Type into Isolation Flavour
IsolationType
Overall enumeration for isolation types in xAOD files.
@ topoetcone20
Topo-cluster ET-sum.
@ topoetcone
Topo-cluster ET-sum.
float coneSize(IsolationConeSize type)
convert Isolation Size into cone size
setScale setgFexType iEta
EventInfo_v1 EventInfo
Definition of the latest event info version.
setRawEt setRawPhi int
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition Egamma.h:17
Photon_v1 Photon
Definition of the current "egamma version".
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.