ATLAS Offline Software
Loading...
Searching...
No Matches
FastSimulationBase.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7// Geant4 includes used in functions
8#include "G4AutoDelete.hh"
9#include <G4Region.hh>
10#include "G4RegionStore.hh"
11#include "G4VFastSimulationModel.hh"
12
13FastSimulationBase::FastSimulationBase(const std::string& type, const std::string& name, const IInterface* parent)
14 : base_class(type,name,parent)
15{
16}
17
19{
20 if (m_regionName.value().empty()) {
21 return nullptr;
22 }
23 return G4RegionStore::GetInstance()->GetRegion(m_regionName.value());
24}
25
26
27// Athena method, used to get out the G4 geometry and set up the Fast Simulation Models
29 ATH_MSG_VERBOSE( name() << "::initializeFastSim()" );
30
31 // Instantiate the FastSimModel for this geant4 thread and register it for deletion
32 G4AutoDelete::Register(makeFastSimModel());
33
34 return StatusCode::SUCCESS;
35}
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< std::string > m_regionName
The region to which this fast sim is assigned.
StatusCode initializeFastSim() override
Construct and setup the fast simulation model.
FastSimulationBase(const std::string &type, const std::string &name, const IInterface *parent)
G4Region * getRegion() const