ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TFCSEnergyAndHitGANV2 Class Reference

#include <TFCSEnergyAndHitGANV2.h>

Inheritance diagram for TFCSEnergyAndHitGANV2:
Collaboration diagram for TFCSEnergyAndHitGANV2:

Public Types

enum  FCSGANfreemem { kGANfreemem = BIT(17) }
 Status bit for chain persistency. More...
 
enum  FCSEnergyInitializationStatusBits { kOnlyScaleEnergy }
 Status bit for energy initialization. More...
 
enum  FCSSplitChainObjects { kSplitChainObjects, kRetryChainFromStart = BIT(17) }
 Status bit for chain persistency. More...
 
typedef std::vector< TFCSParametrizationBase * > Chain_t
 
enum  FCSStatusBits { kMatchAllPDGID }
 Status bit for FCS needs. More...
 
typedef std::map< TFCSParametrizationBase *, Duplicate_tFindDuplicates_t
 
typedef std::map< std::string, FindDuplicates_tFindDuplicateClasses_t
 

Public Member Functions

 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::Binningget_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 TFCSParametrizationBaseoperator[] (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 TFCSParametrizationBaseoperator[] (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_tchain () const
 
Chain_tchain ()
 
void push_back (const Chain_t::value_type &param)
 
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...
 

Static Public Member Functions

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)
 
static void unit_test (TFCSSimulationState *simulstate=nullptr, const TFCSTruthState *truth=nullptr, const TFCSExtrapolationState *extrapol=nullptr)
 
static std::string startMsg (MSG::Level lvl, const std::string &file, int line)
 Make a message to decorate the start of logging. More...
 

Protected Member Functions

void SetRegionAndSliceFromXML (int pid, int etaMax, std::string FastCaloGANInputFolderName)
 
void recalc_pdgid_intersect ()
 
void recalc_pdgid_union ()
 
void recalc_Ekin_intersect ()
 
void recalc_eta_intersect ()
 
void recalc_Ekin_eta_intersect ()
 
void recalc_Ekin_union ()
 
void recalc_eta_union ()
 
void recalc_Ekin_eta_union ()
 
virtual void recalc ()
 Default is to call recalc_pdgid_intersect() and recalc_Ekin_eta_intersect() More...
 
FCSReturnCode simulate_and_retry (TFCSParametrizationBase *parametrization, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
 
bool compare (const TFCSParametrizationBase &ref) const
 

Protected Attributes

std::vector< unsigned int > m_bin_start
 Contains the index where the TFCSParametrizationBase* instances to run for a given bin start. More...
 

Static Protected Attributes

static constexpr double init_Ekin_nominal = 0
 
static constexpr double init_Ekin_min = 0
 Do not persistify! More...
 
static constexpr double init_Ekin_max = 14000000
 Do not persistify! More...
 
static constexpr double init_eta_nominal = 0
 Do not persistify! More...
 
static constexpr double init_eta_min = -100
 Do not persistify! More...
 
static constexpr double init_eta_max = 100
 Do not persistify! More...
 

Private Member Functions

int GetAlphaBinsForRBin (const TAxis *x, int ix, int yBinNum) const
 

Static Private Member Functions

static int GetBinsInFours (double const &bins)
 

Private Attributes

std::vector< int > m_bin_ninit
 
TFCSGANEtaSlicem_slice = nullptr
 
TFCSGANXMLParameters m_param
 
Chain_t m_chain
 
std::vector< std::unique_ptr< TFCSParametrizationBase > > m_writtenBases
 
std::set< int > m_pdgid
 
double m_Ekin_nominal
 
double m_Ekin_min
 
double m_Ekin_max
 
double m_eta_nominal
 
double m_eta_min
 
double m_eta_max
 
std::string m_nm
 Message source name. More...
 

Static Private Attributes

static boost::thread_specific_ptr< MsgStream > m_msg_tls ATLAS_THREAD_SAFE
 Do not persistify! More...
 

Detailed Description

Definition at line 20 of file TFCSEnergyAndHitGANV2.h.

Member Typedef Documentation

◆ Chain_t

Definition at line 40 of file TFCSParametrizationChain.h.

◆ FindDuplicateClasses_t

typedef std::map<std::string, FindDuplicates_t> TFCSParametrizationBase::FindDuplicateClasses_t
inherited

Definition at line 142 of file TFCSParametrizationBase.h.

◆ FindDuplicates_t

Definition at line 141 of file TFCSParametrizationBase.h.

Member Enumeration Documentation

◆ 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.

44  {
46  BIT(18)
47  };

◆ 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.

34  {
35  kGANfreemem = BIT(17)
36  };

◆ 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.

20  {
22  BIT(16),
23  kRetryChainFromStart = BIT(17)
30  };

◆ 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.

52  {
53  kMatchAllPDGID = BIT(
54  14)
55  };

Constructor & Destructor Documentation

◆ TFCSEnergyAndHitGANV2()

TFCSEnergyAndHitGANV2::TFCSEnergyAndHitGANV2 ( const char *  name = nullptr,
const char *  title = nullptr 
)

Definition at line 34 of file TFCSEnergyAndHitGANV2.cxx.

◆ ~TFCSEnergyAndHitGANV2()

TFCSEnergyAndHitGANV2::~TFCSEnergyAndHitGANV2 ( )
virtual

Definition at line 40 of file TFCSEnergyAndHitGANV2.cxx.

40  {
41  if (m_slice != nullptr) {
42  delete m_slice;
43  }
44 }

Member Function Documentation

◆ add_pdgid()

void TFCSParametrization::add_pdgid ( int  id)
virtualinherited

Reimplemented in TFCSEnergyBinParametrization.

Definition at line 35 of file TFCSParametrization.cxx.

35 { m_pdgid.insert(id); }

◆ chain() [1/2]

Chain_t& TFCSParametrizationChain::chain ( )
inlineinherited

Definition at line 54 of file TFCSParametrizationChain.h.

54 { return m_chain; };

◆ chain() [2/2]

const Chain_t& TFCSParametrizationChain::chain ( ) const
inlineinherited

Definition at line 53 of file TFCSParametrizationChain.h.

53 { return m_chain; };

◆ CleanAuxInfo()

virtual void TFCSParametrizationBase::CleanAuxInfo ( TFCSSimulationState ) const
inlinevirtualinherited

Method in all derived classes to delete objects stored in the simulstate AuxInfo.

Definition at line 130 of file TFCSParametrizationBase.h.

130 {};

◆ clear()

void TFCSParametrization::clear ( )
inherited

◆ clear_pdgid()

void TFCSParametrization::clear_pdgid ( )
virtualinherited

Reimplemented in TFCSEnergyBinParametrization.

Definition at line 37 of file TFCSParametrization.cxx.

37 { m_pdgid.clear(); }

◆ compare()

bool TFCSParametrization::compare ( const TFCSParametrizationBase ref) const
protectedinherited

Definition at line 78 of file TFCSParametrization.cxx.

78  {
79  if (IsA() != ref.IsA()) {
80  ATH_MSG_DEBUG("compare(): different class types "
81  << IsA()->GetName() << " != " << ref.IsA()->GetName());
82  return false;
83  }
84  std::string name(GetName());
85  if (name != ref.GetName()) {
86  ATH_MSG_DEBUG("compare(): different names " << GetName()
87  << " != " << ref.GetName());
88  return false;
89  }
90  std::string title(GetTitle());
91  if (title != ref.GetTitle()) {
92  ATH_MSG_DEBUG("compare(): different titles " << GetTitle()
93  << " != " << ref.GetTitle());
94  return false;
95  }
96  if (is_match_all_pdgid() != ref.is_match_all_pdgid() ||
97  pdgid() != ref.pdgid()) {
98  ATH_MSG_DEBUG("compare(): different pdgids");
99  return false;
100  }
101  if (Ekin_nominal() != ref.Ekin_nominal() || Ekin_min() != ref.Ekin_min() ||
102  Ekin_max() != ref.Ekin_max()) {
103  ATH_MSG_DEBUG("compare(): different Ekin range");
104  return false;
105  }
106  if (eta_nominal() != ref.eta_nominal() || eta_min() != ref.eta_min() ||
107  eta_max() != ref.eta_max()) {
108  ATH_MSG_DEBUG("compare(): different eta range");
109  return false;
110  }
111 
112  return true;
113 }

◆ Ekin_max()

double TFCSParametrization::Ekin_max ( ) const
inlineoverridevirtualinherited

Reimplemented from TFCSParametrizationBase.

Definition at line 37 of file TFCSParametrization.h.

37 { return m_Ekin_max; };

◆ Ekin_min()

double TFCSParametrization::Ekin_min ( ) const
inlineoverridevirtualinherited

Reimplemented from TFCSParametrizationBase.

Definition at line 36 of file TFCSParametrization.h.

36 { return m_Ekin_min; };

◆ Ekin_nominal()

double TFCSParametrization::Ekin_nominal ( ) const
inlineoverridevirtualinherited

Reimplemented from TFCSParametrizationBase.

Definition at line 35 of file TFCSParametrization.h.

35 { return m_Ekin_nominal; };

◆ eta_max()

double TFCSParametrization::eta_max ( ) const
inlineoverridevirtualinherited

Reimplemented from TFCSParametrizationBase.

Definition at line 40 of file TFCSParametrization.h.

40 { return m_eta_max; };

◆ eta_min()

double TFCSParametrization::eta_min ( ) const
inlineoverridevirtualinherited

Reimplemented from TFCSParametrizationBase.

Definition at line 39 of file TFCSParametrization.h.

39 { return m_eta_min; };

◆ eta_nominal()

double TFCSParametrization::eta_nominal ( ) const
inlineoverridevirtualinherited

Reimplemented from TFCSParametrizationBase.

Definition at line 38 of file TFCSParametrization.h.

38 { return m_eta_nominal; };

◆ fillEnergy()

bool TFCSEnergyAndHitGANV2::fillEnergy ( TFCSSimulationState simulstate,
const TFCSTruthState truth,
const TFCSExtrapolationState extrapol 
) const

Definition at line 112 of file TFCSEnergyAndHitGANV2.cxx.

114  {
115  if (!truth) {
116  ATH_MSG_ERROR("Invalid truth pointer");
117  return false;
118  }
119 
120  if (!extrapol) {
121  ATH_MSG_ERROR("Invalid extrapolation pointer");
122  return false;
123  }
124 
125  const int pdgId = truth->pdgid();
126  const float charge = HepPDT::ParticleID(pdgId).charge();
127 
128  float Einit;
129  const float Ekin = truth->Ekin();
130  if (OnlyScaleEnergy())
131  Einit = simulstate.E();
132  else
133  Einit = Ekin;
134 
135  ATH_MSG_VERBOSE("Momentum " << truth->P() << " pdgId " << truth->pdgid());
136  // check that the network exists
137  if (!m_slice->IsGanCorrectlyLoaded()) {
138  ATH_MSG_WARNING("GAN not loaded correctly.");
139  return false;
140  }
141 
143  m_slice->GetNetworkOutputs(truth, extrapol, simulstate);
144  ATH_MSG_VERBOSE("network outputs size: " << outputs.size());
145 
146  const TFCSGANXMLParameters::Binning &binsInLayers = m_param.GetBinning();
147  const auto ganVersion = m_param.GetGANVersion();
148  const TFCSGANEtaSlice::FitResultsPerLayer &fitResults =
149  m_slice->GetFitResults(); // used only if GAN version > 1
150 
151  ATH_MSG_DEBUG("energy voxels size = " << outputs.size());
152 
153  double totalEnergy = 0;
154  for (auto output : outputs) {
155  totalEnergy += output.second;
156  }
157  if (totalEnergy < 0) {
158  ATH_MSG_WARNING("Energy from GAN is negative, skipping particle");
159  return false;
160  }
161 
162  ATH_MSG_VERBOSE("Get binning");
163 
164  simulstate.set_E(0);
165 
166  int vox = 0;
167  for (const auto &element : binsInLayers) {
168  const int layer = element.first;
169  const TH2D *h = &element.second;
170 
171  // attempt to debug intermittent ci issues described in
172  // https://its.cern.ch/jira/browse/ATLASSIM-7031
173  if (h->IsZombie()) {
174  ATH_MSG_INFO("Got truth state: ");
175  truth->Print();
176 
177  ATH_MSG_INFO("Got extrapolation state: ");
178  extrapol->Print();
179 
180  ATH_MSG_INFO("Got simulation state: ");
181  simulstate.Print();
182 
183  ATH_MSG_INFO("Got GAN XML parameters: ");
184  m_param.Print();
185 
186  ATH_MSG_ERROR("Histogram pointer for layer " << layer << " is broken");
187  return false;
188  }
189 
190  const int xBinNum = h->GetNbinsX();
191  const int yBinNum = h->GetNbinsY();
192  const TAxis *x = h->GetXaxis();
193 
194  // If only one bin in r means layer is empty, no value should be added
195  if (xBinNum == 1) {
196  ATH_MSG_VERBOSE(" Layer "
197  << layer
198  << " has only one bin in r, this means is it not used, "
199  "skipping (this is needed to keep correct "
200  "syncronisation of voxel and layers)");
201  // delete h;
202  continue;
203  }
204 
205  ATH_MSG_VERBOSE(" Getting energy for Layer " << layer);
206 
207  // First fill energies
208  for (int ix = 1; ix <= xBinNum; ++ix) {
209  double binsInAlphaInRBin = GetAlphaBinsForRBin(x, ix, yBinNum);
210  for (int iy = 1; iy <= binsInAlphaInRBin; ++iy) {
211  const double energyInVoxel = outputs.at(std::to_string(vox));
212  ATH_MSG_VERBOSE(" Vox " << vox << " energy " << energyInVoxel
213  << " binx " << ix << " biny " << iy);
214 
215  if (energyInVoxel <= 0) {
216  vox++;
217  continue;
218  }
219 
220  simulstate.add_E(layer, Einit * energyInVoxel);
221  vox++;
222  }
223  }
224  }
225 
226  for (unsigned int ichain = m_bin_start.back(); ichain < size(); ++ichain) {
227  ATH_MSG_DEBUG("now run for all bins: " << chain()[ichain]->GetName());
228  if (simulate_and_retry(chain()[ichain], simulstate, truth, extrapol) !=
229  FCSSuccess) {
230  return FCSFatal;
231  }
232  }
233 
234  vox = 0;
235  for (const auto &element : binsInLayers) {
236  const int layer = element.first;
237  const TH2D *h = &element.second;
238  const int xBinNum = h->GetNbinsX();
239  const int yBinNum = h->GetNbinsY();
240  const TAxis *x = h->GetXaxis();
241  const TAxis *y = h->GetYaxis();
242 
243  simulstate.setAuxInfo<int>("GANlayer"_FCShash, layer);
245 
246  // If only one bin in r means layer is empty, no value should be added
247  if (xBinNum == 1) {
248  ATH_MSG_VERBOSE(" Layer "
249  << layer
250  << " has only one bin in r, this means is it not used, "
251  "skipping (this is needed to keep correct "
252  "syncronisation of voxel and layers)");
253  // delete h;
254  continue;
255  }
256 
257  if (get_number_of_bins() > 0) {
258  const int bin = get_bin(simulstate, truth, extrapol);
259  if (bin >= 0 && bin < (int)get_number_of_bins()) {
260  for (unsigned int ichain = m_bin_start[bin];
261  ichain < TMath::Min(m_bin_start[bin] + get_nr_of_init(bin),
262  m_bin_start[bin + 1]);
263  ++ichain) {
264  ATH_MSG_DEBUG("for " << get_variable_text(simulstate, truth, extrapol)
265  << " run init " << get_bin_text(bin) << ": "
266  << chain()[ichain]->GetName());
267  if (chain()[ichain]->InheritsFrom(
268  TFCSLateralShapeParametrizationHitBase::Class())) {
271  if (sim->simulate_hit(hit, simulstate, truth, extrapol) !=
272  FCSSuccess) {
273  ATH_MSG_ERROR("error for "
274  << get_variable_text(simulstate, truth, extrapol)
275  << " run init " << get_bin_text(bin) << ": "
276  << chain()[ichain]->GetName());
277  return false;
278  }
279  } else {
280  ATH_MSG_ERROR("for "
281  << get_variable_text(simulstate, truth, extrapol)
282  << " run init " << get_bin_text(bin) << ": "
283  << chain()[ichain]->GetName()
284  << " does not inherit from "
285  "TFCSLateralShapeParametrizationHitBase");
286  return false;
287  }
288  }
289  } else {
290  ATH_MSG_WARNING("nothing to init for "
291  << get_variable_text(simulstate, truth, extrapol)
292  << ": " << get_bin_text(bin));
293  }
294  }
295 
296  int binResolution = 5;
297  if (layer == 1 || layer == 5) {
298  binResolution = 1;
299  }
300 
301  const double center_eta = hit.center_eta();
302  const double center_phi = hit.center_phi();
303  const double center_r = hit.center_r();
304  const double center_z = hit.center_z();
305 
306  ATH_MSG_VERBOSE(" Layer " << layer << " Extrap eta " << center_eta
307  << " phi " << center_phi << " R " << center_r);
308 
309  const float dist000 =
310  TMath::Sqrt(center_r * center_r + center_z * center_z);
311  const float eta_jakobi = TMath::Abs(2.0 * TMath::Exp(-center_eta) /
312  (1.0 + TMath::Exp(-2 * center_eta)));
313 
314  int nHitsAlpha;
315  int nHitsR;
316 
317  // Now create hits
318  for (int ix = 1; ix <= xBinNum; ++ix) {
319  const int binsInAlphaInRBin = GetAlphaBinsForRBin(x, ix, yBinNum);
320 
321  // Horrible work around for variable # of bins along alpha direction
322  const int binsToMerge = yBinNum == 32 ? 32 / binsInAlphaInRBin : 1;
323  for (int iy = 1; iy <= binsInAlphaInRBin; ++iy) {
324  const double energyInVoxel = outputs.at(std::to_string(vox));
325  const int lowEdgeIndex = (iy - 1) * binsToMerge + 1;
326 
327  ATH_MSG_VERBOSE(" Vox " << vox << " energy " << energyInVoxel
328  << " binx " << ix << " biny " << iy);
329 
330  if (energyInVoxel <= 0) {
331  vox++;
332  continue;
333  }
334 
335  if (std::abs(pdgId) == 22 || std::abs(pdgId) == 11) {
336  // maximum 10 MeV per hit, equaly distributed in alpha and r
337  int maxHitsInVoxel = energyInVoxel * truth->Ekin() / 10;
338  if (maxHitsInVoxel < 1)
339  maxHitsInVoxel = 1;
340  nHitsAlpha = std::sqrt(maxHitsInVoxel);
341  nHitsR = std::sqrt(maxHitsInVoxel);
342  } else {
343  // One hit per mm along r
344  nHitsR = x->GetBinUpEdge(ix) - x->GetBinLowEdge(ix);
345  if (yBinNum == 1) {
346  // nbins in alpha depend on circumference lenght
347  const double r = x->GetBinUpEdge(ix);
348  nHitsAlpha = ceil(2 * TMath::Pi() * r / binResolution);
349  } else {
350  // d = 2*r*sin (a/2r) this distance at the upper r must be 1mm for
351  // layer 1 or 5, 5mm otherwise.
352  const TAxis *y = h->GetYaxis();
353  const double angle = y->GetBinUpEdge(iy) - y->GetBinLowEdge(iy);
354  const double r = x->GetBinUpEdge(ix);
355  const double d = 2 * r * sin(angle / 2 * r);
356  nHitsAlpha = ceil(d / binResolution);
357  }
358 
359  if (layer != 1 && layer != 5) {
360  // For layers that are not EMB1 or EMEC1 use a maximum of 10 hits
361  // per direction, a higher granularity is needed for the other
362  // layers
363  const int maxNhits = 10;
364  nHitsAlpha = std::min(maxNhits, std::max(1, nHitsAlpha));
365  nHitsR = std::min(maxNhits, std::max(1, nHitsR));
366  }
367  }
368 
369  for (int ir = 0; ir < nHitsR; ++ir) {
370  double r =
371  x->GetBinLowEdge(ix) + x->GetBinWidth(ix) / (nHitsR + 1) * ir;
372 
373  for (int ialpha = 1; ialpha <= nHitsAlpha; ++ialpha) {
374  if (ganVersion > 1) {
375  if (fitResults.at(layer)[ix - 1] != 0) {
376  int tries = 0;
377  double a = CLHEP::RandFlat::shoot(simulstate.randomEngine(),
378  x->GetBinLowEdge(ix),
379  x->GetBinUpEdge(ix));
380  double rand_r =
381  log((a - x->GetBinLowEdge(ix)) / (x->GetBinWidth(ix))) /
382  fitResults.at(layer)[ix - 1];
383  while ((rand_r < x->GetBinLowEdge(ix) ||
384  rand_r > x->GetBinUpEdge(ix)) &&
385  tries < 100) {
386  a = CLHEP::RandFlat::shoot(simulstate.randomEngine(),
387  x->GetBinLowEdge(ix),
388  x->GetBinUpEdge(ix));
389  rand_r =
390  log((a - x->GetBinLowEdge(ix)) / (x->GetBinWidth(ix))) /
391  fitResults.at(layer)[ix - 1];
392  tries++;
393  }
394  if (tries >= 100) {
395  ATH_MSG_VERBOSE(" Too many tries for bin ["
396  << x->GetBinLowEdge(ix) << "-"
397  << x->GetBinUpEdge(ix) << "] having slope "
398  << fitResults.at(layer)[ix - 1]
399  << " will use grid (old method)");
400  } else {
401  r = rand_r;
402  }
403  }
404  }
405 
406  double alpha;
407  if (binsInAlphaInRBin == 1) {
408  alpha = CLHEP::RandFlat::shoot(simulstate.randomEngine(),
409  -TMath::Pi(), TMath::Pi());
410  } else {
411  alpha =
412  y->GetBinLowEdge(lowEdgeIndex) +
413  y->GetBinWidth(iy) * binsToMerge / (nHitsAlpha + 1) * ialpha;
414 
415  if (m_param.IsSymmetrisedAlpha()) {
416  if (CLHEP::RandFlat::shoot(simulstate.randomEngine(),
417  -TMath::Pi(), TMath::Pi()) < 0) {
418  alpha = -alpha;
419  }
420  }
421  }
422 
423  hit.reset();
424  hit.E() = Einit * energyInVoxel / (nHitsAlpha * nHitsR);
425 
426  if (layer <= 20) {
427  float delta_eta_mm = r * cos(alpha);
428  float delta_phi_mm = r * sin(alpha);
429 
430  ATH_MSG_VERBOSE("delta_eta_mm " << delta_eta_mm
431  << " delta_phi_mm "
432  << delta_phi_mm);
433 
434  // Particles with negative eta are expected to have the same shape
435  // as those with positive eta after transformation: delta_eta -->
436  // -delta_eta
437  if (center_eta < 0.)
438  delta_eta_mm = -delta_eta_mm;
439  // We derive the shower shapes for electrons and positively
440  // charged hadrons. Particle with the opposite charge are expected
441  // to have the same shower shape after the transformation:
442  // delta_phi --> -delta_phi
443  if ((charge < 0. && pdgId != 11) || pdgId == -11)
444  delta_phi_mm = -delta_phi_mm;
445 
446  const float delta_eta = delta_eta_mm / eta_jakobi / dist000;
447  const float delta_phi = delta_phi_mm / center_r;
448 
449  hit.eta() = center_eta + delta_eta;
450  hit.phi() = TVector2::Phi_mpi_pi(center_phi + delta_phi);
451 
452  ATH_MSG_VERBOSE(" Hit eta " << hit.eta() << " phi " << hit.phi()
453  << " layer " << layer);
454  } else { // FCAL is in (x,y,z)
455  const float hit_r = r * cos(alpha) + center_r;
456  float delta_phi = r * sin(alpha) / center_r;
457  // We derive the shower shapes for electrons and positively
458  // charged hadrons. Particle with the opposite charge are expected
459  // to have the same shower shape after the transformation:
460  // delta_phi --> -delta_phi
461  if ((charge < 0. && pdgId != 11) || pdgId == -11)
462  delta_phi = -delta_phi;
463  const float hit_phi =
464  TVector2::Phi_mpi_pi(center_phi + delta_phi);
465  hit.x() = hit_r * cos(hit_phi);
466  hit.y() = hit_r * sin(hit_phi);
467  hit.z() = center_z;
468  ATH_MSG_VERBOSE(" Hit x " << hit.x() << " y " << hit.y()
469  << " layer " << layer);
470  }
471 
472  if (get_number_of_bins() > 0) {
473  const int bin = get_bin(simulstate, truth, extrapol);
474  if (bin >= 0 && bin < (int)get_number_of_bins()) {
475  for (unsigned int ichain =
477  ichain < m_bin_start[bin + 1]; ++ichain) {
479  "for " << get_variable_text(simulstate, truth, extrapol)
480  << " run " << get_bin_text(bin) << ": "
481  << chain()[ichain]->GetName());
482  if (chain()[ichain]->InheritsFrom(
483  TFCSLateralShapeParametrizationHitBase::Class())) {
486  *)(chain()[ichain]);
487  if (sim->simulate_hit(hit, simulstate, truth, extrapol) !=
488  FCSSuccess) {
490  "error for "
491  << get_variable_text(simulstate, truth, extrapol)
492  << " run init " << get_bin_text(bin) << ": "
493  << chain()[ichain]->GetName());
494  return false;
495  }
496  } else {
498  "for " << get_variable_text(simulstate, truth, extrapol)
499  << " run init " << get_bin_text(bin) << ": "
500  << chain()[ichain]->GetName()
501  << " does not inherit from "
502  "TFCSLateralShapeParametrizationHitBase");
503  return false;
504  }
505  }
506  } else {
508  "nothing to do for "
509  << get_variable_text(simulstate, truth, extrapol) << ": "
510  << get_bin_text(bin));
511  }
512  } else {
513  ATH_MSG_WARNING("no bins defined, is this intended?");
514  }
515  }
516  }
517  vox++;
518  }
519  }
520 
521  ATH_MSG_VERBOSE("Number of voxels " << vox);
522  ATH_MSG_VERBOSE("Done layer " << layer);
523  }
524 
525  if (simulstate.E() > std::numeric_limits<double>::epsilon()) {
526  for (int ilayer = 0; ilayer < CaloCell_ID_FCS::MaxSample; ++ilayer) {
527  simulstate.set_Efrac(ilayer, simulstate.E(ilayer) / simulstate.E());
528  }
529  }
530 
531  ATH_MSG_VERBOSE("Done particle");
532  return true;
533 }

