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

#include <TFCSPCAEnergyParametrization.h>

Inheritance diagram for TFCSPCAEnergyParametrization:
Collaboration diagram for TFCSPCAEnergyParametrization:

Public Types

enum  FCSReturnCodePCA { FCSRetryPCA = FCSRetry + 20 }
 
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

 TFCSPCAEnergyParametrization (const char *name=nullptr, const char *title=nullptr)
 
virtual FCSReturnCode simulate (TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const override
 Method in all derived classes to do some simulation. More...
 
int n_pcabins () const
 
virtual int n_bins () const override
 
const std::vector< int > & get_layers () const
 
virtual bool is_match_Ekin_bin (int Ekin_bin) 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 loadInputs (TFile *file)
 
bool loadInputs (TFile *file, const std::string &)
 
void clean ()
 
void Print (Option_t *option="") const override
 
float get_total_energy_normalization () const
 
void set_total_energy_normalization (float norm)
 
void set_totalE_probability_ratio (int Ekin_bin, TH1 *hist)
 
TH1 * get_totalE_probability_ratio (int Ekin_bin) const
 
void clear ()
 
virtual bool is_match_pdgid (int id) const override
 
virtual bool is_match_Ekin (float Ekin) const override
 
virtual bool is_match_eta (float eta) const override
 
virtual bool is_match_all_Ekin () const override
 
virtual bool is_match_all_eta () const override
 
const std::set< int > & pdgid () const override
 
double Ekin_nominal () const override
 
double Ekin_min () const override
 
double Ekin_max () const override
 
double eta_nominal () const override
 
double eta_min () const override
 
double eta_max () const override
 
virtual void set_pdgid (int id)
 
virtual void set_pdgid (const std::set< int > &ids)
 
virtual void add_pdgid (int id)
 
virtual void clear_pdgid ()
 
virtual void set_Ekin_nominal (double min)
 
virtual void set_Ekin_min (double min)
 
virtual void set_Ekin_max (double max)
 
virtual void set_eta_nominal (double min)
 
virtual void set_eta_min (double min)
 
virtual void set_eta_max (double max)
 
virtual void set_Ekin (const TFCSParametrizationBase &ref)
 
virtual void set_eta (const TFCSParametrizationBase &ref)
 
virtual void set_Ekin_eta (const TFCSParametrizationBase &ref)
 
virtual void set_pdgid_Ekin_eta (const TFCSParametrizationBase &ref)
 
virtual bool is_match_all_pdgid () const
 
virtual void set_match_all_pdgid ()
 
virtual void reset_match_all_pdgid ()
 
virtual void set_geometry (ICaloGeometry *geo)
 Method to set the geometry access pointer. More...
 
virtual unsigned int size () const
 Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operator[] methods give general access to these daughters. More...
 
virtual const TFCSParametrizationBaseoperator[] (unsigned int) const
 Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operator[] methods give general access to these daughters. More...
 
virtual TFCSParametrizationBaseoperator[] (unsigned int)
 Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operator[] methods give general access to these daughters. More...
 
virtual void set_daughter (unsigned int, TFCSParametrizationBase *)
 Some derived classes have daughter instances of TFCSParametrizationBase objects The set_daughter method allows to change these daughters - expert use only! The original element at this position is not deleted. More...
 
virtual 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 P2X (TVectorD *, TVectorD *, TMatrixD *, int, const double *, double *, int)
 
static std::string startMsg (MSG::Level lvl, const std::string &file, int line)
 Make a message to decorate the start of logging. More...
 

Public Attributes

int do_rescale
 

Protected Member Functions

bool compare (const TFCSParametrizationBase &ref) const
 

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 Attributes

std::vector< int > m_RelevantLayers
 
std::vector< TMatrixD * > m_EV
 
std::vector< TVectorD * > m_MeanValues
 
std::vector< TVectorD * > m_SigmaValues
 
std::vector< TVectorD * > m_Gauss_means
 
std::vector< TVectorD * > m_Gauss_rms
 
std::vector< std::vector< TFCS1DFunction * > > m_cumulative
 
std::vector< TH1 * > m_totalE_probability_ratio
 
int m_numberpcabins
 
float m_total_energy_normalization {1}
 
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 18 of file TFCSPCAEnergyParametrization.h.

Member Typedef Documentation

◆ 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

◆ FCSReturnCodePCA

Enumerator
FCSRetryPCA 

Definition at line 20 of file TFCSPCAEnergyParametrization.h.

20  {
21  // Assuming an extrem h_totalE_ratio histogram that would cause a retry in
22  // 50% of the cases,
23  // returning FCSRetry+20 will cause an accidental WARNING for every
24  // 2^10=1024 simulated particles and
25  // an accidental FATAL for every 2^20, which should be safe even for largest
26  // scale productions
27  FCSRetryPCA = FCSRetry + 20
28  };

◆ 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

◆ TFCSPCAEnergyParametrization()

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

Definition at line 27 of file TFCSPCAEnergyParametrization.cxx.

30  m_numberpcabins = 1;
31  do_rescale = 1;
32 }

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); }

