|
ATLAS Offline Software
|
#include <TFCSGANEtaSlice.h>
|
static std::string | startMsg (MSG::Level lvl, const std::string &file, int line) |
| Make a message to decorate the start of logging. More...
|
|
Definition at line 30 of file TFCSGANEtaSlice.h.
◆ ExtrapolatorWeights
◆ FitResultsPerLayer
◆ NetworkInputs
◆ NetworkOutputs
◆ TFCSGANEtaSlice() [1/2]
TFCSGANEtaSlice::TFCSGANEtaSlice |
( |
| ) |
|
◆ TFCSGANEtaSlice() [2/2]
◆ ~TFCSGANEtaSlice()
TFCSGANEtaSlice::~TFCSGANEtaSlice |
( |
| ) |
|
|
virtual |
◆ CalculateMeanPointFromDistributionOfR()
void TFCSGANEtaSlice::CalculateMeanPointFromDistributionOfR |
( |
| ) |
|
Definition at line 115 of file TFCSGANEtaSlice.cxx.
121 TFile *
file = TFile::Open(rootFileName.c_str(),
"read");
125 TH2D *h2 = &binsInLayers[
layer];
128 TH1D *
h1 = (TH1D *)
file->Get(histoName.c_str());
129 if (TMath::IsNaN(
h1->Integral())) {
131 h1 = (TH1D *)
file->Get(histoName.c_str());
134 TAxis *
x = (TAxis *)h2->GetXaxis();
135 for (
int ix = 1; ix <= h2->GetNbinsX(); ++ix) {
137 h1->GetXaxis()->SetRangeUser(
x->GetBinLowEdge(ix),
x->GetBinUpEdge(ix));
140 if (
h1->Integral() > 0 &&
h1->GetNbinsX() > 2) {
141 TFitResultPtr
res(0);
143 res =
h1->Fit(
"expo",
"SQ");
144 if (
res >= 0 && !std::isnan(
res->Parameter(0))) {
◆ ExtractExtrapolatorMeansFromInputs()
void TFCSGANEtaSlice::ExtractExtrapolatorMeansFromInputs |
( |
| ) |
|
Definition at line 154 of file TFCSGANEtaSlice.cxx.
160 TFile *
file = TFile::Open(rootFileName.c_str(),
"read");
163 TH1D *
h =
new TH1D(
"h",
"h", 100, 0.01, 1);
164 TTree *
tree = (TTree *)
file->Get(
"rootTree");
165 std::string
command = branchName +
">>h";
◆ GetExtrapolatorWeights()
◆ GetFitResults()
◆ GetNetAll()
◆ GetNetHigh()
◆ GetNetLow()
◆ GetNetworkOutputs()
Definition at line 174 of file TFCSGANEtaSlice.cxx.
177 double randUniformZ = 0.;
180 int maxExp = 0, minExp = 0;
191 }
else if (std::abs(
m_pid) == 211) {
194 }
else if (std::abs(
m_pid) == 2212) {
208 randUniformZ = CLHEP::RandGauss::shoot(simulstate.
randomEngine(), 0.5, 0.5);
209 inputs[
"Noise"].insert(std::pair<std::string, double>(
222 inputs[
"mycond"].insert(std::pair<std::string, double>(
223 "variable_0",
log(truth->
Ekin() / Ekin_min) /
log(Ekin_max / Ekin_min)));
229 inputs[
"mycond"].insert(std::pair<std::string, double>(
230 "variable_1", std::abs(
extrapol->IDCaloBoundary_eta())));
232 inputs[
"mycond"].insert(std::pair<std::string, double>(
"variable_1", 0));
◆ IsGanCorrectlyLoaded()
bool TFCSGANEtaSlice::IsGanCorrectlyLoaded |
( |
| ) |
const |
◆ level()
MSG::Level ISF_FCS::MLogging::level |
( |
| ) |
const |
|
inlineinherited |
Retrieve output level.
Definition at line 201 of file MLogging.h.
201 {
return msg().level(); }
◆ LoadGAN()
bool TFCSGANEtaSlice::LoadGAN |
( |
| ) |
|
◆ LoadGANFromRange()
bool TFCSGANEtaSlice::LoadGANFromRange |
( |
std::string |
inputFileName, |
|
|
std::string |
energyRange |
|
) |
| |
|
private |
◆ LoadGANNoRange()
bool TFCSGANEtaSlice::LoadGANNoRange |
( |
std::string |
inputFileName | ) |
|
|
private |
◆ msg() [1/2]
MsgStream & ISF_FCS::MLogging::msg |
( |
| ) |
const |
|
inlineinherited |
Return a stream for sending messages directly (no decoration)
Definition at line 231 of file MLogging.h.
232 MsgStream *
ms = m_msg_tls.get();
◆ msg() [2/2]
MsgStream & ISF_FCS::MLogging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Return a decorated starting stream for sending messages.
Definition at line 240 of file MLogging.h.
◆ msgLvl()
bool ISF_FCS::MLogging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Check whether the logging system is active at the provided verbosity level.
Definition at line 222 of file MLogging.h.
◆ Print()
void TFCSGANEtaSlice::Print |
( |
| ) |
const |
◆ setLevel()
void ISF_FCS::MLogging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
virtualinherited |
◆ startMsg()
std::string ISF_FCS::MLogging::startMsg |
( |
MSG::Level |
lvl, |
|
|
const std::string & |
file, |
|
|
int |
line |
|
) |
| |
|
staticinherited |
Make a message to decorate the start of logging.
Print a message for the start of logging.
Definition at line 116 of file MLogging.cxx.
120 auto last_slash =
file.find_last_of(
'/');
121 int path_len = last_slash == std::string::npos ? 0 : last_slash;
122 int trim_point = path_len;
123 int total_len =
file.length();
124 if (total_len - path_len > col1_len)
125 trim_point = total_len - col1_len;
126 std::string trimmed_name =
file.substr(trim_point);
128 "NIL",
"VERBOSE",
"DEBUG",
"INFO",
"WARNING",
"ERROR",
"FATAL",
"ALWAYS"};
129 std::string
level = LevelNames[lvl];
130 std::string level_string = std::string(
"(") +
level +
") ";
132 output << std::setw(col1_len) << std::right << trimmed_name <<
":"
133 << std::setw(col2_len) << std::left <<
line << std::setw(col3_len)
134 << std::right << level_string;
◆ ATLAS_THREAD_SAFE
boost::thread_specific_ptr<MsgStream> m_msg_tls ISF_FCS::MLogging::ATLAS_THREAD_SAFE |
|
inlinestaticprivateinherited |
Do not persistify!
MsgStream instance (a std::cout like with print-out levels)
Definition at line 215 of file MLogging.h.
◆ m_allFitResults
◆ m_etaMax
int TFCSGANEtaSlice::m_etaMax {} |
|
private |
◆ m_etaMin
int TFCSGANEtaSlice::m_etaMin {} |
|
private |
◆ m_extrapolatorWeights
◆ m_gan_all
◆ m_gan_high
◆ m_gan_low
◆ m_inputFolderName
std::string TFCSGANEtaSlice::m_inputFolderName |
|
private |
◆ m_net_all
std::unique_ptr<VNetworkBase> TFCSGANEtaSlice::m_net_all = nullptr |
|
private |
◆ m_net_high
std::unique_ptr<VNetworkBase> TFCSGANEtaSlice::m_net_high = nullptr |
|
private |
◆ m_net_low
std::unique_ptr<VNetworkBase> TFCSGANEtaSlice::m_net_low = nullptr |
|
private |
◆ m_nm
std::string ISF_FCS::MLogging::m_nm |
|
privateinherited |
◆ m_param
◆ m_pid
int TFCSGANEtaSlice::m_pid {} |
|
private |
The documentation for this class was generated from the following files:
std::map< std::string, double > NetworkOutputs
Format for network outputs.
FitResultsPerLayer m_allFitResults
std::unique_ptr< VNetworkBase > m_net_low
static std::string representNetworkOutputs(NetworkOutputs const &outputs, int maxValues=3)
String representation of network outputs.
MSG::Level level() const
Retrieve output level.
std::unique_ptr< VNetworkBase > m_net_all
std::map< int, TH2D > Binning
const std::vector< int > & GetRelevantLayers() const
CLHEP::HepRandomEngine * randomEngine()
virtual NetworkOutputs compute(NetworkInputs const &inputs) const =0
Function to pass values to the network.
static std::unique_ptr< VNetworkBase > create(std::string input)
Given a string, make a network.
IMessageSvc * getMessageSvc(bool quiet=false)
VNetworkBase * GetNetAll() const
MsgStream & msg() const
Return a stream for sending messages directly (no decoration)
VNetworkBase * GetNetHigh() const
TFCSGANXMLParameters m_param
std::string m_nm
Message source name.
std::pair< std::vector< unsigned int >, bool > res
void CalculateMeanPointFromDistributionOfR()
TFCSGANLWTNNHandler * m_gan_low
VNetworkBase * GetNetLow() const
ExtrapolatorWeights m_extrapolatorWeights
std::map< std::string, std::map< std::string, double > > NetworkInputs
std::unique_ptr< VNetworkBase > m_net_high
std::string to_string(const DetectorType &type)
int GetLatentSpaceSize() const
static std::string representNetworkInputs(NetworkInputs const &inputs, int maxValues=3)
String representation of network inputs.
int GetGANVersion() const
void ExtractExtrapolatorMeansFromInputs()
const std::string & GetInputFolder() const
TFCSGANLWTNNHandler * m_gan_high
TFCSGANLWTNNHandler * m_gan_all
const Binning & GetBinning() const