◆ FindDuplicates()

void TFCSParametrizationBase::FindDuplicates ( FindDuplicateClasses_t dup)
inherited

Definition at line 90 of file TFCSParametrizationBase.cxx.

91  {
92  for (unsigned int i = 0; i < size(); ++i)
93  if ((*this)[i]) {
94  TFCSParametrizationBase *param = (*this)[i];
95  FindDuplicates_t &dup = dupclasses[param->GetName()];
96  // If param is already in the duplication list, skip over
97  auto checkexist = dup.find(param);
98  if (checkexist != dup.end()) {
99  ATH_MSG_DEBUG("Found duplicate pointer for: " << param << "="
100  << param->GetName());
101  if (checkexist->second.replace) {
102  TFCSParametrizationBase *refparam = checkexist->second.replace;
103  ATH_MSG_DEBUG("Found duplicate pointer: "
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);
109  }
110  continue;
111  }
112  // Add param to duplication list
113  dup[param] = Duplicate_t();
114  for (auto &ref : dup) {
115  TFCSParametrizationBase *refparam = ref.first;
116  // skip itself, as this just added above
117  if (param == refparam)
118  continue;
119  // skip nullptr reference
120  if (refparam == nullptr)
121  continue;
122  // skip reference that is itself going to get replaced
123  if (ref.second.replace)
124  continue;
125  // Check for objects with identical content
126  if (*param == *refparam) {
127  ATH_MSG_DEBUG("Found duplicate: "
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);
134  break;
135  }
136  }
137  // Continue for child objects in param
138  param->FindDuplicates(dupclasses);
139  }
140 }