◆ clean()

void TFCSPCAEnergyParametrization::clean ( )

Definition at line 368 of file TFCSPCAEnergyParametrization.cxx.

368  {
369  for (unsigned int i = 0; i < m_EV.size(); i++)
370  delete m_EV[i];
371 }

◆ 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; };

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

◆ get_layers()

const std::vector<int>& TFCSPCAEnergyParametrization::get_layers ( ) const
inline

Definition at line 39 of file TFCSPCAEnergyParametrization.h.

39 { return m_RelevantLayers; };

◆ get_total_energy_normalization()

float TFCSPCAEnergyParametrization::get_total_energy_normalization ( ) const
inline

Definition at line 55 of file TFCSPCAEnergyParametrization.h.

55  {
57  };

◆ get_totalE_probability_ratio()

TH1 * TFCSPCAEnergyParametrization::get_totalE_probability_ratio ( int  Ekin_bin) const

Definition at line 111 of file TFCSPCAEnergyParametrization.cxx.

112  {
113  if (Ekin_bin < 1)
114  return nullptr;
115  if (Ekin_bin - 1 >= (int)m_totalE_probability_ratio.size())
116  return nullptr;
117  return m_totalE_probability_ratio[Ekin_bin - 1];
118 }

◆ is_match_all_calosample()

virtual bool TFCSPCAEnergyParametrization::is_match_all_calosample ( ) const
inlineoverridevirtual

Reimplemented from TFCSParametrization.

Definition at line 44 of file TFCSPCAEnergyParametrization.h.

