Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 // Geant4 Punchthrough G4 Tool
22 
23 // Random generator service interface
25 // FastCaloSim tool
26 #include "FastCaloSimTool.h"
27 
28 
30 class G4FieldTrack;
31 class G4SafetyHelper;
32 
33 class FastCaloSim: public G4VFastSimulationModel
34 {
35  public:
36 
37  FastCaloSim(const std::string& name,
38  const ServiceHandle<IAthRNGSvc>& rndmGenSvc,
39  const Gaudi::Property<std::string>& randomEngineName,
40  const PublicToolHandle<IFastCaloSimCaloTransportation>& FastCaloSimCaloTransportation,
41  const PublicToolHandle<IFastCaloSimCaloExtrapolation>& FastCaloSimCaloExtrapolation,
42  const PublicToolHandle<IG4CaloTransportTool>& G4CaloTransportTool,
43  const PublicToolHandle<IPunchThroughSimWrapper>& PunchThroughSimWrapper,
44  const ServiceHandle<ISF::IFastCaloSimParamSvc>& FastCaloSimSvc,
45  const Gaudi::Property<std::string>& CaloCellContainerSDName,
46  const Gaudi::Property<bool>& doG4Transport,
47  const Gaudi::Property<bool>& doPhotons,
48  const Gaudi::Property<bool>& doElectrons,
49  const Gaudi::Property<bool>& doHadrons,
50  const Gaudi::Property<float>& AbsEtaMin,
51  const Gaudi::Property<float>& AbsEtaMax,
52  const Gaudi::Property<float>& EkinMinPhotons,
53  const Gaudi::Property<float>& EkinMaxPhotons,
54  const Gaudi::Property<float>& EkinMinElectrons,
55  const Gaudi::Property<float>& EkinMaxElectrons,
56  const Gaudi::Property<bool>& doEMECFCS,
57  const Gaudi::Property<bool>& doPunchThrough,
60 
61  G4bool IsApplicable(const G4ParticleDefinition&) override final;
62  void DoIt(const G4FastTrack&, G4FastStep&) override final;
63  void StartOfAthenaEvent(const EventContext& ctx);
64  void EndOfAthenaEvent(const EventContext& ctx);
65 
69  G4bool ModelTrigger(const G4FastTrack &) override final;
70 
73 
75  G4bool passedIDCaloBoundary(const G4FastTrack& fastTrack);
76 
77  private:
78 
79  // Random generator services
81  Gaudi::Property<std::string> m_randomEngineName;
83 
84  // FastCaloSimCaloTransportation tool to transport particles through the detector with the ATLAS tracking tools
85  PublicToolHandle<IFastCaloSimCaloTransportation> m_FastCaloSimCaloTransportation;
86  // FastCaloSimCaloExtrapolation tool to extrapolate particle shower positions to layers
87  PublicToolHandle<IFastCaloSimCaloExtrapolation> m_FastCaloSimCaloExtrapolation;
88  // Geant4 transportation tool
89  PublicToolHandle<IG4CaloTransportTool> m_G4CaloTransportTool;
90  // Geant4 Punchthrough G4 Tool
91  PublicToolHandle<IPunchThroughSimWrapper> m_PunchThroughSimWrapper;
92 
93  // Main FastCaloSim service
95  // Name of associated CaloCellContainer sensitive detector
96  Gaudi::Property<std::string> m_CaloCellContainerSDName;
97  // Boolean flag to enable Geant4 transportation
98  Gaudi::Property<bool> m_doG4Transport;
99 
100  // Boundaries to enable AF3 transportation
101  Gaudi::Property<bool> m_doPhotons;
102  Gaudi::Property<bool> m_doElectrons;
103  Gaudi::Property<bool> m_doHadrons;
104  Gaudi::Property<float> m_AbsEtaMin;
105  Gaudi::Property<float> m_AbsEtaMax;
106  Gaudi::Property<float> m_EkinMinPhotons;
107  Gaudi::Property<float> m_EkinMaxPhotons;
108  Gaudi::Property<float> m_EkinMinElectrons;
109  Gaudi::Property<float> m_EkinMaxElectrons;
110  Gaudi::Property<float> m_doEMECFCS;
111 
112  //For PunchThrough
113  Gaudi::Property<bool> m_doPunchThrough;
114 
115  // Fast simulation FastCaloSimTool
117 };
118 
119 #endif //G4FASTSIMULATION_FASTCALOSIM_H
120 
FastCaloSimCaloExtrapolation
Definition: FastCaloSimCaloExtrapolation.h:32
FastCaloSim::m_EkinMinPhotons
Gaudi::Property< float > m_EkinMinPhotons
Definition: FastCaloSim.h:106
FastCaloSim
Definition: FastCaloSim.h:34
IFastCaloSimCaloExtrapolation.h
FastCaloSim::StartOfAthenaEvent
void StartOfAthenaEvent(const EventContext &ctx)
Definition: FastCaloSim.cxx:86
FastCaloSim::m_FastCaloSimTool
FastCaloSimTool * m_FastCaloSimTool
Definition: FastCaloSim.h:116
IFastCaloSimParamSvc.h
FastCaloSim::m_FastCaloSimSvc
ServiceHandle< ISF::IFastCaloSimParamSvc > m_FastCaloSimSvc
Definition: FastCaloSim.h:94
FastCaloSim::m_doElectrons
Gaudi::Property< bool > m_doElectrons
Definition: FastCaloSim.h:102
FastCaloSim::m_AbsEtaMin
Gaudi::Property< float > m_AbsEtaMin
Definition: FastCaloSim.h:104
FastCaloSim::m_AbsEtaMax
Gaudi::Property< float > m_AbsEtaMax
Definition: FastCaloSim.h:105
CaloCellContainerSD
Definition: CaloCellContainerSD.h:22
FastCaloSim::getCaloCellContainerSD
CaloCellContainerSD * getCaloCellContainerSD()
Retrieves the associated sensitive detector responsible for writing out the CaloCellContainer.
Definition: FastCaloSim.cxx:327
FastCaloSim::m_FastCaloSimCaloTransportation
PublicToolHandle< IFastCaloSimCaloTransportation > m_FastCaloSimCaloTransportation
Definition: FastCaloSim.h:85
FastCaloSim::m_doPhotons
Gaudi::Property< bool > m_doPhotons
Definition: FastCaloSim.h:101
IPunchThroughSimWrapper.h
IFastCaloSimCaloTransportation.h
FastCaloSim::m_randomEngineName
Gaudi::Property< std::string > m_randomEngineName
Definition: FastCaloSim.h:81
FastCaloSim::m_EkinMaxElectrons
Gaudi::Property< float > m_EkinMaxElectrons
Definition: FastCaloSim.h:109
FastCaloSim::EndOfAthenaEvent
void EndOfAthenaEvent(const EventContext &ctx)
Definition: FastCaloSim.cxx:94
FastCaloSim::m_doHadrons
Gaudi::Property< bool > m_doHadrons
Definition: FastCaloSim.h:103
FastCaloSim::m_PunchThroughSimWrapper
PublicToolHandle< IPunchThroughSimWrapper > m_PunchThroughSimWrapper
Definition: FastCaloSim.h:91
FastCaloSim::m_doEMECFCS
Gaudi::Property< float > m_doEMECFCS
Definition: FastCaloSim.h:110
FastCaloSim::m_FastCaloSimCaloExtrapolation
PublicToolHandle< IFastCaloSimCaloExtrapolation > m_FastCaloSimCaloExtrapolation
Definition: FastCaloSim.h:87
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
FastCaloSim::m_EkinMinElectrons
Gaudi::Property< float > m_EkinMinElectrons
Definition: FastCaloSim.h:108
IG4CaloTransportTool.h
FastCaloSim::m_doPunchThrough
Gaudi::Property< bool > m_doPunchThrough
Definition: FastCaloSim.h:113
PunchThroughSimWrapper
Class to wrap PunchThrough simulation inside FastCaloSim; Runs both PunchThroughG4Classifier and Punc...
Definition: PunchThroughSimWrapper.h:35
FastCaloSim::ModelTrigger
G4bool ModelTrigger(const G4FastTrack &) override final
Determines the applicability of the fast sim model to this particular track.
Definition: FastCaloSim.cxx:122
FastCaloSimCaloTransportation
Definition: FastCaloSimCaloTransportation.h:21
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 PublicToolHandle< IPunchThroughSimWrapper > &PunchThroughSimWrapper, 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 > &AbsEtaMin, const Gaudi::Property< float > &AbsEtaMax, const Gaudi::Property< float > &EkinMinPhotons, const Gaudi::Property< float > &EkinMaxPhotons, const Gaudi::Property< float > &EkinMinElectrons, const Gaudi::Property< float > &EkinMaxElectrons, const Gaudi::Property< bool > &doEMECFCS, const Gaudi::Property< bool > &doPunchThrough, FastCaloSimTool *FastCaloSimTool)
Definition: FastCaloSim.cxx:38
FastCaloSim::m_rngWrapper
ATHRNG::RNGWrapper * m_rngWrapper
Definition: FastCaloSim.h:82
FastCaloSim::DoIt
void DoIt(const G4FastTrack &, G4FastStep &) override final
Definition: FastCaloSim.cxx:219
FastCaloSim::m_doG4Transport
Gaudi::Property< bool > m_doG4Transport
Definition: FastCaloSim.h:98
FastCaloSim::~FastCaloSim
~FastCaloSim()
Definition: FastCaloSim.h:59
FastCaloSim::m_G4CaloTransportTool
PublicToolHandle< IG4CaloTransportTool > m_G4CaloTransportTool
Definition: FastCaloSim.h:89
FastCaloSim::m_CaloCellContainerSDName
Gaudi::Property< std::string > m_CaloCellContainerSDName
Definition: FastCaloSim.h:96
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:347
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:100
FastCaloSimTool
Definition: FastCaloSimTool.h:27
FastCaloSim::m_rndmGenSvc
ServiceHandle< IAthRNGSvc > m_rndmGenSvc
Definition: FastCaloSim.h:80
FastCaloSim::m_EkinMaxPhotons
Gaudi::Property< float > m_EkinMaxPhotons
Definition: FastCaloSim.h:107
IAthRNGSvc.h
ServiceHandle< IAthRNGSvc >