◆ GANfreemem()

bool TFCSEnergyAndHitGANV2::GANfreemem ( ) const
inline

Definition at line 39 of file TFCSEnergyAndHitGANV2.h.

39 { return TestBit(kGANfreemem); };

◆ get_bin()

virtual int TFCSEnergyAndHitGANV2::get_bin ( TFCSSimulationState simulstate,
const TFCSTruthState ,
const TFCSExtrapolationState  
) const
inlineoverridevirtual

use the layer to be done as binning of the GAN chain

Reimplemented from TFCSParametrizationBinnedChain.

Definition at line 55 of file TFCSEnergyAndHitGANV2.h.

56  {
57  return simulstate.getAuxInfo<int>("GANlayer"_FCShash);
58  };

◆ get_bin_text()

const std::string TFCSParametrizationBinnedChain::get_bin_text ( int  bin) const
virtualinherited

print the range of a bin; for bin -1, print the allowed range

Reimplemented in TFCSParametrizationEkinSelectChain, TFCSParametrizationEtaSelectChain, and TFCSParametrizationAbsEtaSelectChain.

Definition at line 60 of file TFCSParametrizationBinnedChain.cxx.

60  {
61  return std::string(Form("bin %d", bin));
62 }

◆ get_Binning()

const TFCSGANXMLParameters::Binning& TFCSEnergyAndHitGANV2::get_Binning ( ) const
inline

Definition at line 66 of file TFCSEnergyAndHitGANV2.h.

66  {
67  return m_param.GetBinning();
68  };

◆ get_ExtrapolationWeights()

const TFCSGANEtaSlice::ExtrapolatorWeights TFCSEnergyAndHitGANV2::get_ExtrapolationWeights ( ) const
inline

Definition at line 69 of file TFCSEnergyAndHitGANV2.h.

69  {
71  };

◆ get_nr_of_init()

unsigned int TFCSEnergyAndHitGANV2::get_nr_of_init ( unsigned int  bin) const

Definition at line 54 of file TFCSEnergyAndHitGANV2.cxx.

54  {
55  if (bin >= m_bin_ninit.size())
56  return 0;
57  return m_bin_ninit[bin];
58 }

◆ get_number_of_bins()

virtual unsigned int TFCSParametrizationBinnedChain::get_number_of_bins ( ) const
inlinevirtualinherited

Definition at line 22 of file TFCSParametrizationBinnedChain.h.

22  {
23  return m_bin_start.size() - 1;
24  };

◆ get_variable_text()

const std::string TFCSEnergyAndHitGANV2::get_variable_text ( TFCSSimulationState simulstate,
const TFCSTruthState ,
const TFCSExtrapolationState  
) const
overridevirtual

Reimplemented from TFCSParametrizationBinnedChain.

Definition at line 105 of file TFCSEnergyAndHitGANV2.cxx.

107  {
108  return std::string(
109  Form("layer=%d", simulstate.getAuxInfo<int>("GANlayer"_FCShash)));
110 }

◆ GetAlphaBinsForRBin()

int TFCSEnergyAndHitGANV2::GetAlphaBinsForRBin ( const TAxis *  x,
int  ix,
int  yBinNum 
) const
private

Definition at line 711 of file TFCSEnergyAndHitGANV2.cxx.

712  {
713  double binsInAlphaInRBin = yBinNum;
714  if (yBinNum == 32) {
715  ATH_MSG_DEBUG("yBinNum is special value 32");
716  const double widthX = x->GetBinWidth(ix);
717  const double radious = x->GetBinCenter(ix);
718  double circumference = radious * 2 * TMath::Pi();
719  if (m_param.IsSymmetrisedAlpha()) {
720  circumference = radious * TMath::Pi();
721  }
722 
723  const double bins = circumference / widthX;
724  binsInAlphaInRBin = GetBinsInFours(bins);
725  ATH_MSG_DEBUG("Bin in alpha: " << binsInAlphaInRBin << " for r bin: " << ix
726  << " (" << x->GetBinLowEdge(ix) << "-"
727  << x->GetBinUpEdge(ix) << ")");
728  }
729  return binsInAlphaInRBin;
730 }

◆ GetBinsInFours()

int TFCSEnergyAndHitGANV2::GetBinsInFours ( double const bins)
staticprivate

Definition at line 700 of file TFCSEnergyAndHitGANV2.cxx.

700  {
701  if (bins < 4)
702  return 4;
703  else if (bins < 8)
704  return 8;
705  else if (bins < 16)
706  return 16;
707  else
708  return 32;
709 }

◆ initializeNetwork()

bool TFCSEnergyAndHitGANV2::initializeNetwork ( int const pid,
int const etaMin,
const std::string &  FastCaloGANInputFolderName 
)

Definition at line 70 of file TFCSEnergyAndHitGANV2.cxx.

72  {
73 
74  // initialize all necessary constants
75  // FIXME eventually all these could be stored in the .json file
76 
78  "Using FastCaloGANInputFolderName: " << FastCaloGANInputFolderName);
79  // get neural net JSON file as an std::istream object
80  const int etaMax = etaMin + 5;
81 
83  set_pdgid(pid);
84  if (pid == 11)
85  add_pdgid(-pid);
86  if (pid == 211)
87  add_pdgid(-pid);
88  set_eta_min(etaMin / 100.0);
89  set_eta_max(etaMax / 100.0);
90  set_eta_nominal((etaMin + etaMax) / 200.0);
91 
92  int pidForXml = pid;
93  if (pid != 22 && pid != 11) {
94  pidForXml = 211;
95  }
96 
97  const int etaMid = (etaMin + etaMax) / 2;
98  m_param.InitialiseFromXML(pidForXml, etaMid, FastCaloGANInputFolderName);
99  m_param.Print();
101  m_slice->Print();
102  return m_slice->LoadGAN();
103 }

◆ is_match_all_calosample()

virtual bool TFCSEnergyAndHitGANV2::is_match_all_calosample ( ) const
inlineoverridevirtual

