ATLAS Offline Software
Tool_InformationStore.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #define GeV 1000
8 
10 #ifdef XAOD_ANALYSIS
11 
12  // Boolean values
13  MapInt m01 = {
14  {"TauConstituents_UsePionMass",1},
15  {"FeatureExtractor_UseEmptySeeds",0},
16  };
17  setMapInt(m01);
18 
19  // double values
20  MapDouble m02 = {
21  {"TauConstituents_Types_DeltaRCore",0.2},
22  {"TauConstituents_MaxEta",9.9},
23  {"TauConstituents_PreselectionMinEnergy",500.},
24  // PanTau BDT Cut values --- CellBased
25  {"DecayModeDeterminator_BDTCutValue_R10X_CellBased",0.52},
26  {"DecayModeDeterminator_BDTCutValue_R11X_CellBased",-0.33},
27  {"DecayModeDeterminator_BDTCutValue_R110_CellBased",0.47},
28  {"DecayModeDeterminator_BDTCutValue_R1XX_CellBased",-0.21},
29  {"DecayModeDeterminator_BDTCutValue_R30X_CellBased",-0.13},
30  {"DecayModeDeterminator_BDTCutValue_R3XX_CellBased",-0.08},
31  };
32 
33  setMapDouble(m02);
34 
35  // String values
36  MapString m03 = {
37  {"Name_TauRecContainer","TauJets"},
38  {"Name_TrackParticleContainer","TrackParticleCandidate"},
39  {"ModeDiscriminator_TMVAMethod","BDTG"},
40  {"FeatureExtractor_VarTypeName_varTypeName_Sum", "Sum"},
41  {"FeatureExtractor_VarTypeName_varTypeName_Ratio", "Ratio"},
42  {"FeatureExtractor_VarTypeName_varTypeName_Isolation", "Isolation"},
43  {"FeatureExtractor_VarTypeName_varTypeName_Num", "Num"},
44  {"FeatureExtractor_VarTypeName_varTypeName_Mean", "Mean"},
45  {"FeatureExtractor_VarTypeName_varTypeName_StdDev", "StdDev"},
46  {"FeatureExtractor_VarTypeName_varTypeName_HLV", "HLV"},
47  {"FeatureExtractor_VarTypeName_varTypeName_Angle", "Angle"},
48  {"FeatureExtractor_VarTypeName_varTypeName_DeltaR", "DeltaR"},
49  {"FeatureExtractor_VarTypeName_varTypeName_JetMoment", "JetMoment"},
50  {"FeatureExtractor_VarTypeName_varTypeName_Combined", "Combined"},
51  {"FeatureExtractor_VarTypeName_varTypeName_Basic", "Basic"},
52  {"FeatureExtractor_VarTypeName_varTypeName_PID", "PID"},
53  {"FeatureExtractor_VarTypeName_varTypeName_Shots", "Shots"},
54  };
55  setMapString(m03);
56 
57  // vector<double> values
58  // In Config_PanTau.py, this was called "vector<float> values". This was changed to "double".
59  // The "Units.GeV" (import AthenaCommon.SystemOfUnits as Units) was now replaced by "GeV" (#include "CLHEP/Units/SystemOfUnits.h", using CLHEP::GeV)
60  MapVecDouble m04 = {
61  {"TauConstituents_BinEdges_Eta",{0.000, 0.800, 1.400, 1.500, 1.900, 9.900}},
62  {"TauConstituents_Selection_Neutral_EtaBinned_EtCut",{2.1*GeV, 2.5*GeV, 2.6*GeV, 2.4*GeV, 1.9*GeV}},
63  // Eta Binned P I 0 - B D T C U T S
64  {"CellBased_BinEdges_Eta",{0.000, 0.800, 1.400, 1.500, 1.900, 9.900}},
65  {"CellBased_EtaBinned_Pi0MVACut_1prong",{0.46, 0.39, 0.51, 0.47, 0.54}},
66  {"CellBased_EtaBinned_Pi0MVACut_3prong",{0.47, 0.52, 0.60, 0.55, 0.50}},
67  // P T B I N S
68  {"ModeDiscriminator_BinEdges_Pt",{10*GeV, 100000*GeV}},
69  {"ModeDiscriminator_BDTVariableDefaults_CellBased_1p0n_vs_1p1n", {-9.0, -0.2, -10.0, -0.2, -2.0}},
70  {"ModeDiscriminator_BDTVariableDefaults_CellBased_1p1n_vs_1pXn", {-9.0, -200.0, -0.2, -5.0, -2.0}},
71  {"ModeDiscriminator_BDTVariableDefaults_CellBased_3p0n_vs_3pXn", {-0.2, -9.0, -0.2, -2.0, -200.0}},
72  };
73  setMapVecDouble(m04);
74 
75  // vector<string> values
76  MapVecString m05 = {
77  {"Names_ModeCases",{"1p0n_vs_1p1n","1p1n_vs_1pXn","3p0n_vs_3pXn"}},
78  // ---> CellBased BDT variables
79  {"ModeDiscriminator_BDTVariableNames_CellBased_1p0n_vs_1p1n",{"Neutral_PID_BDTValues_BDTSort_1","Neutral_Ratio_1stBDTEtOverEtAllConsts","Combined_DeltaR1stNeutralTo1stCharged","Charged_JetMoment_EtDRxTotalEt","Neutral_Shots_NPhotonsInSeed"}},
80  {"ModeDiscriminator_BDTVariableNames_CellBased_1p1n_vs_1pXn",{"Neutral_PID_BDTValues_BDTSort_2","Neutral_HLV_SumM","Neutral_Ratio_EtOverEtAllConsts","Basic_NNeutralConsts","Neutral_Shots_NPhotonsInSeed"}},
81  {"ModeDiscriminator_BDTVariableNames_CellBased_3p0n_vs_3pXn",{"Neutral_Ratio_EtOverEtAllConsts","Neutral_PID_BDTValues_BDTSort_1","Charged_StdDev_Et_WrtEtAllConsts","Neutral_Shots_NPhotonsInSeed","Charged_HLV_SumM"}},
82  {"ModeDiscriminator_BDTVariableTypes_CellBased_1p0n_vs_1p1n", {"F","F","F","F","F"}},
83  {"ModeDiscriminator_BDTVariableTypes_CellBased_1p1n_vs_1pXn", {"F","F","F","F","F"}},
84  {"ModeDiscriminator_BDTVariableTypes_CellBased_3p0n_vs_3pXn", {"F","F","F","F","F"}},
85  };
86  setMapVecString(m05);
87 
88 #endif
89 }
90 
91 
93  asg::AsgTool(name)
94 {
95  declareProperty("Infos_String", m_Infos_String, "Map with string type infos");
96  declareProperty("Infos_VecString", m_Infos_VecString, "Map with vector<string> type infos");
97  declareProperty("Infos_Int", m_Infos_Int, "Map with int type infos");
98  declareProperty("Infos_Double", m_Infos_Double, "Map with double type infos");
99  declareProperty("Infos_VecDouble", m_Infos_VecDouble, "Map with double type infos");
100 }
101 
103 
105  ATH_MSG_INFO( name() << " initialize()" );
106  m_init=true;
107 
108  //This function does nothing in athena
109  ABRDefaultInit();
110 
111  return StatusCode::SUCCESS;
112 }
113 
115  MapInt::const_iterator it = m_Infos_Int.find(varName);
116  if(it == m_Infos_Int.end()) {
117  ATH_MSG_ERROR("getInfo_Int: No integer information called " << varName << " present in InformationStore");
118  return StatusCode::FAILURE;
119  }
120  value = it->second;
121  return StatusCode::SUCCESS;
122 }
123 
125  MapDouble::const_iterator it = m_Infos_Double.find(varName);
126  if(it == m_Infos_Double.end()) {
127  ATH_MSG_ERROR("getInfo_Double: No double information called " << varName << " present in InformationStore");
128  return StatusCode::FAILURE;
129  }
130  value = it->second;
131  return StatusCode::SUCCESS;
132 }
133 
134 StatusCode PanTau::Tool_InformationStore::getInfo_VecDouble(const std::string& varName, std::vector<double>& value) const {
135  MapVecDouble::const_iterator it = m_Infos_VecDouble.find(varName);
136  if(it == m_Infos_VecDouble.end()) {
137  ATH_MSG_ERROR("getInfo_VecDouble: No double information called " << varName << " present in InformationStore");
138  return StatusCode::FAILURE;
139  }
140  value = it->second;
141  return StatusCode::SUCCESS;
142 }
143 
145  MapString::const_iterator it = m_Infos_String.find(varName);
146  if(it == m_Infos_String.end()) {
147  ATH_MSG_ERROR("getInfo_String: No string information called " << varName << " present in InformationStore");
148  return StatusCode::FAILURE;
149  }
150  value = it->second;
151  return StatusCode::SUCCESS;
152 }
153 
154 StatusCode PanTau::Tool_InformationStore::getInfo_VecString(const std::string& varName, std::vector<std::string>& value) const {
155  MapVecString::const_iterator it = m_Infos_VecString.find(varName);
156  if(it == m_Infos_VecString.end()) {
157  ATH_MSG_ERROR("getInfo_VecString: No std::string information called " << varName << " present in InformationStore");
158  return StatusCode::FAILURE;
159  }
160  value = it->second;
161  return StatusCode::SUCCESS;
162 }
PanTau::ITool_InformationStore::MapString
std::map< std::string, std::string > MapString
Definition: ITool_InformationStore.h:29
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PanTau::Tool_InformationStore::~Tool_InformationStore
virtual ~Tool_InformationStore()
PanTau::ITool_InformationStore::MapVecDouble
std::map< std::string, std::vector< double > > MapVecDouble
Definition: ITool_InformationStore.h:33
PanTau::ITool_InformationStore::MapInt
std::map< std::string, int > MapInt
Definition: ITool_InformationStore.h:31
PanTau::Tool_InformationStore::m_Infos_VecString
MapVecString m_Infos_VecString
Definition: Tool_InformationStore.h:56
PanTau::Tool_InformationStore::m_Infos_String
MapString m_Infos_String
named strings, ints etc... for configuration
Definition: Tool_InformationStore.h:55
skel.it
it
Definition: skel.GENtoEVGEN.py:407
asg
Definition: DataHandleTestTool.h:28
athena.value
value
Definition: athena.py:124
PanTau::ITool_InformationStore::MapVecString
std::map< std::string, std::vector< std::string > > MapVecString
Definition: ITool_InformationStore.h:30
PanTau::Tool_InformationStore::getInfo_Double
virtual StatusCode getInfo_Double(const std::string &varName, double &value) const
Definition: Tool_InformationStore.cxx:124
PanTau::Tool_InformationStore::getInfo_Int
virtual StatusCode getInfo_Int(const std::string &varName, int &value) const
Definition: Tool_InformationStore.cxx:114
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
PixelAthClusterMonAlgCfg.varName
string varName
end cluster ToT and charge
Definition: PixelAthClusterMonAlgCfg.py:125
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
PanTau::Tool_InformationStore::m_Infos_Int
MapInt m_Infos_Int
Definition: Tool_InformationStore.h:57
PanTau::Tool_InformationStore::getInfo_String
virtual StatusCode getInfo_String(const std::string &varName, std::string &value) const
Definition: Tool_InformationStore.cxx:144
GeV
#define GeV
Definition: Tool_InformationStore.cxx:7
PanTau::Tool_InformationStore::ABRDefaultInit
virtual void ABRDefaultInit()
Definition: Tool_InformationStore.cxx:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
PanTau::Tool_InformationStore::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: Tool_InformationStore.cxx:104
PanTau::Tool_InformationStore::Tool_InformationStore
Tool_InformationStore(const std::string &name)
Definition: Tool_InformationStore.cxx:92
PanTau::Tool_InformationStore::getInfo_VecDouble
virtual StatusCode getInfo_VecDouble(const std::string &varName, std::vector< double > &value) const
Definition: Tool_InformationStore.cxx:134
Tool_InformationStore.h
PanTau::Tool_InformationStore::m_Infos_VecDouble
MapVecDouble m_Infos_VecDouble
Definition: Tool_InformationStore.h:59
PanTau::Tool_InformationStore::getInfo_VecString
virtual StatusCode getInfo_VecString(const std::string &varName, std::vector< std::string > &value) const
Definition: Tool_InformationStore.cxx:154
PanTau::ITool_InformationStore::MapDouble
std::map< std::string, double > MapDouble
Definition: ITool_InformationStore.h:32
PanTau::Tool_InformationStore::m_Infos_Double
MapDouble m_Infos_Double
Definition: Tool_InformationStore.h:58