ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
ISF
ISF_FastCaloSim
ISF_FastCaloSimEvent
ISF_FastCaloSimEvent
TFCSHitCellMappingWiggle.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TFCSHitCellMappingWiggle_h
6
#define TFCSHitCellMappingWiggle_h
7
8
#include "
CxxUtils/checker_macros.h
"
9
#include "
ISF_FastCaloSimEvent/TFCSHitCellMapping.h
"
10
11
#ifdef USE_GPU
12
#include "
ISF_FastCaloGpu/FH_structs.h
"
13
#include "
ISF_FastCaloGpu/LoadGpuFuncHist.h
"
14
#endif
15
16
class
TFCS1DFunction
;
17
class
TH1;
18
19
class
TFCSHitCellMappingWiggle
:
public
TFCSHitCellMapping
{
20
public
:
21
TFCSHitCellMappingWiggle
(
const
char
*name =
nullptr
,
22
const
char
*title =
nullptr
,
23
ICaloGeometry
*geo =
nullptr
);
24
~TFCSHitCellMappingWiggle
();
25
26
void
initialize
(
TFCS1DFunction
*func);
27
void
initialize
(
const
std::vector<const TFCS1DFunction *> &functions,
28
const
std::vector<float> &bin_low_edges);
29
30
void
initialize
(TH1 *
histogram
,
float
xscale = 1);
31
void
initialize
(
const
std::vector<const TH1 *> &histograms,
32
const
std::vector<float> &bin_low_edges,
float
xscale = 1);
33
34
void
clear
();
35
36
inline
unsigned
int
get_number_of_bins
()
const
{
return
m_functions
.size(); };
37
38
inline
double
get_bin_low_edge
(
int
bin
)
const
{
return
m_bin_low_edge
[
bin
]; };
39
inline
double
get_bin_up_edge
(
int
bin
)
const
{
40
return
m_bin_low_edge
[
bin
+ 1];
41
};
42
43
inline
const
TFCS1DFunction
*
get_function
(
int
bin
)
const
{
44
return
m_functions
[
bin
];
45
};
46
const
std::vector<const TFCS1DFunction *>&
get_functions
() {
47
return
m_functions
;
48
};
49
const
std::vector<float>&
get_bin_low_edges
() {
return
m_bin_low_edge
; };
50
53
virtual
FCSReturnCode
simulate_hit
(
54
Hit
&
hit
,
TFCSSimulationState
&simulstate,
const
TFCSTruthState
*truth,
55
const
TFCSExtrapolationState
*extrapol)
override
;
56
57
virtual
bool
operator==
(
const
TFCSParametrizationBase
&
ref
)
const override
;
58
59
void
Print
(Option_t *option =
""
)
const override
;
60
61
static
void
unit_test
62
ATLAS_NOT_THREAD_SAFE
(
TFCSSimulationState
*simulstate =
nullptr
,
63
TFCSTruthState
*truth =
nullptr
,
64
TFCSExtrapolationState
*extrapol =
nullptr
);
65
66
#ifdef USE_GPU
67
// construct the hist function and copy to GPU
68
// will not compile by default
69
void
set_d_HistFuncs(
FHs
*hf_ptr) { m_d_HistFuncs = hf_ptr; };
70
const
FHs
*d_HistFuncs() {
return
m_d_HistFuncs; };
71
void
LoadHistFuncs();
72
LoadGpuFuncHist *LdFH() {
return
m_LdFH; };
73
#endif
74
75
protected
:
76
bool
compare
(
const
TFCSParametrizationBase
&
ref
)
const
;
77
78
private
:
79
#ifdef USE_GPU
80
// hist functions in GPU
81
FHs
*m_d_HistFuncs =
nullptr
;
82
LoadGpuFuncHist *m_LdFH =
nullptr
;
83
#endif
84
85
//** Function for the hit-to-cell assignment accordion structure fix (wiggle)
86
//**//
87
//** To be moved to the conditions database at some point **//
88
std::vector<const TFCS1DFunction *>
m_functions
= {
nullptr
};
89
std::vector<float>
m_bin_low_edge
= {0,
static_cast<
float
>
(
init_eta_max
)};
90
91
ClassDefOverride(
TFCSHitCellMappingWiggle
, 1)
// TFCSHitCellMappingWiggle
92
};
93
94
#endif
ref
const std::regex ref(r_ef)
FH_structs.h
FHs
struct FHs FHs
hit
bool hit(const Container &ids, int pdgId)
Definition
JetIRCSafeLabelTool.cxx:64
LoadGpuFuncHist.h
TFCSHitCellMapping.h
FCSReturnCode
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
Definition
TFCSParametrizationBase.h:41
histogram
std::string histogram
Definition
chains.cxx:52
checker_macros.h
Define macros for attributes used to control the static checker.
Hit
Definition
Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloGpu/ISF_FastCaloGpu/Hit.h:16
ICaloGeometry
Definition
ICaloGeometry.h:14
TFCS1DFunction
Definition
TFCS1DFunction.h:17
TFCSExtrapolationState
Definition
TFCSExtrapolationState.h:13
TFCSHitCellMappingWiggle
Definition
TFCSHitCellMappingWiggle.h:19
TFCSHitCellMappingWiggle::get_function
const TFCS1DFunction * get_function(int bin) const
Definition
TFCSHitCellMappingWiggle.h:43
TFCSHitCellMappingWiggle::clear
void clear()
Definition
TFCSHitCellMappingWiggle.cxx:31
TFCSHitCellMappingWiggle::simulate_hit
virtual FCSReturnCode simulate_hit(Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) override
modify one hit position to emulate the LAr accordeon shape and then fills all hits into calorimeter c...
Definition
TFCSHitCellMappingWiggle.cxx:120
TFCSHitCellMappingWiggle::compare
bool compare(const TFCSParametrizationBase &ref) const
Definition
TFCSHitCellMappingWiggle.cxx:186
TFCSHitCellMappingWiggle::get_bin_low_edges
const std::vector< float > & get_bin_low_edges()
Definition
TFCSHitCellMappingWiggle.h:49
TFCSHitCellMappingWiggle::Print
void Print(Option_t *option="") const override
Definition
TFCSHitCellMappingWiggle.cxx:168
TFCSHitCellMappingWiggle::get_bin_low_edge
double get_bin_low_edge(int bin) const
Definition
TFCSHitCellMappingWiggle.h:38
TFCSHitCellMappingWiggle::get_bin_up_edge
double get_bin_up_edge(int bin) const
Definition
TFCSHitCellMappingWiggle.h:39
TFCSHitCellMappingWiggle::m_functions
std::vector< const TFCS1DFunction * > m_functions
Definition
TFCSHitCellMappingWiggle.h:88
TFCSHitCellMappingWiggle::get_number_of_bins
unsigned int get_number_of_bins() const
Definition
TFCSHitCellMappingWiggle.h:36
TFCSHitCellMappingWiggle::~TFCSHitCellMappingWiggle
~TFCSHitCellMappingWiggle()
Definition
TFCSHitCellMappingWiggle.cxx:27
TFCSHitCellMappingWiggle::m_bin_low_edge
std::vector< float > m_bin_low_edge
Definition
TFCSHitCellMappingWiggle.h:89
TFCSHitCellMappingWiggle::TFCSHitCellMappingWiggle
TFCSHitCellMappingWiggle(const char *name=nullptr, const char *title=nullptr, ICaloGeometry *geo=nullptr)
Definition
TFCSHitCellMappingWiggle.cxx:22
TFCSHitCellMappingWiggle::ATLAS_NOT_THREAD_SAFE
static void unit_test ATLAS_NOT_THREAD_SAFE(TFCSSimulationState *simulstate=nullptr, TFCSTruthState *truth=nullptr, TFCSExtrapolationState *extrapol=nullptr)
TFCSHitCellMappingWiggle::get_functions
const std::vector< const TFCS1DFunction * > & get_functions()
Definition
TFCSHitCellMappingWiggle.h:46
TFCSHitCellMappingWiggle::operator==
virtual bool operator==(const TFCSParametrizationBase &ref) const override
The == operator compares the content of instances.
Definition
TFCSHitCellMappingWiggle.cxx:154
TFCSHitCellMapping::TFCSHitCellMapping
TFCSHitCellMapping(const char *name=nullptr, const char *title=nullptr, ICaloGeometry *geo=nullptr)
Definition
TFCSHitCellMapping.cxx:14
TFCSParametrizationBase
Definition
TFCSParametrizationBase.h:46
TFCSParametrizationBase::init_eta_max
static constexpr double init_eta_max
Do not persistify!
Definition
TFCSParametrizationBase.h:162
TFCSParametrizationBase::TFCSParametrizationBase
TFCSParametrizationBase(const char *name=nullptr, const char *title=nullptr)
Definition
TFCSParametrizationBase.cxx:20
TFCSSimulationState
Definition
TFCSSimulationState.h:32
TFCSTruthState
Definition
TFCSTruthState.h:13
bin
Definition
BinsDiffFromStripMedian.h:43
initialize
void initialize()
Definition
run_EoverP.cxx:894
FHs
Definition
FH_structs.h:10
Generated on
for ATLAS Offline Software by
1.17.0