ATLAS Offline Software
Loading...
Searching...
No Matches
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"
13#include "CaloIdentifier/CaloCell_ID.h" // For CaloCell_ID::CaloSample
15#include "G4VSensitiveDetector.hh"
19#include "LArSimEvent/LArHit.h"
21
22// Forward declarations
23class G4Step;
24class G4TouchableHistory;
25
26class LArEM_ID;
27class LArFCAL_ID;
28class LArHEC_ID;
29class TileID;
30
31class LArHitContainer;
32
33class StoreGateSvc;
34
35namespace FCS_Param {
36
37struct 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
61};
62
63} // namespace FCS_Param
64
71class 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
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);
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};
107 std::map<Identifier, std::vector<ISF_FCS_Parametrization::FCS_StepInfo*>*>
109
110 private:
112 double getMaxTime(const CaloCell_ID::CaloSample& layer) const;
113};
114
115#endif // ISF_FASTCALOSIM_FCS_STEPINFOSD_H
Cached pointer with atomic update.
Definition of CaloDetDescrManager.
CaloSampling::CaloSample CaloSample
Definition CaloCell_ID.h:53
FCS_Param::Config m_config
double getMaxTime(const CaloCell_ID::CaloSample &layer) const
void setupHelpers(const LArEM_ID *EM, const LArFCAL_ID *FCAL, const LArHEC_ID *HEC, const TileID *tile)
Sets the ID helper pointers.
void update_map(const CLHEP::Hep3Vector &l_vec, const Identifier &l_identifier, double l_energy, double l_time, bool l_valid, int l_detector)
CxxUtils::CachedPointer< const CaloDetDescrManager > m_calo_dd_man
std::map< Identifier, std::vector< ISF_FCS_Parametrization::FCS_StepInfo * > * > m_hit_map
const LArHEC_ID * m_larHecID
FCS_StepInfoSD(G4String a_name, const FCS_Param::Config &config)
Constructor.
virtual G4bool ProcessHits(G4Step *a_step, G4TouchableHistory *) override
Main processing method.
const LArFCAL_ID * m_larFcalID
const LArEM_ID * m_larEmID
Pointers to the identifier helpers.
void getCaloDDManager()
Keep a map instead of trying to keep the full vector.
void EndOfAthenaEvent(ISF_FCS_Parametrization::FCS_StepInfoCollection *hitContnainer)
End of athena event processing.
const TileID * m_tileID
Class for collection of StepInfo class (G4 hits) copied and modified version to ISF.
Helper class for LArEM offline identifiers.
Definition LArEM_ID.h:111
Helper class for LArFCAL offline identifiers.
Definition LArFCAL_ID.h:49
Helper class for LArHEC offline identifiers.
Definition LArHEC_ID.h:76
Hit collection.
The Athena Transient Store API.
Helper class for TileCal offline identifiers.
Definition TileID.h:67
std::vector< double > m_maxRadiusLateral
property, see LArG4GenShowerLib::LArG4GenShowerLib
std::vector< double > m_maxRadiusLongitudinal
property, see LArG4GenShowerLib::LArG4GenShowerLib
ITileCalculator * m_TileCalculator
ILArCalculatorSvc * m_LArCalculator
int verboseLevel
Helper to keep the same verbosity everywhere.
Cached pointer with atomic update.