00001 #ifndef JETUNCERTAINTIES_CONFIGHELPER_H
00002 #define JETUNCERTAINTIES_CONFIGHELPER_H
00003
00004 #include "JetUncertainties/UncertaintyEnum.h"
00005
00006 #include "AsgTools/AsgMessaging.h"
00007
00008 #include "TString.h"
00009 class TEnv;
00010
00011 namespace jet
00012 {
00013
00014 class ComponentHelper
00015 {
00016 public:
00017 ComponentHelper(const TString name = "");
00018 ComponentHelper(TEnv& settings, const TString& compPrefix, const TString& MCtype, const float energyScaleVal);
00019 virtual ~ComponentHelper() {}
00020
00021
00022 const float energyScale;
00023
00024
00025 TString name;
00026 TString desc;
00027 TString param;
00028 TString massDefStr;
00029 TString scale;
00030 TString interpolStr;
00031 TString special;
00032 TString uncNameList;
00033 TString validName;
00034 TString subCompList;
00035 int splitNum;
00036 int groupNum;
00037 TString combMassStr;
00038 TString caloMassTerm;
00039 TString TAMassTerm;
00040 TString caloMassDef;
00041 TString TAMassDef;
00042
00043
00044 CompParametrization::TypeEnum parametrization;
00045 CompMassDef::TypeEnum massDef;
00046 CompScaleVar::TypeEnum scaleVar;
00047 bool isSpecial;
00048 PileupComp::TypeEnum pileupType;
00049 FlavourComp::TypeEnum flavourType;
00050 CombMassComp::TypeEnum combMassType;
00051 bool interpolate;
00052 std::vector<TString> uncNames;
00053 std::vector<TString> subComps;
00054 };
00055
00056 class GroupHelper
00057 {
00058 public:
00059 GroupHelper(const TString name = "");
00060 GroupHelper(TEnv& settings, const TString& groupPrefix, const TString& MCtype);
00061 virtual ~GroupHelper() {}
00062
00063
00064 TString name;
00065 TString desc;
00066 TString cat;
00067 TString corr;
00068 TString isRed;
00069 int groupNum;
00070 int subgroupNum;
00071
00072
00073 CompCategory::TypeEnum category;
00074 CompCorrelation::TypeEnum correlation;
00075 bool reducible;
00076 };
00077
00078 class ConfigHelper : asg::AsgMessaging
00079 {
00080 public:
00081 ConfigHelper(const TString& confPrefix, const TString& MCtype, const float energyScaleVal);
00082 virtual StatusCode initialize(TEnv& settings);
00083 virtual ~ConfigHelper();
00084
00085
00086 bool isCompGroup() const;
00087 bool isComponent() const;
00088 bool isGroup() const;
00089
00090
00091 const ComponentHelper* getComponentInfo() const;
00092 const GroupHelper* getGroupInfo() const;
00093
00094
00095 void enforceGroupNamePrefix(const std::string& prefix);
00096 void enforceGroupNamePrefix(const TString& prefix);
00097 void setComponentJetDefSuffix(const std::string& suffix);
00098 void setComponentJetDefSuffix(const TString& suffix);
00099 void addValidityHistogram(const std::string& histName);
00100 void addValidityHistogram(const TString& histName);
00101
00102 private:
00103 ConfigHelper();
00104
00105 bool m_isInit;
00106
00107
00108 const TString m_confPrefix;
00109 const TString m_MCtype;
00110 const float m_energyScale;
00111
00112
00113 ComponentHelper* m_cInfo;
00114 GroupHelper* m_gInfo;
00115 };
00116
00117 }
00118
00119 #endif