Reimplemented from TFCSParametrization.

Definition at line 31 of file TFCSEnergyAndHitGANV2.h.

31 { return false; };

◆ is_match_all_Ekin()

virtual bool TFCSParametrization::is_match_all_Ekin ( ) const
inlineoverridevirtualinherited

Reimplemented from TFCSParametrizationBase.

Definition at line 25 of file TFCSParametrization.h.

25  {
26  return Ekin_min() == init_Ekin_min && Ekin_max() == init_Ekin_max;
27  };

◆ is_match_all_Ekin_bin()

virtual bool TFCSEnergyAndHitGANV2::is_match_all_Ekin_bin ( ) const
inlineoverridevirtual

Reimplemented from TFCSParametrization.

Definition at line 30 of file TFCSEnergyAndHitGANV2.h.

30 { return true; };

◆ is_match_all_eta()

virtual bool TFCSParametrization::is_match_all_eta ( ) const
inlineoverridevirtualinherited

Reimplemented from TFCSParametrizationBase.

Definition at line 28 of file TFCSParametrization.h.

28  {
29  return eta_min() == init_eta_min && eta_max() == init_eta_max;
30  };

◆ is_match_all_pdgid()

virtual bool TFCSParametrizationBase::is_match_all_pdgid ( ) const
inlinevirtualinherited

Definition at line 66 of file TFCSParametrizationBase.h.

66 { return TestBit(kMatchAllPDGID); };

◆ is_match_calosample()

bool TFCSEnergyAndHitGANV2::is_match_calosample ( int  calosample) const
overridevirtual

Reimplemented from TFCSParametrizationChain.

Definition at line 46 of file TFCSEnergyAndHitGANV2.cxx.

46  {
47  if (get_Binning().find(calosample) == get_Binning().cend())
48  return false;
49  if (get_Binning().at(calosample).GetNbinsX() == 1)
50  return false;
51  return true;
52 }

◆ is_match_Ekin()

virtual bool TFCSParametrization::is_match_Ekin ( float  Ekin) const
inlineoverridevirtualinherited

Reimplemented from TFCSParametrizationBase.

Definition at line 18 of file TFCSParametrization.h.

18  {
19  return (Ekin >= m_Ekin_min) && (Ekin < m_Ekin_max);
20  };

◆ is_match_Ekin_bin()

virtual bool TFCSEnergyAndHitGANV2::is_match_Ekin_bin ( int  ) const
inlineoverridevirtual

Reimplemented from TFCSParametrizationChain.

Definition at line 26 of file TFCSEnergyAndHitGANV2.h.

26  {
27  return true;
28  };

◆ is_match_eta()

virtual bool TFCSParametrization::is_match_eta ( float  eta) const
inlineoverridevirtualinherited

Reimplemented from TFCSParametrizationBase.

Definition at line 21 of file TFCSParametrization.h.

21  {
22  return (eta >= m_eta_min) && (eta < m_eta_max);
23  };

◆ is_match_pdgid()

virtual bool TFCSParametrization::is_match_pdgid ( int  id) const
inlineoverridevirtualinherited

Reimplemented from TFCSParametrizationBase.

Definition at line 15 of file TFCSParametrization.h.

15  {
16  return TestBit(kMatchAllPDGID) || m_pdgid.find(id) != m_pdgid.end();
17  };

◆ 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.

231  {
232  MsgStream *ms = m_msg_tls.get();
233  if (!ms) {
234  ms = new MsgStream(Athena::getMessageSvc(), m_nm);
235  m_msg_tls.reset(ms);
236  }
237  return *ms;
238 }

◆ 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.

240  {
241  return msg() << lvl;
242 }

◆ 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.

222  {
223  if (msg().level() <= lvl) {
224  msg() << lvl;
225  return true;
226  } else {
227  return false;
228  }
229 }

◆ OnlyScaleEnergy()

bool TFCSEnergyAndHitGANV2::OnlyScaleEnergy ( ) const
inline

Definition at line 50 of file TFCSEnergyAndHitGANV2.h.

50 { return TestBit(kOnlyScaleEnergy); };

◆ operator==()

virtual bool TFCSParametrizationBase::operator== ( const TFCSParametrizationBase ref) const
inlinevirtualinherited

The == operator compares the content of instances.

The implementation in the base class only returns true for a comparison with itself

Reimplemented in TFCSHitCellMappingWiggle, TFCSLateralShapeParametrizationHitNumberFromE, TFCSHitCellMapping, and TFCSPredictExtrapWeights.

Definition at line 119 of file TFCSParametrizationBase.h.

119  {
120  return compare(ref);
121  };

◆ operator[]() [1/2]

virtual const TFCSParametrizationBase* TFCSParametrizationChain::operator[] ( unsigned int  ) const
inlineoverridevirtualinherited

Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operator[] methods give general access to these daughters.

Reimplemented from TFCSParametrizationBase.

Definition at line 43 of file TFCSParametrizationChain.h.

43  {
44  return m_chain[ind];
45  };

◆ operator[]() [2/2]

virtual TFCSParametrizationBase* TFCSParametrizationChain::operator[] ( unsigned int  )
inlineoverridevirtualinherited

Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operator[] methods give general access to these daughters.

Reimplemented from TFCSParametrizationBase.

Definition at line 46 of file TFCSParametrizationChain.h.

46  {
47  return m_chain[ind];
48  };

◆ pdgid()

const std::set<int>& TFCSParametrization::pdgid ( ) const
inlineoverridevirtualinherited

Reimplemented from TFCSParametrizationBase.

Definition at line 34 of file TFCSParametrization.h.

34 { return m_pdgid; };

◆ Print()

void TFCSEnergyAndHitGANV2::Print ( Option_t *  option = "") const
overridevirtual

Definition at line 556 of file TFCSEnergyAndHitGANV2.cxx.

556  {
558  TString opt(option);
559  const bool shortprint = opt.Index("short") >= 0;
560  const bool longprint =
561  msgLvl(MSG::DEBUG) || (msgLvl(MSG::INFO) && !shortprint);
562  TString optprint = opt;
563  optprint.ReplaceAll("short", "");
564 
565  TString prefix = "- ";
566  for (unsigned int ichain = 0; ichain < size(); ++ichain) {
567  if (ichain == 0 && ichain != m_bin_start.front()) {
568  prefix = "> ";
569  if (longprint)
570  ATH_MSG_INFO(optprint << prefix << "Run for all bins");
571  }
572  for (unsigned int ibin = 0; ibin < get_number_of_bins(); ++ibin) {
573  if (ichain == m_bin_start[ibin]) {
574  if (ibin < get_number_of_bins() - 1)
575  if (ichain == m_bin_start[ibin + 1])
576  continue;
577  prefix = Form("%-2d", ibin);
578  if (longprint)
579  ATH_MSG_INFO(optprint << prefix << "Run for " << get_bin_text(ibin));
580  }
581  }
582  if (ichain == m_bin_start.back()) {
583  prefix = "< ";
584  if (longprint)
585  ATH_MSG_INFO(optprint << prefix << "Run for all bins");
586  }
587  chain()[ichain]->Print(opt + prefix);
588  }
589 }

◆ push_back()

void TFCSParametrizationChain::push_back ( const Chain_t::value_type &  param)
inlineinherited

Definition at line 55 of file TFCSParametrizationChain.h.

55  {
56  m_chain.push_back(param);
57  recalc();
58  };

◆ push_back_in_bin()

void TFCSParametrizationBinnedChain::push_back_in_bin ( TFCSParametrizationBase param,
unsigned int  bin 
)
virtualinherited

Reimplemented in TFCSParametrizationFloatSelectChain.

Definition at line 31 of file TFCSParametrizationBinnedChain.cxx.

32  {
33  if (m_bin_start.size() <= bin + 1) {
34  m_bin_start.resize(bin + 2, m_bin_start.back());
35  m_bin_start.shrink_to_fit();
36  }
37  if (m_bin_start[bin + 1] == size()) {
38  chain().push_back(param);
39  } else {
41  chain().insert(it, param);
42  }
43  for (unsigned int ibin = bin + 1; ibin < m_bin_start.size(); ++ibin)
44  m_bin_start[ibin]++;
45  recalc();
46 }

◆ push_before_first_bin()

void TFCSParametrizationBinnedChain::push_before_first_bin ( TFCSParametrizationBase param)
virtualinherited

Definition at line 18 of file TFCSParametrizationBinnedChain.cxx.

19  {
20  if (m_bin_start[0] == size()) {
21  chain().push_back(param);
22  } else {
24  chain().insert(it, param);
25  }
26  for (auto &ele : m_bin_start)
27  ele++;
28  recalc();
29 }

◆ recalc()

void TFCSParametrizationChain::recalc ( )
protectedvirtualinherited

Default is to call recalc_pdgid_intersect() and recalc_Ekin_eta_intersect()

Reimplemented in TFCSParametrizationEkinSelectChain, TFCSParametrizationPDGIDSelectChain, and TFCSParametrizationEtaSelectChain.

Definition at line 119 of file TFCSParametrizationChain.cxx.

119  {
120  clear();
121  if (m_chain.empty())
122  return;
123 
126 
127  m_chain.shrink_to_fit();
128 }

◆ recalc_Ekin_eta_intersect()

void TFCSParametrizationChain::recalc_Ekin_eta_intersect ( )
protectedinherited

Definition at line 77 of file TFCSParametrizationChain.cxx.

77  {
80 }

◆ recalc_Ekin_eta_union()

void TFCSParametrizationChain::recalc_Ekin_eta_union ( )
protectedinherited

Definition at line 114 of file TFCSParametrizationChain.cxx.

114  {
117 }

◆ recalc_Ekin_intersect()

void TFCSParametrizationChain::recalc_Ekin_intersect ( )
protectedinherited

Definition at line 45 of file TFCSParametrizationChain.cxx.

45  {
46  set_Ekin(*m_chain[0]);
47 
48  for (const auto &param : m_chain) {
49  if (param->Ekin_min() > Ekin_min())
50  set_Ekin_min(param->Ekin_min());
51  if (param->Ekin_max() < Ekin_max())
52  set_Ekin_max(param->Ekin_max());
53  if (Ekin_nominal() < Ekin_min() || Ekin_nominal() > Ekin_max())
54  set_Ekin_nominal(param->Ekin_nominal());
55  }
56 
57  if (Ekin_nominal() < Ekin_min() || Ekin_nominal() > Ekin_max())
58  set_Ekin_nominal(0.5 * (Ekin_min() + Ekin_max()));
59 }

◆ recalc_Ekin_union()

void TFCSParametrizationChain::recalc_Ekin_union ( )
protectedinherited

Definition at line 82 of file TFCSParametrizationChain.cxx.

82  {
83  set_Ekin(*m_chain[0]);
84 
85  for (const auto &param : m_chain) {
86  if (param->Ekin_min() < Ekin_min())
87  set_Ekin_min(param->Ekin_min());
88  if (param->Ekin_max() > Ekin_max())
89  set_Ekin_max(param->Ekin_max());
90  if (Ekin_nominal() < Ekin_min() || Ekin_nominal() > Ekin_max())
91  set_Ekin_nominal(param->Ekin_nominal());
92  }
93 
94  if (Ekin_nominal() < Ekin_min() || Ekin_nominal() > Ekin_max())
95  set_Ekin_nominal(0.5 * (Ekin_min() + Ekin_max()));
96 }

◆ recalc_eta_intersect()

