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,
45 
46  G4bool IsApplicable(const G4ParticleDefinition&) override final;
47  void DoIt(const G4FastTrack&, G4FastStep&) override final;
48  void StartOfAthenaEvent(const EventContext& ctx);
49  void EndOfAthenaEvent(const EventContext& ctx);
50 
54  G4bool ModelTrigger(const G4FastTrack &) override final;
55 
58 
60  G4bool passedIDCaloBoundary(const G4FastTrack& fastTrack);
61 
62  private:
63 
64  // Random generator services
66  Gaudi::Property<std::string> m_randomEngineName;
68 
69  // FastCaloSimCaloTransportation tool to transport particles through the detector with the ATLAS tracking tools
70  PublicToolHandle<IFastCaloSimCaloTransportation> m_FastCaloSimCaloTransportation;
71  // FastCaloSimCaloExtrapolation tool to extrapolate particle shower positions to layers
72  PublicToolHandle<IFastCaloSimCaloExtrapolation> m_FastCaloSimCaloExtrapolation;
73  // Geant4 transportation tool
74  PublicToolHandle<IG4CaloTransportTool> m_G4CaloTransportTool;
75 
76 
77  // Main FastCaloSim service
79  // Name of associated CaloCellContainer sensitive detector
80  Gaudi::Property<std::string> m_CaloCellContainerSDName;
81  // Boolean flag to enable Geant4 transportation
82  Gaudi::Property<bool> m_doG4Transport;
83 
84  // Fast simulation FastCaloSimTool
86 };
87 
88 #endif //G4FASTSIMULATION_FASTCALOSIM_H
89 
FastCaloSimCaloExtrapolation
Definition: FastCaloSimCaloExtrapolation.h:32
FastCaloSim
Definition: FastCaloSim.h:31
IFastCaloSimCaloExtrapolation.h
FastCaloSim::StartOfAthenaEvent
void StartOfAthenaEvent(const EventContext &ctx)
Definition: FastCaloSim.cxx:57
FastCaloSim::m_FastCaloSimTool
FastCaloSimTool * m_FastCaloSimTool
Definition: FastCaloSim.h:85
IFastCaloSimParamSvc.h
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, FastCaloSimTool *FastCaloSimTool)
Definition: FastCaloSim.cxx:34
FastCaloSim::m_FastCaloSimSvc
ServiceHandle< ISF::IFastCaloSimParamSvc > m_FastCaloSimSvc
Definition: FastCaloSim.h:78
CaloCellContainerSD
Definition: CaloCellContainerSD.h:22
FastCaloSim::getCaloCellContainerSD
CaloCellContainerSD * getCaloCellContainerSD()
Retrieves the associated sensitive detector responsible for writing out the CaloCellContainer.
Definition: FastCaloSim.cxx:271
FastCaloSim::m_FastCaloSimCaloTransportation
PublicToolHandle< IFastCaloSimCaloTransportation > m_FastCaloSimCaloTransportation
Definition: FastCaloSim.h:70
IFastCaloSimCaloTransportation.h
FastCaloSim::m_randomEngineName
Gaudi::Property< std::string > m_randomEngineName
Definition: FastCaloSim.h:66
FastCaloSim::EndOfAthenaEvent
void EndOfAthenaEvent(const EventContext &ctx)
Definition: FastCaloSim.cxx:66
FastCaloSim::m_FastCaloSimCaloExtrapolation
PublicToolHandle< IFastCaloSimCaloExtrapolation > m_FastCaloSimCaloExtrapolation
Definition: FastCaloSim.h:72
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
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:95
FastCaloSimCaloTransportation
Definition: FastCaloSimCaloTransportation.h:21
FastCaloSim::m_rngWrapper
ATHRNG::RNGWrapper * m_rngWrapper
Definition: FastCaloSim.h:67
FastCaloSim::DoIt
void DoIt(const G4FastTrack &, G4FastStep &) override final
Definition: FastCaloSim.cxx:177
FastCaloSim::m_doG4Transport
Gaudi::Property< bool > m_doG4Transport
Definition: FastCaloSim.h:82
FastCaloSim::~FastCaloSim
~FastCaloSim()
Definition: FastCaloSim.h:44
FastCaloSim::m_G4CaloTransportTool
PublicToolHandle< IG4CaloTransportTool > m_G4CaloTransportTool
Definition: FastCaloSim.h:74
FastCaloSim::m_CaloCellContainerSDName
Gaudi::Property< std::string > m_CaloCellContainerSDName
Definition: FastCaloSim.h:80
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:291
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:73
FastCaloSimTool
Definition: FastCaloSimTool.h:24
FastCaloSim::m_rndmGenSvc
ServiceHandle< IAthRNGSvc > m_rndmGenSvc
Definition: FastCaloSim.h:65
IAthRNGSvc.h
ServiceHandle< IAthRNGSvc >