ATLAS Offline Software
UncertaintyGroup.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_UNCERTAINTYGROUP_H
6 #define JETUNCERTAINTIES_UNCERTAINTYGROUP_H
7 
11 
12 #include "xAODJet/Jet.h"
14 
16 
17 #include "TString.h"
18 
19 #include <set>
20 #include <map>
21 
22 class TFile;
23 
24 namespace jet
25 {
26 
28 {
29  public:
30  // Constructor/destructor/initialization
32  UncertaintyGroup(const UncertaintyGroup& toCopy);
33  //virtual UncertaintyGroup* clone() const = 0;
34  virtual ~UncertaintyGroup();
35  virtual StatusCode addComponent(UncertaintyComponent* component);
36  virtual StatusCode addSubgroup(UncertaintyGroup* subgroup);
37  virtual StatusCode initialize(TFile* histFile);
38 
39  // Information retrieval methods
40  virtual TString getName() const { return m_name; }
41  virtual TString getDesc() const { return m_desc; }
42  virtual int getGroupNum() const { return m_groupNum; }
43  virtual int getSubgroupNum() const { return m_subgroupNum; }
44  virtual CompCategory::TypeEnum getCategory() const { return m_category; }
45  virtual CompCorrelation::TypeEnum getCorrType() const { return m_corrType; }
46  virtual bool getIsReducible() const { return m_isReducible; }
47  virtual size_t getNumRawComps() const { return m_subgroups.size(); }
48  virtual size_t getNumSubgroups() const { return m_subgroups.size(); }
49  virtual size_t getNumComponents() const;
50 
51  virtual std::vector<UncertaintyComponent*> getComponents() const { return m_components; }
52  virtual std::vector<UncertaintyGroup*> getSubgroups() const { return m_subgroups; }
53 
54  // Access to information on the constituent components
55  virtual std::set<CompScaleVar::TypeEnum> getScaleVars() const;
56 
57  // Specialty access methods
59 
60  // Methods to check for special situations
61  virtual bool isAlwaysZero() const;
62 
63  // Uncertainty retrieval methods (wrappers)
64  virtual bool getValidity(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo, const CompScaleVar::TypeEnum scaleVar) const;
65  virtual double getUncertainty(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo, const CompScaleVar::TypeEnum scaleVar) const;
66  virtual bool getValidUncertainty(double& unc, const xAOD::Jet& jet, const xAOD::EventInfo& eInfo, const CompScaleVar::TypeEnum scaleVar) const;
67 
68 
69  protected:
70  // Protected members
71  bool m_isInit;
72  const TString m_name;
73  const TString m_desc;
74  const int m_groupNum;
75  const int m_subgroupNum;
78  const bool m_isReducible;
79  std::vector<UncertaintyComponent*> m_components;
80  std::vector<UncertaintyGroup*> m_subgroups;
81  std::map<CompScaleVar::TypeEnum,std::vector<UncertaintyComponent*>*> m_compScaleMap;
82 
83  private:
84  UncertaintyGroup(const std::string& name = "");
85 
86 };
87 
88 // Sorting operators
89 bool operator < (const UncertaintyGroup& groupA, const UncertaintyGroup& groupB);
90 bool operator == (const UncertaintyGroup& groupA, const UncertaintyGroup& groupB);
91 
92 } // end jet namespace
93 
94 
95 #endif
jet::GroupHelper
Definition: ConfigHelper.h:84
jet::CompCorrelation::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:32
Jet.h
jet::UncertaintyGroup::getCategory
virtual CompCategory::TypeEnum getCategory() const
Definition: UncertaintyGroup.h:44
jet::UncertaintyGroup::getGroupNum
virtual int getGroupNum() const
Definition: UncertaintyGroup.h:42
jet::UncertaintyGroup::getDesc
virtual TString getDesc() const
Definition: UncertaintyGroup.h:41
jet::UncertaintyGroup::addComponent
virtual StatusCode addComponent(UncertaintyComponent *component)
Definition: UncertaintyGroup.cxx:105
jet::UncertaintyGroup::m_category
const CompCategory::TypeEnum m_category
Definition: UncertaintyGroup.h:76
jet::UncertaintyGroup::getSubgroups
virtual std::vector< UncertaintyGroup * > getSubgroups() const
Definition: UncertaintyGroup.h:52
jet::UncertaintyGroup::m_groupNum
const int m_groupNum
Definition: UncertaintyGroup.h:74
jet::UncertaintyGroup::getComponents
virtual std::vector< UncertaintyComponent * > getComponents() const
Definition: UncertaintyGroup.h:51
jet::operator==
bool operator==(const UncertaintyComponent &componentA, const UncertaintyComponent &componentB)
Definition: UncertaintyComponent.cxx:18
jet::UncertaintyGroup::UncertaintyGroup
UncertaintyGroup(const GroupHelper &group)
Definition: UncertaintyGroup.cxx:46
jet::UncertaintyGroup::getNumComponents
virtual size_t getNumComponents() const
Definition: UncertaintyGroup.cxx:238
jet::UncertaintyGroup::m_name
const TString m_name
Definition: UncertaintyGroup.h:72
jet::UncertaintyGroup::~UncertaintyGroup
virtual ~UncertaintyGroup()
Definition: UncertaintyGroup.cxx:87
jet::UncertaintyGroup::getName
virtual TString getName() const
Definition: UncertaintyGroup.h:40
UncertaintyEnum.h
jet::UncertaintyComponent
Definition: UncertaintyComponent.h:25
jet::UncertaintyGroup::getNumRawComps
virtual size_t getNumRawComps() const
Definition: UncertaintyGroup.h:47
AsgMessaging.h
jet::UncertaintyGroup::getSubgroupNum
virtual int getSubgroupNum() const
Definition: UncertaintyGroup.h:43
jet::UncertaintyGroup::getUncertainty
virtual double getUncertainty(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar) const
Definition: UncertaintyGroup.cxx:386
jet::UncertaintyGroup::getScaleVars
virtual std::set< CompScaleVar::TypeEnum > getScaleVars() const
Definition: UncertaintyGroup.cxx:247
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
jet::operator<
bool operator<(const UncertaintyComponent &componentA, const UncertaintyComponent &componentB)
Definition: UncertaintyComponent.cxx:13
jet::UncertaintyGroup::m_corrType
const CompCorrelation::TypeEnum m_corrType
Definition: UncertaintyGroup.h:77
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
jet::UncertaintyGroup::addSubgroup
virtual StatusCode addSubgroup(UncertaintyGroup *subgroup)
Definition: UncertaintyGroup.cxx:137
jet::CompScaleVar::UNKNOWN
@ UNKNOWN
Definition: UncertaintyEnum.h:93
jet::UncertaintyGroup::m_subgroupNum
const int m_subgroupNum
Definition: UncertaintyGroup.h:75
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
jet::UncertaintyGroup
Definition: UncertaintyGroup.h:28
jet::UncertaintyGroup::getValidUncertainty
virtual bool getValidUncertainty(double &unc, const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar) const
Definition: UncertaintyGroup.cxx:439
jet::UncertaintyGroup::m_desc
const TString m_desc
Definition: UncertaintyGroup.h:73
jet::UncertaintyGroup::isAlwaysZero
virtual bool isAlwaysZero() const
Definition: UncertaintyGroup.cxx:329
EventInfo.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
jet::CompScaleVar::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:91
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
jet::UncertaintyGroup::m_subgroups
std::vector< UncertaintyGroup * > m_subgroups
Definition: UncertaintyGroup.h:80
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
jet::CompCategory::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:16
jet::UncertaintyGroup::getCorrType
virtual CompCorrelation::TypeEnum getCorrType() const
Definition: UncertaintyGroup.h:45
jet::UncertaintyGroup::getValidity
virtual bool getValidity(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar) const
Definition: UncertaintyGroup.cxx:359
UncertaintyComponent.h
jet::UncertaintyGroup::m_components
std::vector< UncertaintyComponent * > m_components
Definition: UncertaintyGroup.h:79
jet::UncertaintyGroup::getIsReducible
virtual bool getIsReducible() const
Definition: UncertaintyGroup.h:46
jet::JetTopology::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:208
jet::UncertaintyGroup::getTopology
virtual JetTopology::TypeEnum getTopology(const CompScaleVar::TypeEnum scaleVar=CompScaleVar::UNKNOWN) const
Definition: UncertaintyGroup.cxx:275
jet::UncertaintyGroup::m_isReducible
const bool m_isReducible
Definition: UncertaintyGroup.h:78
jet::UncertaintyGroup::initialize
virtual StatusCode initialize(TFile *histFile)
Definition: UncertaintyGroup.cxx:158
jet::UncertaintyGroup::getNumSubgroups
virtual size_t getNumSubgroups() const
Definition: UncertaintyGroup.h:48
jet::UncertaintyGroup::m_compScaleMap
std::map< CompScaleVar::TypeEnum, std::vector< UncertaintyComponent * > * > m_compScaleMap
Definition: UncertaintyGroup.h:81
jet::UncertaintyGroup::m_isInit
bool m_isInit
Definition: UncertaintyGroup.h:71
ConfigHelper.h