ATLAS Offline Software
Loading...
Searching...
No Matches
egammaEnergyCorrectionTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6//
7// REWRITE - February 2013, Karsten Koeneke
8//
10
11#ifndef ELECTRONPHOTONFOURMOMENTUMCORRECTION_EGAMMAENERGYCORRECTIONTOOL_H
12#define ELECTRONPHOTONFOURMOMENTUMCORRECTION_EGAMMAENERGYCORRECTIONTOOL_H
13
14
15
16// PAT includes
19
20// STL includes
21#include <string>
22#include <vector>
23#include <memory>
24
25// Forward declarations
26class eg_resolution;
29class LinearityADC;
30
31class TH1;
32class TProfile;
33class TH2;
34class TAxis;
35class TFile;
36class TList;
37
38namespace egGain {
39 class GainTool; // run1 tool
40 class GainUncertainty; // run2 tool
41} // namespace egGain
42
43// Create a namespace for all needed enums
44namespace egEnergyCorr {
46 // workaround for reflex dict generation
47 };
48
49 // Resolution error variations
50 namespace Resolution {
52 // workaround for reflex dict generation
53 };
54
55 enum Variation {
56 // ZSmearing,SamplingTerm,Material,PileUp only implemented for mc12c...
57
58 // Nothing to be done
60
61 // Nominal
63
64 // All (Only for error plotting - not correct when running over a sample!)
67
68 // Z smearing uncertainty (symmetrized)
71
72 // Sampling term uncertainty
75
76 // Material uncertainty
85
86 // Pileup uncertainty
89
90 // IBL+PP0 for run 2
95
96 // Atlfast resolution uncertainties
99
100 // OFC for Run-3 pre-recommendations
103
104 // to help with loops
106
107 };
108
109 // type of resolution parameterization
111 // gaussian "core"
113 // sigma_eff 80%
115 // sigma_eff 90%
117 };
118} // namespace Resolution
119
120// Scale error variations
121namespace Scale {
123 // workaround for reflex dict generation
124 };
125
127
128 // Nothing to be done
130
131 // central value
133
134 // This applies to electrons only
135
136 // ... Momentum scale systematics
139
140 // The following apply to electrons and photons
141
142 // ... Zee scale uncertainty variations : Stat uncorrelated; Syst correlated
143 // vs eta
152
153 // ... LAr systematics on scale and material determinations : correlated vs
154 // eta
163
164 // extra systematics for 2015PRE*
169
170 // extra systematics for 2015->2016 extrapolation
173
174 // ... G4 systematics on E1/E2
177
178 // scale for E4 TileGap3
181
182 // ... Layer scale variations : data driven, uncorrelated vs eta
187
188 // PS correlated contribution
191
192 // ... ADC non linearity correction
195
196 // ... Leakage : electron
199
200 // ... Leakage : photon
205
206 // topo cluster threshold
209
210 // extra E12 for es2017 run2
213
214 // ... Material variations : data driven, uncorrelated vs eta
221
222 // ... Gain correction
231
232 // ... Pedestal
235
236 // ... wtots1
239
240 // PP0
243
244 // AF2 or AF3 systematics
247
248 // The following apply to photons only
249
250 // ... Conversion efficiency (-> vary unconverted photon calib), fake rate (->
251 // vary converted photon calib)
258
259 // ... in R21, 2022, Precision : NP is correlated between conv and unconv,
260 // let's call it ConvReco
263
264 // Rel22 OFC changes
267
268 // Rel22 MC20 pre and bulk
271
272 // extra Run 2->3 systematic for PS, E1/E2, L2Gain
281
286
287 // to help with loops
289 };
290
291} // namespace Scale
292
293// ES model
294
296
297 es2010, // legacy
298
299 es2011c, // mc11c : faulty G4; old geometry
300
301 es2011d, // mc11d : corrected G4; new geometry == final Run1 scheme
302 es2011dMedium, // mc11d : ditto, medium electrons, |eta|<2.47
303 es2011dTight, // mc11d : ditto, tight electrons, |eta|<2.47
304
305 es2012a, // mc12a : "crude" G4 fix; old geometry
306
307 es2012c, // mc12c : corrected G4; new geometry == final Run1 scheme
308 es2012cMedium, // mc12c : ditto, medium electrons, |eta|<2.47
309 es2012cTight, // mc12c : ditto, tight electrons, |eta|<2.47
310
311 es2015_day0_3percent, // temporary for day0 run2
312 es2012XX, // as es2012 + mc15 MVA calibration + new scales
313 es2015PRE, // as es2012 + mc15 MVA calibration + new scales + additional unc
315 es2015cPRE, // as 2015PRE but with new MVA calibration for crack for rel 20.7
317 es2015c_summer, // data-driven for mc15c (to be used in summer 2016)
318 es2016PRE, // as es2015c_summer + temperature extrapolation
319 es2017, // Moriond 2017
320 es2017_summer, // Summer 2017
321 es2017_summer_improved, // Recommendations for Higgs mass paper
322 es2017_summer_final, // Final 20.7 recommendations
323
324 es2015_5TeV, // For 2015 low mu 5 TeV runs
325
326 es2017_R21_PRE, // Pre-recommendations for release 21
327
328 es2017_R21_v0, // Release 21 model with layer calibration corrections from
329 // run 2, no global scale correction
330 es2017_R21_v1, // Release 21 model July 2018 adding forward, AFII,
331 // mc16d/reproc data, new mat syst
332 es2017_R21_ofc0_v1, // Release 21 model calibration extrapolated for
333 // OFC(mu=0), coveering 2015,2016,2017 and 2018 data
335 es2018_R21_v1, // model with new E1/E2 muon calibration from full run 2
336 // low+high mu data
337 // ---------------------------- release 22+ ----------------------------
338 es2022_R22_PRE, // Pre-recommnedations for release 22, Run-3
339 es2023_R22_Run2_v0, // R22 Run-2 recommendations based on R21
340 es2023_R22_Run2_v1, // fix E1E2 for es2023_R22_Run2_v0
341 es2024_Run3_ofc0_v0, // for run 3 data recorded with LAR OFC(mu=0), based on es2017_R21_ofc0_v1
342 // with extra uncertainty (preliminary recommendation)
343 es2024_Run3_v0, // Run3 intermediate recommendation (based on 2022 and 2023 high mu data)
345
346};
347
348// Geometry distortions
349
351 ConfigA = 0, // 5% ID material scaling
352 ConfigCD, // 10% services scaling
353 ConfigEL, // +7.5%X0 in SCT/TRT endcap; 10%X0, radial, in cryostat
354 ConfigFMX, // +7.5%X0 on ID endplate; 5%X0, radial, between PS and Strips
355 ConfigGp, // all together
356 ConfigN, // material between PS and calo in EndCap (only used for release 21)
357 ConfigIBL, // IBL systematics in run 2 geometry
358 ConfigPP0 // PP0 systematics in run 2 geometry
359};
360
361// Measured material categories
362
364 MatID, // ID material
365 MatCryo, // from ID to Presampler (|eta|<1.82), or Accordion (|eta|>1.82)
366 MatCalo // in calorimeter (between PS and Strips)
367};
368
369} // namespace egEnergyCorr
370
371namespace AtlasRoot {
372
373// Taken from CLHEP/Units/SystemOfUnits.h
374static const double GeV = 1.e+3;
375
377
378 public:
379 typedef unsigned int RandomNumber;
382
383 // Mandatory setup functions
385
386 // ... energy correction model to be used. To be called before initialize()
388
389 // ... Initialize this tool with all internal parameters, depending on the
390 // previous user setup
391 int initialize();
392
393 // Optional
395
396 // ... set input file
397 inline void setFileName(const std::string& val) { m_rootFileName = val; }
398
399 // ... set runnumber
400 void setRunNumber(long int runn = 0) { m_RunNumber = runn; }
401
403
406 }
409 }
413
414 double applyMCCalibration(double eta, double ET,
415 PATCore::ParticleType::Type ptype) const;
416
422
425 PATCore::ParticleType::Type ptype, double momentum, double trk_eta,
427 double varSF = 1.0) const;
428
429 double getCorrectedEnergy(
430 unsigned int runnumber, PATCore::ParticleDataType::DataType dataType,
431 PATCore::ParticleType::Type ptype, double cl_eta, double cl_etaS2,double cl_etaCalo,
432 double energy, double energyS2, double eraw, RandomNumber seed,
438 double varSF = 1.0) const;
439
440 double resolution(double energy, double cl_eta, double cl_etaCalo,
441 PATCore::ParticleType::Type ptype, bool withCT, bool fast,
444
445 // new for mc12c model. Return relative uncertainty on the resolution
447 double energy, double eta, double etaCalo,
452
453 static std::string variationName(egEnergyCorr::Scale::Variation& var);
454 static std::string variationName(egEnergyCorr::Resolution::Variation& var);
455
456 // For run2, precision final recommendation, when we correct for L2Gain,
457 // we do not use the size of the effect as systematic uncertainty, but the
458 // estimated uncertainty
461
462 // Idem for leakage correction
463 void setApplyLeakageCorrection(bool interpt = false) {
466 }
467
468 void setADCTool(std::shared_ptr<LinearityADC> t) { m_ADCLinearity_tool = t; }
469
470 // convenient method for decorrelation of statistical error
471 const TAxis& get_ZeeStat_eta_axis() const;
472
473 private:
474 std::unique_ptr<egGain::GainTool> m_gain_tool; // run 1
475 std::unique_ptr<egGain::GainUncertainty>
476 m_gain_tool_run2; // based on special run for run2
477 std::unique_ptr<egGain::GainUncertainty>
478 m_gain_tool_run3_extra; // OFC extrapolation for run3
479 std::shared_ptr<LinearityADC> m_ADCLinearity_tool; // run 2
480 std::unique_ptr<eg_resolution> m_resolution_tool;
481 std::unique_ptr<get_MaterialResolutionEffect> m_getMaterialDelta;
482 std::unique_ptr<e1hg_systematics> m_e1hg_tool;
483
484 double getAlphaValue(
485 long int runnumber, double cl_eta, double cl_etaS2, double cl_etaCalo, double energy,
486 double energyS2, double eraw,
489 double varSF = 1.) const;
490
491 double getAlphaUncertainty(
492 long int runnumber, double cl_eta, double cl_etaS2, double cl_etaCalo, double energy,
493 double energyS2, double eraw,
496 double varSF = 1.) const;
497
499 // Note : energies in MeV
500
502 double eta, double etaCalo, double energy, RandomNumber seed,
510
512
513 double applyAFtoG4(double eta, double ptGeV,
514 PATCore::ParticleType::Type ptype) const;
515 double applyFStoG4(double eta) const;
516
517 // functions for resolution uncertainty evaluation
518
519 // functions for old model
520 static double mcSamplingTerm(double cl_eta);
521 static double mcSamplingTermRelError(double cl_eta);
522 static double mcNoiseTerm(double cl_eta);
523 static double mcConstantTerm(double cl_eta);
524
525 // to access Z smearing and uncertainty
526 double dataConstantTerm(double eta) const;
527 double dataConstantTermError(double eta) const;
528 double dataConstantTermOFCError(double eta) const;
529
530 // functions for old model
531 double dataZPeakResolution(double cl_eta) const;
532 double mcZPeakResolution(double cl_eta) const;
533 double dataConstantTermCorError(double cl_eta) const;
534 static double fcn_sigma(double energy, double Cdata, double Cdata_er,
535 double S, double S_er);
536 void resolutionError(double energy, double cl_eta, double& errUp,
537 double& errDown) const;
538
539 // functions for energy scale corrections
540
541 double getZeeMeanET(double cl_eta) const;
542
543 double getAlphaZee(
544 long int runnumber, double eta,
546 double varSF = 1.) const;
547
548 double getE4Uncertainty(double eta) const;
549 double getE4NonLinearity(double cl_eta, double meanE,
551
552 double getWtots1Uncertainty(double cl_eta, double energy,
553 PATCore::ParticleType::Type ptype) const;
554
555 double getLayerUncertainty(
556 int iLayer, double cl_eta,
558 double varSF = 1.) const;
559
560 double getLayerNonLinearity(int iLayer, double cl_eta, double energy,
561 PATCore::ParticleType::Type ptype) const;
562
563 double getDeltaX(
564 double cl_eta, egEnergyCorr::MaterialCategory imat,
566
567 double getAlphaMaterial(
568 double cl_eta, egEnergyCorr::MaterialCategory imat,
571 double varSF = 1.) const;
572
574 PATCore::ParticleType::Type ptype, double cl_eta,
575 double ET) const;
576
578 double cl_eta, double energy, egEnergyCorr::MaterialCategory imat,
581 double varSF = 1.) const;
582
583 double getAlphaLeakage(
584 double cl_eta, PATCore::ParticleType::Type ptype,
586 double varSF = 1.) const;
587
588 double getAlphaLeakage2D(
589 double cl_eta, double et, PATCore::ParticleType::Type ptype,
591 double varSF = 1.) const;
592 std::pair<double, double> getAlphaUncAlpha(const TH1& hh, double cl_eta,
593 double et, bool useInterp) const;
594
595 double getAlphaConvSyst(
596 double cl_eta, double energy, PATCore::ParticleType::Type ptype,
598 double varSF = 1.) const;
599
600 double getAlphaPedestal(
601 double cl_eta, double energy, double eraw,
602 PATCore::ParticleType::Type ptype, bool isRef,
604 double varSF = 1.) const;
605
606 double getLayerPedestal(
607 double cl_eta, PATCore::ParticleType::Type ptype, int iLayer,
609 double varSF = 1.) const;
610 double get_ZeeSyst(double eta) const;
611 double get_OFCSyst(double eta) const;
612 static bool isInCrack(double cl_eta);
613 static double nearestEtaBEC(double cl_eta);
614 static double getInterpolateConvSyst2D(const TH2& conv_hist, double aeta,
615 double ET) ;
616
632 void getResolution_systematics(int particle_type, double energy, double eta,
633 double etaCalo, int syst_mask,
634 double& resolution, double& resolution_error,
635 double& resolution_error_up,
636 double& resolution_error_down,
637 int resol_type = 0, bool fast = false) const;
638
639 // approximate pileup noise contribution to the resolution
640 double pileUpTerm(double energy, double eta, int particle_type) const;
641
642 private:
643 std::string m_rootFileName;
644
645 unsigned int m_begRunNumber;
646 unsigned int m_endRunNumber;
647 unsigned int m_RunNumber;
648
649 std::unique_ptr<TH1> m_trkSyst;
650
651 std::unique_ptr<TH1> m_aPSNom;
652 std::unique_ptr<TH1> m_daPSCor;
653 std::unique_ptr<TH1> m_daPSb12;
654 std::unique_ptr<TH1> m_aS12Nom;
655 std::unique_ptr<TH1> m_daS12Cor;
656
657 std::unique_ptr<TH1> m_zeeNom;
658 std::unique_ptr<TH1> m_zeeNom_data2015;
659 std::unique_ptr<TH1> m_zeeNom_data2016;
660 std::unique_ptr<TH1> m_zeeNom_data2017;
661 std::unique_ptr<TH1> m_zeeNom_data2018;
662 std::unique_ptr<TH1> m_zeeNom_data2022;
663 std::unique_ptr<TH1> m_zeeNom_data2023;
664 std::unique_ptr<TH1> m_zeeNom_data2024;
665
666 std::unique_ptr<const TH1> m_zeeFwdk;
667 std::unique_ptr<const TH1> m_zeeFwdb;
668
669 std::unique_ptr<TH1> m_zeeSyst;
670 std::unique_ptr<TH1> m_zeeSystOFC;
671 std::unique_ptr<TH1> m_zeePhys;
673 std::unique_ptr<TProfile> m_meanZeeProfile;
674
675 std::unique_ptr<TH1> m_resNom;
676 std::unique_ptr<TH1> m_resSyst;
677 std::unique_ptr<TH1> m_resSystOFC;
678 std::unique_ptr<TH1> m_peakResData;
679 std::unique_ptr<TH1> m_peakResMC;
680
681 std::unique_ptr<TH1> m_dX_ID_Nom;
682
683 std::unique_ptr<TH1> m_dX_IPPS_Nom;
684 std::unique_ptr<TH1> m_dX_IPPS_LAr;
685
686 std::unique_ptr<TH1> m_dX_IPAcc_Nom;
687 std::unique_ptr<TH1> m_dX_IPAcc_G4;
688 std::unique_ptr<TH1> m_dX_IPAcc_LAr;
689 std::unique_ptr<TH1> m_dX_IPAcc_GL1;
690
691 std::unique_ptr<TH1> m_dX_PSAcc_Nom;
692 std::unique_ptr<TH1> m_dX_PSAcc_G4;
693 std::unique_ptr<TH1> m_dX_PSAcc_LAr;
694
695 std::unique_ptr<TAxis> m_psElectronEtaBins;
696 std::unique_ptr<TList> m_psElectronGraphs;
697 std::unique_ptr<TAxis> m_psUnconvertedEtaBins;
698 std::unique_ptr<TList> m_psUnconvertedGraphs;
699 std::unique_ptr<TAxis> m_psConvertedEtaBins;
700 std::unique_ptr<TList> m_psConvertedGraphs;
701
702 std::unique_ptr<TAxis> m_E4ElectronEtaBins;
703 std::unique_ptr<TList> m_E4ElectronGraphs;
704 std::unique_ptr<TAxis> m_E4UnconvertedEtaBins;
705 std::unique_ptr<TList> m_E4UnconvertedGraphs;
706 std::unique_ptr<TAxis> m_E4ConvertedEtaBins;
707 std::unique_ptr<TList> m_E4ConvertedGraphs;
708
709 std::unique_ptr<TAxis> m_s12ElectronEtaBins;
710 std::unique_ptr<TList> m_s12ElectronGraphs;
711 std::unique_ptr<TAxis> m_s12UnconvertedEtaBins;
712 std::unique_ptr<TList> m_s12UnconvertedGraphs;
713 std::unique_ptr<TAxis> m_s12ConvertedEtaBins;
714 std::unique_ptr<TList> m_s12ConvertedGraphs;
715
716 std::unique_ptr<TAxis> m_EaccElectronEtaBins;
717 std::unique_ptr<TList> m_EaccElectronGraphs;
718 std::unique_ptr<TAxis> m_EaccUnconvertedEtaBins;
719 std::unique_ptr<TList> m_EaccUnconvertedGraphs;
720 std::unique_ptr<TAxis> m_EaccConvertedEtaBins;
721 std::unique_ptr<TList> m_EaccConvertedGraphs;
722
723 std::unique_ptr<TH1> m_pedestalL0;
724 std::unique_ptr<TH1> m_pedestalL1;
725 std::unique_ptr<TH1> m_pedestalL2;
726 std::unique_ptr<TH1> m_pedestalL3;
727
728 std::unique_ptr<TH1> m_pedestals_es2017;
729
730 std::unique_ptr<TH1> m_convRadius;
731 std::unique_ptr<TH1> m_convFakeRate;
732 std::unique_ptr<TH1> m_convRecoEfficiency;
733 std::unique_ptr<TH2> m_convFakeRate_2D;
734 std::unique_ptr<TH2> m_convRecoEfficiency_2D;
735
736 std::unique_ptr<TH1> m_leakageConverted;
737 std::unique_ptr<TH1> m_leakageUnconverted;
738 std::unique_ptr<TH1> m_leakageElectron;
739
740 std::unique_ptr<TH1> m_zeeES2Profile;
741
742 std::unique_ptr<TH2> m_pp0_elec;
743 std::unique_ptr<TH2> m_pp0_unconv;
744 std::unique_ptr<TH2> m_pp0_conv;
745
746 std::unique_ptr<TH1> m_wstot_slope_A_data;
747 std::unique_ptr<TH1> m_wstot_slope_B_MC;
748 std::unique_ptr<TH1> m_wstot_pT_data_p0_electrons;
749 std::unique_ptr<TH1> m_wstot_pT_data_p1_electrons;
754 std::unique_ptr<TH1> m_wstot_pT_MC_p0_electrons;
755 std::unique_ptr<TH1> m_wstot_pT_MC_p1_electrons;
760
761 // Geometry distortion vectors (to be ordered as in the the Geometry enum!)
762
763 std::vector<std::unique_ptr<TH1>> m_matElectronScale;
764 std::vector<std::unique_ptr<TH1>> m_matUnconvertedScale;
765 std::vector<std::unique_ptr<TH1>> m_matConvertedScale;
766 std::vector<std::unique_ptr<TH1>> m_matElectronCstTerm;
767 std::vector<std::unique_ptr<TH1>> m_matX0Additions;
768
769 // Non-linearity graphs
770
771 std::unique_ptr<TAxis> m_matElectronEtaBins;
772 std::vector<std::unique_ptr<TList>> m_matElectronGraphs;
773
774 // 2D histograms for release 21 material systematics sensitivity
775 // parameterization
776 std::unique_ptr<TH2> m_electronBias_ConfigA;
777 std::unique_ptr<TH2> m_electronBias_ConfigEpLp;
778 std::unique_ptr<TH2> m_electronBias_ConfigFpMX;
779 std::unique_ptr<TH2> m_electronBias_ConfigN;
780 std::unique_ptr<TH2> m_electronBias_ConfigIBL;
781 std::unique_ptr<TH2> m_electronBias_ConfigPP0;
782 std::unique_ptr<TH2> m_unconvertedBias_ConfigA;
783 std::unique_ptr<TH2> m_unconvertedBias_ConfigEpLp;
784 std::unique_ptr<TH2> m_unconvertedBias_ConfigFpMX;
785 std::unique_ptr<TH2> m_unconvertedBias_ConfigN;
786 std::unique_ptr<TH2> m_unconvertedBias_ConfigIBL;
787 std::unique_ptr<TH2> m_unconvertedBias_ConfigPP0;
788 std::unique_ptr<TH2> m_convertedBias_ConfigA;
789 std::unique_ptr<TH2> m_convertedBias_ConfigEpLp;
790 std::unique_ptr<TH2> m_convertedBias_ConfigFpMX;
791 std::unique_ptr<TH2> m_convertedBias_ConfigN;
792 std::unique_ptr<TH2> m_convertedBias_ConfigIBL;
793 std::unique_ptr<TH2> m_convertedBias_ConfigPP0;
794
795 // Fastsim -> Fullsim corrections
796
797 std::unique_ptr<TH1> m_G4OverAFII_electron;
798 std::unique_ptr<TH1> m_G4OverAFII_converted;
799 std::unique_ptr<TH1> m_G4OverAFII_unconverted;
800 std::unique_ptr<TH2> m_G4OverAFII_electron_2D;
801 std::unique_ptr<TH2> m_G4OverAFII_converted_2D;
802 std::unique_ptr<TH2> m_G4OverAFII_unconverted_2D;
803 std::unique_ptr<TH1> m_G4OverFrSh;
804
808
809 // Atlfast -> Fullsim corrections extra systematic for 1.3<eta<1.35
816
817 // Main ES model switch
818
820
821 // general switches
822
823 bool m_use_etaCalo_scales; // true for >= es2012XX
824
825 // for tests
826 bool m_applyPSCorrection; // default = true
827 bool m_applyS12Correction; // default = true
828
831 bool m_use_stat_error_scaling; // default = false
832
837
838 bool m_use_temp_correction201215; // default = true (used only for es2015PRE)
840 bool m_use_uA2MeV_2015_first2weeks_correction; // default = true (used only
841 // for es2105PRE)
842};
843
844} // namespace AtlasRoot
845
846#endif
Scalar eta() const
pseudorapidity method
double getSmearingCorrection(double eta, double etaCalo, double energy, RandomNumber seed, PATCore::ParticleType::Type ptype=PATCore::ParticleType::Electron, PATCore::ParticleDataType::DataType dataType=PATCore::ParticleDataType::Full, egEnergyCorr::Resolution::Variation value=egEnergyCorr::Resolution::Nominal, egEnergyCorr::Resolution::resolutionType resType=egEnergyCorr::Resolution::SigmaEff90) const
smearing corrections
std::unique_ptr< eg_resolution > m_resolution_tool
std::unique_ptr< TH1 > m_G4OverAF_unconverted_resolution_extra_sys
double getAlphaLeakage(double cl_eta, PATCore::ParticleType::Type ptype, egEnergyCorr::Scale::Variation var=egEnergyCorr::Scale::Nominal, double varSF=1.) const
double getWtots1Uncertainty(double cl_eta, double energy, PATCore::ParticleType::Type ptype) const
double pileUpTerm(double energy, double eta, int particle_type) const
double getE4NonLinearity(double cl_eta, double meanE, PATCore::ParticleType::Type) const
void getResolution_systematics(int particle_type, double energy, double eta, double etaCalo, int syst_mask, double &resolution, double &resolution_error, double &resolution_error_up, double &resolution_error_down, int resol_type=0, bool fast=false) const
get resolution and its uncertainty)
double applyMCCalibration(double eta, double ET, PATCore::ParticleType::Type ptype) const
double getCorrectedEnergy(unsigned int runnumber, PATCore::ParticleDataType::DataType dataType, PATCore::ParticleType::Type ptype, double cl_eta, double cl_etaS2, double cl_etaCalo, double energy, double energyS2, double eraw, RandomNumber seed, egEnergyCorr::Scale::Variation scaleVar=egEnergyCorr::Scale::None, egEnergyCorr::Resolution::Variation resVar=egEnergyCorr::Resolution::None, egEnergyCorr::Resolution::resolutionType resType=egEnergyCorr::Resolution::SigmaEff90, double varSF=1.0) const
double getAlphaValue(long int runnumber, double cl_eta, double cl_etaS2, double cl_etaCalo, double energy, double energyS2, double eraw, PATCore::ParticleType::Type ptype=PATCore::ParticleType::Electron, egEnergyCorr::Scale::Variation var=egEnergyCorr::Scale::Nominal, double varSF=1.) const
double getMaterialEffect(egEnergyCorr::Geometry geo, PATCore::ParticleType::Type ptype, double cl_eta, double ET) const
void resolutionError(double energy, double cl_eta, double &errUp, double &errDown) const
std::vector< std::unique_ptr< TH1 > > m_matUnconvertedScale
std::vector< std::unique_ptr< TH1 > > m_matElectronScale
double getAlphaZee(long int runnumber, double eta, egEnergyCorr::Scale::Variation var=egEnergyCorr::Scale::Nominal, double varSF=1.) const
void setADCTool(std::shared_ptr< LinearityADC > t)
std::unique_ptr< TH1 > m_G4OverAF_converted_resolution_extra_sys
double getLayerPedestal(double cl_eta, PATCore::ParticleType::Type ptype, int iLayer, egEnergyCorr::Scale::Variation var=egEnergyCorr::Scale::Nominal, double varSF=1.) const
double getAlphaLeakage2D(double cl_eta, double et, PATCore::ParticleType::Type ptype, egEnergyCorr::Scale::Variation var=egEnergyCorr::Scale::Nominal, double varSF=1.) const
double getLayerUncertainty(int iLayer, double cl_eta, egEnergyCorr::Scale::Variation var=egEnergyCorr::Scale::Nominal, double varSF=1.) const
double getAlphaConvSyst(double cl_eta, double energy, PATCore::ParticleType::Type ptype, egEnergyCorr::Scale::Variation var=egEnergyCorr::Scale::Nominal, double varSF=1.) const
static std::string variationName(egEnergyCorr::Scale::Variation &var)
double getAlphaPedestal(double cl_eta, double energy, double eraw, PATCore::ParticleType::Type ptype, bool isRef, egEnergyCorr::Scale::Variation var=egEnergyCorr::Scale::Nominal, double varSF=1.) const
double getCorrectedMomentum(PATCore::ParticleDataType::DataType dataType, PATCore::ParticleType::Type ptype, double momentum, double trk_eta, egEnergyCorr::Scale::Variation scaleVar=egEnergyCorr::Scale::None, double varSF=1.0) const
take eta and uncorrected energy of electron, return corrected energy, apply given variation,...
std::unique_ptr< get_MaterialResolutionEffect > m_getMaterialDelta
double getDeltaX(double cl_eta, egEnergyCorr::MaterialCategory imat, egEnergyCorr::Scale::Variation var=egEnergyCorr::Scale::Nominal) const
static double fcn_sigma(double energy, double Cdata, double Cdata_er, double S, double S_er)
double getMaterialNonLinearity(double cl_eta, double energy, egEnergyCorr::MaterialCategory imat, PATCore::ParticleType::Type ptype, egEnergyCorr::Scale::Variation var=egEnergyCorr::Scale::Nominal, double varSF=1.) const
std::shared_ptr< LinearityADC > m_ADCLinearity_tool
double getAlphaUncertainty(long int runnumber, double cl_eta, double cl_etaS2, double cl_etaCalo, double energy, double energyS2, double eraw, PATCore::ParticleType::Type ptype=PATCore::ParticleType::Electron, egEnergyCorr::Scale::Variation var=egEnergyCorr::Scale::Nominal, double varSF=1.) const
double getAlphaMaterial(double cl_eta, egEnergyCorr::MaterialCategory imat, PATCore::ParticleType::Type ptype, egEnergyCorr::Scale::Variation var=egEnergyCorr::Scale::Nominal, double varSF=1.) const
double resolution(double energy, double cl_eta, double cl_etaCalo, PATCore::ParticleType::Type ptype, bool withCT, bool fast, egEnergyCorr::Resolution::resolutionType resType=egEnergyCorr::Resolution::SigmaEff90) const
double getLayerNonLinearity(int iLayer, double cl_eta, double energy, PATCore::ParticleType::Type ptype) const
std::vector< std::unique_ptr< TList > > m_matElectronGraphs
std::vector< std::unique_ptr< TH1 > > m_matConvertedScale
std::pair< double, double > getAlphaUncAlpha(const TH1 &hh, double cl_eta, double et, bool useInterp) const
std::vector< std::unique_ptr< TH1 > > m_matX0Additions
double applyAFtoG4(double eta, double ptGeV, PATCore::ParticleType::Type ptype) const
MC calibration corrections.
static double getInterpolateConvSyst2D(const TH2 &conv_hist, double aeta, double ET)
double getResolutionError(PATCore::ParticleDataType::DataType dataType, double energy, double eta, double etaCalo, PATCore::ParticleType::Type ptype, egEnergyCorr::Resolution::Variation value, egEnergyCorr::Resolution::resolutionType resType=egEnergyCorr::Resolution::SigmaEff90) const
std::unique_ptr< e1hg_systematics > m_e1hg_tool
std::unique_ptr< TH1 > m_G4OverAF_electron_resolution_extra_sys
std::unique_ptr< egGain::GainTool > m_gain_tool
std::unique_ptr< egGain::GainUncertainty > m_gain_tool_run2
std::unique_ptr< egGain::GainUncertainty > m_gain_tool_run3_extra
std::vector< std::unique_ptr< TH1 > > m_matElectronCstTerm
parameterization of correction for ADC non linearity
Class mimicking the AthMessaging class from the offline software.
get resolution for electron and photons (converted / unconverted) vs E,eta
get resolution systematics from material effect (mc12c setup, MVA calibration)
static std::vector< uint32_t > runnumber
Definition iLumiCalc.h:37
static const double GeV
Extra patterns decribing particle interation process.