 |
ATLAS Offline Software
|
#include <TFCSEnergyAndHitGANV2.h>
|
| TFCSEnergyAndHitGANV2 (const char *name=nullptr, const char *title=nullptr) |
|
virtual | ~TFCSEnergyAndHitGANV2 () |
|
virtual bool | is_match_Ekin_bin (int) const override |
|
virtual 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 |
|
bool | GANfreemem () const |
|
void | set_GANfreemem () |
|
void | reset_GANfreemem () |
|
bool | OnlyScaleEnergy () const |
|
void | set_OnlyScaleEnergy () |
|
void | reset_OnlyScaleEnergy () |
|
virtual int | get_bin (TFCSSimulationState &simulstate, const TFCSTruthState *, const TFCSExtrapolationState *) const override |
| use the layer to be done as binning of the GAN chain More...
|
|
virtual const std::string | get_variable_text (TFCSSimulationState &simulstate, const TFCSTruthState *, const TFCSExtrapolationState *) const override |
|
unsigned int | get_nr_of_init (unsigned int bin) const |
|
void | set_nr_of_init (unsigned int bin, unsigned int ninit) |
|
const TFCSGANXMLParameters::Binning & | get_Binning () const |
|
const TFCSGANEtaSlice::ExtrapolatorWeights | get_ExtrapolationWeights () const |
|
bool | initializeNetwork (int const &pid, int const &etaMin, const std::string &FastCaloGANInputFolderName) |
|
bool | fillEnergy (TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const |
|
virtual FCSReturnCode | simulate (TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const override |
| Method in all derived classes to do some simulation. More...
|
|
virtual void | Print (Option_t *option="") const override |
|
virtual void | push_before_first_bin (TFCSParametrizationBase *param) |
|
virtual void | push_back_in_bin (TFCSParametrizationBase *param, unsigned int bin) |
|
virtual unsigned int | get_number_of_bins () const |
|
virtual const std::string | get_bin_text (int bin) const |
| print the range of a bin; for bin -1, print the allowed range More...
|
|
bool | SplitChainObjects () const |
|
void | set_SplitChainObjects () |
|
void | reset_SplitChainObjects () |
|
bool | RetryChainFromStart () const |
|
void | set_RetryChainFromStart () |
|
void | reset_RetryChainFromStart () |
|
virtual unsigned int | size () const override |
| 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 ind) const override |
| 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 ind) override |
| 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 ind, TFCSParametrizationBase *param) override |
| 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...
|
|
const Chain_t & | chain () const |
|
Chain_t & | chain () |
|
void | push_back (const Chain_t::value_type ¶m) |
|
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 bool | operator== (const TFCSParametrizationBase &ref) const |
| The == operator compares the content of instances. 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...
|
|
|
std::vector< unsigned int > | m_bin_start |
| Contains the index where the TFCSParametrizationBase* instances to run for a given bin start. More...
|
|
Definition at line 20 of file TFCSEnergyAndHitGANV2.h.
◆ Chain_t
◆ FindDuplicateClasses_t
◆ FindDuplicates_t
◆ FCSEnergyInitializationStatusBits
Status bit for energy initialization.
Enumerator |
---|
kOnlyScaleEnergy | Set this bit in the TObject bit field the simulated energy should only be scaled by the GAN.
|
Definition at line 44 of file TFCSEnergyAndHitGANV2.h.
◆ FCSGANfreemem
Status bit for chain persistency.
Enumerator |
---|
kGANfreemem | Set this bit in the TObject bit if the memory for m_input should be freed after reading in athena.
|
Definition at line 34 of file TFCSEnergyAndHitGANV2.h.
◆ FCSSplitChainObjects
Status bit for chain persistency.
Enumerator |
---|
kSplitChainObjects | Set this bit in the TObject bit field if the TFCSParametrizationBase objects in the chain should be written as separate keys into the root file instead of directly writing the objects.
This is needed if the sum of all objects in the chain use >1GB of memory, which can't be handeled by TBuffer. Drawback is that identical objects will get stored as multiple instances
|
kRetryChainFromStart | |
Definition at line 20 of file TFCSParametrizationChain.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.
◆ TFCSEnergyAndHitGANV2()
TFCSEnergyAndHitGANV2::TFCSEnergyAndHitGANV2 |
( |
const char * |
name = nullptr , |
|
|
const char * |
title = nullptr |
|
) |
| |
◆ ~TFCSEnergyAndHitGANV2()
TFCSEnergyAndHitGANV2::~TFCSEnergyAndHitGANV2 |
( |
| ) |
|
|
virtual |
◆ add_pdgid()
void TFCSParametrization::add_pdgid |
( |
int |
id | ) |
|
|
virtualinherited |
◆ chain() [1/2]
Chain_t& TFCSParametrizationChain::chain |
( |
| ) |
|
|
inlineinherited |
◆ chain() [2/2]
◆ CleanAuxInfo()
◆ clear()
void TFCSParametrization::clear |
( |
| ) |
|
|
inherited |
◆ clear_pdgid()
void TFCSParametrization::clear_pdgid |
( |
| ) |
|
|
virtualinherited |
◆ compare()
Definition at line 78 of file TFCSParametrization.cxx.
81 <<
IsA()->GetName() <<
" != " <<
ref.IsA()->GetName());
84 std::string
name(GetName());
87 <<
" != " <<
ref.GetName());
90 std::string
title(GetTitle());
93 <<
" != " <<
ref.GetTitle());
◆ 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 |
◆ fillEnergy()
Definition at line 113 of file TFCSEnergyAndHitGANV2.cxx.
130 const float Ekin = truth->
Ekin();
132 Einit = simulstate.
E();
154 double totalEnergy = 0;
156 totalEnergy +=
output.second;
158 if (totalEnergy < 0) {
168 for (
const auto &[
layer,
h] : binsInLayers) {
188 const int xBinNum =
h.GetNbinsX();
189 const int yBinNum =
h.GetNbinsY();
190 const TAxis *
x =
h.GetXaxis();
196 <<
" has only one bin in r, this means is it not used, "
197 "skipping (this is needed to keep correct "
198 "syncronisation of voxel and layers)");
206 for (
int ix = 1; ix <= xBinNum; ++ix) {
208 for (
int iy = 1; iy <= binsInAlphaInRBin; ++iy) {
211 <<
" binx " << ix <<
" biny " << iy);
213 if (energyInVoxel <= 0) {
218 simulstate.
add_E(
layer, Einit * energyInVoxel);
224 for (
unsigned int ichain =
m_bin_start.back(); ichain <
size(); ++ichain) {
233 for (
const auto &[
layer,
h] : binsInLayers) {
234 const int xBinNum =
h.GetNbinsX();
235 const int yBinNum =
h.GetNbinsY();
236 const TAxis *
x =
h.GetXaxis();
237 const TAxis *
y =
h.GetYaxis();
246 <<
" has only one bin in r, this means is it not used, "
247 "skipping (this is needed to keep correct "
248 "syncronisation of voxel and layers)");
262 <<
chain()[ichain]->GetName());
263 if (
chain()[ichain]->InheritsFrom(
264 TFCSLateralShapeParametrizationHitBase::Class())) {
272 <<
chain()[ichain]->GetName());
279 <<
chain()[ichain]->GetName()
280 <<
" does not inherit from "
281 "TFCSLateralShapeParametrizationHitBase");
292 int binResolution = 5;
297 const double center_eta = hit.center_eta();
298 const double center_phi = hit.center_phi();
299 const double center_r = hit.center_r();
300 const double center_z = hit.center_z();
303 <<
" phi " << center_phi <<
" R " << center_r);
305 const float dist000 =
306 TMath::Sqrt(center_r * center_r + center_z * center_z);
307 const float eta_jakobi = TMath::Abs(2.0 * TMath::Exp(-center_eta) /
308 (1.0 + TMath::Exp(-2 * center_eta)));
314 for (
int ix = 1; ix <= xBinNum; ++ix) {
318 const int binsToMerge = yBinNum == 32 ? 32 / binsInAlphaInRBin : 1;
319 for (
int iy = 1; iy <= binsInAlphaInRBin; ++iy) {
321 const int lowEdgeIndex = (iy - 1) * binsToMerge + 1;
324 <<
" binx " << ix <<
" biny " << iy);
326 if (energyInVoxel <= 0) {
331 if (std::abs(
pdgId) == 22 || std::abs(
pdgId) == 11) {
333 int maxHitsInVoxel = energyInVoxel * truth->
Ekin() / 10;
334 if (maxHitsInVoxel < 1)
336 nHitsAlpha = std::sqrt(maxHitsInVoxel);
337 nHitsR = std::sqrt(maxHitsInVoxel);
340 nHitsR =
x->GetBinUpEdge(ix) -
x->GetBinLowEdge(ix);
343 const double r =
x->GetBinUpEdge(ix);
344 nHitsAlpha = ceil(2 * TMath::Pi() *
r / binResolution);
348 const double angle =
y->GetBinUpEdge(iy) -
y->GetBinLowEdge(iy);
349 const double r =
x->GetBinUpEdge(ix);
351 nHitsAlpha = ceil(
d / binResolution);
358 const int maxNhits = 10;
364 for (
int ir = 0;
ir < nHitsR; ++
ir) {
366 x->GetBinLowEdge(ix) +
x->GetBinWidth(ix) / (nHitsR + 1) *
ir;
368 for (
int ialpha = 1; ialpha <= nHitsAlpha; ++ialpha) {
369 if (ganVersion > 1) {
370 if (fitResults.at(
layer)[ix - 1] != 0) {
373 x->GetBinLowEdge(ix),
374 x->GetBinUpEdge(ix));
376 log((
a -
x->GetBinLowEdge(ix)) / (
x->GetBinWidth(ix))) /
377 fitResults.at(
layer)[ix - 1];
378 while ((rand_r < x->GetBinLowEdge(ix) ||
379 rand_r >
x->GetBinUpEdge(ix)) &&
382 x->GetBinLowEdge(ix),
383 x->GetBinUpEdge(ix));
385 log((
a -
x->GetBinLowEdge(ix)) / (
x->GetBinWidth(ix))) /
386 fitResults.at(
layer)[ix - 1];
391 <<
x->GetBinLowEdge(ix) <<
"-"
392 <<
x->GetBinUpEdge(ix) <<
"] having slope "
393 << fitResults.at(
layer)[ix - 1]
394 <<
" will use grid (old method)");
402 if (binsInAlphaInRBin == 1) {
404 -TMath::Pi(), TMath::Pi());
407 y->GetBinLowEdge(lowEdgeIndex) +
408 y->GetBinWidth(iy) * binsToMerge / (nHitsAlpha + 1) * ialpha;
412 -TMath::Pi(), TMath::Pi()) < 0) {
419 hit.E() = Einit * energyInVoxel / (nHitsAlpha * nHitsR);
433 delta_eta_mm = -delta_eta_mm;
439 delta_phi_mm = -delta_phi_mm;
441 const float delta_eta = delta_eta_mm / eta_jakobi / dist000;
442 const float delta_phi = delta_phi_mm / center_r;
444 hit.eta() = center_eta + delta_eta;
448 <<
" layer " <<
layer);
450 const float hit_r =
r *
cos(
alpha) + center_r;
458 const float hit_phi =
460 hit.x() = hit_r *
cos(hit_phi);
461 hit.y() = hit_r *
sin(hit_phi);
464 <<
" layer " <<
layer);
470 for (
unsigned int ichain =
476 <<
chain()[ichain]->GetName());
477 if (
chain()[ichain]->InheritsFrom(
478 TFCSLateralShapeParametrizationHitBase::Class())) {
488 <<
chain()[ichain]->GetName());
495 <<
chain()[ichain]->GetName()
496 <<
" does not inherit from "
497 "TFCSLateralShapeParametrizationHitBase");
520 if (simulstate.
E() > std::numeric_limits<double>::epsilon()) {
522 simulstate.
set_Efrac(ilayer, simulstate.
E(ilayer) / simulstate.
E());
◆ 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);
◆ GANfreemem()
bool TFCSEnergyAndHitGANV2::GANfreemem |
( |
| ) |
const |
|
inline |
◆ get_bin()
◆ get_bin_text()
const std::string TFCSParametrizationBinnedChain::get_bin_text |
( |
int |
bin | ) |
const |
|
virtualinherited |
◆ get_Binning()
◆ get_ExtrapolationWeights()
◆ get_nr_of_init()
unsigned int TFCSEnergyAndHitGANV2::get_nr_of_init |
( |
unsigned int |
bin | ) |
const |
◆ get_number_of_bins()
virtual unsigned int TFCSParametrizationBinnedChain::get_number_of_bins |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ get_variable_text()
◆ GetAlphaBinsForRBin()
int TFCSEnergyAndHitGANV2::GetAlphaBinsForRBin |
( |
const TAxis * |
x, |
|
|
int |
ix, |
|
|
int |
yBinNum |
|
) |
| const |
|
private |
Definition at line 706 of file TFCSEnergyAndHitGANV2.cxx.
708 double binsInAlphaInRBin = yBinNum;
711 const double widthX =
x->GetBinWidth(ix);
712 const double radious =
x->GetBinCenter(ix);
713 double circumference = radious * 2 * TMath::Pi();
715 circumference = radious * TMath::Pi();
718 const double bins = circumference / widthX;
720 ATH_MSG_DEBUG(
"Bin in alpha: " << binsInAlphaInRBin <<
" for r bin: " << ix
721 <<
" (" <<
x->GetBinLowEdge(ix) <<
"-"
722 <<
x->GetBinUpEdge(ix) <<
")");
724 return binsInAlphaInRBin;
◆ GetBinsInFours()
int TFCSEnergyAndHitGANV2::GetBinsInFours |
( |
double const & |
bins | ) |
|
|
staticprivate |
◆ initializeNetwork()
bool TFCSEnergyAndHitGANV2::initializeNetwork |
( |
int const & |
pid, |
|
|
int const & |
etaMin, |
|
|
const std::string & |
FastCaloGANInputFolderName |
|
) |
| |
◆ is_match_all_calosample()
virtual bool TFCSEnergyAndHitGANV2::is_match_all_calosample |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ is_match_all_Ekin()
virtual bool TFCSParametrization::is_match_all_Ekin |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_all_Ekin_bin()
virtual bool TFCSEnergyAndHitGANV2::is_match_all_Ekin_bin |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ 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 TFCSEnergyAndHitGANV2::is_match_calosample |
( |
int |
calosample | ) |
const |
|
overridevirtual |
◆ is_match_Ekin()
virtual bool TFCSParametrization::is_match_Ekin |
( |
float |
Ekin | ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_Ekin_bin()
virtual bool TFCSEnergyAndHitGANV2::is_match_Ekin_bin |
( |
int |
| ) |
const |
|
inlineoverridevirtual |
◆ 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.
◆ OnlyScaleEnergy()
bool TFCSEnergyAndHitGANV2::OnlyScaleEnergy |
( |
| ) |
const |
|
inline |
◆ operator==()
◆ operator[]() [1/2]
|
inlineoverridevirtualinherited |
◆ operator[]() [2/2]
|
inlineoverridevirtualinherited |
◆ pdgid()
const std::set<int>& TFCSParametrization::pdgid |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ Print()
void TFCSEnergyAndHitGANV2::Print |
( |
Option_t * |
option = "" | ) |
const |
|
overridevirtual |
Definition at line 551 of file TFCSEnergyAndHitGANV2.cxx.
554 const bool shortprint =
opt.Index(
"short") >= 0;
555 const bool longprint =
557 TString optprint =
opt;
558 optprint.ReplaceAll(
"short",
"");
561 for (
unsigned int ichain = 0; ichain <
size(); ++ichain) {
562 if (ichain == 0 && ichain !=
m_bin_start.front()) {
572 prefix = Form(
"%-2d", ibin);
◆ push_back()
void TFCSParametrizationChain::push_back |
( |
const Chain_t::value_type & |
param | ) |
|
|
inlineinherited |
◆ push_back_in_bin()
◆ push_before_first_bin()
◆ recalc()
void TFCSParametrizationChain::recalc |
( |
| ) |
|
|
protectedvirtualinherited |
◆ recalc_Ekin_eta_intersect()
void TFCSParametrizationChain::recalc_Ekin_eta_intersect |
( |
| ) |
|
|
protectedinherited |
◆ recalc_Ekin_eta_union()
void TFCSParametrizationChain::recalc_Ekin_eta_union |
( |
| ) |
|
|
protectedinherited |
◆ recalc_Ekin_intersect()
void TFCSParametrizationChain::recalc_Ekin_intersect |
( |
| ) |
|
|
protectedinherited |
◆ recalc_Ekin_union()
void TFCSParametrizationChain::recalc_Ekin_union |
( |
| ) |
|
|
protectedinherited |
◆ recalc_eta_intersect()
void TFCSParametrizationChain::recalc_eta_intersect |
( |
| ) |
|
|
protectedinherited |
◆ recalc_eta_union()
void TFCSParametrizationChain::recalc_eta_union |
( |
| ) |
|
|
protectedinherited |
◆ recalc_pdgid_intersect()
void TFCSParametrizationChain::recalc_pdgid_intersect |
( |
| ) |
|
|
protectedinherited |
◆ recalc_pdgid_union()
void TFCSParametrizationChain::recalc_pdgid_union |
( |
| ) |
|
|
protectedinherited |
◆ 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_GANfreemem()
void TFCSEnergyAndHitGANV2::reset_GANfreemem |
( |
| ) |
|
|
inline |
◆ reset_match_all_pdgid()
virtual void TFCSParametrizationBase::reset_match_all_pdgid |
( |
| ) |
|
|
inlinevirtualinherited |
◆ reset_OnlyScaleEnergy()
void TFCSEnergyAndHitGANV2::reset_OnlyScaleEnergy |
( |
| ) |
|
|
inline |
◆ reset_RetryChainFromStart()
void TFCSParametrizationChain::reset_RetryChainFromStart |
( |
| ) |
|
|
inlineinherited |
◆ reset_SplitChainObjects()
void TFCSParametrizationChain::reset_SplitChainObjects |
( |
| ) |
|
|
inlineinherited |
◆ RetryChainFromStart()
bool TFCSParametrizationChain::RetryChainFromStart |
( |
| ) |
const |
|
inlineinherited |
◆ set_daughter()
|
inlineoverridevirtualinherited |
◆ set_Ekin()
◆ 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_GANfreemem()
void TFCSEnergyAndHitGANV2::set_GANfreemem |
( |
| ) |
|
|
inline |
◆ set_geometry()
void TFCSParametrizationBase::set_geometry |
( |
ICaloGeometry * |
geo | ) |
|
|
virtualinherited |
◆ set_match_all_pdgid()
virtual void TFCSParametrizationBase::set_match_all_pdgid |
( |
| ) |
|
|
inlinevirtualinherited |
◆ set_nr_of_init()
void TFCSEnergyAndHitGANV2::set_nr_of_init |
( |
unsigned int |
bin, |
|
|
unsigned int |
ninit |
|
) |
| |
◆ set_OnlyScaleEnergy()
void TFCSEnergyAndHitGANV2::set_OnlyScaleEnergy |
( |
| ) |
|
|
inline |
◆ 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_RetryChainFromStart()
void TFCSParametrizationChain::set_RetryChainFromStart |
( |
| ) |
|
|
inlineinherited |
◆ set_SplitChainObjects()
void TFCSParametrizationChain::set_SplitChainObjects |
( |
| ) |
|
|
inlineinherited |
◆ setLevel()
void ISF_FCS::MLogging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
virtualinherited |
◆ SetRegionAndSliceFromXML()
void TFCSEnergyAndHitGANV2::SetRegionAndSliceFromXML |
( |
int |
pid, |
|
|
int |
etaMax, |
|
|
std::string |
FastCaloGANInputFolderName |
|
) |
| |
|
protected |
◆ 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 TFCSParametrizationBinnedChain.
Definition at line 530 of file TFCSEnergyAndHitGANV2.cxx.
533 for (
unsigned int ichain = 0; ichain <
m_bin_start[0]; ++ichain) {
◆ simulate_and_retry()
◆ size()
virtual unsigned int TFCSParametrizationChain::size |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ SplitChainObjects()
bool TFCSParametrizationChain::SplitChainObjects |
( |
| ) |
const |
|
inlineinherited |
◆ 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 604 of file TFCSEnergyAndHitGANV2.cxx.
613 #if defined(__FastCaloSimStandAlone__)
628 e->set_IDCaloBoundary_eta(truth->Eta());
629 for (
int i = 0;
i < 24; ++
i) {
652 for (
int i = 0;
i < 24; ++
i)
653 if (GAN.is_match_calosample(
i)) {
655 Form(
"center%d",
i), Form(
"center layer %d",
i));
656 c->set_calosample(
i);
657 c->setExtrapWeight(0.5);
664 c->set_eta_min(
etaMin / 100.0);
665 c->set_eta_max(
etaMax / 100.0);
668 GAN.push_back_in_bin(
c,
i);
669 GAN.set_nr_of_init(
i, 1);
675 const std::string
outname =
"FCSGANtest_" + outputname +
".root";
676 TFile *fGAN = TFile::Open(
outname.c_str(),
"recreate");
679 fGAN->WriteObjectAny(&GAN,
"TFCSEnergyAndHitGANV2",
"GAN");
685 fGAN = TFile::Open(
outname.c_str());
◆ unit_test()
Definition at line 586 of file TFCSEnergyAndHitGANV2.cxx.
592 "/eos/atlas/atlascerngroupdisk/proj-simul/AF3_Run3/"
593 "InputsToBigParamFiles/FastCaloGANWeightsVer02/";
598 "/eos/atlas/atlascerngroupdisk/proj-simul/AF3_Run3/"
599 "InputsToBigParamFiles/FastCaloGANWeightsONNXVer08/";
◆ 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_bin_ninit
std::vector<int> TFCSEnergyAndHitGANV2::m_bin_ninit |
|
private |
◆ m_bin_start
std::vector<unsigned int> TFCSParametrizationBinnedChain::m_bin_start |
|
protectedinherited |
Contains the index where the TFCSParametrizationBase* instances to run for a given bin start.
The last entry of the vector correponds to the index from where on TFCSParametrizationBase* objects should be run again for all bins. This way one can loop over some instances for all bins, then only specific ones for one bin and at the end again over some for all bins
Definition at line 53 of file TFCSParametrizationBinnedChain.h.
◆ m_chain
Chain_t TFCSParametrizationChain::m_chain |
|
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_nm
std::string ISF_FCS::MLogging::m_nm |
|
privateinherited |
◆ m_param
◆ m_pdgid
std::set<int> TFCSParametrization::m_pdgid |
|
privateinherited |
◆ m_slice
◆ m_writtenBases
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
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)
virtual void recalc()
Default is to call recalc_pdgid_intersect() and recalc_Ekin_eta_intersect()
const std::set< int > & pdgid() const override
virtual FCSReturnCode simulate_hit(Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol)
simulated one hit position with some energy.
const T getAuxInfo(std::uint32_t index) const
virtual const std::string get_bin_text(int bin) const
print the range of a bin; for bin -1, print the allowed range
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!
@ kSplitChainObjects
Set this bit in the TObject bit field if the TFCSParametrizationBase objects in the chain should be w...
path
python interpreter configuration --------------------------------------—
static constexpr double init_Ekin_min
Do not persistify!
#define IsA
Declare the TObject style functions.
std::string find(const std::string &s)
return a remapped string
double Ekin_max() const override
virtual bool is_match_all_pdgid() const
const TFCSGANXMLParameters::Binning & get_Binning() const
static constexpr double init_eta_min
Do not persistify!
void InitialiseFromXML(int pid, int etaMid, const std::string &FastCaloGANInputFolderName)
void recalc_eta_intersect()
Scalar eta() const
pseudorapidity method
MSG::Level level() const
Retrieve output level.
std::map< std::string, double > NetworkOutputs
virtual void add_pdgid(int id)
static int GetBinsInFours(double const &bins)
void FindDuplicates(FindDuplicateClasses_t &dup)
virtual void set_Ekin_max(double max)
@ kGANfreemem
Set this bit in the TObject bit if the memory for m_input should be freed after reading in athena.
std::map< int, TH2D > Binning
static constexpr double init_eta_max
Do not persistify!
bool OnlyScaleEnergy() const
double eta_nominal() const override
CLHEP::HepRandomEngine * randomEngine()
#define ATH_MSG_VERBOSE(x)
void Print(Option_t *option="") const
virtual void set_Ekin(const TFCSParametrizationBase &ref)
__HOSTDEV__ double Phi_mpi_pi(double)
virtual void set_eta(const TFCSParametrizationBase &ref)
IMessageSvc * getMessageSvc(bool quiet=false)
virtual void set_eta_max(double max)
virtual void set_pdgid(int id)
constexpr double chargedPionMassInMeV
the mass of the charged pion (in MeV)
virtual void set_Ekin_eta(const TFCSParametrizationBase &ref)
virtual unsigned int get_number_of_bins() const
void add_E(int sample, double Esample)
Set * set_union(Set *set1, Set *set2)
Perform a union of two sets.
MsgStream & msg() const
Return a stream for sending messages directly (no decoration)
virtual void set_Ekin_min(double min)
const Chain_t & chain() const
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
std::map< std::string, FindDuplicates_t > FindDuplicateClasses_t
std::string m_nm
Message source name.
TFCSGANEtaSlice * m_slice
void recalc_pdgid_intersect()
void recalc_Ekin_intersect()
double Ekin_min() const override
int GetAlphaBinsForRBin(const TAxis *x, int ix, int yBinNum) const
void Print(Option_t *option="") const
Print object information.
std::map< int, std::vector< double > > FitResultsPerLayer
std::map< TFCSParametrizationBase *, Duplicate_t > FindDuplicates_t
void Print(Option_t *option="") const
bool IsGanCorrectlyLoaded() const
double eta_max() const override
const FitResultsPerLayer & GetFitResults() const
virtual void reset_match_all_pdgid()
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)
void set_E(int sample, double Esample)
double charge(const T &p)
int GetGANVersion() const
const ExtrapolatorWeights & GetExtrapolatorWeights()
static constexpr double init_Ekin_nominal
virtual FCSReturnCode simulate(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const override
Method in all derived classes to do some simulation.
NetworkOutputs GetNetworkOutputs(const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol, TFCSSimulationState simulstate) const
void setRandomEngine(CLHEP::HepRandomEngine *engine)
std::vector< int > m_bin_ninit
int ir
counter of the current depth
TFCSGANXMLParameters m_param
#define ATH_MSG_NOCLASS(logger_name, x)
#define ATH_MSG_WARNING(x)
const boost::regex ref(r_ef)
virtual int get_bin(TFCSSimulationState &simulstate, const TFCSTruthState *, const TFCSExtrapolationState *) const override
use the layer to be done as binning of the GAN chain
def delta_phi(phi1, phi2)
FCSReturnCode simulate_and_retry(TFCSParametrizationBase *parametrization, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
double Ekin_nominal() const override
void recalc_Ekin_eta_intersect()
@ kOnlyScaleEnergy
Set this bit in the TObject bit field the simulated energy should only be scaled by the GAN.
virtual void set_eta_min(double min)
bool fillEnergy(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
@ kMatchAllPDGID
Set this bit in the TObject bit field if valid for all PDGID.
unsigned int get_nr_of_init(unsigned int bin) const
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
TFCSParametrizationBinnedChain(const char *name=nullptr, const char *title=nullptr)
virtual unsigned int size() const
Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operat...
static void test_path(const std::string &path, TFCSSimulationState *simulstate=nullptr, const TFCSTruthState *truth=nullptr, const TFCSExtrapolationState *extrapol=nullptr, const std::string &outputname="unnamed", int pid=211)
virtual void Print(Option_t *option="") const override
bool IsSymmetrisedAlpha() const
bool msgLvl(const MSG::Level lvl) const
Check whether the logging system is active at the provided verbosity level.
std::vector< unsigned int > m_bin_start
Contains the index where the TFCSParametrizationBase* instances to run for a given bin start.
const Binning & GetBinning() const
void set_Efrac(int sample, double Efracsample)
virtual const std::string get_variable_text(TFCSSimulationState &simulstate, const TFCSTruthState *, const TFCSExtrapolationState *) const override
virtual unsigned int size() const override
Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operat...