void TFCSParametrizationChain::recalc_eta_intersect ( )
protectedinherited

Definition at line 61 of file TFCSParametrizationChain.cxx.

61  {
62  set_eta(*m_chain[0]);
63 
64  for (const auto &param : m_chain) {
65  if (param->eta_min() > eta_min())
66  set_eta_min(param->eta_min());
67  if (param->eta_max() < eta_max())
68  set_eta_max(param->eta_max());
69  if (eta_nominal() < eta_min() || eta_nominal() > eta_max())
70  set_eta_nominal(param->eta_nominal());
71  }
72 
73  if (eta_nominal() < eta_min() || eta_nominal() > eta_max())
74  set_eta_nominal(0.5 * (eta_min() + eta_max()));
75 }

◆ recalc_eta_union()

void TFCSParametrizationChain::recalc_eta_union ( )
protectedinherited

Definition at line 98 of file TFCSParametrizationChain.cxx.

98  {
99  set_eta(*m_chain[0]);
100 
101  for (const auto &param : m_chain) {
102  if (param->eta_min() < eta_min())
103  set_eta_min(param->eta_min());
104  if (param->eta_max() > eta_max())
105  set_eta_max(param->eta_max());
106  if (eta_nominal() < eta_min() || eta_nominal() > eta_max())
107  set_eta_nominal(param->eta_nominal());
108  }
109 
110  if (eta_nominal() < eta_min() || eta_nominal() > eta_max())
111  set_eta_nominal(0.5 * (eta_min() + eta_max()));
112 }

◆ recalc_pdgid_intersect()

void TFCSParametrizationChain::recalc_pdgid_intersect ( )
protectedinherited

Definition at line 20 of file TFCSParametrizationChain.cxx.

20  {
21  set_pdgid(m_chain[0]->pdgid());
22 
23  for (const auto &param : m_chain) {
24  std::set<int> tmp;
25 
27  param->pdgid().begin(), param->pdgid().end(),
28  std::inserter(tmp, tmp.begin()));
29  set_pdgid(tmp);
30  }
31 }

◆ recalc_pdgid_union()

void TFCSParametrizationChain::recalc_pdgid_union ( )
protectedinherited

Definition at line 33 of file TFCSParametrizationChain.cxx.

33  {
34  set_pdgid(chain()[0]->pdgid());
35 
36  for (const auto &param : chain()) {
37  std::set<int> tmp;
38 
39  std::set_union(pdgid().begin(), pdgid().end(), param->pdgid().begin(),
40  param->pdgid().end(), std::inserter(tmp, tmp.begin()));
41  set_pdgid(tmp);
42  }
43 }

◆ RemoveDuplicates()

void TFCSParametrizationBase::RemoveDuplicates ( )
inherited

Definition at line 142 of file TFCSParametrizationBase.cxx.

142  {
143  FindDuplicateClasses_t dupclasses;
144  FindDuplicates(dupclasses);
145 
146  std::set<TFCSParametrizationBase *> dellist;
147  for (auto &dupiter : dupclasses) {
148  FindDuplicates_t &dup = dupiter.second;
149  for (auto onedup : dup) {
150  if (onedup.second.mother.empty())
151  continue;
152  TFCSParametrizationBase *ref = onedup.first;
153  ATH_MSG_DEBUG("Main object " << ref << "=" << ref->GetName());
154  for (unsigned int i = 0; i < onedup.second.mother.size(); ++i) {
155  int index = onedup.second.index[i];
156  TFCSParametrizationBase *mother = onedup.second.mother[i];
157  TFCSParametrizationBase *delparam = mother->operator[](index);
158  unsigned int delcount = dup[delparam].mother.size();
159  if (delcount == 0) {
160  ATH_MSG_DEBUG(" - Delete object "
161  << delparam << "=" << delparam->GetName() << " index "
162  << index << " of " << mother << ", has " << delcount
163  << " other replacements attached. Deleting");
164  mother->set_daughter(index, ref);
165  dellist.insert(delparam);
166  } else {
167  ATH_MSG_WARNING(" - Delete object "
168  << delparam << "=" << delparam->GetName() << " index "
169  << index << " of " << mother << ", has " << delcount
170  << " other replacements attached. Skipping");
171  }
172  }
173  }
174  }
175 
176  ATH_MSG_INFO("RERUNNING DUPLICATE FINDING");
177  FindDuplicateClasses_t dupclasses2;
178  FindDuplicates(dupclasses2);
179 
180  std::map<std::string, int> ndel;
181  for (auto *delparam : dellist) {
182  FindDuplicates_t &dup2 = dupclasses2[delparam->GetName()];
183  bool present = dup2.find(delparam) != dup2.end();
184  if (present) {
185  ATH_MSG_WARNING("- Delete object " << delparam << "="
186  << delparam->GetName()
187  << " still referenced somewhere!");
188  } else {
189  ATH_MSG_DEBUG("- Delete object " << delparam << "="
190  << delparam->GetName());
191  ++ndel[delparam->ClassName()];
192  delete delparam;
193  }
194  }
195  for (auto &del : ndel)
196  ATH_MSG_INFO("Deleted " << del.second << " duplicate objects of class "
197  << del.first);
198 }

◆ RemoveNameTitle()

void TFCSParametrizationBase::RemoveNameTitle ( )
inherited

Definition at line 200 of file TFCSParametrizationBase.cxx.

200  {
201  for (unsigned int i = 0; i < size(); ++i)
202  if ((*this)[i]) {
203  TFCSParametrizationBase *param = (*this)[i];
204  param->SetName("");
205  param->SetTitle("");
206 
207  // Continue for child objects in param
208  param->RemoveNameTitle();
209  }
210 }

◆ reset_GANfreemem()

void TFCSEnergyAndHitGANV2::reset_GANfreemem ( )
inline

Definition at line 41 of file TFCSEnergyAndHitGANV2.h.

41 { ResetBit(kGANfreemem); };

◆ reset_match_all_pdgid()

virtual void TFCSParametrizationBase::reset_match_all_pdgid ( )
inlinevirtualinherited

Definition at line 84 of file TFCSParametrizationBase.h.

84 { ResetBit(kMatchAllPDGID); };

◆ reset_OnlyScaleEnergy()

void TFCSEnergyAndHitGANV2::reset_OnlyScaleEnergy ( )
inline

Definition at line 52 of file TFCSEnergyAndHitGANV2.h.

52 { ResetBit(kOnlyScaleEnergy); };

◆ reset_RetryChainFromStart()

void TFCSParametrizationChain::reset_RetryChainFromStart ( )
inlineinherited

Definition at line 38 of file TFCSParametrizationChain.h.

38 { ResetBit(kRetryChainFromStart); };

◆ reset_SplitChainObjects()

void TFCSParametrizationChain::reset_SplitChainObjects ( )
inlineinherited

Definition at line 34 of file TFCSParametrizationChain.h.

34 { ResetBit(kSplitChainObjects); };

◆ RetryChainFromStart()

bool TFCSParametrizationChain::RetryChainFromStart ( ) const
inlineinherited

Definition at line 36 of file TFCSParametrizationChain.h.

36 { return TestBit(kRetryChainFromStart); };

◆ set_daughter()

virtual void TFCSParametrizationChain::set_daughter ( unsigned int  ,
TFCSParametrizationBase  
)
inlineoverridevirtualinherited

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.

Reimplemented from TFCSParametrizationBase.

Definition at line 49 of file TFCSParametrizationChain.h.

50  {
51  m_chain.at(ind) = param;
52  };

◆ set_Ekin()

void TFCSParametrization::set_Ekin ( const TFCSParametrizationBase ref)
virtualinherited

Definition at line 55 of file TFCSParametrization.cxx.

55  {
56  set_Ekin_nominal(ref.Ekin_nominal());
57  set_Ekin_min(ref.Ekin_min());
58  set_Ekin_max(ref.Ekin_max());
59 }

◆ set_Ekin_eta()

void TFCSParametrization::set_Ekin_eta ( const TFCSParametrizationBase ref)
virtualinherited

Definition at line 67 of file TFCSParametrization.cxx.

67  {
68  set_Ekin(ref);
69  set_eta(ref);
70 }

◆ set_Ekin_max()

void TFCSParametrization::set_Ekin_max ( double  max)
virtualinherited

Definition at line 45 of file TFCSParametrization.cxx.

45 { m_Ekin_max = max; }

◆ set_Ekin_min()

void TFCSParametrization::set_Ekin_min ( double  min)
virtualinherited

Definition at line 43 of file TFCSParametrization.cxx.

43 { m_Ekin_min = min; }

◆ set_Ekin_nominal()

void TFCSParametrization::set_Ekin_nominal ( double  min)
virtualinherited

Definition at line 39 of file TFCSParametrization.cxx.

39  {
40  m_Ekin_nominal = nominal;
41 }

◆ set_eta()

void TFCSParametrization::set_eta ( const TFCSParametrizationBase ref)
virtualinherited

Definition at line 61 of file TFCSParametrization.cxx.

61  {
62  set_eta_nominal(ref.eta_nominal());
63  set_eta_min(ref.eta_min());
64  set_eta_max(ref.eta_max());
65 }

◆ set_eta_max()

void TFCSParametrization::set_eta_max ( double  max)
virtualinherited

Definition at line 53 of file TFCSParametrization.cxx.

53 { m_eta_max = max; }

◆ set_eta_min()

void TFCSParametrization::set_eta_min ( double  min)
virtualinherited

Definition at line 51 of file TFCSParametrization.cxx.

51 { m_eta_min = min; }

◆ set_eta_nominal()

void TFCSParametrization::set_eta_nominal ( double  min)
virtualinherited

Definition at line 47 of file TFCSParametrization.cxx.

47  {
48  m_eta_nominal = nominal;
49 }

◆ set_GANfreemem()

void TFCSEnergyAndHitGANV2::set_GANfreemem ( )
inline

Definition at line 40 of file TFCSEnergyAndHitGANV2.h.

40 { SetBit(kGANfreemem); };

◆ set_geometry()

void TFCSParametrizationBase::set_geometry ( ICaloGeometry geo)
virtualinherited

Method to set the geometry access pointer.

Loops over daughter objects if present

Reimplemented in TFCSHistoLateralShapeParametrization, TFCSVoxelHistoLateralCovarianceFluctuations, and TFCSHitCellMapping.

Definition at line 24 of file TFCSParametrizationBase.cxx.

24  {
25  for (unsigned int i = 0; i < size(); ++i)
26  (*this)[i]->set_geometry(geo);
27 }

◆ set_match_all_pdgid()

virtual void TFCSParametrizationBase::set_match_all_pdgid ( )
inlinevirtualinherited

Definition at line 83 of file TFCSParametrizationBase.h.

83 { SetBit(kMatchAllPDGID); };

◆ set_nr_of_init()

void TFCSEnergyAndHitGANV2::set_nr_of_init ( unsigned int  bin,
unsigned int  ninit 
)

Definition at line 60 of file TFCSEnergyAndHitGANV2.cxx.

61  {
62  if (bin >= m_bin_ninit.size()) {
63  m_bin_ninit.resize(bin + 1, 0);
64  m_bin_ninit.shrink_to_fit();
65  }
66  m_bin_ninit[bin] = ninit;
67 }

◆ set_OnlyScaleEnergy()

void TFCSEnergyAndHitGANV2::set_OnlyScaleEnergy ( )
inline

Definition at line 51 of file TFCSEnergyAndHitGANV2.h.

51 { SetBit(kOnlyScaleEnergy); };

