ATLAS Offline Software
Loading...
Searching...
No Matches
PFEnergyPredictorTool Class Reference

#include <PFEnergyPredictorTool.h>

Inheritance diagram for PFEnergyPredictorTool:
Collaboration diagram for PFEnergyPredictorTool:

Public Member Functions

 PFEnergyPredictorTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode initialize () override
virtual StatusCode finalize () override
float runOnnxInference (std::vector< float > &tensor) const
float nnEnergyPrediction (const eflowRecTrack *ptr) const
void NormalizeTensor (std::vector< float > &tensor, size_t limit) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::unique_ptr< Ort::Session > m_session ATLAS_THREAD_SAFE
std::vector< const char * > m_input_node_names
std::vector< const char * > m_output_node_names
std::vector< int64_t > m_input_node_dims
ServiceHandle< AthOnnx::IOnnxRuntimeSvcm_svc {this, "ONNXRuntimeSvc", "AthOnnx::OnnxRuntimeSvc", "CaloMuonScoreTool ONNXRuntimeSvc"}
Gaudi::Property< std::string > m_model_filepath {this, "ModelPath", "////"}
Gaudi::Property< float > m_cellE_mean {this,"cellE_mean",-2.2852574689444385}
 Normalization constants for the inputs to the onnx model.
Gaudi::Property< float > m_cellE_std {this,"cellE_std",2.0100506557174946}
Gaudi::Property< float > m_cellPhi_std {this,"cellPhi_std",0.6916977411859621}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 16 of file PFEnergyPredictorTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ PFEnergyPredictorTool()

PFEnergyPredictorTool::PFEnergyPredictorTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 12 of file PFEnergyPredictorTool.cxx.

12 : AthAlgTool(type, name, parent)
13{
14
15}
AthAlgTool()
Default constructor:

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode PFEnergyPredictorTool::finalize ( )
overridevirtual

Definition at line 323 of file PFEnergyPredictorTool.cxx.

324{
325 return StatusCode::SUCCESS;
326}

◆ initialize()

StatusCode PFEnergyPredictorTool::initialize ( )
overridevirtual

Definition at line 18 of file PFEnergyPredictorTool.cxx.

