ATLAS Offline Software
UncertaintySet.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef JETUNCERTAINTIES_UNCERTAINTYSET_H
6 #define JETUNCERTAINTIES_UNCERTAINTYSET_H
7 
9 
10 #include "xAODJet/Jet.h"
12 
15 #include "AsgTools/IAsgTool.h"
16 
17 #include <string>
18 #include <vector>
19 #include <utility>
20 
21 namespace jet
22 {
23 
24 class UncertaintySet : virtual public asg::AsgMessaging
25 {
27 
28  public:
29  // Constructor/destructor/initialization
30  UncertaintySet(const std::string& name = "");
31  virtual ~UncertaintySet();
32  virtual StatusCode initialize(const CP::SystematicSet& systConfig, const std::vector<UncertaintyGroup*>& groups);
33 
34  virtual std::string getName() const;
35 
36  // Uncertainty retrieval methods
37  // These only work when the user is asking for a single CompScaleVar (unknown is fine if there's only one type)
38  virtual bool getValidity(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo, const CompScaleVar::TypeEnum scaleVar = CompScaleVar::UNKNOWN) const;
39  virtual double getUncertainty(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo, const CompScaleVar::TypeEnum scaleVar = CompScaleVar::UNKNOWN) const;
40  virtual bool getValidUncertainty(double& unc, const xAOD::Jet& jet, const xAOD::EventInfo& eInfo, const CompScaleVar::TypeEnum scaleVar = CompScaleVar::UNKNOWN) const;
41 
42  // More advanced retrieval methods for generic sets
43  virtual std::vector<CompScaleVar::TypeEnum> getScaleVars() const;
44  virtual std::vector< std::pair<CompScaleVar::TypeEnum,bool> > getValiditySet(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
45  virtual std::vector< std::pair<CompScaleVar::TypeEnum,double> > getUncertaintySet(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
46  virtual std::vector< std::pair<CompScaleVar::TypeEnum,bool> > getValidUncertaintySet(std::vector< std::pair<CompScaleVar::TypeEnum,double> >& unc, const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
47 
48  // Specialty methods
50 
51  private:
52  // Private members
53  const std::string m_name;
54  bool m_isInit;
55  std::vector<UncertaintyGroup*> m_groups;
56  std::vector<float> m_shiftWeights;
57 
58 
59  // Helper methods
61 
62 };
63 
64 } // end jet namespace
65 
66 #endif
ChainDefInMenu.groups
groups
Definition: ChainDefInMenu.py:44
Jet.h
UncertaintyGroup.h
jet::UncertaintySet::m_name
const std::string m_name
Definition: UncertaintySet.h:53
jet::UncertaintySet::getTopology
JetTopology::TypeEnum getTopology(const CompScaleVar::TypeEnum scaleVar=CompScaleVar::UNKNOWN) const
Definition: UncertaintySet.cxx:281
jet::UncertaintySet::m_shiftWeights
std::vector< float > m_shiftWeights
Definition: UncertaintySet.h:56
SystematicSet.h
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
jet::UncertaintySet::m_groups
std::vector< UncertaintyGroup * > m_groups
Definition: UncertaintySet.h:55
jet::UncertaintySet::getValiditySet
virtual std::vector< std::pair< CompScaleVar::TypeEnum, bool > > getValiditySet(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: UncertaintySet.cxx:208
jet::UncertaintySet::initialize
virtual StatusCode initialize(const CP::SystematicSet &systConfig, const std::vector< UncertaintyGroup * > &groups)
Definition: UncertaintySet.cxx:31
jet::UncertaintySet::getValidity
virtual bool getValidity(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar=CompScaleVar::UNKNOWN) const
Definition: UncertaintySet.cxx:102
jet::UncertaintySet::getValidUncertainty
virtual bool getValidUncertainty(double &unc, const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar=CompScaleVar::UNKNOWN) const
Definition: UncertaintySet.cxx:152
AsgMessaging.h
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
jet::UncertaintySet::getUncertainty
virtual double getUncertainty(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar=CompScaleVar::UNKNOWN) const
Definition: UncertaintySet.cxx:123
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ASG_TOOL_CLASS0
#define ASG_TOOL_CLASS0(CLASSNAME)
Definition: AsgToolMacros.h:62
IAsgTool.h
jet::UncertaintySet::getSingleVar
CompScaleVar::TypeEnum getSingleVar() const
Definition: UncertaintySet.cxx:83
jet::UncertaintySet::UncertaintySet
UncertaintySet(const std::string &name="")
Definition: UncertaintySet.cxx:20
jet::CompScaleVar::UNKNOWN
@ UNKNOWN
Definition: UncertaintyEnum.h:93
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
EventInfo.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
jet::UncertaintySet::getScaleVars
virtual std::vector< CompScaleVar::TypeEnum > getScaleVars() const
Definition: UncertaintySet.cxx:190
jet::UncertaintySet::m_isInit
bool m_isInit
Definition: UncertaintySet.h:54
jet::CompScaleVar::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:91
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
jet::UncertaintySet::getName
virtual std::string getName() const
Definition: UncertaintySet.cxx:72
jet::UncertaintySet
Definition: UncertaintySet.h:25
jet::UncertaintySet::getUncertaintySet
virtual std::vector< std::pair< CompScaleVar::TypeEnum, double > > getUncertaintySet(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: UncertaintySet.cxx:227
jet::JetTopology::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:208
jet::UncertaintySet::getValidUncertaintySet
virtual std::vector< std::pair< CompScaleVar::TypeEnum, bool > > getValidUncertaintySet(std::vector< std::pair< CompScaleVar::TypeEnum, double > > &unc, const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: UncertaintySet.cxx:246
jet::UncertaintySet::~UncertaintySet
virtual ~UncertaintySet()