ATLAS Offline Software
NeuralNetworkToHistoTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include "GaudiKernel/MsgStream.h"
9 #include "TrkNeuralNetworkUtils/NetworkToHistoTool.hh"
10 
11 #include <TH1F.h>
12 #include <TH2F.h>
13 #include <cmath>
14 
15 namespace Trk
16 {
17 
18 
20  const std::string& n, const IInterface* p):
21  AthAlgTool(name, n,p)
22 {
23  declareInterface<NeuralNetworkToHistoTool>(this);
24 }
25 
27 = default;
28 
30 
31  ATH_MSG_INFO(" Initialization of NeuralNetworkToHistoTool succesfull");
32  return StatusCode::SUCCESS;
33 }
34 
36 
37  ATH_MSG_INFO(" Finalization of NeuralNetworkToHistoTool succesfull");
38  return StatusCode::SUCCESS;
39 }
40 
41 
42 std::vector<TH1*> NeuralNetworkToHistoTool
44 {
45  NetworkToHistoTool tool;
46  return NetworkToHistoTool::fromTrainedNetworkToHisto(trainedNetwork);
47 }
48 
50 ::fromHistoToTrainedNetwork(const std::vector<TH1*> & inputHistos)
51 {
52  NetworkToHistoTool tool;
53  return NetworkToHistoTool::fromHistoToTrainedNetwork(inputHistos);
54 }
55 
57 ::fromHistoToTrainedNetwork(const std::vector<const TH1*> & inputHistos)
58 {
59  NetworkToHistoTool tool;
60  return NetworkToHistoTool::fromHistoToTrainedNetwork(inputHistos);
61 }
62 
63 std::map<std::string,TH1*> NeuralNetworkToHistoTool
65 
66 {
67  NetworkToHistoTool tool;
68  return NetworkToHistoTool::histsFromNetwork(net);
69 }
70 
72 ::networkFromHists(const std::map<std::string,const TH1*>& hists)
73 
74 {
75  NetworkToHistoTool tool;
76  return NetworkToHistoTool::networkFromHists(hists);
77 }
78 }//end namespace Trk
79 
80 
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Trk::NeuralNetworkToHistoTool::networkFromHists
static TTrainedNetwork * networkFromHists(const std::map< std::string, const TH1 * > &)
Definition: NeuralNetworkToHistoTool.cxx:72
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Trk::NeuralNetworkToHistoTool::fromHistoToTrainedNetwork
static TTrainedNetwork * fromHistoToTrainedNetwork(const std::vector< TH1 * > &)
Definition: NeuralNetworkToHistoTool.cxx:50
NeuralNetworkToHistoTool.h
Trk::NeuralNetworkToHistoTool::initialize
virtual StatusCode initialize()
Definition: NeuralNetworkToHistoTool.cxx:29
Trk::NeuralNetworkToHistoTool::NeuralNetworkToHistoTool
NeuralNetworkToHistoTool(const std::string &name, const std::string &n, const IInterface *p)
Definition: NeuralNetworkToHistoTool.cxx:19
Trk::NeuralNetworkToHistoTool::~NeuralNetworkToHistoTool
~NeuralNetworkToHistoTool()
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::NeuralNetworkToHistoTool::fromTrainedNetworkToHisto
static std::vector< TH1 * > fromTrainedNetworkToHisto(TTrainedNetwork *)
Definition: NeuralNetworkToHistoTool.cxx:43
MakeTH3DFromTH2Ds.hists
hists
Definition: MakeTH3DFromTH2Ds.py:72
TTrainedNetwork
Definition: InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.h:21
TTrainedNetwork.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
Trk::NeuralNetworkToHistoTool::finalize
virtual StatusCode finalize()
Definition: NeuralNetworkToHistoTool.cxx:35
AthAlgTool
Definition: AthAlgTool.h:26
Trk::NeuralNetworkToHistoTool::histsFromNetwork
static std::map< std::string, TH1 * > histsFromNetwork(TTrainedNetwork *)
Definition: NeuralNetworkToHistoTool.cxx:64