19{
20 ATH_MSG_DEBUG("Initializing " << name());
21 if(m_model_filepath == "////"){
22 ATH_MSG_WARNING("model not provided tool will not work");
23 return StatusCode::SUCCESS;
24 }
25 ATH_CHECK(m_svc.retrieve());
26 std::string path = m_model_filepath;//Add path resolving code
27
28 Ort::SessionOptions session_options;
29 Ort::AllocatorWithDefaultOptions allocator;
30 session_options.SetIntraOpNumThreads(1);
31 session_options.SetGraphOptimizationLevel(ORT_ENABLE_BASIC);
32 m_session = std::make_unique<Ort::Session>(m_svc->env(), path.c_str(), session_options);
33
34 ATH_MSG_INFO("Created ONNX runtime session with model " << path);
35
36 size_t num_input_nodes = m_session->GetInputCount();
37 m_input_node_names.resize(num_input_nodes);
38
39 for (std::size_t i = 0; i < num_input_nodes; i++) {
40 // print input node names
41 char* input_name = m_session->GetInputNameAllocated(i, allocator).release();
42 ATH_MSG_INFO("Input " << i << " : "
43 << " name= " << input_name);
44 m_input_node_names[i] = input_name;
45 // print input node types
46 Ort::TypeInfo type_info = m_session->GetInputTypeInfo(i);
47 auto tensor_info = type_info.GetTensorTypeAndShapeInfo();
48 ONNXTensorElementDataType type = tensor_info.GetElementType();
49 ATH_MSG_INFO("Input " << i << " : "
50 << " type= " << type);
51
52 // print input shapes/dims
53 m_input_node_dims = tensor_info.GetShape();
54 m_input_node_dims[1] = 5430/5;
55 ATH_MSG_INFO("Input " << i << " : num_dims= " << m_input_node_dims.size());
56 for (std::size_t j = 0; j < m_input_node_dims.size(); j++) {
57 if (m_input_node_dims[j] < 0) m_input_node_dims[j] = 1;
58 ATH_MSG_INFO("Input " << i << " : dim " << j << "= " << m_input_node_dims[j]);
59 }
60 }
61
62 // output nodes
63 std::vector<int64_t> output_node_dims;
64 size_t num_output_nodes = m_session->GetOutputCount();
65 ATH_MSG_INFO("Have output nodes " << num_output_nodes);
66 m_output_node_names.resize(num_output_nodes);
67
68 for (std::size_t i = 0; i < num_output_nodes; i++) {
69 // print output node names
70 char* output_name = m_session->GetOutputNameAllocated(i, allocator).release();
71 ATH_MSG_INFO("Output " << i << " : "
72 << " name= " << output_name);
73 m_output_node_names[i] = output_name;
74
75 Ort::TypeInfo type_info = m_session->GetOutputTypeInfo(i);
76 auto tensor_info = type_info.GetTensorTypeAndShapeInfo();
77 ONNXTensorElementDataType type = tensor_info.GetElementType();
78 ATH_MSG_INFO("Output " << i << " : "
79 << " type= " << type);
80
81 // print output shapes/dims
82 output_node_dims = tensor_info.GetShape();
83 ATH_MSG_INFO("Output " << i << " : num_dims= " << output_node_dims.size());
84 for (std::size_t j = 0; j < output_node_dims.size(); j++) {
85 if (output_node_dims[j] < 0) output_node_dims[j] = 1;
86 ATH_MSG_INFO("Output" << i << " : dim " << j << "= " << output_node_dims[j]);
87 }
88 }
89
90 return StatusCode::SUCCESS;
91}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
std::vector< const char * > m_input_node_names
Gaudi::Property< std::string > m_model_filepath
std::vector< const char * > m_output_node_names
std::vector< int64_t > m_input_node_dims
ServiceHandle< AthOnnx::IOnnxRuntimeSvc > m_svc
path
python interpreter configuration --------------------------------------—
Definition athena.py:128

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & PFEnergyPredictorTool::interfaceID ( )
inlinestatic

Definition at line 49 of file PFEnergyPredictorTool.h.

