ATLAS Offline Software
FastCaloSim.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 G4FASTSIMULATION_FASTCALOSIM_H
6 #define G4FASTSIMULATION_FASTCALOSIM_H
7 
8 // Service handle to define smart pointer to FastCaloSim parametrisation service
9 #include "GaudiKernel/ServiceHandle.h"
10 // Geant4 fast simulation base class
11 #include "G4VFastSimulationModel.hh"
12 // FastCaloSim parametrisation service interface
14 // FastCaloSim extrapolation tool interface
16 // FastCaloSim ATLAS transportation tool interface
18 // Geant4 transportation tool interface
20 // Random generator service interface
22 // FastCaloSim tool
23 #include "FastCaloSimTool.h"
24 
25 
27 class G4FieldTrack;
28 class G4SafetyHelper;
29 
30 class FastCaloSim: public G4VFastSimulationModel
31 {
32  public:
33 
34  FastCaloSim(const std::string& name,
35  const ServiceHandle<IAthRNGSvc>& rndmGenSvc,
36  const Gaudi::Property<std::string>& randomEngineName,
37  const PublicToolHandle<IFastCaloSimCaloTransportation>& FastCaloSimCaloTransportation,
38  const PublicToolHandle<IFastCaloSimCaloExtrapolation>& FastCaloSimCaloExtrapolation,
39  const PublicToolHandle<IG4CaloTransportTool>& G4CaloTransportTool,
40  const ServiceHandle<ISF::IFastCaloSimParamSvc>& FastCaloSimSvc,
41  const Gaudi::Property<std::string>& CaloCellContainerSDName,
42  const Gaudi::Property<bool>& doG4Transport,
43  const Gaudi::Property<bool>& doPhotons,
44  const Gaudi::Property<bool>& doElectrons,
45  const Gaudi::Property<bool>& doHadrons,
46  const Gaudi::Property<float>& EtaLow,
47  const Gaudi::Property<float>& EtaHigh,
48  const Gaudi::Property<float>& EkinLow,
49  const Gaudi::Property<float>& EkinHigh,
50  const Gaudi::Property<bool>& doEMECFCS,
53 
54  G4bool IsApplicable(const G4ParticleDefinition&) override final;
55  void DoIt(const G4FastTrack&, G4FastStep&) override final;
56  void StartOfAthenaEvent(const EventContext& ctx);
57  void EndOfAthenaEvent(const EventContext& ctx);
58 
62  G4bool ModelTrigger(const G4FastTrack &) override final;
63 
66 
68  G4bool passedIDCaloBoundary(const G4FastTrack& fastTrack);
69 
70  private:
71 
72  // Random generator services
74  Gaudi::Property<std::string> m_randomEngineName;
76 
77  // FastCaloSimCaloTransportation tool to transport particles through the detector with the ATLAS tracking tools
78  PublicToolHandle<IFastCaloSimCaloTransportation> m_FastCaloSimCaloTransportation;
79  // FastCaloSimCaloExtrapolation tool to extrapolate particle shower positions to layers
80  PublicToolHandle<IFastCaloSimCaloExtrapolation> m_FastCaloSimCaloExtrapolation;
81  // Geant4 transportation tool
82  PublicToolHandle<IG4CaloTransportTool> m_G4CaloTransportTool;
83 
84 
85  // Main FastCaloSim service
87  // Name of associated CaloCellContainer sensitive detector
88  Gaudi::Property<std::string> m_CaloCellContainerSDName;
89  // Boolean flag to enable Geant4 transportation
90  Gaudi::Property<bool> m_doG4Transport;
91 
92  // Boundaries to enable AF3 transportation
93  Gaudi::Property<bool> m_doPhotons;
94  Gaudi::Property<bool> m_doElectrons;
95  Gaudi::Property<bool> m_doHadrons;
96  Gaudi::Property<float> m_AbsEtaMin;
97  Gaudi::Property<float> m_AbsEtaMax;
98  Gaudi::Property<float> m_EkinMin;
99  Gaudi::Property<float> m_EkinMax;
100  Gaudi::Property<float> m_doEMECFCS;
101 
102  // Fast simulation FastCaloSimTool
104 };
105 
106 #endif //G4FASTSIMULATION_FASTCALOSIM_H
107 
FastCaloSimCaloExtrapolation
Definition: FastCaloSimCaloExtrapolation.h:32
FastCaloSim
Definition: FastCaloSim.h:31
IFastCaloSimCaloExtrapolation.h
FastCaloSim::StartOfAthenaEvent
void StartOfAthenaEvent(const EventContext &ctx)
Definition: FastCaloSim.cxx:73
FastCaloSim::m_FastCaloSimTool
FastCaloSimTool * m_FastCaloSimTool
Definition: FastCaloSim.h:103
IFastCaloSimParamSvc.h
FastCaloSim::m_FastCaloSimSvc
ServiceHandle< ISF::IFastCaloSimParamSvc > m_FastCaloSimSvc
Definition: FastCaloSim.h:86
FastCaloSim::m_doElectrons
Gaudi::Property< bool > m_doElectrons
Definition: FastCaloSim.h:94
FastCaloSim::m_AbsEtaMin
Gaudi::Property< float > m_AbsEtaMin
Definition: FastCaloSim.h:96
FastCaloSim::m_AbsEtaMax
Gaudi::Property< float > m_AbsEtaMax
Definition: FastCaloSim.h:97
CaloCellContainerSD
Definition: CaloCellContainerSD.h:22
FastCaloSim::getCaloCellContainerSD
CaloCellContainerSD * getCaloCellContainerSD()
Retrieves the associated sensitive detector responsible for writing out the CaloCellContainer.
Definition: FastCaloSim.cxx:300
FastCaloSim::m_FastCaloSimCaloTransportation
PublicToolHandle< IFastCaloSimCaloTransportation > m_FastCaloSimCaloTransportation
Definition: FastCaloSim.h:78
FastCaloSim::m_doPhotons
Gaudi::Property< bool > m_doPhotons
Definition: FastCaloSim.h:93
IFastCaloSimCaloTransportation.h
FastCaloSim::m_randomEngineName
Gaudi::Property< std::string > m_randomEngineName
Definition: FastCaloSim.h:74
FastCaloSim::m_EkinMax
Gaudi::Property< float > m_EkinMax
Definition: FastCaloSim.h:99
FastCaloSim::EndOfAthenaEvent
void EndOfAthenaEvent(const EventContext &ctx)
Definition: FastCaloSim.cxx:82
FastCaloSim::m_doHadrons
Gaudi::Property< bool > m_doHadrons
Definition: FastCaloSim.h:95
FastCaloSim::m_doEMECFCS
Gaudi::Property< float > m_doEMECFCS
Definition: FastCaloSim.h:100
FastCaloSim::m_FastCaloSimCaloExtrapolation
PublicToolHandle< IFastCaloSimCaloExtrapolation > m_FastCaloSimCaloExtrapolation
Definition: FastCaloSim.h:80
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
IG4CaloTransportTool.h
FastCaloSim::ModelTrigger
G4bool ModelTrigger(const G4FastTrack &) override final
Determines the applicability of the fast sim model to this particular track.
Definition: FastCaloSim.cxx:111
FastCaloSim::m_EkinMin
Gaudi::Property< float > m_EkinMin
Definition: FastCaloSim.h:98
FastCaloSim::FastCaloSim
FastCaloSim(const std::string &name, const ServiceHandle< IAthRNGSvc > &rndmGenSvc, const Gaudi::Property< std::string > &randomEngineName, const PublicToolHandle< IFastCaloSimCaloTransportation > &FastCaloSimCaloTransportation, const PublicToolHandle< IFastCaloSimCaloExtrapolation > &FastCaloSimCaloExtrapolation, const PublicToolHandle< IG4CaloTransportTool > &G4CaloTransportTool, const ServiceHandle< ISF::IFastCaloSimParamSvc > &FastCaloSimSvc, const Gaudi::Property< std::string > &CaloCellContainerSDName, const Gaudi::Property< bool > &doG4Transport, const Gaudi::Property< bool > &doPhotons, const Gaudi::Property< bool > &doElectrons, const Gaudi::Property< bool > &doHadrons, const Gaudi::Property< float > &EtaLow, const Gaudi::Property< float > &EtaHigh, const Gaudi::Property< float > &EkinLow, const Gaudi::Property< float > &EkinHigh, const Gaudi::Property< bool > &doEMECFCS, FastCaloSimTool *FastCaloSimTool)
Definition: FastCaloSim.cxx:34
FastCaloSimCaloTransportation
Definition: FastCaloSimCaloTransportation.h:21
FastCaloSim::m_rngWrapper
ATHRNG::RNGWrapper * m_rngWrapper
Definition: FastCaloSim.h:75
FastCaloSim::DoIt
void DoIt(const G4FastTrack &, G4FastStep &) override final
Definition: FastCaloSim.cxx:206
FastCaloSim::m_doG4Transport
Gaudi::Property< bool > m_doG4Transport
Definition: FastCaloSim.h:90
FastCaloSim::~FastCaloSim
~FastCaloSim()
Definition: FastCaloSim.h:52
FastCaloSim::m_G4CaloTransportTool
PublicToolHandle< IG4CaloTransportTool > m_G4CaloTransportTool
Definition: FastCaloSim.h:82
FastCaloSim::m_CaloCellContainerSDName
Gaudi::Property< std::string > m_CaloCellContainerSDName
Definition: FastCaloSim.h:88
FastCaloSimTool.h
FastCaloSim::passedIDCaloBoundary
G4bool passedIDCaloBoundary(const G4FastTrack &fastTrack)
Check if the particle is located at the proper ID-Calo parametrization boundary and is travelling out...
Definition: FastCaloSim.cxx:320
G4CaloTransportTool
A tool which transports particles through the Geant4 geometry.
Definition: G4CaloTransportTool.h:25
FastCaloSim::IsApplicable
G4bool IsApplicable(const G4ParticleDefinition &) override final
Definition: FastCaloSim.cxx:89
FastCaloSimTool
Definition: FastCaloSimTool.h:24
FastCaloSim::m_rndmGenSvc
ServiceHandle< IAthRNGSvc > m_rndmGenSvc
Definition: FastCaloSim.h:73
IAthRNGSvc.h
ServiceHandle< IAthRNGSvc >