|
ATLAS Offline Software
|
#include <TFCSPredictExtrapWeights.h>
|
| TFCSPredictExtrapWeights (const char *name=nullptr, const char *title=nullptr) |
|
virtual | ~TFCSPredictExtrapWeights () |
|
virtual bool | operator== (const TFCSParametrizationBase &ref) const override |
| The == operator compares the content of instances. More...
|
|
virtual FCSReturnCode | simulate (TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const override |
| Method in all derived classes to do some simulation. More...
|
|
virtual FCSReturnCode | simulate_hit (Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) override |
| simulated one hit position with some energy. More...
|
|
bool | freemem () const |
|
void | set_freemem () |
|
bool | initializeNetwork (int pid, const std::string &etaBin, const std::string &FastCaloNNInputFolderName) |
|
bool | getNormInputs (const std::string &etaBin, const std::string &FastCaloTXTInputFolderName) |
|
std::map< std::string, double > | prepareInputs (TFCSSimulationState &simulstate, const float truthE) const |
|
void | Print (Option_t *option="") const override |
|
bool | UseHardcodedWeight () const |
|
void | set_UseHardcodedWeight () |
|
void | reset_UseHardcodedWeight () |
|
virtual double | get_sigma2_fluctuation (TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const |
| Give the effective size sigma^2 of the fluctuations that should be generated by the amount of generated hits. More...
|
|
virtual int | get_number_of_hits (TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const |
| Call get_number_of_hits() only once per shower simulation, as it could be calculated with random numbers and give different results each time. More...
|
|
virtual float | get_E_hit (TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const |
| Get hit energy from layer energy and number of hits. More...
|
|
virtual float | getMinWeight () const |
| Get minimum and maximum value of weight for hit energy reweighting. More...
|
|
virtual float | getMaxWeight () const |
|
bool | is_match_Ekin_bin (int bin) const override |
|
bool | is_match_calosample (int calosample) const override |
|
virtual bool | is_match_all_Ekin_bin () const override |
|
virtual bool | is_match_all_calosample () const override |
|
int | Ekin_bin () const |
|
void | set_Ekin_bin (int bin) |
|
int | calosample () const |
|
void | set_calosample (int cs) |
|
virtual void | set_pdgid_Ekin_eta_Ekin_bin_calosample (const TFCSLateralShapeParametrization &ref) |
|
void | clear () |
|
virtual bool | is_match_pdgid (int id) const override |
|
virtual bool | is_match_Ekin (float Ekin) const override |
|
virtual bool | is_match_eta (float eta) const override |
|
virtual bool | is_match_all_Ekin () const override |
|
virtual bool | is_match_all_eta () const override |
|
const std::set< int > & | pdgid () const override |
|
double | Ekin_nominal () const override |
|
double | Ekin_min () const override |
|
double | Ekin_max () const override |
|
double | eta_nominal () const override |
|
double | eta_min () const override |
|
double | eta_max () const override |
|
virtual void | set_pdgid (int id) |
|
virtual void | set_pdgid (const std::set< int > &ids) |
|
virtual void | add_pdgid (int id) |
|
virtual void | clear_pdgid () |
|
virtual void | set_Ekin_nominal (double min) |
|
virtual void | set_Ekin_min (double min) |
|
virtual void | set_Ekin_max (double max) |
|
virtual void | set_eta_nominal (double min) |
|
virtual void | set_eta_min (double min) |
|
virtual void | set_eta_max (double max) |
|
virtual void | set_Ekin (const TFCSParametrizationBase &ref) |
|
virtual void | set_eta (const TFCSParametrizationBase &ref) |
|
virtual void | set_Ekin_eta (const TFCSParametrizationBase &ref) |
|
virtual void | set_pdgid_Ekin_eta (const TFCSParametrizationBase &ref) |
|
virtual bool | is_match_all_pdgid () const |
|
virtual void | set_match_all_pdgid () |
|
virtual void | reset_match_all_pdgid () |
|
virtual void | set_geometry (ICaloGeometry *geo) |
| Method to set the geometry access pointer. More...
|
|
virtual unsigned int | size () const |
| Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operator[] methods give general access to these daughters. More...
|
|
virtual const TFCSParametrizationBase * | operator[] (unsigned int) const |
| Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operator[] methods give general access to these daughters. More...
|
|
virtual TFCSParametrizationBase * | operator[] (unsigned int) |
| Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operator[] methods give general access to these daughters. More...
|
|
virtual void | set_daughter (unsigned int, TFCSParametrizationBase *) |
| Some derived classes have daughter instances of TFCSParametrizationBase objects The set_daughter method allows to change these daughters - expert use only! The original element at this position is not deleted. More...
|
|
virtual void | CleanAuxInfo (TFCSSimulationState &) const |
| Method in all derived classes to delete objects stored in the simulstate AuxInfo. More...
|
|
void | FindDuplicates (FindDuplicateClasses_t &dup) |
|
void | RemoveDuplicates () |
|
void | RemoveNameTitle () |
|
bool | msgLvl (const MSG::Level lvl) const |
| Check whether the logging system is active at the provided verbosity level. More...
|
|
MsgStream & | msg () const |
| Return a stream for sending messages directly (no decoration) More...
|
|
MsgStream & | msg (const MSG::Level lvl) const |
| Return a decorated starting stream for sending messages. More...
|
|
MSG::Level | level () const |
| Retrieve output level. More...
|
|
virtual void | setLevel (MSG::Level lvl) |
| Update outputlevel. More...
|
|
Definition at line 18 of file TFCSPredictExtrapWeights.h.
◆ FindDuplicateClasses_t
◆ FindDuplicates_t
◆ FCSfreemem
Enumerator |
---|
kfreemem | Set this bit in the TObject bit if the memory for m_input should be freed after reading in athena.
|
Definition at line 38 of file TFCSPredictExtrapWeights.h.
◆ FCSStatusBits
Status bit for FCS needs.
Enumerator |
---|
kMatchAllPDGID | Set this bit in the TObject bit field if valid for all PDGID.
|
Definition at line 52 of file TFCSParametrizationBase.h.
◆ TFCSPredictExtrapWeightsStatusBits
◆ TFCSPredictExtrapWeights()
TFCSPredictExtrapWeights::TFCSPredictExtrapWeights |
( |
const char * |
name = nullptr , |
|
|
const char * |
title = nullptr |
|
) |
| |
◆ ~TFCSPredictExtrapWeights()
TFCSPredictExtrapWeights::~TFCSPredictExtrapWeights |
( |
| ) |
|
|
virtual |
◆ add_pdgid()
void TFCSParametrization::add_pdgid |
( |
int |
id | ) |
|
|
virtualinherited |
◆ calosample()
int TFCSLateralShapeParametrization::calosample |
( |
| ) |
const |
|
inlineinherited |
◆ CleanAuxInfo()
◆ clear()
void TFCSParametrization::clear |
( |
| ) |
|
|
inherited |
◆ clear_pdgid()
void TFCSParametrization::clear_pdgid |
( |
| ) |
|
|
virtualinherited |
◆ compare()
◆ Ekin_bin()
int TFCSLateralShapeParametrization::Ekin_bin |
( |
| ) |
const |
|
inlineinherited |
◆ Ekin_max()
double TFCSParametrization::Ekin_max |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ Ekin_min()
double TFCSParametrization::Ekin_min |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ Ekin_nominal()
double TFCSParametrization::Ekin_nominal |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ eta_max()
double TFCSParametrization::eta_max |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ eta_min()
double TFCSParametrization::eta_min |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ eta_nominal()
double TFCSParametrization::eta_nominal |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ FindDuplicates()
Definition at line 90 of file TFCSParametrizationBase.cxx.
92 for (
unsigned int i = 0;
i <
size(); ++
i)
97 auto checkexist = dup.find(param);
98 if (checkexist != dup.end()) {
100 << param->GetName());
101 if (checkexist->second.replace) {
104 << refparam <<
"=" << refparam->GetName()
105 <<
", duplicate is " << param <<
"=" << param->GetName()
106 <<
" index " <<
i <<
" of " <<
this);
107 dup[refparam].mother.push_back(
this);
108 dup[refparam].index.push_back(
i);
113 dup[param] = Duplicate_t();
114 for (
auto &
ref : dup) {
117 if (param == refparam)
120 if (refparam ==
nullptr)
123 if (
ref.second.replace)
126 if (*param == *refparam) {
128 << refparam <<
"=" << refparam->GetName()
129 <<
", duplicate is " << param <<
"=" << param->GetName()
130 <<
" index " <<
i <<
" of " <<
this);
131 dup[param].replace = refparam;
132 dup[refparam].mother.push_back(
this);
133 dup[refparam].index.push_back(
i);
◆ freemem()
bool TFCSPredictExtrapWeights::freemem |
( |
| ) |
const |
|
inline |
◆ get_E_hit()
◆ get_number_of_hits()
◆ get_sigma2_fluctuation()
◆ getMaxWeight()
float TFCSLateralShapeParametrizationHitBase::getMaxWeight |
( |
| ) |
const |
|
virtualinherited |
◆ getMinWeight()
float TFCSLateralShapeParametrizationHitBase::getMinWeight |
( |
| ) |
const |
|
virtualinherited |
◆ getNormInputs()
bool TFCSPredictExtrapWeights::getNormInputs |
( |
const std::string & |
etaBin, |
|
|
const std::string & |
FastCaloTXTInputFolderName |
|
) |
| |
Definition at line 98 of file TFCSPredictExtrapWeights.cxx.
118 std::string inputFileName = FastCaloTXTInputFolderName +
119 "MeanStdDevEnergyFractions_eta_" +
etaBin +
122 std::ifstream inputTXT(inputFileName);
123 if (inputTXT.is_open()) {
125 while (getline(inputTXT,
line)) {
126 std::stringstream
ss(
line);
130 getline(
ss, substr,
' ');
132 if (substr !=
"etrue") {
133 int index = std::stoi(substr.substr(substr.find(
'_') + 1));
◆ initializeNetwork()
bool TFCSPredictExtrapWeights::initializeNetwork |
( |
int |
pid, |
|
|
const std::string & |
etaBin, |
|
|
const std::string & |
FastCaloNNInputFolderName |
|
) |
| |
Definition at line 298 of file TFCSPredictExtrapWeights.cxx.
303 "Using FastCaloNNInputFolderName: " << FastCaloNNInputFolderName);
306 std::string inputFileName =
307 FastCaloNNInputFolderName +
"NN_" +
etaBin +
".json";
309 if (inputFileName.empty()) {
314 <<
", loading json file " << inputFileName);
315 std::ifstream
input(inputFileName);
316 std::stringstream
sin;
322 if (
m_nn ==
nullptr) {
323 ATH_MSG_ERROR(
"Could not create LightWeightNeuralNetwork from "
334 int layer = std::stoi(
◆ is_match_all_calosample()
virtual bool TFCSLateralShapeParametrization::is_match_all_calosample |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_all_Ekin()
virtual bool TFCSParametrization::is_match_all_Ekin |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_all_Ekin_bin()
virtual bool TFCSLateralShapeParametrization::is_match_all_Ekin_bin |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_all_eta()
virtual bool TFCSParametrization::is_match_all_eta |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_all_pdgid()
virtual bool TFCSParametrizationBase::is_match_all_pdgid |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ is_match_calosample()
bool TFCSLateralShapeParametrization::is_match_calosample |
( |
int |
calosample | ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_Ekin()
virtual bool TFCSParametrization::is_match_Ekin |
( |
float |
Ekin | ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_Ekin_bin()
bool TFCSLateralShapeParametrization::is_match_Ekin_bin |
( |
int |
bin | ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_eta()
virtual bool TFCSParametrization::is_match_eta |
( |
float |
eta | ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_pdgid()
virtual bool TFCSParametrization::is_match_pdgid |
( |
int |
id | ) |
const |
|
inlineoverridevirtualinherited |
◆ level()
MSG::Level ISF_FCS::MLogging::level |
( |
| ) |
const |
|
inlineinherited |
Retrieve output level.
Definition at line 201 of file MLogging.h.
201 {
return msg().level(); }
◆ 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.
◆ operator==()
The == operator compares the content of instances.
The implementation in the base class only returns true for a comparison with itself
Reimplemented from TFCSParametrizationBase.
Definition at line 76 of file TFCSPredictExtrapWeights.cxx.
80 <<
IsA()->GetName() <<
" != " <<
ref.IsA()->GetName());
◆ operator[]() [1/2]
◆ operator[]() [2/2]
◆ pdgid()
const std::set<int>& TFCSParametrization::pdgid |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ prepareInputs()
std::map< std::string, double > TFCSPredictExtrapWeights::prepareInputs |
( |
TFCSSimulationState & |
simulstate, |
|
|
const float |
truthE |
|
) |
| const |
Definition at line 158 of file TFCSPredictExtrapWeights.cxx.
160 std::map<std::string, double> inputVariables;
170 inputVariables[
"ef_" +
layer] =
174 ATH_MSG_ERROR(
"Normalization information not found for layer "
182 inputVariables[
"etrue"] = (truthE - std::as_const(
m_normMeans)->at(
index)) /
185 inputVariables[
"pdgId"] = 1;
187 inputVariables[
"pdgId"] = 0;
189 return inputVariables;
◆ Print()
void TFCSPredictExtrapWeights::Print |
( |
Option_t * |
option = "" | ) |
const |
|
override |
◆ RemoveDuplicates()
void TFCSParametrizationBase::RemoveDuplicates |
( |
| ) |
|
|
inherited |
Definition at line 142 of file TFCSParametrizationBase.cxx.
146 std::set<TFCSParametrizationBase *> dellist;
147 for (
auto &dupiter : dupclasses) {
149 for (
auto onedup : dup) {
150 if (onedup.second.mother.empty())
154 for (
unsigned int i = 0;
i < onedup.second.mother.size(); ++
i) {
155 int index = onedup.second.index[
i];
158 unsigned int delcount = dup[delparam].mother.
size();
161 << delparam <<
"=" << delparam->GetName() <<
" index "
162 <<
index <<
" of " << mother <<
", has " << delcount
163 <<
" other replacements attached. Deleting");
165 dellist.insert(delparam);
168 << delparam <<
"=" << delparam->GetName() <<
" index "
169 <<
index <<
" of " << mother <<
", has " << delcount
170 <<
" other replacements attached. Skipping");
180 std::map<std::string, int> ndel;
181 for (
auto *delparam : dellist) {
183 bool present = dup2.find(delparam) != dup2.end();
186 << delparam->GetName()
187 <<
" still referenced somewhere!");
190 << delparam->GetName());
191 ++ndel[delparam->ClassName()];
195 for (
auto &del : ndel)
196 ATH_MSG_INFO(
"Deleted " << del.second <<
" duplicate objects of class "
◆ RemoveNameTitle()
void TFCSParametrizationBase::RemoveNameTitle |
( |
| ) |
|
|
inherited |
◆ reset_match_all_pdgid()
virtual void TFCSParametrizationBase::reset_match_all_pdgid |
( |
| ) |
|
|
inlinevirtualinherited |
◆ reset_UseHardcodedWeight()
void TFCSPredictExtrapWeights::reset_UseHardcodedWeight |
( |
| ) |
|
|
inline |
◆ set_calosample()
void TFCSLateralShapeParametrization::set_calosample |
( |
int |
cs | ) |
|
|
inherited |
◆ set_daughter()
◆ set_Ekin()
◆ set_Ekin_bin()
void TFCSLateralShapeParametrization::set_Ekin_bin |
( |
int |
bin | ) |
|
|
inherited |
◆ set_Ekin_eta()
◆ set_Ekin_max()
void TFCSParametrization::set_Ekin_max |
( |
double |
max | ) |
|
|
virtualinherited |
◆ set_Ekin_min()
void TFCSParametrization::set_Ekin_min |
( |
double |
min | ) |
|
|
virtualinherited |
◆ set_Ekin_nominal()
void TFCSParametrization::set_Ekin_nominal |
( |
double |
min | ) |
|
|
virtualinherited |
◆ set_eta()
◆ set_eta_max()
void TFCSParametrization::set_eta_max |
( |
double |
max | ) |
|
|
virtualinherited |
◆ set_eta_min()
void TFCSParametrization::set_eta_min |
( |
double |
min | ) |
|
|
virtualinherited |
◆ set_eta_nominal()
void TFCSParametrization::set_eta_nominal |
( |
double |
min | ) |
|
|
virtualinherited |
◆ set_freemem()
void TFCSPredictExtrapWeights::set_freemem |
( |
| ) |
|
|
inline |
◆ set_geometry()
void TFCSParametrizationBase::set_geometry |
( |
ICaloGeometry * |
geo | ) |
|
|
virtualinherited |
◆ set_match_all_pdgid()
virtual void TFCSParametrizationBase::set_match_all_pdgid |
( |
| ) |
|
|
inlinevirtualinherited |
◆ set_pdgid() [1/2]
void TFCSParametrization::set_pdgid |
( |
const std::set< int > & |
ids | ) |
|
|
virtualinherited |
◆ set_pdgid() [2/2]
void TFCSParametrization::set_pdgid |
( |
int |
id | ) |
|
|
virtualinherited |
◆ set_pdgid_Ekin_eta()
◆ set_pdgid_Ekin_eta_Ekin_bin_calosample()
◆ set_UseHardcodedWeight()
void TFCSPredictExtrapWeights::set_UseHardcodedWeight |
( |
| ) |
|
|
inline |
◆ setLevel()
void ISF_FCS::MLogging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
virtualinherited |
◆ simulate()
Method in all derived classes to do some simulation.
Result should be returned in simulstate.
Simulate all energies in calo layers for energy parametrizations. Simulate cells for shape simulation.
Reimplemented from TFCSParametrizationBase.
Definition at line 194 of file TFCSPredictExtrapWeights.cxx.
199 std::map<std::string, double> inputVariables =
208 << ilayer <<
" weight: "
◆ simulate_hit()
simulated one hit position with some energy.
As last step in TFCSLateralShapeParametrizationHitChain::simulate, the hit should be mapped into a cell and this cell recorded in simulstate. All hits/cells should be resacled such that their final sum is simulstate->E(sample)
Reimplemented from TFCSLateralShapeParametrizationHitBase.
Definition at line 228 of file TFCSPredictExtrapWeights.cxx.
237 extrapWeight = simulstate.
getAuxInfo<
float>(cs);
240 "Simulstate is not decorated with extrapolation weights for cs = "
249 float extrapWeight_for_r_z = extrapWeight;
251 extrapWeight_for_r_z = 0.5;
253 "Will use extrapWeight=0.5 for r and z when constructing a hit");
255 ATH_MSG_DEBUG(
"Will use predicted extrapWeight also for r and z when "
256 "constructing a hit");
263 if (!std::isfinite(
r) || !std::isfinite(
z) || !std::isfinite(
eta) ||
264 !std::isfinite(
phi)) {
265 ATH_MSG_WARNING(
"Extrapolator contains NaN or infinite number.\nSetting "
266 "center position to calo boundary.");
268 <<
r <<
" center_z: " <<
z <<
" center_phi: " <<
phi
269 <<
" center_eta: " <<
eta <<
" weight: " << extrapWeight
277 <<
r <<
" center_z: " <<
z <<
" center_phi: " <<
phi
278 <<
" center_eta: " <<
eta <<
" weight: " << extrapWeight
291 <<
" weight: " << extrapWeight <<
" cs: " << cs);
◆ size()
virtual unsigned int TFCSParametrizationBase::size |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ 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;
◆ test_path()
Definition at line 390 of file TFCSPredictExtrapWeights.cxx.
396 << net_path.substr(net_path.length() - 20)
397 <<
" and norm path ..."
398 << norm_path.substr(norm_path.length() - 20));
401 #if defined(__FastCaloSimStandAlone__)
409 t->SetPtEtaPhiM(524288000, 0, 0, 130);
415 e->set_IDCaloBoundary_eta(truth->Eta());
416 for (
int i = 0;
i < 24; ++
i) {
434 simulstate->
set_E(0, 1028.77124023);
435 simulstate->
set_E(1, 68199.0625);
436 simulstate->
set_E(2, 438270.78125);
437 simulstate->
set_E(3, 3024.02929688);
438 simulstate->
set_E(12, 1330.10131836);
439 simulstate->
set_E(1028.77124023 + 68199.0625 + 438270.78125 + 3024.02929688 +
441 simulstate->
set_Efrac(0, simulstate->
E(0) / simulstate->
E());
442 simulstate->
set_Efrac(1, simulstate->
E(1) / simulstate->
E());
443 simulstate->
set_Efrac(2, simulstate->
E(2) / simulstate->
E());
444 simulstate->
set_Efrac(3, simulstate->
E(3) / simulstate->
E());
445 simulstate->
set_Efrac(12, simulstate->
E(12) / simulstate->
E());
447 const int pdgId = truth->
pdgid();
448 const float Ekin = truth->
Ekin();
449 const float eta = truth->Eta();
457 for (
int i = 0;
i <= 25; ++
i) {
459 if (
Eta >= etaTmp &&
Eta < (etaTmp + 5)) {
467 NN.setLevel(MSG::INFO);
469 NN.initializeNetwork(
pid,
etaBin, net_path);
470 NN.getNormInputs(
etaBin, norm_path);
475 std::map<std::string, double> inputVariables =
476 NN.prepareInputs(*simulstate, truth->E() * 0.001);
480 auto outputs = NN.m_nn->compute(inputVariables);
481 const std::vector<int>
layers = {0, 1, 2, 3, 12};
482 for (
int ilayer :
layers) {
489 NN.set_calosample(
layer);
491 NN.simulate_hit(hit, *simulstate, truth,
extrapol);
494 TFile *fNN =
new TFile(
"FCSNNtest.root",
"RECREATE");
501 fNN = TFile::Open(
"FCSNNtest.root");
◆ unit_test()
Definition at line 374 of file TFCSPredictExtrapWeights.cxx.
377 const std::string this_file = __FILE__;
378 const std::string parent_dir = this_file.substr(0, this_file.find(
"/src/"));
379 const std::string norm_path = parent_dir +
"/share/NormPredExtrapSample/";
380 std::string net_path =
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/"
381 "FastCaloSim/LWTNNPredExtrapSample/";
◆ UseHardcodedWeight()
bool TFCSPredictExtrapWeights::UseHardcodedWeight |
( |
| ) |
const |
|
inline |
◆ 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.
◆ init_Ekin_max
constexpr double TFCSParametrizationBase::init_Ekin_max = 14000000 |
|
staticconstexprprotectedinherited |
◆ init_Ekin_min
constexpr double TFCSParametrizationBase::init_Ekin_min = 0 |
|
staticconstexprprotectedinherited |
◆ init_Ekin_nominal
constexpr double TFCSParametrizationBase::init_Ekin_nominal = 0 |
|
staticconstexprprotectedinherited |
◆ init_eta_max
constexpr double TFCSParametrizationBase::init_eta_max = 100 |
|
staticconstexprprotectedinherited |
◆ init_eta_min
constexpr double TFCSParametrizationBase::init_eta_min = -100 |
|
staticconstexprprotectedinherited |
◆ init_eta_nominal
constexpr double TFCSParametrizationBase::init_eta_nominal = 0 |
|
staticconstexprprotectedinherited |
◆ m_calosample
int TFCSLateralShapeParametrization::m_calosample |
|
privateinherited |
◆ m_Ekin_bin
int TFCSLateralShapeParametrization::m_Ekin_bin |
|
privateinherited |
◆ m_Ekin_max
double TFCSParametrization::m_Ekin_max |
|
privateinherited |
◆ m_Ekin_min
double TFCSParametrization::m_Ekin_min |
|
privateinherited |
◆ m_Ekin_nominal
double TFCSParametrization::m_Ekin_nominal |
|
privateinherited |
◆ m_eta_max
double TFCSParametrization::m_eta_max |
|
privateinherited |
◆ m_eta_min
double TFCSParametrization::m_eta_min |
|
privateinherited |
◆ m_eta_nominal
double TFCSParametrization::m_eta_nominal |
|
privateinherited |
◆ m_input
std::string* TFCSPredictExtrapWeights::m_input = nullptr |
|
private |
◆ m_nm
std::string ISF_FCS::MLogging::m_nm |
|
privateinherited |
◆ m_nn
lwt::LightweightNeuralNetwork* TFCSPredictExtrapWeights::m_nn = nullptr |
|
private |
◆ m_normLayers
std::vector<int>* TFCSPredictExtrapWeights::m_normLayers |
|
private |
◆ m_normMeans
std::vector<float>* TFCSPredictExtrapWeights::m_normMeans |
|
private |
◆ m_normStdDevs
std::vector<float>* TFCSPredictExtrapWeights::m_normStdDevs |
|
private |
◆ m_pdgid
std::set<int> TFCSParametrization::m_pdgid |
|
privateinherited |
◆ m_relevantLayers
std::vector<int>* TFCSPredictExtrapWeights::m_relevantLayers = nullptr |
|
private |
The documentation for this class was generated from the following files:
virtual void set_daughter(unsigned int, TFCSParametrizationBase *)
Some derived classes have daughter instances of TFCSParametrizationBase objects The set_daughter meth...
virtual void set_Ekin_nominal(double min)
bool compare(const TFCSParametrizationBase &ref) const
const T getAuxInfo(std::uint32_t index) const
static constexpr double init_Ekin_max
Do not persistify!
bool compare(const TFCSParametrizationBase &ref) const
Do not persistify!
static constexpr double init_eta_nominal
Do not persistify!
virtual bool is_match_pdgid(int id) const override
static constexpr double init_Ekin_min
Do not persistify!
Scalar phi() const
phi method
#define IsA
Declare the TObject style functions.
std::string find(const std::string &s)
return a remapped string
double Ekin_max() const override
static constexpr double init_eta_min
Do not persistify!
Scalar eta() const
pseudorapidity method
MSG::Level level() const
Retrieve output level.
double Efrac(int sample) const
virtual void set_pdgid_Ekin_eta(const TFCSParametrizationBase &ref)
void FindDuplicates(FindDuplicateClasses_t &dup)
void Print(Option_t *option="") const override
virtual void set_Ekin_max(double max)
static constexpr double init_eta_max
Do not persistify!
CUDA_HOSTDEV float & center_eta()
virtual void set_Ekin(const TFCSParametrizationBase &ref)
virtual void set_eta(const TFCSParametrizationBase &ref)
JSONConfig parse_json(std::istream &json)
IMessageSvc * getMessageSvc(bool quiet=false)
virtual void set_eta_max(double max)
virtual void set_pdgid(int id)
virtual void set_Ekin_eta(const TFCSParametrizationBase &ref)
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap etaBin
void set_calosample(int cs)
MsgStream & msg() const
Return a stream for sending messages directly (no decoration)
virtual void set_Ekin_min(double min)
CUDA_HOSTDEV float & center_z()
void set_Ekin_bin(int bin)
CUDA_HOSTDEV float & center_phi()
std::map< std::string, FindDuplicates_t > FindDuplicateClasses_t
std::string m_nm
Message source name.
bool hasAuxInfo(std::uint32_t index) const
double Ekin_min() const override
std::map< TFCSParametrizationBase *, Duplicate_t > FindDuplicates_t
double eta_max() const override
TFCSLateralShapeParametrizationHitBase(const char *name=nullptr, const char *title=nullptr)
virtual int get_number_of_hits(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
Call get_number_of_hits() only once per shower simulation, as it could be calculated with random numb...
double eta_min() const override
virtual void set_eta_nominal(double min)
std::string to_string(const DetectorType &type)
virtual void setLevel(MSG::Level lvl)
Update outputlevel.
void setAuxInfo(std::uint32_t index, const T &val)
const T * as_const_ptr(const T *p)
Helper for getting a const version of a pointer.
void set_E(int sample, double Esample)
CUDA_HOSTDEV void setCenter_phi(float phi)
static constexpr double init_Ekin_nominal
void setRandomEngine(CLHEP::HepRandomEngine *engine)
bool compare(const TFCSParametrizationBase &ref) const
#define ATH_MSG_NOCLASS(logger_name, x)
#define ATH_MSG_WARNING(x)
const boost::regex ref(r_ef)
CUDA_HOSTDEV void setCenter_eta(float eta)
virtual void set_eta_min(double min)
CUDA_HOSTDEV void setCenter_r(float r)
@ kMatchAllPDGID
Set this bit in the TObject bit field if valid for all PDGID.
CUDA_HOSTDEV void setCenter_z(float z)
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
virtual unsigned int size() const
Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operat...
CUDA_HOSTDEV float & center_r()
bool msgLvl(const MSG::Level lvl) const
Check whether the logging system is active at the provided verbosity level.
void set_Efrac(int sample, double Efracsample)