ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
ISF
ISF_FastCaloSim
ISF_FastCaloSimSD
src
FCS_StepInfoSD.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ISF_FASTCALOSIM_FCS_STEPINFOSD_H
6
#define ISF_FASTCALOSIM_FCS_STEPINFOSD_H
7
8
#include <map>
9
#include <vector>
10
11
#include "CLHEP/Units/SystemOfUnits.h"
12
#include "
CaloDetDescr/CaloDetDescrManager.h
"
13
#include "
CaloIdentifier/CaloCell_ID.h
"
// For CaloCell_ID::CaloSample
14
#include "
CxxUtils/CachedPointer.h
"
15
#include "G4VSensitiveDetector.hh"
16
#include "
ISF_FastCaloSimEvent/FCS_StepInfoCollection.h
"
17
#include "
LArG4Code/ILArCalculatorSvc.h
"
18
#include "
LArG4Code/LArG4Identifier.h
"
19
#include "
LArSimEvent/LArHit.h
"
20
#include "
TileG4Interfaces/ITileCalculator.h
"
21
22
// Forward declarations
23
class
G4Step;
24
class
G4TouchableHistory;
25
26
class
LArEM_ID
;
27
class
LArFCAL_ID
;
28
class
LArHEC_ID
;
29
class
TileID
;
30
31
class
LArHitContainer
;
32
33
class
StoreGateSvc
;
34
35
namespace
FCS_Param
{
36
37
struct
Config
{
39
int
verboseLevel
= 0;
40
bool
shift_lar_subhit
=
true
;
41
bool
shorten_lar_step
=
false
;
42
double
substpsize
= 0.2 * CLHEP::mm;
// size of splitting into substeps
43
// before calling the calculators.
44
45
// Merging properties
46
std::vector<double>
m_maxRadiusLateral
{
47
24, 5.};
48
49
std::vector<double>
m_maxRadiusLongitudinal
{
50
24, 5.};
51
52
53
double
m_maxTime
= 25.;
54
double
m_maxTimeLAr
= 25.;
55
double
m_maxTimeHEC
= 25.;
56
double
m_maxTimeFCAL
= 25.;
57
double
m_maxTimeTile
= 25.;
58
59
ILArCalculatorSvc
*
m_LArCalculator
=
nullptr
;
60
ITileCalculator
*
m_TileCalculator
=
nullptr
;
61
};
62
63
}
// namespace FCS_Param
64
71
class
FCS_StepInfoSD
:
public
G4VSensitiveDetector {
72
public
:
74
FCS_StepInfoSD
(G4String a_name,
const
FCS_Param::Config
& config);
75
77
virtual
G4bool
ProcessHits
(G4Step* a_step, G4TouchableHistory*)
override
;
78
80
void
EndOfAthenaEvent
(
81
ISF_FCS_Parametrization::FCS_StepInfoCollection
* hitContnainer);
82
84
void
setupHelpers
(
const
LArEM_ID
* EM,
const
LArFCAL_ID
* FCAL,
85
const
LArHEC_ID
* HEC,
const
TileID
* tile) {
86
m_larEmID
= EM;
87
m_larFcalID
= FCAL;
88
m_larHecID
= HEC;
89
m_tileID
= tile;
90
}
91
92
protected
:
96
void
getCaloDDManager
();
97
void
update_map
(
const
CLHEP::Hep3Vector& l_vec,
98
const
Identifier
& l_identifier,
double
l_energy,
99
double
l_time,
bool
l_valid,
int
l_detector);
100
FCS_Param::Config
m_config
;
102
const
LArEM_ID
*
m_larEmID
{
nullptr
};
103
const
LArFCAL_ID
*
m_larFcalID
{
nullptr
};
104
const
LArHEC_ID
*
m_larHecID
{
nullptr
};
105
const
TileID
*
m_tileID
{
nullptr
};
106
CxxUtils::CachedPointer<const CaloDetDescrManager>
m_calo_dd_man
;
107
std::map<Identifier, std::vector<ISF_FCS_Parametrization::FCS_StepInfo*>*>
108
m_hit_map
;
109
110
private
:
112
double
getMaxTime
(
const
CaloCell_ID::CaloSample
& layer)
const
;
113
};
114
115
#endif
// ISF_FASTCALOSIM_FCS_STEPINFOSD_H
CachedPointer.h
Cached pointer with atomic update.
CaloCell_ID.h
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
FCS_StepInfoCollection.h
ILArCalculatorSvc.h
ITileCalculator.h
LArG4Identifier.h
LArHit.h
CaloCell_ID::CaloSample
CaloSampling::CaloSample CaloSample
Definition
CaloCell_ID.h:53
FCS_StepInfoSD::m_config
FCS_Param::Config m_config
Definition
FCS_StepInfoSD.h:100
FCS_StepInfoSD::getMaxTime
double getMaxTime(const CaloCell_ID::CaloSample &layer) const
Definition
FCS_StepInfoSD.cxx:34
FCS_StepInfoSD::setupHelpers
void setupHelpers(const LArEM_ID *EM, const LArFCAL_ID *FCAL, const LArHEC_ID *HEC, const TileID *tile)
Sets the ID helper pointers.
Definition
FCS_StepInfoSD.h:84
FCS_StepInfoSD::update_map
void update_map(const CLHEP::Hep3Vector &l_vec, const Identifier &l_identifier, double l_energy, double l_time, bool l_valid, int l_detector)
Definition
FCS_StepInfoSD.cxx:62
FCS_StepInfoSD::m_calo_dd_man
CxxUtils::CachedPointer< const CaloDetDescrManager > m_calo_dd_man
Definition
FCS_StepInfoSD.h:106
FCS_StepInfoSD::m_hit_map
std::map< Identifier, std::vector< ISF_FCS_Parametrization::FCS_StepInfo * > * > m_hit_map
Definition
FCS_StepInfoSD.h:108
FCS_StepInfoSD::m_larHecID
const LArHEC_ID * m_larHecID
Definition
FCS_StepInfoSD.h:104
FCS_StepInfoSD::FCS_StepInfoSD
FCS_StepInfoSD(G4String a_name, const FCS_Param::Config &config)
Constructor.
Definition
FCS_StepInfoSD.cxx:21
FCS_StepInfoSD::ProcessHits
virtual G4bool ProcessHits(G4Step *a_step, G4TouchableHistory *) override
Main processing method.
Definition
FCS_StepInfoSD.cxx:26
FCS_StepInfoSD::m_larFcalID
const LArFCAL_ID * m_larFcalID
Definition
FCS_StepInfoSD.h:103
FCS_StepInfoSD::m_larEmID
const LArEM_ID * m_larEmID
Pointers to the identifier helpers.
Definition
FCS_StepInfoSD.h:102
FCS_StepInfoSD::getCaloDDManager
void getCaloDDManager()
Keep a map instead of trying to keep the full vector.
Definition
FCS_StepInfoSD.cxx:49
FCS_StepInfoSD::EndOfAthenaEvent
void EndOfAthenaEvent(ISF_FCS_Parametrization::FCS_StepInfoCollection *hitContnainer)
End of athena event processing.
Definition
FCS_StepInfoSD.cxx:146
FCS_StepInfoSD::m_tileID
const TileID * m_tileID
Definition
FCS_StepInfoSD.h:105
ILArCalculatorSvc
Definition
ILArCalculatorSvc.h:25
ISF_FCS_Parametrization::FCS_StepInfoCollection
Class for collection of StepInfo class (G4 hits) copied and modified version to ISF.
Definition
FCS_StepInfoCollection.h:30
ITileCalculator
Definition
ITileCalculator.h:67
LArEM_ID
Helper class for LArEM offline identifiers.
Definition
LArEM_ID.h:111
LArFCAL_ID
Helper class for LArFCAL offline identifiers.
Definition
LArFCAL_ID.h:49
LArHEC_ID
Helper class for LArHEC offline identifiers.
Definition
LArHEC_ID.h:76
LArHitContainer
Hit collection.
Definition
LArHitContainer.h:26
StoreGateSvc
The Athena Transient Store API.
Definition
StoreGateSvc.h:120
TileID
Helper class for TileCal offline identifiers.
Definition
TileID.h:67
FCS_Param
Definition
FCS_StepInfoSD.h:35
Identifier
Definition
IdentifierFieldParser.cxx:14
FCS_Param::Config
Definition
FCS_StepInfoSD.h:37
FCS_Param::Config::m_maxRadiusLateral
std::vector< double > m_maxRadiusLateral
property, see LArG4GenShowerLib::LArG4GenShowerLib
Definition
FCS_StepInfoSD.h:46
FCS_Param::Config::m_maxTimeFCAL
double m_maxTimeFCAL
Definition
FCS_StepInfoSD.h:56
FCS_Param::Config::m_maxRadiusLongitudinal
std::vector< double > m_maxRadiusLongitudinal
property, see LArG4GenShowerLib::LArG4GenShowerLib
Definition
FCS_StepInfoSD.h:49
FCS_Param::Config::m_maxTimeHEC
double m_maxTimeHEC
Definition
FCS_StepInfoSD.h:55
FCS_Param::Config::m_TileCalculator
ITileCalculator * m_TileCalculator
Definition
FCS_StepInfoSD.h:60
FCS_Param::Config::m_LArCalculator
ILArCalculatorSvc * m_LArCalculator
Definition
FCS_StepInfoSD.h:59
FCS_Param::Config::verboseLevel
int verboseLevel
Helper to keep the same verbosity everywhere.
Definition
FCS_StepInfoSD.h:39
FCS_Param::Config::substpsize
double substpsize
Definition
FCS_StepInfoSD.h:42
FCS_Param::Config::shorten_lar_step
bool shorten_lar_step
Definition
FCS_StepInfoSD.h:41
FCS_Param::Config::m_maxTimeLAr
double m_maxTimeLAr
Definition
FCS_StepInfoSD.h:54
FCS_Param::Config::shift_lar_subhit
bool shift_lar_subhit
Definition
FCS_StepInfoSD.h:40
FCS_Param::Config::m_maxTime
double m_maxTime
Definition
FCS_StepInfoSD.h:53
FCS_Param::Config::m_maxTimeTile
double m_maxTimeTile
Definition
FCS_StepInfoSD.h:57
CxxUtils::CachedPointer
Cached pointer with atomic update.
Definition
CachedPointer.h:57
Generated on
for ATLAS Offline Software by
1.17.0