ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsListSvc.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 G4ATLASTOOLS_PHYSICSLISTSVC_H
6#define G4ATLASTOOLS_PHYSICSLISTSVC_H
7
8// Base classes
11
12
14#include "GaudiKernel/ToolHandle.h"
15
16// Classes that are returned
17class G4VModularPhysicsList;
18class G4VUserPhysicsList;
19
20// STL library
21#include <string>
22
23class PhysicsListSvc : public extends<AthService, IPhysicsListSvc>
24{
25public:
26 // Standard constructor and destructor
27 PhysicsListSvc(const std::string& name, ISvcLocator* pSvcLocator);
28 virtual ~PhysicsListSvc() = default;
29
30
31 virtual StatusCode initialize( ) override;
32 // Base class methods from IPhysicsListSvc
33 virtual void CreatePhysicsList() override;
34 virtual G4VUserPhysicsList* GetPhysicsList() override;
35 virtual void SetPhysicsList() override;
36 virtual void SetPhysicsOptions() override;
37
38private:
39
41 void CommandLog(int returnCode, const std::string& commandString) const;
42
43 ToolHandle<IPhysicsOptionTool> m_fastSimulationConstructor{this, "FastSimConstructor", "", "Physics Constructor for fast simulation physics"};
44
45 ToolHandleArray<IPhysicsOptionTool> m_phys_option{this, "PhysOption", {}, "Tool handle array of physics options" };
46 ToolHandleArray<IPhysicsOptionTool> m_phys_decay{this, "PhysicsDecay", {}, "Tool handle array of physics decays"};
47 G4VModularPhysicsList* m_physicsList{};
48 Gaudi::Property<std::string> m_physicsListName{this, "PhysicsList", "FTFP_BERT", "Name for physics list"};
49 Gaudi::Property<double> m_neutronTimeCut{this, "NeutronTimeCut", 0, "Time cut for neutron killer"};
50 Gaudi::Property<double> m_neutronEnergyCut{this, "NeutronEnergyCut", 0, "Energy cut for neutron killer"};
51 Gaudi::Property<double> m_generalCut{this, "GeneralCut", 0, "General cut"};
52 Gaudi::Property<double> m_emMaxEnergy{this, "EMMaxEnergy", -1., "Maximum energy for EM tables"};
53 Gaudi::Property<double> m_emMinEnergy{this, "EMMinEnergy", -1., "Minimum energy for EM tables"};
54 /* --- ATLASSIM-3967 ---
55 Old methods SetDEDXBinning and SetLambdaBinning are replaced in G4 10.4 by
56 SetNumberOfBinsPerDecade which now controls both settings with the same
57 value. Instead of changing the overall number of bins, user should
58 specify the number of bins per energy decade instead.
59 */
60 Gaudi::Property<int> m_emNumberOfBinsPerDecade{this, "EMNumberOfBinsPerDecade", -1, "Number of bins per Energy decade. Used for both DeDx and for the Lambda binning."};
61 Gaudi::Property<bool> m_applyEMCuts{this, "ApplyEMCuts", true, "Apply cuts EM flag in Geant4"};
62 Gaudi::Property<bool> m_quietMode{this, "QuietMode", false, ""};
63 Gaudi::Property<bool> m_unstableAntiNeutrons{this, "UnstableAntiNeutrons",false,"Bugfix for ATLASSIM-6634 until we switch to using Geant4 11"};
64};
65
66#endif
Gaudi::Property< double > m_neutronEnergyCut
!< Time cut for neutrons (in the neutron killer process)
Gaudi::Property< double > m_emMaxEnergy
!< A general cut - this isn't normally used in our simulation
ToolHandleArray< IPhysicsOptionTool > m_phys_option
virtual void SetPhysicsOptions() override
Gaudi::Property< double > m_emMinEnergy
!< Maximum energy of the pre-calculated EM cross-section tables
Gaudi::Property< double > m_neutronTimeCut
!< Name for the physics list (property to be set in the tool)
Gaudi::Property< bool > m_applyEMCuts
!< Number of bins per Energy decade. Used for both DeDx and for the Lambda binning.
virtual void SetPhysicsList() override
Gaudi::Property< int > m_emNumberOfBinsPerDecade
!< Minimum energy of the pre-calculated EM cross-section tables
ToolHandle< IPhysicsOptionTool > m_fastSimulationConstructor
virtual StatusCode initialize() override
Gaudi::Property< bool > m_unstableAntiNeutrons
PhysicsListSvc(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< bool > m_quietMode
!< Switch for the G4 "apply cuts" EM physics flag
virtual G4VUserPhysicsList * GetPhysicsList() override
ToolHandleArray< IPhysicsOptionTool > m_phys_decay
Gaudi::Property< std::string > m_physicsListName
!< Handle on the physics list
G4VModularPhysicsList * m_physicsList
virtual void CreatePhysicsList() override
void CommandLog(int returnCode, const std::string &commandString) const
This command prints a message about a G4Command depending on its returnCode.
virtual ~PhysicsListSvc()=default
Gaudi::Property< double > m_generalCut
!< Energy cut for neutrons (in the neutron killer process)