◆ set_pdgid() [1/2]

void TFCSParametrization::set_pdgid ( const std::set< int > &  ids)
virtualinherited

Reimplemented in TFCSEnergyBinParametrization.

Definition at line 33 of file TFCSParametrization.cxx.

33 { m_pdgid = ids; }

◆ set_pdgid() [2/2]

void TFCSParametrization::set_pdgid ( int  id)
virtualinherited

Reimplemented in TFCSEnergyBinParametrization.

Definition at line 28 of file TFCSParametrization.cxx.

28  {
29  m_pdgid.clear();
30  m_pdgid.insert(id);
31 }

◆ set_pdgid_Ekin_eta()

void TFCSParametrization::set_pdgid_Ekin_eta ( const TFCSParametrizationBase ref)
virtualinherited

Definition at line 72 of file TFCSParametrization.cxx.

73  {
75  set_pdgid(ref.pdgid());
76 }

◆ set_RetryChainFromStart()

void TFCSParametrizationChain::set_RetryChainFromStart ( )
inlineinherited

Definition at line 37 of file TFCSParametrizationChain.h.

37 { SetBit(kRetryChainFromStart); };

◆ set_SplitChainObjects()

void TFCSParametrizationChain::set_SplitChainObjects ( )
inlineinherited

Definition at line 33 of file TFCSParametrizationChain.h.

33 { SetBit(kSplitChainObjects); };

◆ setLevel()

void ISF_FCS::MLogging::setLevel ( MSG::Level  lvl)
virtualinherited

Update outputlevel.

Definition at line 105 of file MLogging.cxx.

105  {
106  lvl = (lvl >= MSG::NUM_LEVELS) ? MSG::ALWAYS
107  : (lvl < MSG::NIL) ? MSG::NIL
108  : lvl;
109  msg().setLevel(lvl);
110 }

◆ SetRegionAndSliceFromXML()

void TFCSEnergyAndHitGANV2::SetRegionAndSliceFromXML ( int  pid,
int  etaMax,
std::string  FastCaloGANInputFolderName 
)
protected

◆ simulate()

FCSReturnCode TFCSEnergyAndHitGANV2::simulate ( TFCSSimulationState simulstate,
const TFCSTruthState truth,
const TFCSExtrapolationState extrapol 
) const
overridevirtual

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 535 of file TFCSEnergyAndHitGANV2.cxx.

537  {
538  for (unsigned int ichain = 0; ichain < m_bin_start[0]; ++ichain) {
539  ATH_MSG_DEBUG("now run for all bins: " << chain()[ichain]->GetName());
540  if (simulate_and_retry(chain()[ichain], simulstate, truth, extrapol) !=
541  FCSSuccess) {
542  return FCSFatal;
543  }
544  }
545 
546  ATH_MSG_VERBOSE("Fill Energies");
547  if (!fillEnergy(simulstate, truth, extrapol)) {
548  ATH_MSG_WARNING("Could not fill energies ");
549  // bail out but do not stop the job
550  return FCSSuccess;
551  }
552 
553  return FCSSuccess;
554 }

◆ simulate_and_retry()

FCSReturnCode TFCSParametrizationChain::simulate_and_retry ( TFCSParametrizationBase parametrization,
TFCSSimulationState simulstate,
const TFCSTruthState truth,
const TFCSExtrapolationState extrapol 
) const
protectedinherited

◆ size()

virtual unsigned int TFCSParametrizationChain::size ( ) const
inlineoverridevirtualinherited

Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operator[] methods give general access to these daughters.

Reimplemented from TFCSParametrizationBase.

Definition at line 41 of file TFCSParametrizationChain.h.

41 { return m_chain.size(); };

◆ SplitChainObjects()

bool TFCSParametrizationChain::SplitChainObjects ( ) const
inlineinherited

Definition at line 32 of file TFCSParametrizationChain.h.

32 { return TestBit(kSplitChainObjects); };

◆ 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.

116  {
117  int col1_len = 20;
118  int col2_len = 5;
119  int col3_len = 10;
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);
127  const char *LevelNames[MSG::NUM_LEVELS] = {
128  "NIL", "VERBOSE", "DEBUG", "INFO", "WARNING", "ERROR", "FATAL", "ALWAYS"};
129  std::string level = LevelNames[lvl];
130  std::string level_string = std::string("(") + level + ") ";
131  std::stringstream output;
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;
135  return output.str();
136 }

◆ test_path()

void TFCSEnergyAndHitGANV2::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 
)
static

Definition at line 609 of file TFCSEnergyAndHitGANV2.cxx.

613  {
615  ATH_MSG_NOCLASS(logger, "Running test on " << path << std::endl);
616  if (!simulstate) {
617  simulstate = new TFCSSimulationState();
618 #if defined(__FastCaloSimStandAlone__)
619  simulstate->setRandomEngine(new CLHEP::TRandomEngine());
620 #else
621  simulstate->setRandomEngine(new CLHEP::RanluxEngine());
622 #endif
623  }
624  if (!truth) {
625  ATH_MSG_NOCLASS(logger, "New particle");
627  t->SetPtEtaPhiM(65536, 0, 0, 139.6);
628  t->set_pdgid(pid);
629  truth = t;
630  }
631  if (!extrapol) {
633  e->set_IDCaloBoundary_eta(truth->Eta());
634  for (int i = 0; i < 24; ++i) {
635  e->set_eta(i, TFCSExtrapolationState::SUBPOS_ENT, truth->Eta());
636  e->set_eta(i, TFCSExtrapolationState::SUBPOS_EXT, truth->Eta());
637  e->set_eta(i, TFCSExtrapolationState::SUBPOS_MID, truth->Eta());
638  e->set_phi(i, TFCSExtrapolationState::SUBPOS_ENT, 0);
639  e->set_phi(i, TFCSExtrapolationState::SUBPOS_EXT, 0);
640  e->set_phi(i, TFCSExtrapolationState::SUBPOS_MID, 0);
641  e->set_r(i, TFCSExtrapolationState::SUBPOS_ENT, 1500 + i * 10);
642  e->set_r(i, TFCSExtrapolationState::SUBPOS_EXT, 1510 + i * 10);
643  e->set_r(i, TFCSExtrapolationState::SUBPOS_MID, 1505 + i * 10);
644  e->set_z(i, TFCSExtrapolationState::SUBPOS_ENT, 3500 + i * 10);
645  e->set_z(i, TFCSExtrapolationState::SUBPOS_EXT, 3510 + i * 10);
646  e->set_z(i, TFCSExtrapolationState::SUBPOS_MID, 3505 + i * 10);
647  }
648  extrapol = e;
649  }
650 
651  TFCSEnergyAndHitGANV2 GAN("GAN", "GAN");
652  GAN.setLevel(MSG::INFO);
653  const int etaMin = 20;
654  const int etaMax = etaMin + 5;
655  ATH_MSG_NOCLASS(logger, "Initialize Networks");
656  GAN.initializeNetwork(pid, etaMin, path);
657  for (int i = 0; i < 24; ++i)
658  if (GAN.is_match_calosample(i)) {
660  Form("center%d", i), Form("center layer %d", i));
661  c->set_calosample(i);
662  c->setExtrapWeight(0.5);
663  c->setLevel(MSG::INFO);
664  c->set_pdgid(pid);
665  if (pid == 11)
666  c->add_pdgid(-pid);
667  if (pid == 211)
668  c->add_pdgid(-pid);
669  c->set_eta_min(etaMin / 100.0);
670  c->set_eta_max(etaMax / 100.0);
671  c->set_eta_nominal((etaMin + etaMax) / 200.0);
672 
673  GAN.push_back_in_bin(c, i);
674  GAN.set_nr_of_init(i, 1);
675  }
676 
677  GAN.Print();
678 
679  ATH_MSG_NOCLASS(logger, "Writing GAN to " << outputname);
680  const std::string outname = "FCSGANtest_" + outputname + ".root";
681  TFile *fGAN = TFile::Open(outname.c_str(), "recreate");
682  fGAN->cd();
683  // GAN.Write();
684  fGAN->WriteObjectAny(&GAN, "TFCSEnergyAndHitGANV2", "GAN");
685 
686  fGAN->ls();
687  fGAN->Close();
688 
689  ATH_MSG_NOCLASS(logger, "Open " << outname);
690  fGAN = TFile::Open(outname.c_str());
691  TFCSEnergyAndHitGANV2 *GAN2 = (TFCSEnergyAndHitGANV2 *)(fGAN->Get("GAN"));
692  GAN2->setLevel(MSG::INFO);
693  GAN2->Print();
694 
695  ATH_MSG_NOCLASS(logger, "Before running GAN2->simulate()");
696  GAN2->simulate(*simulstate, truth, extrapol);
697  simulstate->Print();
698 }

◆ unit_test()

void TFCSEnergyAndHitGANV2::unit_test ( TFCSSimulationState simulstate = nullptr,
const TFCSTruthState truth = nullptr,
const TFCSExtrapolationState extrapol = nullptr 
)
static

Definition at line 591 of file TFCSEnergyAndHitGANV2.cxx.

593  {
595  ATH_MSG_NOCLASS(logger, "Start lwtnn test" << std::endl);
596  std::string path =
597  "/eos/atlas/atlascerngroupdisk/proj-simul/AF3_Run3/"
598  "InputsToBigParamFiles/FastCaloGANWeightsVer02/";
599  test_path(path, simulstate, truth, extrapol, "lwtnn");
600 
601  ATH_MSG_NOCLASS(logger, "Start onnx test" << std::endl);
602  path =
603  "/eos/atlas/atlascerngroupdisk/proj-simul/AF3_Run3/"
604  "InputsToBigParamFiles/FastCaloGANWeightsONNXVer08/";
605  test_path(path, simulstate, truth, extrapol, "onnx");
606  ATH_MSG_NOCLASS(logger, "Finish all tests" << std::endl);
607 }

Member Data Documentation

◆ 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

Do not persistify!

Definition at line 155 of file TFCSParametrizationBase.h.

◆ init_Ekin_min

constexpr double TFCSParametrizationBase::init_Ekin_min = 0
staticconstexprprotectedinherited

Do not persistify!

Definition at line 154 of file TFCSParametrizationBase.h.

◆ init_Ekin_nominal

constexpr double TFCSParametrizationBase::init_Ekin_nominal = 0
staticconstexprprotectedinherited

Definition at line 153 of file TFCSParametrizationBase.h.

◆ init_eta_max

constexpr double TFCSParametrizationBase::init_eta_max = 100
staticconstexprprotectedinherited

Do not persistify!

Definition at line 158 of file TFCSParametrizationBase.h.

◆ init_eta_min

constexpr double TFCSParametrizationBase::init_eta_min = -100
staticconstexprprotectedinherited

Do not persistify!

Definition at line 157 of file TFCSParametrizationBase.h.

◆ init_eta_nominal

constexpr double TFCSParametrizationBase::init_eta_nominal = 0
staticconstexprprotectedinherited

Do not persistify!

Definition at line 156 of file TFCSParametrizationBase.h.

◆ m_bin_ninit

std::vector<int> TFCSEnergyAndHitGANV2::m_bin_ninit
private

Definition at line 102 of file TFCSEnergyAndHitGANV2.h.

◆ 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

Definition at line 99 of file TFCSParametrizationChain.h.

◆ m_Ekin_max

double TFCSParametrization::m_Ekin_max
privateinherited

Definition at line 64 of file TFCSParametrization.h.

◆ m_Ekin_min