static const InterfaceID IID_PFEnergyPredictorTool("PFEnergyPredictorTool", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ nnEnergyPrediction()

float PFEnergyPredictorTool::nnEnergyPrediction ( const eflowRecTrack * ptr) const

Definition at line 134 of file PFEnergyPredictorTool.cxx.

134 {
135
136 constexpr std::array<int,19> calo_numbers{1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
137 constexpr std::array<int,12> fixed_r_numbers = {1,2,3,12,13,14,15,16,17,18,19,20};
138 constexpr std::array<double,12> fixed_r_vals = {1532.18, 1723.89, 1923.02, 2450.00, 2995.00, 3630.00, 3215.00,
139 3630.00, 2246.50, 2450.00, 2870.00, 3480.00
140 };
141 constexpr std::array<int, 7> fixed_z_numbers = {5,6,7,8,9,10,11};
142 constexpr std::array<double, 7> fixed_z_vals = {3790.03, 3983.68, 4195.84, 4461.25, 4869.50, 5424.50, 5905.00};
143 std::unordered_map<int, double> r_calo_dict;//change to flatmap in c++23
144 std::unordered_map<int, double> z_calo_dict;
145 for(size_t i=0; i<fixed_r_vals.size(); i++) r_calo_dict[fixed_r_numbers[i]] = fixed_r_vals[i];
146 for(size_t i=0; i<fixed_z_numbers.size(); i++) z_calo_dict[fixed_z_numbers[i]] = fixed_z_vals[i];
147
148 std::vector<float> inputnn;
149 inputnn.assign(5430, 0.0);
150 std::vector<eflowRecCluster*> matchedClusters;
151 std::vector<eflowTrackClusterLink*> links = ptr->getClusterMatches();
152
153 std::array<double, 19> etatotal = getEtaTrackCalo(ptr->getTrackCaloPoints());
154 std::array<double, 19> phitotal = getPhiTrackCalo(ptr->getTrackCaloPoints());
155
156 const std::array<double, 2> track{ptr->getTrack()->eta(), ptr->getTrack()->phi()};
157
158 for(auto *clink : links){
159 auto *cell = clink->getCluster()->getCluster();
160 float clusterE = cell->e()*1e-3;
161 float clusterEta = cell->eta();
162
163 if (clusterE < 0.0 || clusterE > 1e4f || std::abs(clusterEta) > 2.5) continue;
164
165 constexpr bool cutOnR = false;
166 if(cutOnR){
167 std::array<double, 2> p{clink->getCluster()->getCluster()->eta(), clink->getCluster()->getCluster()->phi()};
168 double part1 = p[0] - track[0];
169 double part2 = p[1] - track[1];
170 while(part1 > M_PI) part1 -= 2*M_PI;
171 while(part1 < -M_PI) part1 += 2*M_PI;
172 while(part2 > M_PI) part2 -= 2*M_PI;
173 while(part2 < -M_PI) part2 += 2*M_PI;
174 double R = std::sqrt(part1 * part1 + part2*part2);
175 if(R >= 1.2) continue;
176 }
177
178 matchedClusters.push_back(clink->getCluster());
179 }
180
181 std::vector<std::array<double, 5>> cells;
182
183 const eflowTrackCaloPoints& trackCaloPoints = ptr->getTrackCaloPoints();
184 bool trk_bool_em[2] = {false,false};
185 std::array<double,2> trk_em_eta = {trackCaloPoints.getEta(eflowCalo::EMB2), trackCaloPoints.getEta(eflowCalo::EME2)};
186 std::array<double,2> trk_em_phi = {trackCaloPoints.getPhi(eflowCalo::EMB2), trackCaloPoints.getPhi(eflowCalo::EME2)};
187 double eta_ctr;
188 double phi_ctr;
189 for(int i =0; i<2; i++) {
190 trk_bool_em[i] = std::abs(trk_em_eta[i]) < 2.5 && std::abs(trk_em_phi[i]) <= M_PI;
191 }
192 int nProj_em = (int)trk_bool_em[0] + (int)trk_bool_em[1];
193
194 if(nProj_em ==1) {
195 eta_ctr = trk_bool_em[0] ? trk_em_eta[0] : trk_em_eta[1];
196 phi_ctr = trk_bool_em[0] ? trk_em_phi[0] : trk_em_phi[1];
197 } else if(nProj_em==2) {
198 eta_ctr = (trk_em_eta[0] + trk_em_eta[1]) / 2.0;
199 phi_ctr = (trk_em_phi[0] + trk_em_phi[1]) / 2.0;
200 } else {
201 eta_ctr = ptr->getTrack()->eta();
202 phi_ctr = ptr->getTrack()->phi();
203 }
204
205
206
207 for(auto *cptr : matchedClusters){
208 auto *clustlink = cptr->getCluster();
209
210 for(auto it_cell = clustlink->cell_begin(); it_cell != clustlink->cell_end(); it_cell++){
211 const CaloCell* cell = (*it_cell);
212 float cellE = cell->e()*(it_cell.weight())*1e-3f;
213 if(cellE < 0.005) continue;//Cut from ntuple maker
214 const auto *theDDE=it_cell->caloDDE();
215 double cx=theDDE->x();
216 double cy=theDDE->y();
217
218 cells.emplace_back( std::array<double, 5> { cellE,
219 theDDE->eta() - eta_ctr,
220 theDDE->phi() - phi_ctr,
221 std::hypot(cx,cy), //rperp
222 0.0 } );
223 }
224 }
225
226
227 std::vector<bool> trk_bool(calo_numbers.size(), false);
228 std::vector<std::array<double,4>> trk_full(calo_numbers.size());
229 for(size_t j=0; j<phitotal.size(); j++) {
230 int cnum = calo_numbers[j];
231 double eta = etatotal[j];
232 double phi = phitotal[j];
233 if(std::abs(eta) < 2.5 && std::abs(phi) <= M_PI) {
234 trk_bool[j] = true;
235 trk_full[j][0] = eta;
236 trk_full[j][1] = phi;
237 trk_full[j][3] = cnum;
238 double rPerp =-99999;
239 if(auto itr = r_calo_dict.find(cnum); itr != r_calo_dict.end()) rPerp = itr->second;
240 else if(auto itr = z_calo_dict.find(cnum); itr != z_calo_dict.end())
241 {
242 double z = itr->second;
243 if(eta != 0.0){
244 double aeta = std::abs(eta);
245 rPerp = z*2.*std::exp(aeta)/(std::exp(2.0*aeta)-1.0);
246 }else rPerp =0.0; //Check if this makes sense
247 } else {
248 throw std::runtime_error("Calo sample num not found in dicts..");
249 }
250 trk_full[j][2] = rPerp;
251 } else {
252 trk_full[j].fill(0.0);
253 }
254 }
255 double trackP = std::abs(1. / ptr->getTrack()->qOverP()) * 1e-3;
256 int trk_proj_num = std::accumulate(trk_bool.begin(), trk_bool.end(), 0);
257 if(trk_proj_num ==0) {
258 trk_proj_num =1;
259 std::array<double,5> trk_arr{};
260
261 trk_arr[0] = trackP;
262 trk_arr[1] = ptr->getTrack()->eta() - eta_ctr;
263 trk_arr[2] = ptr->getTrack()->phi() - phi_ctr;
264 trk_arr[3] = 1532.18; // just place it in EMB1
265 trk_arr[4] = 1.;
266
267 cells.emplace_back(trk_arr);
268 } else {
269 for(size_t i =0; i<calo_numbers.size(); i++) {
270 if(!trk_bool[i]) continue;
271 std::array<double,5> trk_arr{};
272 trk_arr[0]= trackP/double(trk_proj_num);
273 trk_arr[1]= trk_full[i][0] - eta_ctr;
274 trk_arr[2]= trk_full[i][1] - phi_ctr;
275 trk_arr[3]= trk_full[i][2];
276 trk_arr[4]= 1.;
277
278 cells.emplace_back(trk_arr);
279 }
280 }
281
282 int index = 0;
283 for(auto &in : cells){
284 std::copy(in.begin(), in.end(), inputnn.begin() + index);
285 index+=5;
286 if(index >= static_cast<int>(inputnn.size()-4)) {
287 ATH_MSG_WARNING("Data exceeded tensor size");
288 break;
289 }
290 }
291
292 //Normalization prior to training
293 NormalizeTensor(inputnn, cells.size() * 5 );
294
295 float predictedEnergy = exp(runOnnxInference(inputnn)) * 1000.0;//Correct to MeV units
296 ATH_MSG_DEBUG("NN Predicted energy " << predictedEnergy);
297 return predictedEnergy;
298
299}
#define M_PI
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
std::array< double, 19 > getPhiTrackCalo(const eflowTrackCaloPoints &trackCaloPoints)
std::array< double, 19 > getEtaTrackCalo(const eflowTrackCaloPoints &trackCaloPoints)
#define z
void NormalizeTensor(std::vector< float > &tensor, size_t limit) const
float runOnnxInference(std::vector< float > &tensor) const
double getPhi(eflowCalo::LAYER layer) const
double getEta(eflowCalo::LAYER layer) const
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
str index
Definition DeMoScan.py:362
void * ptr(T *p)
Definition SGImplSvc.cxx:74

◆ NormalizeTensor()

void PFEnergyPredictorTool::NormalizeTensor ( std::vector< float > & tensor,
size_t limit ) const

Definition at line 301 of file PFEnergyPredictorTool.cxx.

301 {
302 size_t i=0;
303 for(i =0;i<limit;i+=5){
304 auto &f = inputnn[i+3];
305 if(f!= 0.0f) f/= 3630.f;
306 auto &e = inputnn[i+0];
307 if(e!= 0.0f){
308 e = std::log(e);
310 }
311 auto &eta = inputnn[i+1];
312 if(eta!= 0.0) eta /= 0.7f;
313 auto &phi = inputnn[i+2];
314 if(phi!= 0.0) phi /= m_cellPhi_std;
315 }
316 if(i> inputnn.size()){
317 ATH_MSG_ERROR("Index exceeded tensor MEMORY CORRUPTION");
318 }
319}
#define ATH_MSG_ERROR(x)
Gaudi::Property< float > m_cellE_std
Gaudi::Property< float > m_cellPhi_std
Gaudi::Property< float > m_cellE_mean
Normalization constants for the inputs to the onnx model.

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ runOnnxInference()

float PFEnergyPredictorTool::runOnnxInference ( std::vector< float > & tensor) const

Definition at line 93 of file PFEnergyPredictorTool.cxx.

93 {
94 using std::endl;
95 using std::cout;
96 auto memory_info = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault);
97 auto input_tensor_size = tensor.size();
98
99 Ort::Value input_tensor =
100 Ort::Value::CreateTensor<float>(memory_info, tensor.data(), input_tensor_size,
101 m_input_node_dims.data(), m_input_node_dims.size());
102
103 auto output_tensors = m_session->Run(Ort::RunOptions{nullptr}, m_input_node_names.data(), &input_tensor, m_input_node_names.size(),
105
106 const float *output_score_array = output_tensors.front().GetTensorData<float>();
107
108 // Binary classification - the score is just the first element of the output tensor
109 float output_score = output_score_array[0];
110
111 return output_score;
112}

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::unique_ptr<Ort::Session> m_session PFEnergyPredictorTool::ATLAS_THREAD_SAFE
private

Definition at line 32 of file PFEnergyPredictorTool.h.

◆ m_cellE_mean

Gaudi::Property<float> PFEnergyPredictorTool::m_cellE_mean {this,"cellE_mean",-2.2852574689444385}
private

Normalization constants for the inputs to the onnx model.

Definition at line 43 of file PFEnergyPredictorTool.h.

43{this,"cellE_mean",-2.2852574689444385};

◆ m_cellE_std

Gaudi::Property<float> PFEnergyPredictorTool::m_cellE_std {this,"cellE_std",2.0100506557174946}
private

Definition at line 44 of file PFEnergyPredictorTool.h.

44{this,"cellE_std",2.0100506557174946};

◆ m_cellPhi_std

Gaudi::Property<float> PFEnergyPredictorTool::m_cellPhi_std {this,"cellPhi_std",0.6916977411859621}
private

Definition at line 45 of file PFEnergyPredictorTool.h.

45{this,"cellPhi_std",0.6916977411859621};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_input_node_dims

std::vector<int64_t> PFEnergyPredictorTool::m_input_node_dims
private

Definition at line 38 of file PFEnergyPredictorTool.h.

◆ m_input_node_names

std::vector<const char *> PFEnergyPredictorTool::m_input_node_names
private

Definition at line 34 of file PFEnergyPredictorTool.h.

◆ m_model_filepath

Gaudi::Property<std::string> PFEnergyPredictorTool::m_model_filepath {this, "ModelPath", "////"}
private

Definition at line 40 of file PFEnergyPredictorTool.h.

40{this, "ModelPath", "////"};

◆ m_output_node_names

std::vector<const char *> PFEnergyPredictorTool::m_output_node_names
private

Definition at line 36 of file PFEnergyPredictorTool.h.

◆ m_svc

ServiceHandle<AthOnnx::IOnnxRuntimeSvc> PFEnergyPredictorTool::m_svc {this, "ONNXRuntimeSvc", "AthOnnx::OnnxRuntimeSvc", "CaloMuonScoreTool ONNXRuntimeSvc"}
private

Definition at line 39 of file PFEnergyPredictorTool.h.

39{this, "ONNXRuntimeSvc", "AthOnnx::OnnxRuntimeSvc", "CaloMuonScoreTool ONNXRuntimeSvc"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: