#include <TFCSMLCalorimeterSimulator.h>
|
| static std::string | startMsg (MSG::Level lvl, const std::string &file, int line) |
| | Make a message to decorate the start of logging. More...
|
| |
◆ TFCSMLCalorimeterSimulator()
| TFCSMLCalorimeterSimulator::TFCSMLCalorimeterSimulator |
( |
| ) |
|
◆ ~TFCSMLCalorimeterSimulator()
| TFCSMLCalorimeterSimulator::~TFCSMLCalorimeterSimulator |
( |
| ) |
|
|
virtual |
◆ getEvent()
Definition at line 85 of file TFCSMLCalorimeterSimulator.cxx.
92 float first_output =
outputs.begin()->second;
93 bool contains_nan = std::isnan(first_output);
96 while (contains_nan) {
105 first_output =
outputs.begin()->second;
106 contains_nan = std::isnan(first_output);
113 std::vector<unsigned int> bin_index_vector;
114 std::vector<float> E_vector;
118 long unsigned int layer_index = 0;
121 for (
long unsigned int voxel_index = 0; voxel_index <
m_nVoxels; ++voxel_index) {
125 layer_index = layer_index + 1;
131 if (voxel_energy > 0) {
133 event.event_data.resize(
layer+1);
138 event.event_data.at(
layer).E_vector.push_back(voxel_energy/
energy);
◆ level()
| MSG::Level ISF_FCS::MLogging::level |
( |
| ) |
const |
|
inlineinherited |
Retrieve output level.
Definition at line 201 of file MLogging.h.
201 {
return msg().level(); }
◆ loadSimulator()
| bool TFCSMLCalorimeterSimulator::loadSimulator |
( |
std::string & |
filename | ) |
|
◆ 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.
◆ predictVoxels() [1/2]
Definition at line 147 of file TFCSMLCalorimeterSimulator.cxx.
159 std::vector<float> eta_vector(
nEvents, 2.0);
160 std::vector<float> energy_vector(
nEvents, 65536.0);
161 std::vector<float> z_shape_vector(
nEvents*nVoxels, 0.5);
162 std::vector<float> z_energy_vector(
nEvents*nLayers, 0.5);
167 for (
float eta : eta_vector) {
173 for (
float energy : energy_vector) {
179 for (
float z_shape : z_shape_vector) {
180 inputs[
"cfm_z_shape"].insert(std::pair<std::string, double>(
"variable_" +
std::to_string(
i), z_shape));
185 for (
float z_energy : z_energy_vector) {
186 inputs[
"inn_z_energy"].insert(std::pair<std::string, double>(
"variable_" +
std::to_string(
i), z_energy));
◆ predictVoxels() [2/2]
Definition at line 33 of file TFCSMLCalorimeterSimulator.cxx.
45 for (
auto& z_shape : z_shape_vector) {
46 z_shape = CLHEP::RandGauss::shoot(simulstate.
randomEngine(), 0.0, 1.0);
48 for (
auto& z_energy : z_energy_vector) {
49 z_energy = CLHEP::RandGauss::shoot(simulstate.
randomEngine(), 0.0, 1.0);
56 for (
float thisEta : eta_vector) {
57 inputs[
"inn_eta_in"].insert(std::pair<std::string, double>(
"variable_" +
std::to_string(
i), thisEta));
62 for (
float thisEnergy : energy_vector) {
63 inputs[
"inn_einc_in"].insert(std::pair<std::string, double>(
"variable_" +
std::to_string(
i), thisEnergy));
68 for (
float z_shape : z_shape_vector) {
69 inputs[
"cfm_z_shape"].insert(std::pair<std::string, double>(
"variable_" +
std::to_string(
i), z_shape));
74 for (
float z_energy : z_energy_vector) {
75 inputs[
"inn_z_energy"].insert(std::pair<std::string, double>(
"variable_" +
std::to_string(
i), z_energy));
◆ Print()
| void TFCSMLCalorimeterSimulator::Print |
( |
| ) |
const |
◆ setInputShapes()
| void TFCSMLCalorimeterSimulator::setInputShapes |
( |
std::vector< long unsigned int > & |
layer_boundaries, |
|
|
std::vector< long unsigned int > & |
used_layers |
|
) |
| |
|
inline |
◆ 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_layer_boundaries
| std::vector<long unsigned int> TFCSMLCalorimeterSimulator::m_layer_boundaries = {0, 36, 200, 310, 346, 382} |
|
private |
◆ m_nEvents
| int TFCSMLCalorimeterSimulator::m_nEvents = 1 |
|
private |
◆ m_nLayers
| long unsigned int TFCSMLCalorimeterSimulator::m_nLayers = 5 |
|
private |
◆ m_nm
| std::string ISF_FCS::MLogging::m_nm |
|
privateinherited |
◆ m_nVoxels
| long unsigned int TFCSMLCalorimeterSimulator::m_nVoxels = 382 |
|
private |
◆ m_onnx_model
| std::unique_ptr<VNetworkBase> TFCSMLCalorimeterSimulator::m_onnx_model = nullptr |
|
private |
◆ m_used_layers
| std::vector<long unsigned int> TFCSMLCalorimeterSimulator::m_used_layers = {0, 1, 2, 3, 12} |
|
private |
The documentation for this class was generated from the following files: