ATLAS Offline Software
TFCSGANEtaSlice.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TFCSGANEtaSlice.h, (c) ATLAS Detector software
8 
9 #ifndef ISF_TFCSGANETASLICE_H
10 #define ISF_TFCSGANETASLICE_H 1
11 
12 // ISF includes
13 #include <map>
14 #include <vector>
15 
21 
22 // generic network class
24 // net class for legacy loading
26 
27 #include <fstream>
28 
29 
31 public:
33  TFCSGANEtaSlice(int pid, int etaMin, int etaMax,
34  const TFCSGANXMLParameters &param);
35  virtual ~TFCSGANEtaSlice();
36 
37  typedef std::map<int, std::vector<double>> FitResultsPerLayer;
38  typedef std::map<int, double> ExtrapolatorWeights;
39  typedef std::map<std::string, std::map<std::string, double>> NetworkInputs;
40  typedef std::map<std::string, double> NetworkOutputs;
41 
42  bool LoadGAN();
45 
48  TFCSSimulationState simulstate) const;
49 
50  bool IsGanCorrectlyLoaded() const;
53 
54  void Print() const;
55 
56 private:
57  int m_pid;
58  int m_etaMin;
59  int m_etaMax;
60 
61  std::string m_inputFolderName;
62 
65 
66  // legacy - keep or streamers are confused by
67  // old classes that didn't inherit
71  // updated - can take an old or new class
72  std::unique_ptr<VNetworkBase> m_net_all = nullptr;
73  std::unique_ptr<VNetworkBase> m_net_low = nullptr;
74  std::unique_ptr<VNetworkBase> m_net_high = nullptr;
75  // getters so that we are insensitive to where the data actually is
76  VNetworkBase *GetNetAll() const;
77  VNetworkBase *GetNetLow() const;
78  VNetworkBase *GetNetHigh() const;
79 
80  bool LoadGANNoRange(std::string inputFileName);
81  bool LoadGANFromRange(std::string inputFileName, std::string energyRange);
82 
84 
85  ClassDef(TFCSGANEtaSlice, 5) // TFCSGANEtaSlice
86 };
87 
88 #endif //> !ISF_TFCSGANETASLICE_H
VNetworkBase.h
TFCSGANEtaSlice::LoadGAN
bool LoadGAN()
Definition: TFCSGANEtaSlice.cxx:71
ISF_FCS::MLogging
Cut down AthMessaging.
Definition: MLogging.h:176
TFCSGANLWTNNHandler
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
Definition: TFCSGANLWTNNHandler.h:37
TFCSGANEtaSlice::m_allFitResults
FitResultsPerLayer m_allFitResults
Definition: TFCSGANEtaSlice.h:63
TFCSGANEtaSlice::m_net_low
std::unique_ptr< VNetworkBase > m_net_low
Definition: TFCSGANEtaSlice.h:73
TFCSGANEtaSlice::LoadGANFromRange
bool LoadGANFromRange(std::string inputFileName, std::string energyRange)
TFCSGANEtaSlice::NetworkOutputs
std::map< std::string, double > NetworkOutputs
Definition: TFCSGANEtaSlice.h:40
TFCSGANEtaSlice::m_net_all
std::unique_ptr< VNetworkBase > m_net_all
Definition: TFCSGANEtaSlice.h:72
TFCSGANXMLParameters.h
xAOD::etaMax
etaMax
Definition: HIEventShape_v2.cxx:46
TFCSGANEtaSlice::m_pid
int m_pid
Definition: TFCSGANEtaSlice.h:57
TFCSGANEtaSlice::m_etaMin
int m_etaMin
Definition: TFCSGANEtaSlice.h:58
TFCSExtrapolationState
Definition: TFCSExtrapolationState.h:13
RunActsMaterialValidation.extrapol
extrapol
Definition: RunActsMaterialValidation.py:90
TFCSGANXMLParameters
Definition: TFCSGANXMLParameters.h:27
TFCSGANEtaSlice::GetNetAll
VNetworkBase * GetNetAll() const
Definition: TFCSGANEtaSlice.cxx:42
TFCSGANEtaSlice::GetNetHigh
VNetworkBase * GetNetHigh() const
Definition: TFCSGANEtaSlice.cxx:52
TFCSGANEtaSlice::m_param
TFCSGANXMLParameters m_param
Definition: TFCSGANEtaSlice.h:83
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
TFCSGANEtaSlice::TFCSGANEtaSlice
TFCSGANEtaSlice()
Definition: TFCSGANEtaSlice.cxx:29
TFCSGANEtaSlice::Print
void Print() const
Definition: TFCSGANEtaSlice.cxx:258
TFCSGANEtaSlice::CalculateMeanPointFromDistributionOfR
void CalculateMeanPointFromDistributionOfR()
Definition: TFCSGANEtaSlice.cxx:115
TFCSGANEtaSlice
Definition: TFCSGANEtaSlice.h:30
TFCSGANEtaSlice::FitResultsPerLayer
std::map< int, std::vector< double > > FitResultsPerLayer
Definition: TFCSGANEtaSlice.h:37
TFCSGANEtaSlice::m_gan_low
TFCSGANLWTNNHandler * m_gan_low
Definition: TFCSGANEtaSlice.h:69
TFCSGANEtaSlice::IsGanCorrectlyLoaded
bool IsGanCorrectlyLoaded() const
Definition: TFCSGANEtaSlice.cxx:58
TFCSGANEtaSlice::GetNetLow
VNetworkBase * GetNetLow() const
Definition: TFCSGANEtaSlice.cxx:47
TFCSGANEtaSlice::GetExtrapolatorWeights
ExtrapolatorWeights GetExtrapolatorWeights()
Definition: TFCSGANEtaSlice.h:52
TFCSGANEtaSlice::m_extrapolatorWeights
ExtrapolatorWeights m_extrapolatorWeights
Definition: TFCSGANEtaSlice.h:64
TFCSGANEtaSlice::NetworkInputs
std::map< std::string, std::map< std::string, double > > NetworkInputs
Definition: TFCSGANEtaSlice.h:39
VNetworkBase
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
Definition: VNetworkBase.h:38
TFCSGANEtaSlice::m_net_high
std::unique_ptr< VNetworkBase > m_net_high
Definition: TFCSGANEtaSlice.h:74
TFCSGANEtaSlice::m_inputFolderName
std::string m_inputFolderName
Definition: TFCSGANEtaSlice.h:61
TFCSGANEtaSlice::ExtrapolatorWeights
std::map< int, double > ExtrapolatorWeights
Definition: TFCSGANEtaSlice.h:38
TFCSGANEtaSlice::m_etaMax
int m_etaMax
Definition: TFCSGANEtaSlice.h:59
TFCSGANEtaSlice::ExtractExtrapolatorMeansFromInputs
void ExtractExtrapolatorMeansFromInputs()
Definition: TFCSGANEtaSlice.cxx:154
TFCSGANEtaSlice::GetFitResults
FitResultsPerLayer GetFitResults() const
Definition: TFCSGANEtaSlice.h:51
TFCSGANEtaSlice::GetNetworkOutputs
NetworkOutputs GetNetworkOutputs(const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol, TFCSSimulationState simulstate) const
Definition: TFCSGANEtaSlice.cxx:174
LArCellBinning.etaMin
etaMin
Definition: LArCellBinning.py:84
TFCSTruthState.h
TFCSExtrapolationState.h
TFCSGANEtaSlice::~TFCSGANEtaSlice
virtual ~TFCSGANEtaSlice()
Definition: TFCSGANEtaSlice.cxx:35
TFCSGANEtaSlice::m_gan_high
TFCSGANLWTNNHandler * m_gan_high
Definition: TFCSGANEtaSlice.h:70
TFCSSimulationState.h
TFCSTruthState
Definition: TFCSTruthState.h:13
MLogging.h
TFCSSimulationState
Definition: TFCSSimulationState.h:32
TFCSGANEtaSlice::m_gan_all
TFCSGANLWTNNHandler * m_gan_all
Definition: TFCSGANEtaSlice.h:68
TFCSGANLWTNNHandler.h
TFCSGANEtaSlice::LoadGANNoRange
bool LoadGANNoRange(std::string inputFileName)