double TFCSParametrization::m_Ekin_min
privateinherited

Definition at line 64 of file TFCSParametrization.h.

◆ m_Ekin_nominal

double TFCSParametrization::m_Ekin_nominal
privateinherited

Definition at line 64 of file TFCSParametrization.h.

◆ m_eta_max

double TFCSParametrization::m_eta_max
privateinherited

Definition at line 65 of file TFCSParametrization.h.

◆ m_eta_min

double TFCSParametrization::m_eta_min
privateinherited

Definition at line 65 of file TFCSParametrization.h.

◆ m_eta_nominal

double TFCSParametrization::m_eta_nominal
privateinherited

Definition at line 65 of file TFCSParametrization.h.

◆ m_nm

std::string ISF_FCS::MLogging::m_nm
privateinherited

Message source name.

Definition at line 211 of file MLogging.h.

◆ m_param

TFCSGANXMLParameters TFCSEnergyAndHitGANV2::m_param
private

Definition at line 110 of file TFCSEnergyAndHitGANV2.h.

◆ m_pdgid

std::set<int> TFCSParametrization::m_pdgid
privateinherited

Definition at line 63 of file TFCSParametrization.h.

◆ m_slice

TFCSGANEtaSlice* TFCSEnergyAndHitGANV2::m_slice = nullptr
private

Definition at line 109 of file TFCSEnergyAndHitGANV2.h.

◆ m_writtenBases

std::vector<std::unique_ptr<TFCSParametrizationBase> > TFCSParametrizationChain::m_writtenBases
privateinherited

