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