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_Ratio", "Ratio"},
41  {"FeatureExtractor_VarTypeName_varTypeName_Mean", "Mean"},
42  {"FeatureExtractor_VarTypeName_varTypeName_StdDev", "StdDev"},
43  {"FeatureExtractor_VarTypeName_varTypeName_HLV", "HLV"},
44  {"FeatureExtractor_VarTypeName_varTypeName_Angle", "Angle"},
45  {"FeatureExtractor_VarTypeName_varTypeName_DeltaR", "DeltaR"},
46  {"FeatureExtractor_VarTypeName_varTypeName_JetMoment", "JetMoment"},
47  {"FeatureExtractor_VarTypeName_varTypeName_Combined", "Combined"},
48  {"FeatureExtractor_VarTypeName_varTypeName_Basic", "Basic"},
49  {"FeatureExtractor_VarTypeName_varTypeName_PID", "PID"},
50  {"FeatureExtractor_VarTypeName_varTypeName_Shots", "Shots"},
51  };
52  setMapString(m03);
53 
54  // vector<double> values
55  // In Config_PanTau.py, this was called "vector<float> values". This was changed to "double".
56  // The "Units.GeV" (import AthenaCommon.SystemOfUnits as Units) was now replaced by "GeV" (#include "CLHEP/Units/SystemOfUnits.h", using CLHEP::GeV)
57  MapVecDouble m04 = {
58  {"TauConstituents_BinEdges_Eta",{0.000, 0.800, 1.400, 1.500, 1.900, 9.900}},
59  {"TauConstituents_Selection_Neutral_EtaBinned_EtCut",{2.1*GeV, 2.5*GeV, 2.6*GeV, 2.4*GeV, 1.9*GeV}},
60  // Eta Binned P I 0 - B D T C U T S
61  {"CellBased_BinEdges_Eta",{0.000, 0.800, 1.400, 1.500, 1.900, 9.900}},
62  {"CellBased_EtaBinned_Pi0MVACut_1prong",{0.46, 0.39, 0.51, 0.47, 0.54}},
63  {"CellBased_EtaBinned_Pi0MVACut_3prong",{0.47, 0.52, 0.60, 0.55, 0.50}},
64  // P T B I N S
65  {"ModeDiscriminator_BinEdges_Pt",{10*GeV, 100000*GeV}},
66  {"ModeDiscriminator_BDTVariableDefaults_CellBased_1p0n_vs_1p1n", {-9.0, -0.2, -10.0, -0.2, -2.0}},
67  {"ModeDiscriminator_BDTVariableDefaults_CellBased_1p1n_vs_1pXn", {-9.0, -200.0, -0.2, -5.0, -2.0}},
68  {"ModeDiscriminator_BDTVariableDefaults_CellBased_3p0n_vs_3pXn", {-0.2, -9.0, -0.2, -2.0, -200.0}},
69  };
70  setMapVecDouble(m04);
71 
72  // vector<string> values
73  MapVecString m05 = {
74  {"Names_ModeCases",{"1p0n_vs_1p1n","1p1n_vs_1pXn","3p0n_vs_3pXn"}},
75  // ---> CellBased BDT variables
76  {"ModeDiscriminator_BDTVariableNames_CellBased_1p0n_vs_1p1n",{"Neutral_PID_BDTValues_BDTSort_1","Neutral_Ratio_1stBDTEtOverEtAllConsts","Combined_DeltaR1stNeutralTo1stCharged","Charged_JetMoment_EtDRxTotalEt","Neutral_Shots_NPhotonsInSeed"}},
77  {"ModeDiscriminator_BDTVariableNames_CellBased_1p1n_vs_1pXn",{"Neutral_PID_BDTValues_BDTSort_2","Neutral_HLV_SumM","Neutral_Ratio_EtOverEtAllConsts","Basic_NNeutralConsts","Neutral_Shots_NPhotonsInSeed"}},
78  {"ModeDiscriminator_BDTVariableNames_CellBased_3p0n_vs_3pXn",{"Neutral_Ratio_EtOverEtAllConsts","Neutral_PID_BDTValues_BDTSort_1","Charged_StdDev_Et_WrtEtAllConsts","Neutral_Shots_NPhotonsInSeed","Charged_HLV_SumM"}},
79  {"ModeDiscriminator_BDTVariableTypes_CellBased_1p0n_vs_1p1n", {"F","F","F","F","F"}},
80  {"ModeDiscriminator_BDTVariableTypes_CellBased_1p1n_vs_1pXn", {"F","F","F","F","F"}},
81  {"ModeDiscriminator_BDTVariableTypes_CellBased_3p0n_vs_3pXn", {"F","F","F","F","F"}},
82  };
83  setMapVecString(m05);
84 
85 #endif
86 }
87 
88 
90  asg::AsgTool(name)
91 {
92  declareProperty("Infos_String", m_Infos_String, "Map with string type infos");
93  declareProperty("Infos_VecString", m_Infos_VecString, "Map with vector<string> type infos");
94  declareProperty("Infos_Int", m_Infos_Int, "Map with int type infos");
95  declareProperty("Infos_Double", m_Infos_Double, "Map with double type infos");
96  declareProperty("Infos_VecDouble", m_Infos_VecDouble, "Map with double type infos");
97 }
98 
100 
102  ATH_MSG_INFO( name() << " initialize()" );
103  m_init=true;
104 
105  //This function does nothing in athena
106  ABRDefaultInit();
107 
108  return StatusCode::SUCCESS;
109 }
110 
112  MapInt::const_iterator it = m_Infos_Int.find(varName);
113  if(it == m_Infos_Int.end()) {
114  ATH_MSG_ERROR("getInfo_Int: No integer information called " << varName << " present in InformationStore");
115  return StatusCode::FAILURE;
116  }
117  value = it->second;
118  return StatusCode::SUCCESS;
119 }
120 
122  MapDouble::const_iterator it = m_Infos_Double.find(varName);
123  if(it == m_Infos_Double.end()) {
124  ATH_MSG_ERROR("getInfo_Double: No double information called " << varName << " present in InformationStore");
125  return StatusCode::FAILURE;
126  }
127  value = it->second;
128  return StatusCode::SUCCESS;
129 }
130 
131 StatusCode PanTau::Tool_InformationStore::getInfo_VecDouble(const std::string& varName, std::vector<double>& value) const {
132  MapVecDouble::const_iterator it = m_Infos_VecDouble.find(varName);
133  if(it == m_Infos_VecDouble.end()) {
134  ATH_MSG_ERROR("getInfo_VecDouble: No double information called " << varName << " present in InformationStore");
135  return StatusCode::FAILURE;
136  }
137  value = it->second;
138  return StatusCode::SUCCESS;
139 }
140 
142  MapString::const_iterator it = m_Infos_String.find(varName);
143  if(it == m_Infos_String.end()) {
144  ATH_MSG_ERROR("getInfo_String: No string information called " << varName << " present in InformationStore");
145  return StatusCode::FAILURE;
146  }
147  value = it->second;
148  return StatusCode::SUCCESS;
149 }
150 
151 StatusCode PanTau::Tool_InformationStore::getInfo_VecString(const std::string& varName, std::vector<std::string>& value) const {
152  MapVecString::const_iterator it = m_Infos_VecString.find(varName);
153  if(it == m_Infos_VecString.end()) {
154  ATH_MSG_ERROR("getInfo_VecString: No std::string information called " << varName << " present in InformationStore");
155  return StatusCode::FAILURE;
156  }
157  value = it->second;
158  return StatusCode::SUCCESS;
159 }
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:121
PanTau::Tool_InformationStore::getInfo_Int
virtual StatusCode getInfo_Int(const std::string &varName, int &value) const
Definition: Tool_InformationStore.cxx:111
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:141
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:101
PanTau::Tool_InformationStore::Tool_InformationStore
Tool_InformationStore(const std::string &name)
Definition: Tool_InformationStore.cxx:89
PanTau::Tool_InformationStore::getInfo_VecDouble
virtual StatusCode getInfo_VecDouble(const std::string &varName, std::vector< double > &value) const
Definition: Tool_InformationStore.cxx:131
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:151
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