ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkUtilityPackages
TrkNeuralNetworkUtils
src
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
5
#include "
TrkNeuralNetworkUtils/NeuralNetworkToHistoTool.h
"
6
7
#include "GaudiKernel/MsgStream.h"
8
#include "
TrkNeuralNetworkUtils/TTrainedNetwork.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
19
NeuralNetworkToHistoTool::NeuralNetworkToHistoTool
(
const
std::string& name,
20
const
std::string& n,
const
IInterface* p):
21
AthAlgTool
(name, n,p)
22
{
23
declareInterface<NeuralNetworkToHistoTool>(
this
);
24
}
25
26
NeuralNetworkToHistoTool::~NeuralNetworkToHistoTool
()
27
=
default
;
28
29
StatusCode
NeuralNetworkToHistoTool::initialize
() {
30
31
ATH_MSG_INFO
(
" Initialization of NeuralNetworkToHistoTool succesfull"
);
32
return
StatusCode::SUCCESS;
33
}
34
35
StatusCode
NeuralNetworkToHistoTool::finalize
() {
36
37
ATH_MSG_INFO
(
" Finalization of NeuralNetworkToHistoTool succesfull"
);
38
return
StatusCode::SUCCESS;
39
}
40
41
42
std::vector<TH1*> NeuralNetworkToHistoTool
43
::fromTrainedNetworkToHisto(
TTrainedNetwork
* trainedNetwork)
44
{
45
NetworkToHistoTool tool;
46
return
NetworkToHistoTool::fromTrainedNetworkToHisto(trainedNetwork);
47
}
48
49
TTrainedNetwork
* NeuralNetworkToHistoTool
50
::fromHistoToTrainedNetwork(
const
std::vector<TH1*> & inputHistos)
51
{
52
NetworkToHistoTool tool;
53
return
NetworkToHistoTool::fromHistoToTrainedNetwork(inputHistos);
54
}
55
56
TTrainedNetwork
* NeuralNetworkToHistoTool
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
64
::histsFromNetwork(
TTrainedNetwork
* net)
65
66
{
67
NetworkToHistoTool tool;
68
return
NetworkToHistoTool::histsFromNetwork(net);
69
}
70
71
TTrainedNetwork
* NeuralNetworkToHistoTool
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
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
NeuralNetworkToHistoTool.h
TTrainedNetwork.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
TTrainedNetwork
Definition
InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.h:21
Trk::NeuralNetworkToHistoTool::initialize
virtual StatusCode initialize()
Definition
NeuralNetworkToHistoTool.cxx:29
Trk::NeuralNetworkToHistoTool::~NeuralNetworkToHistoTool
~NeuralNetworkToHistoTool()
Trk::NeuralNetworkToHistoTool::finalize
virtual StatusCode finalize()
Definition
NeuralNetworkToHistoTool.cxx:35
Trk::NeuralNetworkToHistoTool::NeuralNetworkToHistoTool
NeuralNetworkToHistoTool(const std::string &name, const std::string &n, const IInterface *p)
Definition
NeuralNetworkToHistoTool.cxx:19
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Generated on
for ATLAS Offline Software by
1.17.0