ATLAS Offline Software
Loading...
Searching...
No Matches
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
28class G4FieldTrack;
29class G4SafetyHelper;
30
31class 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
83#endif //G4FASTSIMULATION_FASTCALOSIM_H
84
CaloCellContainerSD * getCaloCellContainerSD()
Retrieves the associated sensitive detector responsible for writing out the CaloCellContainer.
void DoIt(const G4FastTrack &, G4FastStep &) override final
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)
std::string m_CaloCellContainerSDName
Definition FastCaloSim.h:75
PublicToolHandle< IFastCaloSimCaloExtrapolation > m_FastCaloSimCaloExtrapolation
Definition FastCaloSim.h:66
PublicToolHandle< IG4CaloTransportTool > m_G4CaloTransportTool
Definition FastCaloSim.h:68
G4bool ModelTrigger(const G4FastTrack &) override final
Determines the applicability of the fast sim model to this particular track.
bool m_doG4Transport
Definition FastCaloSim.h:77
G4bool passedIDCaloBoundary(const G4FastTrack &fastTrack)
Check if the particle is located at the proper ID-Calo parametrization boundary and is travelling out...
ServiceHandle< ISF::IFastCaloSimParamSvc > m_FastCaloSimSvc
Definition FastCaloSim.h:73
bool m_doPunchThrough
Definition FastCaloSim.h:80
PublicToolHandle< IFastCaloSimCaloTransportation > m_FastCaloSimCaloTransportation
Definition FastCaloSim.h:64
G4bool IsApplicable(const G4ParticleDefinition &) override final
PublicToolHandle< IPunchThroughSimWrapper > m_PunchThroughSimWrapper
Definition FastCaloSim.h:70
A tool which transports particles through the Geant4 geometry.
Class to wrap PunchThrough simulation inside FastCaloSim; Runs both PunchThroughG4Classifier and Punc...