ATLAS Offline Software
FastCaloSim.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 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 // Geant4 Punchthrough G4 Tool
22 
23 // FastCaloSim tool
24 #include "FastCaloSimTool.h"
25 
26 
28 class G4FieldTrack;
29 class G4SafetyHelper;
30 
31 class FastCaloSim: public G4VFastSimulationModel
32 {
33  public:
34 
35  FastCaloSim(const std::string& name,
36  G4Region* region,
37  const PublicToolHandle<IFastCaloSimCaloTransportation>& FastCaloSimCaloTransportation,
38  const PublicToolHandle<IFastCaloSimCaloExtrapolation>& FastCaloSimCaloExtrapolation,
39  const PublicToolHandle<IG4CaloTransportTool>& G4CaloTransportTool,
40  const PublicToolHandle<IPunchThroughSimWrapper>& PunchThroughSimWrapper,
41  const ServiceHandle<ISF::IFastCaloSimParamSvc>& FastCaloSimSvc,
42  const std::string& CaloCellContainerSDName,
43  bool doG4Transport,
44  bool doPunchThrough,
47 
48  G4bool IsApplicable(const G4ParticleDefinition&) override final;
49  void DoIt(const G4FastTrack&, G4FastStep&) override final;
50 
54  G4bool ModelTrigger(const G4FastTrack &) override final;
55 
58 
60  G4bool passedIDCaloBoundary(const G4FastTrack& fastTrack);
61 
62  private:
63  // FastCaloSimCaloTransportation tool to transport particles through the detector with the ATLAS tracking tools
64  PublicToolHandle<IFastCaloSimCaloTransportation> m_FastCaloSimCaloTransportation;
65  // FastCaloSimCaloExtrapolation tool to extrapolate particle shower positions to layers
66  PublicToolHandle<IFastCaloSimCaloExtrapolation> m_FastCaloSimCaloExtrapolation;
67  // Geant4 transportation tool
68  PublicToolHandle<IG4CaloTransportTool> m_G4CaloTransportTool;
69  // Geant4 Punchthrough G4 Tool
70  PublicToolHandle<IPunchThroughSimWrapper> m_PunchThroughSimWrapper;
71 
72  // Main FastCaloSim service
74  // Name of associated CaloCellContainer sensitive detector
76  // Boolean flag to enable Geant4 transportation
78 
79  //For PunchThrough
81 
82  // Fast simulation FastCaloSimTool
84 };
85 
86 #endif //G4FASTSIMULATION_FASTCALOSIM_H
87 
FastCaloSimCaloExtrapolation
Definition: FastCaloSimCaloExtrapolation.h:32
FastCaloSim
Definition: FastCaloSim.h:32
IFastCaloSimCaloExtrapolation.h
FastCaloSim::m_FastCaloSimTool
FastCaloSimTool * m_FastCaloSimTool
Definition: FastCaloSim.h:83
IFastCaloSimParamSvc.h
FastCaloSim::m_FastCaloSimSvc
ServiceHandle< ISF::IFastCaloSimParamSvc > m_FastCaloSimSvc
Definition: FastCaloSim.h:73
FastCaloSim::FastCaloSim
FastCaloSim(const std::string &name, G4Region *region, const PublicToolHandle< IFastCaloSimCaloTransportation > &FastCaloSimCaloTransportation, const PublicToolHandle< IFastCaloSimCaloExtrapolation > &FastCaloSimCaloExtrapolation, const PublicToolHandle< IG4CaloTransportTool > &G4CaloTransportTool, const PublicToolHandle< IPunchThroughSimWrapper > &PunchThroughSimWrapper, const ServiceHandle< ISF::IFastCaloSimParamSvc > &FastCaloSimSvc, const std::string &CaloCellContainerSDName, bool doG4Transport, bool doPunchThrough, FastCaloSimTool *FastCaloSimTool)
Definition: FastCaloSim.cxx:33
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:64
IPunchThroughSimWrapper.h
IFastCaloSimCaloTransportation.h
FastCaloSim::m_doPunchThrough
bool m_doPunchThrough
Definition: FastCaloSim.h:80
FastCaloSim::m_CaloCellContainerSDName
std::string m_CaloCellContainerSDName
Definition: FastCaloSim.h:75
FastCaloSim::m_PunchThroughSimWrapper
PublicToolHandle< IPunchThroughSimWrapper > m_PunchThroughSimWrapper
Definition: FastCaloSim.h:70
FastCaloSim::m_FastCaloSimCaloExtrapolation
PublicToolHandle< IFastCaloSimCaloExtrapolation > m_FastCaloSimCaloExtrapolation
Definition: FastCaloSim.h:66
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
IG4CaloTransportTool.h
PunchThroughSimWrapper
Class to wrap PunchThrough simulation inside FastCaloSim; Runs both PunchThroughG4Classifier and Punc...
Definition: PunchThroughSimWrapper.h:32
FastCaloSim::ModelTrigger
G4bool ModelTrigger(const G4FastTrack &) override final
Determines the applicability of the fast sim model to this particular track.
Definition: FastCaloSim.cxx:81
FastCaloSim::m_doG4Transport
bool m_doG4Transport
Definition: FastCaloSim.h:77
FastCaloSimCaloTransportation
Definition: FastCaloSimCaloTransportation.h:21
FastCaloSim::DoIt
void DoIt(const G4FastTrack &, G4FastStep &) override final
Definition: FastCaloSim.cxx:163
FastCaloSim::~FastCaloSim
~FastCaloSim()
Definition: FastCaloSim.h:46
FastCaloSim::m_G4CaloTransportTool
PublicToolHandle< IG4CaloTransportTool > m_G4CaloTransportTool
Definition: FastCaloSim.h:68
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:59
FastCaloSimTool
Definition: FastCaloSimTool.h:24
ServiceHandle< ISF::IFastCaloSimParamSvc >