ATLAS Offline Software
IMETSystematicsTool.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // This is a copy from
8 // $Id: IMuonSmearingTool.h 299883 2014-03-28 17:34:16Z krasznaa $
9 
10 #ifndef METINTERFACE_IMETSYSTEMATICSTOOL_H
11 #define METINTERFACE_IMETSYSTEMATICSTOOL_H
12 
13 // Framework include(s):
14 #include "AsgTools/IAsgTool.h"
17 
18 // xAOD includes
23 #include "xAODJet/JetContainer.h"
24 
25 namespace met {
26 
27  namespace softCaloAffSyst {
28  const static CP::SystematicVariation MET_SoftCalo_ScaleUp ("MET_SoftCalo_Scale__1up" );
29  const static CP::SystematicVariation MET_SoftCalo_ScaleDown("MET_SoftCalo_Scale__1down");
30  const static CP::SystematicVariation MET_SoftCalo_ResoPara ("MET_SoftCalo_ResoPara" );
31  const static CP::SystematicVariation MET_SoftCalo_ResoPerp ("MET_SoftCalo_ResoPerp" );
32  const static CP::SystematicVariation MET_SoftCalo_ResoCorr ("MET_SoftCalo_ResoCorr" );
33  }
34 
35  namespace softTrkAffSyst {
36  const static CP::SystematicVariation MET_SoftTrk_ScaleUp ("MET_SoftTrk_Scale__1up" );
37  const static CP::SystematicVariation MET_SoftTrk_ScaleDown("MET_SoftTrk_Scale__1down");
38  const static CP::SystematicVariation MET_SoftTrk_ResoPara ("MET_SoftTrk_ResoPara" );
39  const static CP::SystematicVariation MET_SoftTrk_ResoPerp ("MET_SoftTrk_ResoPerp" );
40  const static CP::SystematicVariation MET_SoftTrk_ResoCorr ("MET_SoftTrk_ResoCorr" );
41  }
42 
43  namespace jetTrkAffSyst {
44  const static CP::SystematicVariation MET_JetTrk_ScaleUp ("MET_JetTrk_Scale__1up" );
45  const static CP::SystematicVariation MET_JetTrk_ScaleDown ("MET_JetTrk_Scale__1down");
46  }
47 
48  enum SystType {
49  INVALID=-1,
52  JETTRK
53  };
54 
55  inline SystType getSystType(const CP::SystematicVariation & systematic)
56  {
57  if(systematic == met::softCaloAffSyst::MET_SoftCalo_ScaleUp ||
58  systematic == met::softCaloAffSyst::MET_SoftCalo_ScaleDown ||
59  systematic == met::softCaloAffSyst::MET_SoftCalo_ResoPara ||
60  systematic == met::softCaloAffSyst::MET_SoftCalo_ResoPerp ||
61  systematic == met::softCaloAffSyst::MET_SoftCalo_ResoCorr ) return SOFTCALO;
62  if(systematic == met::softTrkAffSyst::MET_SoftTrk_ScaleUp ||
63  systematic == met::softTrkAffSyst::MET_SoftTrk_ScaleDown ||
64  systematic == met::softTrkAffSyst::MET_SoftTrk_ResoPara ||
65  systematic == met::softTrkAffSyst::MET_SoftTrk_ResoPerp ||
66  systematic == met::softTrkAffSyst::MET_SoftTrk_ResoCorr ) return SOFTTRK;
67  if(systematic == met::jetTrkAffSyst::MET_JetTrk_ScaleUp ||
68  systematic == met::jetTrkAffSyst::MET_JetTrk_ScaleDown ) return JETTRK;
69  return INVALID;
70  }
71 
72 }
73 
74 class IMETSystematicsTool : virtual public asg::IAsgTool,
75  virtual public CP::ISystematicsTool
76 {
77  // Declare the interface that the class provides
79 
80  public:
81  virtual ~IMETSystematicsTool() {}
82 
83  virtual void setRandomSeed(unsigned long seed) const = 0;
84 
85  //we don't inherit from CorrectionTool directly, but we are something close to that
88  ) const = 0;
91  ) const = 0;
92 
93  // virtual StatusCode applySystematicVariation(const CP::SystematicSet & set) = 0;
94  // virtual CP::SystematicSet affectingSystematics() const = 0;
95  // virtual CP::SystematicSet recommendedSystematics() const = 0;
96  // virtual bool isAffectedBySystematic(const CP::SystematicVariation & systematic) const = 0;
97 
98 }; // class IMETSystematicsTool
99 
100 #endif // METINTERFACE_IMETSYSTEMATICSTOOL_H
IMETSystematicsTool::correctedCopy
virtual CP::CorrectionCode correctedCopy(const xAOD::MissingET &met, xAOD::MissingET *&outputmet, const xAOD::MissingETAssociationHelper &helper) const =0
IMETSystematicsTool
Definition: IMETSystematicsTool.h:76
IMETSystematicsTool::applyCorrection
virtual CP::CorrectionCode applyCorrection(xAOD::MissingET &met, const xAOD::MissingETAssociationHelper &helper) const =0
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition: IAsgTool.h:41
met::JETTRK
@ JETTRK
Definition: IMETSystematicsTool.h:52
CP::SystematicVariation
Definition: SystematicVariation.h:47
ISystematicsTool.h
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:115
IMETSystematicsTool::~IMETSystematicsTool
virtual ~IMETSystematicsTool()
Definition: IMETSystematicsTool.h:81
met
Definition: IMETSignificance.h:24
met::getSystType
SystType getSystType(const CP::SystematicVariation &systematic)
Definition: IMETSystematicsTool.h:55
xAOD::MissingET_v1
Principal data object for Missing ET.
Definition: MissingET_v1.h:25
ASG_TOOL_INTERFACE
#define ASG_TOOL_INTERFACE(CLASSNAME)
Definition: AsgToolMacros.h:40
IAsgTool.h
met::SOFTTRK
@ SOFTTRK
Definition: IMETSystematicsTool.h:51
IMETSystematicsTool::setRandomSeed
virtual void setRandomSeed(unsigned long seed) const =0
MissingET.h
xAOD::MissingETAssociationHelper
Definition: MissingETAssociationHelper.h:22
met::SOFTCALO
@ SOFTCALO
Definition: IMETSystematicsTool.h:50
EventInfo.h
met::SystType
SystType
Definition: IMETSystematicsTool.h:48
CP::ISystematicsTool
Interface for all CP tools supporting systematic variations.
Definition: ISystematicsTool.h:32
JetContainer.h
met::INVALID
@ INVALID
Definition: IMETSystematicsTool.h:49
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
CorrectionCode.h
MissingETAssociationMap.h
MissingETAssociationHelper.h