ATLAS Offline Software
TFCSLateralShapeParametrizationHitChain.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TFCSLateralShapeParametrizationHitChain_h
6 #define TFCSLateralShapeParametrizationHitChain_h
7 
10 #include <vector>
11 
12 class ICaloGeometry;
13 
16 public:
17 #ifdef USE_GPU
18  // modify the construction function in order to get the geometry for FCS-GPU
19  TFCSLateralShapeParametrizationHitChain(const char *name = nullptr,
20  const char *title = nullptr,
21  ICaloGeometry *geo = nullptr);
22  // override the set_geometry function for FCS-GPU
23  // the geometry is needed to assign the deposit energy to cell
24  // will not compile by default
25  virtual void set_geometry(ICaloGeometry *geo) override;
26 #else
27  TFCSLateralShapeParametrizationHitChain(const char *name = nullptr,
28  const char *title = nullptr);
29 #endif
30 
33 
34  virtual FCSReturnCode
36  TFCSSimulationState &simulstate, const TFCSTruthState *truth,
37  const TFCSExtrapolationState *extrapol) const;
38 
39  virtual FCSReturnCode
40  simulate(TFCSSimulationState &simulstate, const TFCSTruthState *truth,
41  const TFCSExtrapolationState *extrapol) const override;
42 
43  typedef std::vector<TFCSLateralShapeParametrizationHitBase *> Chain_t;
44  virtual unsigned int size() const override;
45  virtual const TFCSParametrizationBase *
46  operator[](unsigned int ind) const override;
47  virtual TFCSParametrizationBase *operator[](unsigned int ind) override;
48  virtual void set_daughter(unsigned int ind,
49  TFCSParametrizationBase *param) override;
50  const Chain_t &chain() const { return m_chain; };
51  Chain_t &chain() { return m_chain; };
52  void push_back(const Chain_t::value_type &value) {
53  m_chain.push_back(value);
54  };
55  void push_back_init(const Chain_t::value_type &value);
56 
57  unsigned int get_nr_of_init() const { return m_ninit; };
58  void set_nr_of_init(unsigned int ninit) { m_ninit = ninit; };
59 
61  virtual void
64  };
65 
67  virtual int get_number_of_hits(TFCSSimulationState &simulstate,
68  const TFCSTruthState *truth,
69  const TFCSExtrapolationState *extrapol) const;
70 
72  virtual float get_E_hit(TFCSSimulationState &simulstate,
73  const TFCSTruthState *truth,
74  const TFCSExtrapolationState *extrapol) const;
75 
78  virtual float
80  const TFCSTruthState *truth,
81  const TFCSExtrapolationState *extrapol) const;
82 
84  virtual float getMinWeight() const;
85  virtual float getMaxWeight() const;
86 
87  static constexpr float s_max_sigma2_fluctuation = 1000;
88 
89  void Print(Option_t *option = "") const override;
90 
91 protected:
93 
95 
96 private:
97 #ifdef USE_GPU
98  // the FCS-GPU will use this geometry to get the correct cell
99  // will not compile by default
100  ICaloGeometry *m_geo;
101 #endif
102 
104  unsigned int m_ninit = 0;
105 
107  2) // TFCSLateralShapeParametrizationHitChain
108 };
109 
110 #endif
TFCSLateralShapeParametrizationHitChain::get_number_of_hits
virtual int get_number_of_hits(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
Call get_number_of_hits() only once, as it could contain a random number.
Definition: TFCSLateralShapeParametrizationHitChain.cxx:125
FCSReturnCode
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
Definition: TFCSParametrizationBase.h:41
TFCSLateralShapeParametrizationHitChain
Definition: TFCSLateralShapeParametrizationHitChain.h:15
TFCSLateralShapeParametrizationHitChain::getMinWeight
virtual float getMinWeight() const
Get minimum and maximum value of weight for hit energy reweighting.
Definition: TFCSLateralShapeParametrizationHitChain.cxx:144
ISF_FCS::MLogging::level
MSG::Level level() const
Retrieve output level.
Definition: MLogging.h:201
TFCSLateralShapeParametrizationHitChain::init_hit
virtual FCSReturnCode init_hit(TFCSLateralShapeParametrizationHitBase::Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
Definition: TFCSLateralShapeParametrizationHitChain.cxx:207
TFCSLateralShapeParametrizationHitChain::PropagateMSGLevel
void PropagateMSGLevel(MSG::Level level) const
Definition: TFCSLateralShapeParametrizationHitChain.cxx:201
athena.value
value
Definition: athena.py:124
TFCSExtrapolationState
Definition: TFCSExtrapolationState.h:13
TFCSLateralShapeParametrizationHitBase::Hit
Definition: TFCSLateralShapeParametrizationHitBase.h:42
RunActsMaterialValidation.extrapol
extrapol
Definition: RunActsMaterialValidation.py:91
TFCSLateralShapeParametrizationHitChain::operator[]
virtual const TFCSParametrizationBase * operator[](unsigned int ind) const override
Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operat...
Definition: TFCSLateralShapeParametrizationHitChain.cxx:84
TFCSLateralShapeParametrizationHitChain::size
virtual unsigned int size() const override
Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operat...
Definition: TFCSLateralShapeParametrizationHitChain.cxx:65
TFCSLateralShapeParametrizationHitBase
Definition: TFCSLateralShapeParametrizationHitBase.h:13
TFCSLateralShapeParametrizationHitChain::get_E_hit
virtual float get_E_hit(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
Get hit energy from layer energy and number of hits.
Definition: TFCSLateralShapeParametrizationHitChain.cxx:162
TFCSLateralShapeParametrizationHitChain::getMaxWeight
virtual float getMaxWeight() const
Definition: TFCSLateralShapeParametrizationHitChain.cxx:153
TFCSParametrizationBase
Definition: TFCSParametrizationBase.h:46
TFCSLateralShapeParametrizationHitChain::get_sigma2_fluctuation
virtual float get_sigma2_fluctuation(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
Give the effective size sigma^2 of the fluctuations that should be generated.
Definition: TFCSLateralShapeParametrizationHitChain.cxx:183
TFCSLateralShapeParametrizationHitChain::push_back_init
void push_back_init(const Chain_t::value_type &value)
Definition: TFCSLateralShapeParametrizationHitChain.cxx:72
TFCSLateralShapeParametrizationHitBase.h
TFCSLateralShapeParametrizationHitChain::s_max_sigma2_fluctuation
static constexpr float s_max_sigma2_fluctuation
Definition: TFCSLateralShapeParametrizationHitChain.h:87
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
TFCSLateralShapeParametrizationHitChain::set_number_of_hits_simul
virtual void set_number_of_hits_simul(TFCSLateralShapeParametrizationHitBase *sim)
set which instance should determine the number of hits
Definition: TFCSLateralShapeParametrizationHitChain.h:62
TFCSLateralShapeParametrizationHitChain::get_nr_of_init
unsigned int get_nr_of_init() const
Definition: TFCSLateralShapeParametrizationHitChain.h:57
TFCSLateralShapeParametrizationHitChain::chain
Chain_t & chain()
Definition: TFCSLateralShapeParametrizationHitChain.h:51
ICaloGeometry
Definition: ICaloGeometry.h:14
covarianceTool.title
title
Definition: covarianceTool.py:542
TFCSParametrizationBase::set_geometry
virtual void set_geometry(ICaloGeometry *geo)
Method to set the geometry access pointer.
Definition: TFCSParametrizationBase.cxx:24
TFCSLateralShapeParametrizationHitChain::TFCSLateralShapeParametrizationHitChain
TFCSLateralShapeParametrizationHitChain(const char *name=nullptr, const char *title=nullptr)
Definition: TFCSLateralShapeParametrizationHitChain.cxx:48
TFCSLateralShapeParametrizationHitChain::m_number_of_hits_simul
TFCSLateralShapeParametrizationHitBase * m_number_of_hits_simul
Definition: TFCSLateralShapeParametrizationHitChain.h:103
TFCSLateralShapeParametrization.h
TFCSLateralShapeParametrizationHitChain::set_daughter
virtual void set_daughter(unsigned int ind, TFCSParametrizationBase *param) override
Some derived classes have daughter instances of TFCSParametrizationBase objects The set_daughter meth...
Definition: TFCSLateralShapeParametrizationHitChain.cxx:105
TFCSLateralShapeParametrizationHitChain::m_ninit
unsigned int m_ninit
Definition: TFCSLateralShapeParametrizationHitChain.h:104
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TFCSLateralShapeParametrizationHitChain::push_back
void push_back(const Chain_t::value_type &value)
Definition: TFCSLateralShapeParametrizationHitChain.h:52
TFCSLateralShapeParametrizationHitChain::m_chain
Chain_t m_chain
Definition: TFCSLateralShapeParametrizationHitChain.h:94
LArCellConditions.geo
bool geo
Definition: LArCellConditions.py:46
TFCSLateralShapeParametrization
Definition: TFCSLateralShapeParametrization.h:10
TFCSLateralShapeParametrizationHitChain::Chain_t
std::vector< TFCSLateralShapeParametrizationHitBase * > Chain_t
Definition: TFCSLateralShapeParametrizationHitChain.h:43
TFCSTruthState
Definition: TFCSTruthState.h:13
TFCSSimulationState
Definition: TFCSSimulationState.h:32
TFCSLateralShapeParametrizationHitChain::chain
const Chain_t & chain() const
Definition: TFCSLateralShapeParametrizationHitChain.h:50
checkFileSG.ind
list ind
Definition: checkFileSG.py:118
TFCSLateralShapeParametrizationHitChain::simulate
virtual FCSReturnCode simulate(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const override
Method in all derived classes to do some simulation.
Definition: TFCSLateralShapeParametrizationHitChain.cxx:233
TFCSLateralShapeParametrizationHitChain::Print
void Print(Option_t *option="") const override
Do not persistify!
Definition: TFCSLateralShapeParametrizationHitChain.cxx:448
TFCSLateralShapeParametrizationHitChain::set_nr_of_init
void set_nr_of_init(unsigned int ninit)
Definition: TFCSLateralShapeParametrizationHitChain.h:58