Skip to content
Snippets Groups Projects
Commit 40429b32 authored by Scott Snyder's avatar Scott Snyder Committed by Graeme Stewart
Browse files

'Tool handle constness fixes.' (IsolationCorrections-00-01-12-01)

	* Tagging IsolationCorrections-00-01-12-01.
	* Tool handle constness fixes.

2016-08-29  scott snyder  <snyder@bnl.gov>

	* Tagging IsolationCorrections-00-01-11.
	* Fix spelling error.
	* Tagging IsolationCorrections-00-01-10.
	* Fix placement of using declaration.
	* Tagging IsolationCorrections-00-01-09.
	* Comply with ATLAS naming conventions.
	* Tagging IsolationCorrections-00-01-08.
	* Fix compilation warning.

2016-08-25 Will Buttinger <will@cern.ch>
	* performance improvement (see ATLASG-663)
	* Tag IsolationCorrections-00-01-07
parent 38b9b6ec
No related merge requests found
...@@ -46,7 +46,7 @@ namespace CP { ...@@ -46,7 +46,7 @@ namespace CP {
virtual CP::SystematicCode applySystematicVariation ( const CP::SystematicSet& systConfig ) = 0; virtual CP::SystematicCode applySystematicVariation ( const CP::SystematicSet& systConfig ) = 0;
virtual float GetPtCorrectedIsolation(const xAOD::Egamma&, xAOD::Iso::IsolationType) = 0; virtual float GetPtCorrectedIsolation(const xAOD::Egamma&, xAOD::Iso::IsolationType) = 0;
virtual float GetPtCorrection(const xAOD::Egamma&, xAOD::Iso::IsolationType) = 0; virtual float GetPtCorrection(const xAOD::Egamma&, xAOD::Iso::IsolationType) const = 0;
virtual float GetDDCorrection(const xAOD::Egamma&, xAOD::Iso::IsolationType) = 0; virtual float GetDDCorrection(const xAOD::Egamma&, xAOD::Iso::IsolationType) = 0;
}; };
......
...@@ -38,9 +38,9 @@ class IsolationCorrection : public asg::AsgMessaging{ ...@@ -38,9 +38,9 @@ class IsolationCorrection : public asg::AsgMessaging{
void SetToolVer(CP::IsolationCorrection::Version); void SetToolVer(CP::IsolationCorrection::Version);
float GetPtCorrectedIsolation(const xAOD::Egamma&, const xAOD::Iso::IsolationType); float GetPtCorrectedIsolation(const xAOD::Egamma&, const xAOD::Iso::IsolationType);
float GetPtCorrection(const xAOD::Egamma&, const xAOD::Iso::IsolationType); float GetPtCorrection(const xAOD::Egamma&, const xAOD::Iso::IsolationType) const;
float GetDDCorrection(const xAOD::Egamma&); float GetDDCorrection(const xAOD::Egamma&) const;
float GetDDCorrection_2015(const xAOD::Egamma&, const xAOD::Iso::IsolationType); float GetDDCorrection_2015(const xAOD::Egamma&, const xAOD::Iso::IsolationType) const;
float GetEtaPointing(const xAOD::Egamma*); float GetEtaPointing(const xAOD::Egamma*);
...@@ -81,6 +81,10 @@ class IsolationCorrection : public asg::AsgMessaging{ ...@@ -81,6 +81,10 @@ class IsolationCorrection : public asg::AsgMessaging{
CP::ShowerDepthTool* m_shower; CP::ShowerDepthTool* m_shower;
// booleans for helping with versions
bool m_isv2;
bool m_isv3;
template <class T> void FreeClear( T & cntr ); template <class T> void FreeClear( T & cntr );
// ------------------------------------------------------------ // ------------------------------------------------------------
...@@ -153,74 +157,74 @@ class IsolationCorrection : public asg::AsgMessaging{ ...@@ -153,74 +157,74 @@ class IsolationCorrection : public asg::AsgMessaging{
float GetPtCorrection (float energy, float etaS2, float etaPointing, float etaCluster, float GetPtCorrection (float energy, float etaS2, float etaPointing, float etaCluster,
float radius, bool is_mc=true, float radius, bool is_mc=true,
bool isConversion=false, ParticleType parttype = ELECTRON); bool isConversion=false, ParticleType parttype = ELECTRON) const;
float GetPtCorrectionTopo (float energy, float etaS2, float etaPointing, float etaCluster, float GetPtCorrectionTopo (float energy, float etaS2, float etaPointing, float etaCluster,
float radius, bool is_mc=true, float radius, bool is_mc=true,
bool isConversion=false, ParticleType parttype = ELECTRON, Version ver = REL17_2, 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.); int convFlag_int=0, int author=0, float conv_radius=0., float conv_ratio=0.) const;
int GetRadius(float radius); int GetRadius(float radius) const;
int GetEtaBinFine(float eta); int GetEtaBinFine(float eta) const;
int GetEtaBinCoarse(float eta); int GetEtaBinCoarse(float eta) const;
int GetEtaBinDD(float eta); int GetEtaBinDD(float eta) const;
float GetPtCorrectionFactor(float eta, std::vector<float> mc_leakage_corrections_ptr =std::vector<float>(), float GetPtCorrectionFactor(float eta, std::vector<float> mc_leakage_corrections_ptr =std::vector<float>(),
std::vector<float> data_leakage_corrections_ptr= std::vector<float>()); std::vector<float> data_leakage_corrections_ptr= std::vector<float>()) const;
float GetPtCorrectionValue(float energy, float etaPointing, float etaCluster, float scale_factor); float GetPtCorrectionValue(float energy, float etaPointing, float etaCluster, float scale_factor) const;
float GetPtCorrection_FromGraph(float energy,float etaS2,float etaPointing,float etaCluster,float radius,bool isConversion,ParticleType parttype); float GetPtCorrection_FromGraph(float energy,float etaS2,float etaPointing,float etaCluster,float radius,bool isConversion,ParticleType parttype) const;
float GetPtCorrection_FromGraph_2015(float energy, float etaS2, float radius, int conversion_flag, int author, float conv_radius, float conv_ratio, ParticleType parttype); float GetPtCorrection_FromGraph_2015(float energy, float etaS2, float radius, int conversion_flag, int author, float conv_radius, float conv_ratio, ParticleType parttype) const;
// ------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------
// ------------- data-driven corrections based on 2015 data ---------------------------------- // ------------- data-driven corrections based on 2015 data ----------------------------------
// corrections recomputed for topological isolation, 0.4/0.2 cone. special eta binning ------- // corrections recomputed for topological isolation, 0.4/0.2 cone. special eta binning -------
// ------------------------- ----------------------------------------------------------------- // ------------------------- -----------------------------------------------------------------
std::vector<TGraph*> graph_dd_2015_cone40_unconv_photon_shift; std::vector<TGraph*> m_graph_dd_2015_cone40_unconv_photon_shift;
std::vector<TGraph*> graph_dd_2015_cone40_conv_photon_shift; std::vector<TGraph*> m_graph_dd_2015_cone40_conv_photon_shift;
std::vector<TGraph*> graph_dd_2015_cone20_unconv_photon_shift; std::vector<TGraph*> m_graph_dd_2015_cone20_unconv_photon_shift;
std::vector<TGraph*> graph_dd_2015_cone20_conv_photon_shift; std::vector<TGraph*> m_graph_dd_2015_cone20_conv_photon_shift;
// ------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------
// ------------- data-driven corrections based on 2012 inclusive photon sample --------------- // ------------- data-driven corrections based on 2012 inclusive photon sample ---------------
// corrections recomputed for topological isolation, 0.4 cone. special eta binning ----------- // corrections recomputed for topological isolation, 0.4 cone. special eta binning -----------
// ------------------------- https://cds.cern.ch/record/2008664 ------------------------------ // ------------------------- https://cds.cern.ch/record/2008664 ------------------------------
std::vector<TF1*> graph_dd_cone40_photon_shift; std::vector<TF1*> m_graph_dd_cone40_photon_shift;
std::vector<TF1*> graph_dd_cone40_photon_smearing; std::vector<TF1*> m_graph_dd_cone40_photon_smearing;
// ------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------
// ------------- full 2015 (rel 20_2) leakage corrections -------------------------------------- // ------------- full 2015 (rel 20_2) leakage corrections --------------------------------------
// corrections recomputed for topological isolation: fine grained in eta, derived from MC15 // corrections recomputed for topological isolation: fine grained in eta, derived from MC15
//---- Rel 20_2 pT leakage correction file : all categories //---- Rel 20_2 pT leakage correction file : all categories
std::vector<TF1*> function_2015_cone40_photon_unconverted; std::vector<TF1*> m_function_2015_cone40_photon_unconverted;
std::vector<TF1*> function_2015_cone30_photon_unconverted; std::vector<TF1*> m_function_2015_cone30_photon_unconverted;
std::vector<TF1*> function_2015_cone20_photon_unconverted; std::vector<TF1*> m_function_2015_cone20_photon_unconverted;
std::vector<TF1*> function_2015_cone40_photon_converted_ok; std::vector<TF1*> m_function_2015_cone40_photon_converted_ok;
std::vector<TF1*> function_2015_cone30_photon_converted_ok; std::vector<TF1*> m_function_2015_cone30_photon_converted_ok;
std::vector<TF1*> function_2015_cone20_photon_converted_ok; std::vector<TF1*> m_function_2015_cone20_photon_converted_ok;
std::vector<TF1*> function_2015_cone40_photon_converted_trouble; std::vector<TF1*> m_function_2015_cone40_photon_converted_trouble;
std::vector<TF1*> function_2015_cone30_photon_converted_trouble; std::vector<TF1*> m_function_2015_cone30_photon_converted_trouble;
std::vector<TF1*> function_2015_cone20_photon_converted_trouble; std::vector<TF1*> m_function_2015_cone20_photon_converted_trouble;
std::vector<TF1*> function_2015_cone40_author_1_electron; std::vector<TF1*> m_function_2015_cone40_author_1_electron;
std::vector<TF1*> function_2015_cone30_author_1_electron; std::vector<TF1*> m_function_2015_cone30_author_1_electron;
std::vector<TF1*> function_2015_cone20_author_1_electron; std::vector<TF1*> m_function_2015_cone20_author_1_electron;
std::vector<TF1*> function_2015_cone40_author_16_electron; std::vector<TF1*> m_function_2015_cone40_author_16_electron;
std::vector<TF1*> function_2015_cone30_author_16_electron; std::vector<TF1*> m_function_2015_cone30_author_16_electron;
std::vector<TF1*> function_2015_cone20_author_16_electron; std::vector<TF1*> m_function_2015_cone20_author_16_electron;
//---- Rel 20_2 pT leakage correction with histogram mean file : for "trouble categories", below pT threshold //---- Rel 20_2 pT leakage correction with histogram mean file : for "trouble categories", below pT threshold
std::vector<TGraph*> graph_histoMean_2015_cone40_photon_converted_trouble; std::vector<TGraph*> m_graph_histoMean_2015_cone40_photon_converted_trouble;
std::vector<TGraph*> graph_histoMean_2015_cone30_photon_converted_trouble; std::vector<TGraph*> m_graph_histoMean_2015_cone30_photon_converted_trouble;
std::vector<TGraph*> graph_histoMean_2015_cone20_photon_converted_trouble; std::vector<TGraph*> m_graph_histoMean_2015_cone20_photon_converted_trouble;
std::vector<TGraph*> graph_histoMean_2015_cone40_author_16_electron; std::vector<TGraph*> m_graph_histoMean_2015_cone40_author_16_electron;
std::vector<TGraph*> graph_histoMean_2015_cone30_author_16_electron; std::vector<TGraph*> m_graph_histoMean_2015_cone30_author_16_electron;
std::vector<TGraph*> graph_histoMean_2015_cone20_author_16_electron; std::vector<TGraph*> m_graph_histoMean_2015_cone20_author_16_electron;
// ------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------
...@@ -228,65 +232,65 @@ class IsolationCorrection : public asg::AsgMessaging{ ...@@ -228,65 +232,65 @@ class IsolationCorrection : public asg::AsgMessaging{
// corrections recomputed for topological isolation: fine grained in eta, derived from MC12 // corrections recomputed for topological isolation: fine grained in eta, derived from MC12
//---- Rel 17.2 pT leakage correction file //---- Rel 17.2 pT leakage correction file
std::vector<TGraph*> graph_cone40_photon_unconverted; std::vector<TGraph*> m_graph_cone40_photon_unconverted;
std::vector<TGraph*> graph_cone30_photon_unconverted; std::vector<TGraph*> m_graph_cone30_photon_unconverted;
std::vector<TGraph*> graph_cone20_photon_unconverted; std::vector<TGraph*> m_graph_cone20_photon_unconverted;
std::vector<TGraph*> graph_cone40_photon_converted; std::vector<TGraph*> m_graph_cone40_photon_converted;
std::vector<TGraph*> graph_cone30_photon_converted; std::vector<TGraph*> m_graph_cone30_photon_converted;
std::vector<TGraph*> graph_cone20_photon_converted; std::vector<TGraph*> m_graph_cone20_photon_converted;
std::vector<TGraph*> graph_cone40_electron; std::vector<TGraph*> m_graph_cone40_electron;
std::vector<TGraph*> graph_cone30_electron; std::vector<TGraph*> m_graph_cone30_electron;
std::vector<TGraph*> graph_cone20_electron; std::vector<TGraph*> m_graph_cone20_electron;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// ------------- full 2011 (rel 17) etcone leakage corrections --------------- // ------------- full 2011 (rel 17) etcone leakage corrections ---------------
// //
std::vector<float> mc_rel17_leakage_correction_slopes_electron_15; std::vector<float> m_mc_rel17_leakage_correction_slopes_electron_15;
std::vector<float> mc_rel17_leakage_correction_slopes_electron_20; std::vector<float> m_mc_rel17_leakage_correction_slopes_electron_20;
std::vector<float> mc_rel17_leakage_correction_slopes_electron_25; std::vector<float> m_mc_rel17_leakage_correction_slopes_electron_25;
std::vector<float> mc_rel17_leakage_correction_slopes_electron_30; std::vector<float> m_mc_rel17_leakage_correction_slopes_electron_30;
std::vector<float> mc_rel17_leakage_correction_slopes_electron_35; std::vector<float> m_mc_rel17_leakage_correction_slopes_electron_35;
std::vector<float> mc_rel17_leakage_correction_slopes_electron_40; std::vector<float> m_mc_rel17_leakage_correction_slopes_electron_40;
std::vector<float> mc_rel17_leakage_correction_offsets_electron_15; std::vector<float> m_mc_rel17_leakage_correction_offsets_electron_15;
std::vector<float> mc_rel17_leakage_correction_offsets_electron_20; std::vector<float> m_mc_rel17_leakage_correction_offsets_electron_20;
std::vector<float> mc_rel17_leakage_correction_offsets_electron_25; std::vector<float> m_mc_rel17_leakage_correction_offsets_electron_25;
std::vector<float> mc_rel17_leakage_correction_offsets_electron_30; std::vector<float> m_mc_rel17_leakage_correction_offsets_electron_30;
std::vector<float> mc_rel17_leakage_correction_offsets_electron_35; std::vector<float> m_mc_rel17_leakage_correction_offsets_electron_35;
std::vector<float> mc_rel17_leakage_correction_offsets_electron_40; std::vector<float> m_mc_rel17_leakage_correction_offsets_electron_40;
// photons: last eta bin isn't used // photons: last eta bin isn't used
std::vector<float> mc_rel17_leakage_correction_slopes_photon_converted_15; std::vector<float> m_mc_rel17_leakage_correction_slopes_photon_converted_15;
std::vector<float> mc_rel17_leakage_correction_slopes_photon_converted_20; std::vector<float> m_mc_rel17_leakage_correction_slopes_photon_converted_20;
std::vector<float> mc_rel17_leakage_correction_slopes_photon_converted_25; std::vector<float> m_mc_rel17_leakage_correction_slopes_photon_converted_25;
std::vector<float> mc_rel17_leakage_correction_slopes_photon_converted_30; std::vector<float> m_mc_rel17_leakage_correction_slopes_photon_converted_30;
std::vector<float> mc_rel17_leakage_correction_slopes_photon_converted_35; std::vector<float> m_mc_rel17_leakage_correction_slopes_photon_converted_35;
std::vector<float> mc_rel17_leakage_correction_slopes_photon_converted_40; std::vector<float> m_mc_rel17_leakage_correction_slopes_photon_converted_40;
std::vector<float> mc_rel17_leakage_correction_offsets_photon_converted_15; std::vector<float> m_mc_rel17_leakage_correction_offsets_photon_converted_15;
std::vector<float> mc_rel17_leakage_correction_offsets_photon_converted_20; std::vector<float> m_mc_rel17_leakage_correction_offsets_photon_converted_20;
std::vector<float> mc_rel17_leakage_correction_offsets_photon_converted_25; std::vector<float> m_mc_rel17_leakage_correction_offsets_photon_converted_25;
std::vector<float> mc_rel17_leakage_correction_offsets_photon_converted_30; std::vector<float> m_mc_rel17_leakage_correction_offsets_photon_converted_30;
std::vector<float> mc_rel17_leakage_correction_offsets_photon_converted_35; std::vector<float> m_mc_rel17_leakage_correction_offsets_photon_converted_35;
std::vector<float> mc_rel17_leakage_correction_offsets_photon_converted_40; std::vector<float> m_mc_rel17_leakage_correction_offsets_photon_converted_40;
std::vector<float> mc_rel17_leakage_correction_slopes_photon_unconverted_15; std::vector<float> m_mc_rel17_leakage_correction_slopes_photon_unconverted_15;
std::vector<float> mc_rel17_leakage_correction_slopes_photon_unconverted_20; std::vector<float> m_mc_rel17_leakage_correction_slopes_photon_unconverted_20;
std::vector<float> mc_rel17_leakage_correction_slopes_photon_unconverted_25; std::vector<float> m_mc_rel17_leakage_correction_slopes_photon_unconverted_25;
std::vector<float> mc_rel17_leakage_correction_slopes_photon_unconverted_30; std::vector<float> m_mc_rel17_leakage_correction_slopes_photon_unconverted_30;
std::vector<float> mc_rel17_leakage_correction_slopes_photon_unconverted_35; std::vector<float> m_mc_rel17_leakage_correction_slopes_photon_unconverted_35;
std::vector<float> mc_rel17_leakage_correction_slopes_photon_unconverted_40; std::vector<float> m_mc_rel17_leakage_correction_slopes_photon_unconverted_40;
std::vector<float> mc_rel17_leakage_correction_offsets_photon_unconverted_15; std::vector<float> m_mc_rel17_leakage_correction_offsets_photon_unconverted_15;
std::vector<float> mc_rel17_leakage_correction_offsets_photon_unconverted_20; std::vector<float> m_mc_rel17_leakage_correction_offsets_photon_unconverted_20;
std::vector<float> mc_rel17_leakage_correction_offsets_photon_unconverted_25; std::vector<float> m_mc_rel17_leakage_correction_offsets_photon_unconverted_25;
std::vector<float> mc_rel17_leakage_correction_offsets_photon_unconverted_30; std::vector<float> m_mc_rel17_leakage_correction_offsets_photon_unconverted_30;
std::vector<float> mc_rel17_leakage_correction_offsets_photon_unconverted_35; std::vector<float> m_mc_rel17_leakage_correction_offsets_photon_unconverted_35;
std::vector<float> mc_rel17_leakage_correction_offsets_photon_unconverted_40; std::vector<float> m_mc_rel17_leakage_correction_offsets_photon_unconverted_40;
}; };
......
...@@ -19,35 +19,35 @@ class IsolationCorrectionTool : virtual public IIsolationCorrectionTool, ...@@ -19,35 +19,35 @@ class IsolationCorrectionTool : virtual public IIsolationCorrectionTool,
public: public:
IsolationCorrectionTool( const std::string& name ); IsolationCorrectionTool( const std::string& name );
~IsolationCorrectionTool(); virtual ~IsolationCorrectionTool();
StatusCode initialize(); virtual StatusCode initialize() override;
StatusCode finalize(); virtual StatusCode finalize() override;
// Apply correction to a modifyable Egamma object // Apply correction to a modifyable Egamma object
virtual CP::CorrectionCode applyCorrection(xAOD::Egamma&); virtual CP::CorrectionCode applyCorrection(xAOD::Egamma&) override;
// This helps to correct for the (wrong) leakage at the analysis level // This helps to correct for the (wrong) leakage at the analysis level
virtual CP::CorrectionCode CorrectLeakage(xAOD::Egamma&); virtual CP::CorrectionCode CorrectLeakage(xAOD::Egamma&) override;
// Create a corrected copy from a const Egamma object // Create a corrected copy from a const Egamma object
virtual CP::CorrectionCode correctedCopy( const xAOD::Egamma&, xAOD::Egamma*&); virtual CP::CorrectionCode correctedCopy( const xAOD::Egamma&, xAOD::Egamma*&) override;
//systematics //systematics
// Which systematics have an effect on the tool's behaviour? // Which systematics have an effect on the tool's behaviour?
virtual CP::SystematicSet affectingSystematics() const; virtual CP::SystematicSet affectingSystematics() const override;
// Is the tool affected by a specific systematic? // Is the tool affected by a specific systematic?
virtual bool isAffectedBySystematic( const CP::SystematicVariation& systematic ) const; virtual bool isAffectedBySystematic( const CP::SystematicVariation& systematic ) const override;
//Systematics to be used for physics analysis //Systematics to be used for physics analysis
virtual CP::SystematicSet recommendedSystematics() const; virtual CP::SystematicSet recommendedSystematics() const override;
//Use specific systematic //Use specific systematic
virtual CP::SystematicCode applySystematicVariation ( const CP::SystematicSet& systConfig ); virtual CP::SystematicCode applySystematicVariation ( const CP::SystematicSet& systConfig ) override;
float GetEtaPointing(const xAOD::Egamma* input) {return m_isol_corr->GetEtaPointing(input);}; float GetEtaPointing(const xAOD::Egamma* input) {return m_isol_corr->GetEtaPointing(input);};
float GetPtCorrectedIsolation(const xAOD::Egamma&, xAOD::Iso::IsolationType); virtual float GetPtCorrectedIsolation(const xAOD::Egamma&, xAOD::Iso::IsolationType) override;
float GetPtCorrection(const xAOD::Egamma&, xAOD::Iso::IsolationType); virtual float GetPtCorrection(const xAOD::Egamma&, xAOD::Iso::IsolationType) const override;
float GetDDCorrection(const xAOD::Egamma&, xAOD::Iso::IsolationType); virtual float GetDDCorrection(const xAOD::Egamma&, xAOD::Iso::IsolationType) override;
private: private:
......
...@@ -121,7 +121,7 @@ namespace CP { ...@@ -121,7 +121,7 @@ namespace CP {
static SG::AuxElement::Decorator<float> decDDcor20("topoetcone20_DDcorr"); static SG::AuxElement::Decorator<float> decDDcor20("topoetcone20_DDcorr");
static SG::AuxElement::Decorator<float> decDDcor40("topoetcone40_DDcorr"); static SG::AuxElement::Decorator<float> decDDcor40("topoetcone40_DDcorr");
std::vector<xAOD::Iso::IsolationType> topoisolation_types = {xAOD::Iso::topoetcone20, static const std::vector<xAOD::Iso::IsolationType> topoisolation_types = {xAOD::Iso::topoetcone20,
xAOD::Iso::topoetcone30, xAOD::Iso::topoetcone30,
xAOD::Iso::topoetcone40}; xAOD::Iso::topoetcone40};
for (auto type : topoisolation_types) { for (auto type : topoisolation_types) {
...@@ -131,20 +131,20 @@ namespace CP { ...@@ -131,20 +131,20 @@ namespace CP {
bool gotIso = eg.isolationValue(oldiso,type); bool gotIso = eg.isolationValue(oldiso,type);
if (!gotIso) continue; if (!gotIso) continue;
if (eg.pt() > 25e3) if (eg.pt() > 25e3)
ATH_MSG_DEBUG("pt = " << eg.pt() << " eta = " << eg.eta() << ", def Iso " << xAOD::Iso::toString(type) << " = " << oldiso ATH_MSG_DEBUG("pt = " << eg.pt() << " eta = " << eg.eta() << ", def Iso " << xAOD::Iso::toString(type) << " = " << oldiso
<< " old leak = " << oldleak << " new leak = " << newleak); << " old leak = " << oldleak << " new leak = " << newleak);
float iso = oldiso + (oldleak-newleak); float iso = oldiso + (oldleak-newleak);
float ddcorr = 0; float ddcorr = 0;
if (m_is_mc && m_apply_dd && type != xAOD::Iso::topoetcone30) { if (m_is_mc && m_apply_dd && type != xAOD::Iso::topoetcone30) {
ddcorr = this->GetDDCorrection(eg,type); ddcorr = this->GetDDCorrection(eg,type);
if (type == xAOD::Iso::topoetcone20) if (type == xAOD::Iso::topoetcone20)
decDDcor20(eg) = ddcorr; decDDcor20(eg) = ddcorr;
else if (type == xAOD::Iso::topoetcone40) else if (type == xAOD::Iso::topoetcone40)
decDDcor40(eg) = ddcorr; decDDcor40(eg) = ddcorr;
iso += ddcorr; iso += ddcorr;
} }
if (eg.pt() > 25e3) if (eg.pt() > 25e3)
ATH_MSG_DEBUG("ddcor = " << ddcorr << " new Iso = " << iso << "\n"); ATH_MSG_DEBUG("ddcor = " << ddcorr << " new Iso = " << iso << "\n");
bool setIso = eg.setIsolationValue(iso,type); bool setIso = eg.setIsolationValue(iso,type);
setIso = (setIso && eg.setIsolationCaloCorrection(newleak-ddcorr,type,xAOD::Iso::ptCorrection)); setIso = (setIso && eg.setIsolationCaloCorrection(newleak-ddcorr,type,xAOD::Iso::ptCorrection));
if (!setIso) { if (!setIso) {
...@@ -158,7 +158,7 @@ namespace CP { ...@@ -158,7 +158,7 @@ namespace CP {
float IsolationCorrectionTool::GetPtCorrectedIsolation(const xAOD::Egamma& input, xAOD::Iso::IsolationType isol){ float IsolationCorrectionTool::GetPtCorrectedIsolation(const xAOD::Egamma& input, xAOD::Iso::IsolationType isol){
return m_isol_corr->GetPtCorrectedIsolation(input, isol); return m_isol_corr->GetPtCorrectedIsolation(input, isol);
} }
float IsolationCorrectionTool::GetPtCorrection(const xAOD::Egamma& input, xAOD::Iso::IsolationType isol){ float IsolationCorrectionTool::GetPtCorrection(const xAOD::Egamma& input, xAOD::Iso::IsolationType isol) const {
return m_isol_corr->GetPtCorrection(input, isol); return m_isol_corr->GetPtCorrection(input, isol);
} }
......
...@@ -15,10 +15,11 @@ ...@@ -15,10 +15,11 @@
#include <map> #include <map>
#include <memory> #include <memory>
using std::make_pair;
#include "PathResolver/PathResolver.h" #include "PathResolver/PathResolver.h"
using std::make_pair;
namespace CP{ namespace CP{
ShowerDepthTool::ShowerDepthTool() : ShowerDepthTool::ShowerDepthTool() :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment