ATLAS Offline Software
Loading...
Searching...
No Matches
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 {"Common_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_EtaBinned_Pi0MVACut_1prong",{0.46, 0.39, 0.51, 0.47, 0.54}},
62 {"CellBased_EtaBinned_Pi0MVACut_3prong",{0.47, 0.52, 0.60, 0.55, 0.50}},
63 // P T B I N S
64 {"ModeDiscriminator_BinEdges_Pt",{10*GeV, 100000*GeV}},
65 {"ModeDiscriminator_BDTVariableDefaults_CellBased_1p0n_vs_1p1n", {-9.0, -0.2, -10.0, -0.2, -2.0}},
66 {"ModeDiscriminator_BDTVariableDefaults_CellBased_1p1n_vs_1pXn", {-9.0, -200.0, -0.2, -5.0, -2.0}},
67 {"ModeDiscriminator_BDTVariableDefaults_CellBased_3p0n_vs_3pXn", {-0.2, -9.0, -0.2, -2.0, -200.0}},
68 };
69 setMapVecDouble(m04);
70
71 // vector<string> values
72 MapVecString m05 = {
73 {"Names_ModeCases",{"1p0n_vs_1p1n","1p1n_vs_1pXn","3p0n_vs_3pXn"}},
74 // ---> CellBased BDT variables
75 {"ModeDiscriminator_BDTVariableNames_CellBased_1p0n_vs_1p1n",{"Neutral_PID_BDTValues_BDTSort_1","Neutral_Ratio_1stBDTEtOverEtAllConsts","Combined_DeltaR1stNeutralTo1stCharged","Charged_JetMoment_EtDRxTotalEt","Neutral_Shots_NPhotonsInSeed"}},
76 {"ModeDiscriminator_BDTVariableNames_CellBased_1p1n_vs_1pXn",{"Neutral_PID_BDTValues_BDTSort_2","Neutral_HLV_SumM","Neutral_Ratio_EtOverEtAllConsts","Basic_NNeutralConsts","Neutral_Shots_NPhotonsInSeed"}},
77 {"ModeDiscriminator_BDTVariableNames_CellBased_3p0n_vs_3pXn",{"Neutral_Ratio_EtOverEtAllConsts","Neutral_PID_BDTValues_BDTSort_1","Charged_StdDev_Et_WrtEtAllConsts","Neutral_Shots_NPhotonsInSeed","Charged_HLV_SumM"}},
78 {"ModeDiscriminator_BDTVariableTypes_CellBased_1p0n_vs_1p1n", {"F","F","F","F","F"}},
79 {"ModeDiscriminator_BDTVariableTypes_CellBased_1p1n_vs_1pXn", {"F","F","F","F","F"}},
80 {"ModeDiscriminator_BDTVariableTypes_CellBased_3p0n_vs_3pXn", {"F","F","F","F","F"}},
81 };
82 setMapVecString(m05);
83
84#endif
85}
86
87
89 asg::AsgTool(name)
90{
91 declareProperty("Infos_String", m_Infos_String, "Map with string type infos");
92 declareProperty("Infos_VecString", m_Infos_VecString, "Map with vector<string> type infos");
93 declareProperty("Infos_Int", m_Infos_Int, "Map with int type infos");
94 declareProperty("Infos_Double", m_Infos_Double, "Map with double type infos");
95 declareProperty("Infos_VecDouble", m_Infos_VecDouble, "Map with double type infos");
96}
97
99
101 ATH_MSG_INFO( name() << " initialize()" );
102 m_init=true;
103
104 //This function does nothing in athena
106
107 return StatusCode::SUCCESS;
108}
109
110StatusCode PanTau::Tool_InformationStore::getInfo_Int(const std::string& varName, int& value) const {
111 MapInt::const_iterator it = m_Infos_Int.find(varName);
112 if(it == m_Infos_Int.end()) {
113 ATH_MSG_ERROR("getInfo_Int: No integer information called " << varName << " present in InformationStore");
114 return StatusCode::FAILURE;
115 }
116 value = it->second;
117 return StatusCode::SUCCESS;
118}
119
120StatusCode PanTau::Tool_InformationStore::getInfo_Double(const std::string& varName, double& value) const {
121 MapDouble::const_iterator it = m_Infos_Double.find(varName);
122 if(it == m_Infos_Double.end()) {
123 ATH_MSG_ERROR("getInfo_Double: No double information called " << varName << " present in InformationStore");
124 return StatusCode::FAILURE;
125 }
126 value = it->second;
127 return StatusCode::SUCCESS;
128}
129
130StatusCode PanTau::Tool_InformationStore::getInfo_VecDouble(const std::string& varName, std::vector<double>& value) const {
131 MapVecDouble::const_iterator it = m_Infos_VecDouble.find(varName);
132 if(it == m_Infos_VecDouble.end()) {
133 ATH_MSG_ERROR("getInfo_VecDouble: No double information called " << varName << " present in InformationStore");
134 return StatusCode::FAILURE;
135 }
136 value = it->second;
137 return StatusCode::SUCCESS;
138}
139
140StatusCode PanTau::Tool_InformationStore::getInfo_String(const std::string& varName, std::string& value) const {
141 MapString::const_iterator it = m_Infos_String.find(varName);
142 if(it == m_Infos_String.end()) {
143 ATH_MSG_ERROR("getInfo_String: No string information called " << varName << " present in InformationStore");
144 return StatusCode::FAILURE;
145 }
146 value = it->second;
147 return StatusCode::SUCCESS;
148}
149
150StatusCode PanTau::Tool_InformationStore::getInfo_VecString(const std::string& varName, std::vector<std::string>& value) const {
151 MapVecString::const_iterator it = m_Infos_VecString.find(varName);
152 if(it == m_Infos_VecString.end()) {
153 ATH_MSG_ERROR("getInfo_VecString: No std::string information called " << varName << " present in InformationStore");
154 return StatusCode::FAILURE;
155 }
156 value = it->second;
157 return StatusCode::SUCCESS;
158}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::map< std::string, std::vector< std::string > > MapVecString
std::map< std::string, std::string > MapString
std::map< std::string, std::vector< double > > MapVecDouble
std::map< std::string, double > MapDouble
std::map< std::string, int > MapInt
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
virtual StatusCode getInfo_VecString(const std::string &varName, std::vector< std::string > &value) const
Tool_InformationStore(const std::string &name)
virtual StatusCode getInfo_Double(const std::string &varName, double &value) const
virtual StatusCode getInfo_Int(const std::string &varName, int &value) const
virtual StatusCode getInfo_VecDouble(const std::string &varName, std::vector< double > &value) const
virtual StatusCode getInfo_String(const std::string &varName, std::string &value) const
MapString m_Infos_String
named strings, ints etc... for configuration
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58