ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
ISF
ISF_FastCaloSim
ISF_FastCaloSimEvent
ISF_FastCaloSimEvent
TFCSHistoLateralShapeParametrization.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 TFCSHistoLateralShapeParametrization_h
6
#define TFCSHistoLateralShapeParametrization_h
7
8
#include "
ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h
"
9
#include "
ISF_FastCaloSimEvent/TFCS2DFunctionHistogram.h
"
10
#include "
ISF_FastCaloSimEvent/TFCSTruthState.h
"
11
#ifdef USE_GPU
12
#include "
ISF_FastCaloGpu/LoadGpuFuncHist.h
"
13
#include "
ISF_FastCaloGpu/FH_structs.h
"
14
#endif
15
16
class
TH2;
17
class
ICaloGeometry
;
18
19
class
TFCSHistoLateralShapeParametrization
20
:
public
TFCSLateralShapeParametrizationHitBase
{
21
public
:
22
TFCSHistoLateralShapeParametrization
(
const
char
*name =
nullptr
,
23
const
char
*title =
nullptr
);
24
~TFCSHistoLateralShapeParametrization
();
25
27
enum
FCSStatusBits
{
28
k_phi_symmetric
=
29
BIT(15)
30
};
31
34
virtual
void
set_geometry
(
ICaloGeometry
*geo)
override
;
35
36
bool
is_phi_symmetric
()
const
{
return
TestBit(
k_phi_symmetric
); };
37
virtual
void
set_phi_symmetric
() { SetBit(
k_phi_symmetric
); };
38
virtual
void
reset_phi_symmetric
() { ResetBit(
k_phi_symmetric
); };
39
41
void
set_number_of_hits
(
float
nhits);
42
43
float
get_number_of_expected_hits
()
const
{
return
m_nhits
; };
44
46
void
set_r_offset
(
float
r_offset
) {
m_r_offset
=
r_offset
; };
47
float
r_offset
()
const
{
return
m_r_offset
; };
48
50
void
set_r_scale
(
float
r_scale
) {
m_r_scale
=
r_scale
; };
51
float
r_scale
()
const
{
return
m_r_scale
; };
52
55
virtual
double
56
get_sigma2_fluctuation
(
TFCSSimulationState
&simulstate,
57
const
TFCSTruthState
*truth,
58
const
TFCSExtrapolationState
*extrapol)
const override
;
59
61
virtual
int
62
get_number_of_hits
(
TFCSSimulationState
&simulstate,
63
const
TFCSTruthState
*truth,
64
const
TFCSExtrapolationState
*extrapol)
const override
;
65
69
virtual
FCSReturnCode
70
simulate_hit
(
Hit
&
hit
,
TFCSSimulationState
&simulstate,
71
const
TFCSTruthState
*truth,
72
const
TFCSExtrapolationState
*extrapol)
override
;
73
76
bool
Initialize
(TH2 *hist);
77
bool
Initialize
(
const
char
*filepath,
const
char
*histname);
78
79
TFCS2DFunctionHistogram
&
histogram
() {
return
m_hist
; };
80
const
TFCS2DFunctionHistogram
&
histogram
()
const
{
return
m_hist
; };
81
82
void
Print
(Option_t *option =
""
)
const override
;
83
84
#ifdef USE_GPU
85
// for FCS-GPU
86
// construct the hist function and copy to GPU
87
// will not compile by default
88
void
set_d_HistFunc(
FH2D
*hf_ptr) { m_d_HistFunc = hf_ptr; };
89
const
FH2D
*d_HistFunc() {
return
m_d_HistFunc; };
90
LoadGpuFuncHist *LdFH() {
return
m_LdFH; };
91
void
LoadHistFuncs();
92
#endif
93
94
protected
:
96
TFCS2DFunctionHistogram
m_hist
;
97
float
m_nhits
;
98
float
m_r_offset
;
99
float
m_r_scale
;
100
101
private
:
102
#ifdef USE_GPU
103
FH2D
*m_d_HistFunc =
nullptr
;
104
LoadGpuFuncHist
*m_LdFH =
nullptr
;
105
#endif
106
107
ClassDefOverride(
TFCSHistoLateralShapeParametrization
,
108
2)
// TFCSHistoLateralShapeParametrization
109
};
110
111
#endif
FH_structs.h
FH2D
struct FH2D FH2D
hit
bool hit(const Container &ids, int pdgId)
Definition
JetIRCSafeLabelTool.cxx:64
LoadGpuFuncHist.h
TFCS2DFunctionHistogram.h
TFCSLateralShapeParametrizationHitBase.h
FCSReturnCode
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
Definition
TFCSParametrizationBase.h:41
TFCSTruthState.h
Hit
Definition
Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloGpu/ISF_FastCaloGpu/Hit.h:16
ICaloGeometry
Definition
ICaloGeometry.h:14
LoadGpuFuncHist
Definition
LoadGpuFuncHist.h:10
TFCS2DFunctionHistogram
Definition
TFCS2DFunctionHistogram.h:15
TFCSExtrapolationState
Definition
TFCSExtrapolationState.h:13
TFCSHistoLateralShapeParametrization::set_geometry
virtual void set_geometry(ICaloGeometry *geo) override
will actually not store the geometry information, but rather used to check the validity of the 2D sha...
Definition
TFCSHistoLateralShapeParametrization.cxx:38
TFCSHistoLateralShapeParametrization::Print
void Print(Option_t *option="") const override
Definition
TFCSHistoLateralShapeParametrization.cxx:218
TFCSHistoLateralShapeParametrization::m_r_offset
float m_r_offset
Definition
TFCSHistoLateralShapeParametrization.h:98
TFCSHistoLateralShapeParametrization::is_phi_symmetric
bool is_phi_symmetric() const
Definition
TFCSHistoLateralShapeParametrization.h:36
TFCSHistoLateralShapeParametrization::get_number_of_hits
virtual int get_number_of_hits(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const override
default for this class is to simulate get_number_of_expected_hits() hits
Definition
TFCSHistoLateralShapeParametrization.cxx:87
TFCSHistoLateralShapeParametrization::get_number_of_expected_hits
float get_number_of_expected_hits() const
Definition
TFCSHistoLateralShapeParametrization.h:43
TFCSHistoLateralShapeParametrization::reset_phi_symmetric
virtual void reset_phi_symmetric()
Definition
TFCSHistoLateralShapeParametrization.h:38
TFCSHistoLateralShapeParametrization::Initialize
bool Initialize(TH2 *hist)
Init from histogram.
Definition
TFCSHistoLateralShapeParametrization.cxx:187
TFCSHistoLateralShapeParametrization::~TFCSHistoLateralShapeParametrization
~TFCSHistoLateralShapeParametrization()
Definition
TFCSHistoLateralShapeParametrization.cxx:32
TFCSHistoLateralShapeParametrization::simulate_hit
virtual FCSReturnCode simulate_hit(Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) override
simulated one hit position with weight that should be put into simulstate sometime later all hit weig...
Definition
TFCSHistoLateralShapeParametrization.cxx:101
TFCSHistoLateralShapeParametrization::set_r_scale
void set_r_scale(float r_scale)
set an scale factor for r on the simulated histogram
Definition
TFCSHistoLateralShapeParametrization.h:50
TFCSHistoLateralShapeParametrization::set_phi_symmetric
virtual void set_phi_symmetric()
Definition
TFCSHistoLateralShapeParametrization.h:37
TFCSHistoLateralShapeParametrization::set_r_offset
void set_r_offset(float r_offset)
set an offset in r on the simulated histogram
Definition
TFCSHistoLateralShapeParametrization.h:46
TFCSHistoLateralShapeParametrization::r_scale
float r_scale() const
Definition
TFCSHistoLateralShapeParametrization.h:51
TFCSHistoLateralShapeParametrization::m_r_scale
float m_r_scale
Definition
TFCSHistoLateralShapeParametrization.h:99
TFCSHistoLateralShapeParametrization::m_nhits
float m_nhits
Definition
TFCSHistoLateralShapeParametrization.h:97
TFCSHistoLateralShapeParametrization::m_hist
TFCS2DFunctionHistogram m_hist
Histogram to be used for the shape simulation.
Definition
TFCSHistoLateralShapeParametrization.h:96
TFCSHistoLateralShapeParametrization::TFCSHistoLateralShapeParametrization
TFCSHistoLateralShapeParametrization(const char *name=nullptr, const char *title=nullptr)
Definition
TFCSHistoLateralShapeParametrization.cxx:25
TFCSHistoLateralShapeParametrization::FCSStatusBits
FCSStatusBits
Status bit for FCS needs.
Definition
TFCSHistoLateralShapeParametrization.h:27
TFCSHistoLateralShapeParametrization::k_phi_symmetric
@ k_phi_symmetric
Set this bit to simulate phi symmetric histograms.
Definition
TFCSHistoLateralShapeParametrization.h:28
TFCSHistoLateralShapeParametrization::histogram
TFCS2DFunctionHistogram & histogram()
Definition
TFCSHistoLateralShapeParametrization.h:79
TFCSHistoLateralShapeParametrization::set_number_of_hits
void set_number_of_hits(float nhits)
set the integral of the histogram to the desired number of hits
Definition
TFCSHistoLateralShapeParametrization.cxx:97
TFCSHistoLateralShapeParametrization::histogram
const TFCS2DFunctionHistogram & histogram() const
Definition
TFCSHistoLateralShapeParametrization.h:80
TFCSHistoLateralShapeParametrization::get_sigma2_fluctuation
virtual double get_sigma2_fluctuation(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const override
default for this class is to simulate get_number_of_expected_hits() hits, which gives fluctuations si...
Definition
TFCSHistoLateralShapeParametrization.cxx:78
TFCSHistoLateralShapeParametrization::r_offset
float r_offset() const
Definition
TFCSHistoLateralShapeParametrization.h:47
TFCSLateralShapeParametrizationHitBase::TFCSLateralShapeParametrizationHitBase
TFCSLateralShapeParametrizationHitBase(const char *name=nullptr, const char *title=nullptr)
Definition
TFCSLateralShapeParametrizationHitBase.cxx:15
TFCSSimulationState
Definition
TFCSSimulationState.h:32
TFCSTruthState
Definition
TFCSTruthState.h:13
FH2D
Definition
FH_structs.h:29
Generated on
for ATLAS Offline Software by
1.17.0