44 { 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 TFCSPCAEnergyParametrization::is_match_all_Ekin_bin ( ) const
inlineoverridevirtual

Reimplemented from TFCSParametrization.

Definition at line 43 of file TFCSPCAEnergyParametrization.h.

43 { 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 TFCSPCAEnergyParametrization::is_match_calosample ( int  calosample) const
overridevirtual

Reimplemented from TFCSEnergyParametrization.

Definition at line 40 of file TFCSPCAEnergyParametrization.cxx.

40  {
41  for (unsigned int i = 0; i < m_RelevantLayers.size(); i++) {
42  if (m_RelevantLayers[i] == calosample)
43  return true;
44  }
45  return false;
46 }

◆ 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()

bool TFCSPCAEnergyParametrization::is_match_Ekin_bin ( int  Ekin_bin) const
overridevirtual

Reimplemented from TFCSEnergyParametrization.

Definition at line 34 of file TFCSPCAEnergyParametrization.cxx.

34  {
35  if (Ekin_bin >= 1 && Ekin_bin <= n_bins())
36  return true;
37  return false;
38 }

◆ 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(); }

◆ loadInputs() [1/2]

bool TFCSPCAEnergyParametrization::loadInputs ( TFile *  file)

Definition at line 250 of file TFCSPCAEnergyParametrization.cxx.

250  {
251  return loadInputs(file, "");
252 }

◆ loadInputs() [2/2]

bool TFCSPCAEnergyParametrization::loadInputs ( TFile *  file,
const std::string &  folder 
)

Definition at line 254 of file TFCSPCAEnergyParametrization.cxx.

255  {
256 
257  bool load_ok = 1;
258 
259  int trynext = 1;
260  TString x;
261  if (folder.empty())
262  x = "bin";
263  else
264  x = folder + "/bin";
265  while (trynext) {
266  IntArray *test = (IntArray *)file->Get(
267  x + Form("%i/pca/RelevantLayers", m_numberpcabins));
268  if (test) {
269  m_numberpcabins++;
270  delete test;
271  } else
272  trynext = 0;
273  }
274  m_numberpcabins -= 1;
275 
276  file->cd(x + "1/pca");
277  IntArray *RelevantLayers = (IntArray *)gDirectory->Get("RelevantLayers");
278  if (RelevantLayers == nullptr) {
279  ATH_MSG_ERROR("TFCSPCAEnergyParametrization::m_RelevantLayers in first "
280  "pcabin is null!");
281  load_ok = false;
282  }
283 
284  if (!load_ok)
285  return false;
286 
287  m_RelevantLayers.reserve(RelevantLayers->GetSize());
288  for (int i = 0; i < RelevantLayers->GetSize(); i++)
289  m_RelevantLayers.push_back(RelevantLayers->GetAt(i));
290 
291  for (int bin = 1; bin <= m_numberpcabins; bin++) {
292 
293  file->cd(x + Form("%i/pca", bin));
294 
295  TMatrixDSym *symCov = (TMatrixDSym *)gDirectory->Get("symCov");
296  TVectorD *MeanValues = (TVectorD *)gDirectory->Get("MeanValues");
297  TVectorD *SigmaValues = (TVectorD *)gDirectory->Get("SigmaValues");
298  TVectorD *Gauss_means = (TVectorD *)gDirectory->Get("Gauss_means");
299  TVectorD *Gauss_rms = (TVectorD *)gDirectory->Get("Gauss_rms");
300 
301  if (symCov == nullptr) {
302  ATH_MSG_WARNING("TFCSPCAEnergyParametrization::symCov in pcabin "
303  << bin << " is null!");
304  load_ok = false;
305  }
306  if (MeanValues == nullptr) {
307  ATH_MSG_WARNING("TFCSPCAEnergyParametrization::MeanValues in pcabin "
308  << bin << " is null!");
309  load_ok = false;
310  }
311  if (SigmaValues == nullptr) {
312  ATH_MSG_WARNING("TFCSPCAEnergyParametrization::SigmaValues in pcabin "
313  << bin << " is null!");
314  load_ok = false;
315  }
316  if (Gauss_means == nullptr) {
317  ATH_MSG_WARNING("TFCSPCAEnergyParametrization::Gauss_means in pcabin "
318  << bin << " is null!");
319  load_ok = false;
320  }
321  if (Gauss_rms == nullptr) {
322  ATH_MSG_WARNING("TFCSPCAEnergyParametrization::Gause_rms in pcabin "
323  << bin << " is null!");
324  load_ok = false;
325  }
326 
327  if (!load_ok)
328  return false;
329 
330  TMatrixDSymEigen cov_eigen(*symCov);
331  TMatrixD *EV = new TMatrixD(cov_eigen.GetEigenVectors());
332  m_EV.push_back(EV);
333  m_MeanValues.push_back(MeanValues);
334  m_SigmaValues.push_back(SigmaValues);
335  m_Gauss_means.push_back(Gauss_means);
336  m_Gauss_rms.push_back(Gauss_rms);
337 
338  std::vector<std::string> layer;
339  const std::vector<int> &layerNr = m_RelevantLayers;
340 
341  for (unsigned int i = 0; i < layerNr.size(); i++) {
342  layer.emplace_back(Form("layer%i", layerNr[i]));
343  }
344  layer.emplace_back("totalE");
345 
346  std::vector<TFCS1DFunction *> cumulative;
347  cumulative.reserve(layer.size());
348 
349  for (unsigned int l = 0; l < layer.size(); l++) {
350  file->cd(Form("%s/bin%i/%s", folder.c_str(), bin, layer[l].c_str()));
351 
353  fct = (TFCS1DFunction *)gDirectory->Get("TFCS1DFunctionRegression");
354  if (!fct)
355  fct = (TFCS1DFunction *)gDirectory->Get("TFCS1DFunctionRegressionTF");
356  if (!fct)
357  fct = (TFCS1DFunction *)gDirectory->Get("TFCS1DFunctionHistogram");
358  cumulative.push_back(fct);
359  }
360 
361  m_cumulative.emplace_back(std::move(cumulative));
362  }
363  m_totalE_probability_ratio.resize(m_numberpcabins - 1, nullptr);
364 
365  return true;
366 }

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

◆ n_bins()

virtual int TFCSPCAEnergyParametrization::n_bins ( ) const
inlineoverridevirtual

Reimplemented from TFCSEnergyParametrization.

Definition at line 38 of file TFCSPCAEnergyParametrization.h.

38 { return m_numberpcabins; };

◆ n_pcabins()

int TFCSPCAEnergyParametrization::n_pcabins ( ) const
inline

Definition at line 37 of file TFCSPCAEnergyParametrization.h.

37 { return m_numberpcabins; };

◆ 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 TFCSParametrizationBase* TFCSParametrizationBase::operator[] ( unsigned int  )
inlinevirtualinherited

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

Reimplemented in TFCSLateralShapeParametrizationHitChain, and TFCSParametrizationChain.

Definition at line 106 of file TFCSParametrizationBase.h.

106  {
107  return nullptr;
108  };

◆ operator[]() [2/2]

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

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

Reimplemented in TFCSLateralShapeParametrizationHitChain, and TFCSParametrizationChain.

Definition at line 99 of file TFCSParametrizationBase.h.

99  {
100  return nullptr;
101  };

◆ P2X()

void TFCSPCAEnergyParametrization::P2X ( TVectorD *  ,
TVectorD *  ,
TMatrixD *  ,
int  ,
const double *  ,
double *  ,
int   
)
static

Definition at line 232 of file TFCSPCAEnergyParametrization.cxx.

235  {
236 
237  const double *gSigmaValues = SigmaValues->GetMatrixArray();
238  const double *gMeanValues = MeanValues->GetMatrixArray();
239  const double *gEigenVectors = EV->GetMatrixArray();
240 
241  for (int i = 0; i < gNVariables; i++) {
242  x[i] = gMeanValues[i];
243  for (int j = 0; j < nTest; j++) {
244  x[i] +=
245  p[j] * gSigmaValues[i] * (double)(gEigenVectors[i * gNVariables + j]);
246  }
247  }
248 }

◆ 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 TFCSPCAEnergyParametrization::Print ( Option_t *  option = "") const
override

Definition at line 48 of file TFCSPCAEnergyParametrization.cxx.

48  {
49  TString opt(option);
50  bool shortprint = opt.Index("short") >= 0;
51  bool longprint = msgLvl(MSG::DEBUG) || (msgLvl(MSG::INFO) && !shortprint);
52  TString optprint = opt;
53  optprint.ReplaceAll("short", "");
55 
56  if (longprint) {
57  ATH_MSG(INFO) << optprint << " #bins=" << m_numberpcabins
58  << ", Enorm=" << m_total_energy_normalization << ", layers=";
59  for (unsigned int i = 0; i < m_RelevantLayers.size(); i++) {
60  if (i > 0)
61  ATH_MSG(INFO) << ", ";
63  }
64  ATH_MSG(INFO) << END_MSG(INFO);
65  }
66 }

◆ 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_match_all_pdgid()

virtual void TFCSParametrizationBase::reset_match_all_pdgid ( )
inlinevirtualinherited

Definition at line 84 of file TFCSParametrizationBase.h.

84 { ResetBit(kMatchAllPDGID); };

◆ set_daughter()

virtual void TFCSParametrizationBase::set_daughter ( unsigned int  ,
TFCSParametrizationBase  
)
inlinevirtualinherited

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 in TFCSParametrizationChain, and TFCSLateralShapeParametrizationHitChain.

Definition at line 113 of file TFCSParametrizationBase.h.

114  {};

◆ 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_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_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_total_energy_normalization()

void TFCSPCAEnergyParametrization::set_total_energy_normalization ( float  norm)
inline

Definition at line 58 of file TFCSPCAEnergyParametrization.h.

58  {
60  };

◆ set_totalE_probability_ratio()

void TFCSPCAEnergyParametrization::set_totalE_probability_ratio ( int  Ekin_bin,
TH1 *  hist 
)

Definition at line 102 of file TFCSPCAEnergyParametrization.cxx.

103  {
104  if (Ekin_bin < 1)
105  return;
106  if (Ekin_bin - 1 >= (int)m_totalE_probability_ratio.size())
107  return;
108  m_totalE_probability_ratio[Ekin_bin - 1] = hist;
109 }

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

◆ simulate()

FCSReturnCode TFCSPCAEnergyParametrization::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 TFCSParametrizationBase.

Definition at line 120 of file TFCSPCAEnergyParametrization.cxx.

122  {
123 
124  if (!simulstate.randomEngine()) {
125  return FCSFatal;
126  }
127 
128  int pcabin = simulstate.Ebin();
129 
130  if (pcabin == 0) {
131  simulstate.set_E(0);
132  for (int s = 0; s < CaloCell_ID_FCS::MaxSample; s++) {
133  simulstate.set_E(s, 0.0);
134  simulstate.set_Efrac(s, 0.0);
135  }
136  } else {
137 
138  TMatrixD *EV = m_EV[pcabin - 1];
139  TVectorD *MeanValues = m_MeanValues[pcabin - 1];
140  TVectorD *SigmaValues = m_SigmaValues[pcabin - 1];
141  TVectorD *Gauss_means = m_Gauss_means[pcabin - 1];
142  TVectorD *Gauss_rms = m_Gauss_rms[pcabin - 1];
143  std::vector<TFCS1DFunction *> cumulative = m_cumulative[pcabin - 1];
144 
145  const std::vector<int> &layerNr = m_RelevantLayers;
146 
147  double *vals_gauss_means = (double *)Gauss_means->GetMatrixArray();
148  double *vals_gauss_rms = Gauss_rms->GetMatrixArray();
149 
150  double *output_data = new double[layerNr.size() + 1];
151  double *input_data = new double[layerNr.size() + 1];
152 
153  for (unsigned int l = 0; l <= layerNr.size(); l++) {
154  double mean = vals_gauss_means[l];
155  double rms = vals_gauss_rms[l];
156  double gauszz =
157  CLHEP::RandGaussZiggurat::shoot(simulstate.randomEngine(), mean, rms);
158  input_data[l] = gauszz;
159  }
160 
161  P2X(SigmaValues, MeanValues, EV, layerNr.size() + 1, input_data,
162  output_data, layerNr.size() + 1);
163 
164  double *simdata = new double[layerNr.size() + 1];
165  double sum_fraction = 0.0;
166  for (unsigned int l = 0; l <= layerNr.size(); l++) {
167  double simdata_uniform =
168  (TMath::Erf(output_data[l] / 1.414213562) + 1) / 2.f;
169 
170  simdata[l] = cumulative[l]->rnd_to_fct(simdata_uniform);
171 
172  if (l != layerNr.size()) // sum up the fractions, but not the totalE
173  sum_fraction += simdata[l];
174  }
175 
176  double scalefactor = 1.0 / sum_fraction;
177  if (!do_rescale)
178  scalefactor = 1.0;
179 
180  // Using signed int for better loop optimization and vectorization where
181  // possible
182  int layerNrsize = static_cast<int>(layerNr.size());
183  for (int l = 0; l < layerNrsize; l++) {
184  simdata[l] *= scalefactor;
185  }
186 
187  // Apply hit-and-miss reweighting of total energy response
188  // This needs to run before simulstate is modified, otherwise a clean retry
189  // is not possible
190  TH1 *h_totalE_ratio = get_totalE_probability_ratio(pcabin);
191  if (h_totalE_ratio) {
192  float pass_probability = 0;
193  float Etot = simdata[layerNr.size()];
194  if (Etot > h_totalE_ratio->GetXaxis()->GetXmin() &&
195  Etot < h_totalE_ratio->GetXaxis()->GetXmax()) {
196  pass_probability = interpolate_get_y(h_totalE_ratio, Etot);
197  }
198  float random = CLHEP::RandFlat::shoot(simulstate.randomEngine());
199  if (random > pass_probability) {
200  delete[] output_data;
201  delete[] input_data;
202  delete[] simdata;
203 
204  return (FCSReturnCode)FCSRetryPCA;
205  }
206  }
207 
208  double total_energy =
209  simdata[layerNr.size()] * simulstate.E() / m_total_energy_normalization;
210  simulstate.set_E(total_energy);
211  ATH_MSG_DEBUG("set E to total_energy=" << total_energy);
212 
213  for (int s = 0; s < CaloCell_ID_FCS::MaxSample; s++) {
214  double energyfrac = 0.0;
215  for (unsigned int l = 0; l < layerNr.size(); l++) {
216  if (layerNr[l] == s)
217  energyfrac = simdata[l];
218  }
219  simulstate.set_Efrac(s, energyfrac);
220  simulstate.set_E(s, energyfrac * total_energy);
221  simulstate.set_SF(scalefactor);
222  }
223 
224  delete[] output_data;
225  delete[] input_data;
226  delete[] simdata;
227  }
228 
229  return FCSSuccess;
230 }

◆ size()

virtual unsigned int TFCSParametrizationBase::size ( ) const
inlinevirtualinherited

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

Reimplemented in TFCSLateralShapeParametrizationHitChain, and TFCSParametrizationChain.

Definition at line 93 of file TFCSParametrizationBase.h.

93 { return 0; };

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

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.

◆ do_rescale

int TFCSPCAEnergyParametrization::do_rescale

Definition at line 65 of file TFCSPCAEnergyParametrization.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_cumulative

std::vector<std::vector<TFCS1DFunction *> > TFCSPCAEnergyParametrization::m_cumulative
private

Definition at line 75 of file TFCSPCAEnergyParametrization.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_EV

std::vector<TMatrixD *> TFCSPCAEnergyParametrization::m_EV
private

Definition at line 70 of file TFCSPCAEnergyParametrization.h.

◆ m_Gauss_means

std::vector<TVectorD *> TFCSPCAEnergyParametrization::m_Gauss_means
private

Definition at line 73 of file TFCSPCAEnergyParametrization.h.

◆ m_Gauss_rms

std::vector<TVectorD *> TFCSPCAEnergyParametrization::m_Gauss_rms
private

Definition at line 74 of file TFCSPCAEnergyParametrization.h.

◆ m_MeanValues

std::vector<TVectorD *> TFCSPCAEnergyParametrization::m_MeanValues
private

Definition at line 71 of file TFCSPCAEnergyParametrization.h.

◆ m_nm

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

Message source name.

Definition at line 211 of file MLogging.h.

◆ m_numberpcabins

int TFCSPCAEnergyParametrization::m_numberpcabins
private

Definition at line 79 of file TFCSPCAEnergyParametrization.h.

◆ m_pdgid

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

Definition at line 63 of file TFCSParametrization.h.

◆ m_RelevantLayers

std::vector<int> TFCSPCAEnergyParametrization::m_RelevantLayers
private

Definition at line 68 of file TFCSPCAEnergyParametrization.h.

◆ m_SigmaValues

std::vector<TVectorD *> TFCSPCAEnergyParametrization::m_SigmaValues
private

Definition at line 72 of file TFCSPCAEnergyParametrization.h.

◆ m_total_energy_normalization

float TFCSPCAEnergyParametrization::m_total_energy_normalization {1}
private

Definition at line 81 of file TFCSPCAEnergyParametrization.h.

◆ m_totalE_probability_ratio

std::vector<TH1 *> TFCSPCAEnergyParametrization::m_totalE_probability_ratio
private

Definition at line 77 of file TFCSPCAEnergyParametrization.h.


The documentation for this class was generated from the following files:
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
TFCSParametrization::set_Ekin_nominal
virtual void set_Ekin_nominal(double min)
Definition: TFCSParametrization.cxx:39
FCSReturnCode
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
Definition: TFCSParametrizationBase.h:41
TFCSParametrization::pdgid
const std::set< int > & pdgid() const override
Definition: TFCSParametrization.h:34
TFCSPCAEnergyParametrization::m_SigmaValues
std::vector< TVectorD * > m_SigmaValues
Definition: TFCSPCAEnergyParametrization.h:72
TFCSPCAEnergyParametrization::m_RelevantLayers
std::vector< int > m_RelevantLayers
Definition: TFCSPCAEnergyParametrization.h:68
PlotCalibFromCool.norm
norm
Definition: PlotCalibFromCool.py:100
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
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
mean
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
Definition: dependence.cxx:254
ATH_MSG
#define ATH_MSG(lvl)
Definition: AthMsgStreamMacros.h:38
TFCSParametrizationBase::init_Ekin_min
static constexpr double init_Ekin_min
Do not persistify!
Definition: TFCSParametrizationBase.h:154
TFCSPCAEnergyParametrization::m_Gauss_rms
std::vector< TVectorD * > m_Gauss_rms
Definition: TFCSPCAEnergyParametrization.h:74
IsA
#define IsA
Declare the TObject style functions.
Definition: xAODTEventBranch.h:59
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
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
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
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
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
plotmaker.hist
hist
Definition: plotmaker.py:148
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
TFCSPCAEnergyParametrization::m_total_energy_normalization
float m_total_energy_normalization
Definition: TFCSPCAEnergyParametrization.h:81
TFCSParametrization::m_eta_nominal
double m_eta_nominal
Definition: TFCSParametrization.h:65
TFCSPCAEnergyParametrization::P2X
static void P2X(TVectorD *, TVectorD *, TMatrixD *, int, const double *, double *, int)
Definition: TFCSPCAEnergyParametrization.cxx:232
TFCSPCAEnergyParametrization::loadInputs
bool loadInputs(TFile *file)
Definition: TFCSPCAEnergyParametrization.cxx:250
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
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
TFCSParametrizationBase::init_eta_max
static constexpr double init_eta_max
Do not persistify!
Definition: TFCSParametrizationBase.h:158
TFCSParametrization::eta_nominal
double eta_nominal() const override
Definition: TFCSParametrization.h:38
TFCSParametrization::m_eta_max
double m_eta_max
Definition: TFCSParametrization.h:65
TrigInDetValidation_Base.test
test
Definition: TrigInDetValidation_Base.py:147
TFCSSimulationState::randomEngine
CLHEP::HepRandomEngine * randomEngine()
Definition: TFCSSimulationState.h:36
python.AthDsoLogger.fct
fct
Definition: AthDsoLogger.py:43
TFCSParametrization::set_Ekin
virtual void set_Ekin(const TFCSParametrizationBase &ref)
Definition: TFCSParametrization.cxx:55
x
#define x
TFCSParametrization::set_eta
virtual void set_eta(const TFCSParametrizationBase &ref)
Definition: TFCSParametrization.cxx:61
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
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
TFCSPCAEnergyParametrization::n_bins
virtual int n_bins() const override
Definition: TFCSPCAEnergyParametrization.h:38
FCSRetry
@ FCSRetry
Definition: TFCSParametrizationBase.h:41
TFCSPCAEnergyParametrization::m_EV
std::vector< TMatrixD * > m_EV
Definition: TFCSPCAEnergyParametrization.h:70
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
TFCSSimulationState::set_SF
void set_SF(double mysf)
Definition: TFCSSimulationState.h:81
CaloCell_ID_FCS::MaxSample
@ MaxSample
Definition: FastCaloSim_CaloCell_ID.h:47
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
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
TFCSEnergyParametrization::TFCSEnergyParametrization
TFCSEnergyParametrization(const char *name=nullptr, const char *title=nullptr)
Definition: TFCSEnergyParametrization.cxx:12
TrigConf::MSGTC::ALWAYS
@ ALWAYS
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:29
ParseInputs.gDirectory
gDirectory
Definition: Final2012/ParseInputs.py:133
TFCSPCAEnergyParametrization::get_totalE_probability_ratio
TH1 * get_totalE_probability_ratio(int Ekin_bin) const
Definition: TFCSPCAEnergyParametrization.cxx:111
lumiFormat.i
int i
Definition: lumiFormat.py:85
TFCSSimulationState::Ebin
int Ebin() const
Definition: TFCSSimulationState.h:45
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
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
file
TFile * file
Definition: tile_monitor.h:29
TFCSParametrization::m_Ekin_min
double m_Ekin_min
Definition: TFCSParametrization.h:64
TFCSParametrization::Ekin_min
double Ekin_min() const override
Definition: TFCSParametrization.h:36
TFCSParametrization::m_eta_min
double m_eta_min
Definition: TFCSParametrization.h:65
TFCSParametrizationBase::Print
void Print(Option_t *option="") const
Print object information.
Definition: TFCSParametrizationBase.cxx:52
hist_file_dump.f
f
Definition: hist_file_dump.py:135
TFCSPCAEnergyParametrization::m_MeanValues
std::vector< TVectorD * > m_MeanValues
Definition: TFCSPCAEnergyParametrization.h:71
TFCSParametrizationBase::FindDuplicates_t
std::map< TFCSParametrizationBase *, Duplicate_t > FindDuplicates_t
Definition: TFCSParametrizationBase.h:141
FCSFatal
@ FCSFatal
Definition: TFCSParametrizationBase.h:41
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
FCSSuccess
@ FCSSuccess
Definition: TFCSParametrizationBase.h:41
TFCSParametrization::eta_max
double eta_max() const override
Definition: TFCSParametrization.h:40
TFCSParametrizationBase::RemoveNameTitle
void RemoveNameTitle()
Definition: TFCSParametrizationBase.cxx:200
merge.output
output
Definition: merge.py:17
TFCSParametrization::m_Ekin_nominal
double m_Ekin_nominal
Definition: TFCSParametrization.h:64
TFCSPCAEnergyParametrization::m_cumulative
std::vector< std::vector< TFCS1DFunction * > > m_cumulative
Definition: TFCSPCAEnergyParametrization.h:75
TrigConf::MSGTC::NUM_LEVELS
@ NUM_LEVELS
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:30
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
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
TFCSPCAEnergyParametrization::m_totalE_probability_ratio
std::vector< TH1 * > m_totalE_probability_ratio
Definition: TFCSPCAEnergyParametrization.h:77
TFCSPCAEnergyParametrization::FCSRetryPCA
@ FCSRetryPCA
Definition: TFCSPCAEnergyParametrization.h:27
TFCSSimulationState::set_E
void set_E(int sample, double Esample)
Definition: TFCSSimulationState.h:48
TFCSParametrizationBase::init_Ekin_nominal
static constexpr double init_Ekin_nominal
Definition: TFCSParametrizationBase.h:153
interpolate_get_y
float interpolate_get_y(TH1 *hist, float x)
Definition: TFCSPCAEnergyParametrization.cxx:68
DeMoScan.index
string index
Definition: DeMoScan.py:364
END_MSG
#define END_MSG(lvl)
Definition: MLogging.h:171
IntArray
Definition: IntArray.h:11
TFCSPCAEnergyParametrization::m_numberpcabins
int m_numberpcabins
Definition: TFCSPCAEnergyParametrization.h:79
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.Constants.INFO
int INFO
Definition: Control/AthenaCommon/python/Constants.py:16
ref
const boost::regex ref(r_ef)
LArCellConditions.geo
bool geo
Definition: LArCellConditions.py:46
DEBUG
#define DEBUG
Definition: page_access.h:11
beamspotnt.rms
rms
Definition: bin/beamspotnt.py:1266
TFCSParametrization::Ekin_nominal
double Ekin_nominal() const override
Definition: TFCSParametrization.h:35
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
TFCSParametrization::set_eta_min
virtual void set_eta_min(double min)
Definition: TFCSParametrization.cxx:51
TFCSSimulationState::E
double E() const
Definition: TFCSSimulationState.h:42
TFCSPCAEnergyParametrization::m_Gauss_means
std::vector< TVectorD * > m_Gauss_means
Definition: TFCSPCAEnergyParametrization.h:73
TFCSParametrization::m_Ekin_max
double m_Ekin_max
Definition: TFCSParametrization.h:64
TrigConf::MSGTC::NIL
@ NIL
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:22
TFCSParametrizationBase::kMatchAllPDGID
@ kMatchAllPDGID
Set this bit in the TObject bit field if valid for all PDGID.
Definition: TFCSParametrizationBase.h:53
TFCS1DFunction
Definition: TFCS1DFunction.h:17
TFCSPCAEnergyParametrization::do_rescale
int do_rescale
Definition: TFCSPCAEnergyParametrization.h:65
TFCSParametrizationBase::size
virtual unsigned int size() const
Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operat...
Definition: TFCSParametrizationBase.h:93
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
TFCSSimulationState::set_Efrac
void set_Efrac(int sample, double Efracsample)
Definition: TFCSSimulationState.h:49