ATLAS Offline Software
TFCSEnergyBinParametrization.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ISF_FASTCALOSIMEVENT_TFCSEnergyBinParametrization_h
6 #define ISF_FASTCALOSIMEVENT_TFCSEnergyBinParametrization_h
7 
9 #include "TFile.h"
10 #include <map>
11 #include <vector>
12 
14 public:
15  TFCSEnergyBinParametrization(const char *name = nullptr,
16  const char *title = nullptr);
17 
18  virtual void set_pdgid(int id) override;
19  virtual void set_pdgid(const std::set<int> &ids) override;
20  virtual void add_pdgid(int id) override;
21  virtual void clear_pdgid() override;
22 
23  virtual int n_bins() const override { return m_number_of_Ekin_bins; };
24 
27  void set_number_of_Ekin_bins(int n_Ekin_bin) {
28  m_number_of_Ekin_bins = n_Ekin_bin;
29  resize();
30  };
31 
39  virtual void set_pdgid_Ekin_bin_probability(int id, std::vector<float> prob);
40  virtual bool
42  std::string prob_object_name);
43 
44  virtual FCSReturnCode
45  simulate(TFCSSimulationState &simulstate, const TFCSTruthState *truth,
46  const TFCSExtrapolationState *extrapol) const override;
47 
48  virtual bool is_match_Ekin_bin(int Ekin_bin) const override;
49 
50  void Print(Option_t *option = "") const override;
51 
52 private:
54  std::map<int, std::vector<float>> m_pdgid_Ebin_probability;
55 
56  void resize();
57 
58  ClassDefOverride(TFCSEnergyBinParametrization,
59  1) // TFCSEnergyBinParametrization
60 };
61 
62 #endif
FCSReturnCode
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
Definition: TFCSParametrizationBase.h:41
TFCSEnergyBinParametrization::m_number_of_Ekin_bins
int m_number_of_Ekin_bins
Definition: TFCSEnergyBinParametrization.h:53
TFCSEnergyParametrization
Definition: TFCSEnergyParametrization.h:10
TFCSEnergyBinParametrization::clear_pdgid
virtual void clear_pdgid() override
Definition: TFCSEnergyBinParametrization.cxx:59
TFCSEnergyBinParametrization::set_number_of_Ekin_bins
void set_number_of_Ekin_bins(int n_Ekin_bin)
current convention is to start Ekin_bin counting at 1, to be updated to start counting with 0
Definition: TFCSEnergyBinParametrization.h:27
TFCSEnergyBinParametrization::load_pdgid_Ekin_bin_probability_from_file
virtual bool load_pdgid_Ekin_bin_probability_from_file(int id, TFile *file, std::string prob_object_name)
Definition: TFCSEnergyBinParametrization.cxx:84
TFCSExtrapolationState
Definition: TFCSExtrapolationState.h:13
RunActsMaterialValidation.extrapol
extrapol
Definition: RunActsMaterialValidation.py:90
TFCSEnergyBinParametrization::is_match_Ekin_bin
virtual bool is_match_Ekin_bin(int Ekin_bin) const override
Definition: TFCSEnergyBinParametrization.cxx:24
TFCSEnergyBinParametrization::n_bins
virtual int n_bins() const override
Definition: TFCSEnergyBinParametrization.h:23
covarianceTool.prob
prob
Definition: covarianceTool.py:678
TFCSEnergyBinParametrization::set_pdgid
virtual void set_pdgid(int id) override
Definition: TFCSEnergyBinParametrization.cxx:44
covarianceTool.title
title
Definition: covarianceTool.py:542
file
TFile * file
Definition: tile_monitor.h:29
TFCSEnergyBinParametrization::resize
void resize()
Definition: TFCSEnergyBinParametrization.cxx:30
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
TFCSEnergyBinParametrization::add_pdgid
virtual void add_pdgid(int id) override
Definition: TFCSEnergyBinParametrization.cxx:54
TFCSEnergyBinParametrization::set_pdgid_Ekin_bin_probability
virtual void set_pdgid_Ekin_bin_probability(int id, std::vector< float > prob)
set_pdgid_Ekin_bin_probability(): format of probability should be a vector of float with probability ...
Definition: TFCSEnergyBinParametrization.cxx:64
TFCSEnergyBinParametrization::Print
void Print(Option_t *option="") const override
Definition: TFCSEnergyBinParametrization.cxx:131
TFCSEnergyBinParametrization
Definition: TFCSEnergyBinParametrization.h:13
TFCSEnergyParametrization.h
TFCSEnergyBinParametrization::simulate
virtual FCSReturnCode simulate(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const override
Method in all derived classes to do some simulation.
Definition: TFCSEnergyBinParametrization.cxx:157
TFCSTruthState
Definition: TFCSTruthState.h:13
TFCSSimulationState
Definition: TFCSSimulationState.h:32
TFCSEnergyBinParametrization::m_pdgid_Ebin_probability
std::map< int, std::vector< float > > m_pdgid_Ebin_probability
Definition: TFCSEnergyBinParametrization.h:54
TFCSEnergyBinParametrization::TFCSEnergyBinParametrization
TFCSEnergyBinParametrization(const char *name=nullptr, const char *title=nullptr)
Definition: TFCSEnergyBinParametrization.cxx:18