Definition at line 102 of file TFCSParametrizationChain.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
TFCSParametrizationBase::set_daughter
virtual void set_daughter(unsigned int, TFCSParametrizationBase *)
Some derived classes have daughter instances of TFCSParametrizationBase objects The set_daughter meth...
Definition: TFCSParametrizationBase.h:113
TFCSGANXMLParameters::Print
void Print() const
Definition: TFCSGANXMLParameters.cxx:124
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
beamspotman.r
def r
Definition: beamspotman.py:676
TFCSParametrization::set_Ekin_nominal
virtual void set_Ekin_nominal(double min)
Definition: TFCSParametrization.cxx:39
TFCSParametrizationChain::recalc
virtual void recalc()
Default is to call recalc_pdgid_intersect() and recalc_Ekin_eta_intersect()
Definition: TFCSParametrizationChain.cxx:119
TFCSGANEtaSlice::LoadGAN
bool LoadGAN()
Definition: TFCSGANEtaSlice.cxx:71
TFCSParametrization::pdgid
const std::set< int > & pdgid() const override
Definition: TFCSParametrization.h:34
TFCSLateralShapeParametrizationHitBase::simulate_hit
virtual FCSReturnCode simulate_hit(Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol)
simulated one hit position with some energy.
Definition: TFCSLateralShapeParametrizationHitBase.cxx:50
ISF_FCS::MLogging
Cut down AthMessaging.
Definition: MLogging.h:176
TFCSSimulationState::getAuxInfo
const T getAuxInfo(std::uint32_t index) const
Definition: TFCSSimulationState.h:161
TFCSParametrizationBinnedChain::get_bin_text
virtual const std::string get_bin_text(int bin) const
print the range of a bin; for bin -1, print the allowed range
Definition: TFCSParametrizationBinnedChain.cxx:60
TFCSParametrizationBase::init_Ekin_max
static constexpr double init_Ekin_max
Do not persistify!
Definition: TFCSParametrizationBase.h:155
TFCSParametrizationBase::compare
bool compare(const TFCSParametrizationBase &ref) const
Do not persistify!
Definition: TFCSParametrizationBase.cxx:42
checkFileSG.line
line
Definition: checkFileSG.py:75
TFCSParametrizationBase::init_eta_nominal
static constexpr double init_eta_nominal
Do not persistify!
Definition: TFCSParametrizationBase.h:156
TFCSEnergyAndHitGANV2::set_GANfreemem
void set_GANfreemem()
Definition: TFCSEnergyAndHitGANV2.h:40
TFCSEnergyAndHitGANV2
Definition: TFCSEnergyAndHitGANV2.h:20
TFCSParametrizationChain::kSplitChainObjects
@ kSplitChainObjects
Set this bit in the TObject bit field if the TFCSParametrizationBase objects in the chain should be w...
Definition: TFCSParametrizationChain.h:21
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
max
#define max(a, b)
Definition: cfImp.cxx:41
TFCSParametrizationBase::init_Ekin_min
static constexpr double init_Ekin_min
Do not persistify!
Definition: TFCSParametrizationBase.h:154
IsA
#define IsA
Declare the TObject style functions.
Definition: xAODTEventBranch.h:59
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
TFCSParametrization::Ekin_max
double Ekin_max() const override
Definition: TFCSParametrization.h:37
TFCSParametrizationBase::is_match_all_pdgid
virtual bool is_match_all_pdgid() const
Definition: TFCSParametrizationBase.h:66
TFCSEnergyAndHitGANV2::get_Binning
const TFCSGANXMLParameters::Binning & get_Binning() const
Definition: TFCSEnergyAndHitGANV2.h:66
make_coralServer_rep.opt
opt
Definition: make_coralServer_rep.py:19
TFCSParametrizationBase::init_eta_min
static constexpr double init_eta_min
Do not persistify!
Definition: TFCSParametrizationBase.h:157
TFCSGANXMLParameters::InitialiseFromXML
void InitialiseFromXML(int pid, int etaMid, const std::string &FastCaloGANInputFolderName)
Definition: TFCSGANXMLParameters.cxx:16
TFCSParametrizationChain::recalc_eta_intersect
void recalc_eta_intersect()
Definition: TFCSParametrizationChain.cxx:61
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
index
Definition: index.py:1
ISF_FCS::MLogging::level
MSG::Level level() const
Retrieve output level.
Definition: MLogging.h:201
hist_file_dump.d
d
Definition: hist_file_dump.py:137
TFCSGANEtaSlice::NetworkOutputs
std::map< std::string, double > NetworkOutputs
Definition: TFCSGANEtaSlice.h:40
TFCSParametrization::add_pdgid
virtual void add_pdgid(int id)
Definition: TFCSParametrization.cxx:35
TFCSParametrizationChain::recalc_Ekin_union
void recalc_Ekin_union()
Definition: TFCSParametrizationChain.cxx:82
TFCSEnergyAndHitGANV2::GetBinsInFours
static int GetBinsInFours(double const &bins)
Definition: TFCSEnergyAndHitGANV2.cxx:700
TFCSParametrization::m_eta_nominal
double m_eta_nominal
Definition: TFCSParametrization.h:65
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
TFCSCenterPositionCalculation
Definition: TFCSCenterPositionCalculation.h:11
skel.it
it
Definition: skel.GENtoEVGEN.py:396
TFCSParametrizationBase::FindDuplicates
void FindDuplicates(FindDuplicateClasses_t &dup)
Definition: TFCSParametrizationBase.cxx:90
bin
Definition: BinsDiffFromStripMedian.h:43
TFCSParametrization::set_Ekin_max
virtual void set_Ekin_max(double max)
Definition: TFCSParametrization.cxx:45
xAOD::etaMax
etaMax
Definition: HIEventShape_v2.cxx:46
TFCSEnergyAndHitGANV2::kGANfreemem
@ kGANfreemem
Set this bit in the TObject bit if the memory for m_input should be freed after reading in athena.
Definition: TFCSEnergyAndHitGANV2.h:35
TFCSGANXMLParameters::Binning
std::map< int, TH2D > Binning
Definition: TFCSGANXMLParameters.h:23
TFCSExtrapolationState::SUBPOS_ENT
@ SUBPOS_ENT
Definition: TFCSExtrapolationState.h:21
TFCSParametrizationBase::init_eta_max
static constexpr double init_eta_max
Do not persistify!
Definition: TFCSParametrizationBase.h:158
TFCSEnergyAndHitGANV2::OnlyScaleEnergy
bool OnlyScaleEnergy() const
Definition: TFCSEnergyAndHitGANV2.h:50
TFCSParametrization::eta_nominal
double eta_nominal() const override
Definition: TFCSParametrization.h:38
TFCSParametrization::m_eta_max
double m_eta_max
Definition: TFCSParametrization.h:65
TFCSExtrapolationState
Definition: TFCSExtrapolationState.h:13
TFCSSimulationState::randomEngine
CLHEP::HepRandomEngine * randomEngine()
Definition: TFCSSimulationState.h:36
TFCSLateralShapeParametrizationHitBase::Hit
Definition: TFCSLateralShapeParametrizationHitBase.h:42
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
TFCSExtrapolationState::SUBPOS_MID
@ SUBPOS_MID
Definition: TFCSExtrapolationState.h:20
RunActsMaterialValidation.extrapol
extrapol
Definition: RunActsMaterialValidation.py:90
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
TFCSTruthState::Print
void Print(Option_t *option="") const
Definition: TFCSTruthState.cxx:21
TFCSParametrization::set_Ekin
virtual void set_Ekin(const TFCSParametrizationBase &ref)
Definition: TFCSParametrization.cxx:55
Phi_mpi_pi
__HOSTDEV__ double Phi_mpi_pi(double)
Definition: GeoRegion.cxx:7
x
#define x
TFCSExtrapolationState::SUBPOS_EXT
@ SUBPOS_EXT
Definition: TFCSExtrapolationState.h:22
TFCSParametrization::set_eta
virtual void set_eta(const TFCSParametrizationBase &ref)
Definition: TFCSParametrization.cxx:61
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
TFCSParametrizationChain::recalc_eta_union
void recalc_eta_union()
Definition: TFCSParametrizationChain.cxx:98
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
TFCSParametrization::set_eta_max
virtual void set_eta_max(double max)
Definition: TFCSParametrization.cxx:53
TFCSLateralShapeParametrizationHitBase
Definition: TFCSLateralShapeParametrizationHitBase.h:13
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
TFCSParametrization::set_pdgid
virtual void set_pdgid(int id)
Definition: TFCSParametrization.cxx:28
TFCSParametrization::set_Ekin_eta
virtual void set_Ekin_eta(const TFCSParametrizationBase &ref)
Definition: TFCSParametrization.cxx:67
TFCSParametrizationBase
Definition: TFCSParametrizationBase.h:46
TFCSParametrizationBinnedChain::get_number_of_bins
virtual unsigned int get_number_of_bins() const
Definition: TFCSParametrizationBinnedChain.h:22
TFCSSimulationState::add_E
void add_E(int sample, double Esample)
Definition: TFCSSimulationState.h:53
set_union
Set * set_union(Set *set1, Set *set2)
Perform a union of two sets.
CaloCell_ID_FCS::MaxSample
@ MaxSample
Definition: FastCaloSim_CaloCell_ID.h:47
ISF_FCS::MLogging::msg
MsgStream & msg() const
Return a stream for sending messages directly (no decoration)
Definition: MLogging.h:231
TFCSParametrization::set_Ekin_min
virtual void set_Ekin_min(double min)
Definition: TFCSParametrization.cxx:43
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TrigConf::MSGTC::ALWAYS
@ ALWAYS
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:29
lumiFormat.i
int i
Definition: lumiFormat.py:85
TFCSParametrizationChain::chain
const Chain_t & chain() const
Definition: TFCSParametrizationChain.h:53
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
angle
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Definition: TRTDetectorFactory_Full.cxx:73
TFCSTruthState::Ekin
double Ekin() const
Definition: TFCSTruthState.h:26
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
TFCSParametrizationBase::FindDuplicateClasses_t
std::map< std::string, FindDuplicates_t > FindDuplicateClasses_t
Definition: TFCSParametrizationBase.h:142
covarianceTool.title
title
Definition: covarianceTool.py:542
ISF_FCS::MLogging::m_nm
std::string m_nm
Message source name.
Definition: MLogging.h:211
TFCSEnergyAndHitGANV2::m_slice
TFCSGANEtaSlice * m_slice
Definition: TFCSEnergyAndHitGANV2.h:109
TFCSParametrizationChain::recalc_pdgid_intersect
void recalc_pdgid_intersect()
Definition: TFCSParametrizationChain.cxx:20
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
file
TFile * file
Definition: tile_monitor.h:29
TFCSParametrizationChain::recalc_Ekin_intersect
void recalc_Ekin_intersect()
Definition: TFCSParametrizationChain.cxx:45
TFCSGANEtaSlice::Print
void Print() const
Definition: TFCSGANEtaSlice.cxx:258
TFCSParametrization::m_Ekin_min
double m_Ekin_min
Definition: TFCSParametrization.h:64
jobOptions.ParticleID
ParticleID
Definition: jobOptions.decayer.py:85
TFCSParametrization::Ekin_min
double Ekin_min() const override
Definition: TFCSParametrization.h:36
TFCSGANEtaSlice
Definition: TFCSGANEtaSlice.h:30
TFCSParametrization::m_eta_min
double m_eta_min
Definition: TFCSParametrization.h:65
TFCSEnergyAndHitGANV2::GetAlphaBinsForRBin
int GetAlphaBinsForRBin(const TAxis *x, int ix, int yBinNum) const
Definition: TFCSEnergyAndHitGANV2.cxx:711
TFCSParametrizationBase::Print
void Print(Option_t *option="") const
Print object information.
Definition: TFCSParametrizationBase.cxx:52
TFCSGANEtaSlice::FitResultsPerLayer
std::map< int, std::vector< double > > FitResultsPerLayer
Definition: TFCSGANEtaSlice.h:37
plotting.yearwise_luminosity_vs_mu.bins
bins
Definition: yearwise_luminosity_vs_mu.py:30
TFCSParametrizationBase::FindDuplicates_t
std::map< TFCSParametrizationBase *, Duplicate_t > FindDuplicates_t
Definition: TFCSParametrizationBase.h:141
TFCSSimulationState::Print
void Print(Option_t *option="") const
Definition: TFCSSimulationState.cxx:40
FCSFatal
@ FCSFatal
Definition: TFCSParametrizationBase.h:41
TFCSGANEtaSlice::IsGanCorrectlyLoaded
bool IsGanCorrectlyLoaded() const
Definition: TFCSGANEtaSlice.cxx:58
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
FCSSuccess
@ FCSSuccess
Definition: TFCSParametrizationBase.h:41
TFCSParametrization::eta_max
double eta_max() const override
Definition: TFCSParametrization.h:40
TFCSGANEtaSlice::GetFitResults
const FitResultsPerLayer & GetFitResults() const
Definition: TFCSGANEtaSlice.h:51
python.CreateTierZeroArgdict.outputs
outputs
Definition: CreateTierZeroArgdict.py:189
TFCSParametrizationBase::RemoveNameTitle
void RemoveNameTitle()
Definition: TFCSParametrizationBase.cxx:200
min
#define min(a, b)
Definition: cfImp.cxx:40
merge.output
output
Definition: merge.py:17
beamspotman.outname
outname
Definition: beamspotman.py:414
TFCSParametrization::m_Ekin_nominal
double m_Ekin_nominal
Definition: TFCSParametrization.h:64
TrigConf::MSGTC::NUM_LEVELS
@ NUM_LEVELS
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:30
TFCSParametrizationBase::reset_match_all_pdgid
virtual void reset_match_all_pdgid()
Definition: TFCSParametrizationBase.h:84
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TFCSParametrization::eta_min
double eta_min() const override
Definition: TFCSParametrization.h:39
TFCSParametrization::m_pdgid
std::set< int > m_pdgid
Definition: TFCSParametrization.h:63
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
TFCSParametrization::set_eta_nominal
virtual void set_eta_nominal(double min)
Definition: TFCSParametrization.cxx:47
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
ISF_FCS::MLogging::setLevel
virtual void setLevel(MSG::Level lvl)
Update outputlevel.
Definition: MLogging.cxx:105
TFCSSimulationState::setAuxInfo
void setAuxInfo(std::uint32_t index, const T &val)
Definition: TFCSSimulationState.h:168
plotBeamSpotVxVal.bin
int bin
Definition: plotBeamSpotVxVal.py:83
TFCSSimulationState::set_E
void set_E(int sample, double Esample)
Definition: TFCSSimulationState.h:48
charge
double charge(const T &p)
Definition: AtlasPID.h:538
TFCSParametrization::clear
void clear()
Definition: TFCSParametrization.cxx:18
TFCSTruthState::pdgid
int pdgid() const
Definition: TFCSTruthState.h:25
TFCSGANXMLParameters::GetGANVersion
int GetGANVersion() const
Definition: TFCSGANXMLParameters.h:35
TFCSGANEtaSlice::GetExtrapolatorWeights
const ExtrapolatorWeights & GetExtrapolatorWeights()
Definition: TFCSGANEtaSlice.h:52
TFCSParametrizationBase::init_Ekin_nominal
static constexpr double init_Ekin_nominal
Definition: TFCSParametrizationBase.h:153
TFCSEnergyAndHitGANV2::simulate
virtual FCSReturnCode simulate(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const override
Method in all derived classes to do some simulation.
Definition: TFCSEnergyAndHitGANV2.cxx:535
TFCSGANEtaSlice::GetNetworkOutputs
NetworkOutputs GetNetworkOutputs(const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol, TFCSSimulationState simulstate) const
Definition: TFCSGANEtaSlice.cxx:174
TFCSSimulationState::setRandomEngine
void setRandomEngine(CLHEP::HepRandomEngine *engine)
Definition: TFCSSimulationState.h:37
TFCSEnergyAndHitGANV2::m_bin_ninit
std::vector< int > m_bin_ninit
Definition: TFCSEnergyAndHitGANV2.h:102
ir
int ir
counter of the current depth
Definition: fastadd.cxx:49
DeMoScan.index
string index
Definition: DeMoScan.py:364
a
TList * a
Definition: liststreamerinfos.cxx:10
LArCellBinning.etaMin
etaMin
Definition: LArCellBinning.py:84
TFCSEnergyAndHitGANV2::m_param
TFCSGANXMLParameters m_param
Definition: TFCSEnergyAndHitGANV2.h:110
ATH_MSG_NOCLASS
#define ATH_MSG_NOCLASS(logger_name, x)
Definition: MLogging.h:52
y
#define y
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ref
const boost::regex ref(r_ef)
TFCSEnergyAndHitGANV2::get_bin
virtual int get_bin(TFCSSimulationState &simulstate, const TFCSTruthState *, const TFCSExtrapolationState *) const override
use the layer to be done as binning of the GAN chain
Definition: TFCSEnergyAndHitGANV2.h:55
LArCellConditions.geo
bool geo
Definition: LArCellConditions.py:46
eFEXNTuple.delta_phi
def delta_phi(phi1, phi2)
Definition: eFEXNTuple.py:15
DEBUG
#define DEBUG
Definition: page_access.h:11
TFCSParametrizationChain::simulate_and_retry
FCSReturnCode simulate_and_retry(TFCSParametrizationBase *parametrization, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TFCSParametrizationChain::m_chain
Chain_t m_chain
Definition: TFCSParametrizationChain.h:99
TFCSParametrization::Ekin_nominal
double Ekin_nominal() const override
Definition: TFCSParametrization.h:35
TFCSParametrizationChain::recalc_Ekin_eta_intersect
void recalc_Ekin_eta_intersect()
Definition: TFCSParametrizationChain.cxx:77
TFCSEnergyAndHitGANV2::kOnlyScaleEnergy
@ kOnlyScaleEnergy
Set this bit in the TObject bit field the simulated energy should only be scaled by the GAN.
Definition: TFCSEnergyAndHitGANV2.h:45
TFCSParametrization::set_eta_min
virtual void set_eta_min(double min)
Definition: TFCSParametrization.cxx:51
TFCSSimulationState::E
double E() const
Definition: TFCSSimulationState.h:42
TFCSParametrization::m_Ekin_max
double m_Ekin_max
Definition: TFCSParametrization.h:64
TFCSEnergyAndHitGANV2::fillEnergy
bool fillEnergy(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
Definition: TFCSEnergyAndHitGANV2.cxx:112
TrigConf::MSGTC::NIL
@ NIL
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:22
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
TFCSParametrizationBase::kMatchAllPDGID
@ kMatchAllPDGID
Set this bit in the TObject bit field if valid for all PDGID.
Definition: TFCSParametrizationBase.h:53
TFCSEnergyAndHitGANV2::get_nr_of_init
unsigned int get_nr_of_init(unsigned int bin) const
Definition: TFCSEnergyAndHitGANV2.cxx:54
set_intersection
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
TFCSParametrizationBinnedChain::TFCSParametrizationBinnedChain
TFCSParametrizationBinnedChain(const char *name=nullptr, const char *title=nullptr)
Definition: TFCSParametrizationBinnedChain.h:12
TFCSTruthState
Definition: TFCSTruthState.h:13
python.compressB64.c
def c
Definition: compressB64.py:93
TFCSParametrizationBase::size
virtual unsigned int size() const
Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operat...
Definition: TFCSParametrizationBase.h:93
TFCSEnergyAndHitGANV2::test_path
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)
Definition: TFCSEnergyAndHitGANV2.cxx:609
TFCSEnergyAndHitGANV2::Print
virtual void Print(Option_t *option="") const override
Definition: TFCSEnergyAndHitGANV2.cxx:556
TFCSSimulationState
Definition: TFCSSimulationState.h:32
TFCSParametrizationChain::kRetryChainFromStart
@ kRetryChainFromStart
Definition: TFCSParametrizationChain.h:29
TFCSGANXMLParameters::IsSymmetrisedAlpha
bool IsSymmetrisedAlpha() const
Definition: TFCSGANXMLParameters.h:36
python.iconfTool.gui.pad.logger
logger
Definition: pad.py:14
checkFileSG.ind
list ind
Definition: checkFileSG.py:118
ISF_FCS::MLogging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Check whether the logging system is active at the provided verbosity level.
Definition: MLogging.h:222
TFCSParametrizationBinnedChain::m_bin_start
std::vector< unsigned int > m_bin_start
Contains the index where the TFCSParametrizationBase* instances to run for a given bin start.
Definition: TFCSParametrizationBinnedChain.h:53
TFCSGANXMLParameters::GetBinning
const Binning & GetBinning() const
Definition: TFCSGANXMLParameters.h:33
TFCSSimulationState::set_Efrac
void set_Efrac(int sample, double Efracsample)
Definition: TFCSSimulationState.h:49
TFCSEnergyAndHitGANV2::get_variable_text
virtual const std::string get_variable_text(TFCSSimulationState &simulstate, const TFCSTruthState *, const TFCSExtrapolationState *) const override
Definition: TFCSEnergyAndHitGANV2.cxx:105
TFCSParametrizationChain::size
virtual unsigned int size() const override
Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operat...
Definition: TFCSParametrizationChain.h:41