ATLAS Offline Software
Loading...
Searching...
No Matches
StoppedParticleFastSimTool Class Reference

#include <StoppedParticleFastSimTool.h>

Inheritance diagram for StoppedParticleFastSimTool:
Collaboration diagram for StoppedParticleFastSimTool:

Public Member Functions

 StoppedParticleFastSimTool (const std::string &type, const std::string &name, const IInterface *parent)
 ~StoppedParticleFastSimTool ()
StatusCode initialize () override final
StatusCode initializeFastSim () override
 Construct and setup the fast simulation model.
virtual StatusCode BeginOfAthenaEvent () override
 Begin of an athena event - do anything that needs to be done at the beginning of each athena event.
virtual StatusCode EndOfAthenaEvent () override
 End of an athena event - do any tidying up required at the end of each athena event.

Protected Member Functions

virtual G4VFastSimulationModel * makeFastSimModel () override final
 Method to make the actual fast simulation model itself, which will be owned by the tool.
G4Region * getRegion () const

Protected Attributes

Gaudi::Property< std::string > m_regionName {this, "RegionName", ""}
 The region to which this fast sim is assigned.
Gaudi::Property< bool > m_noRegions {this, "NoRegions", false}
 This Fast Simulation has no regions associated with it.

Private Attributes

ToolHandle< ISensitiveDetectorm_trackFastSimSDTool

Detailed Description

Definition at line 15 of file StoppedParticleFastSimTool.h.

Constructor & Destructor Documentation

◆ StoppedParticleFastSimTool()

StoppedParticleFastSimTool::StoppedParticleFastSimTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 8 of file StoppedParticleFastSimTool.cxx.

9 : FastSimulationBase(type,name,parent),
10 m_trackFastSimSDTool("TrackFastSimSDTool")
11{
12}
FastSimulationBase(const std::string &type, const std::string &name, const IInterface *parent)
ToolHandle< ISensitiveDetector > m_trackFastSimSDTool

◆ ~StoppedParticleFastSimTool()

StoppedParticleFastSimTool::~StoppedParticleFastSimTool ( )
inline

Definition at line 20 of file StoppedParticleFastSimTool.h.

20{}

Member Function Documentation

◆ BeginOfAthenaEvent()

virtual StatusCode FastSimulationBase::BeginOfAthenaEvent ( )
inlineoverridevirtualinherited

Begin of an athena event - do anything that needs to be done at the beginning of each athena event.

Definition at line 42 of file FastSimulationBase.h.

42{ return StatusCode::SUCCESS; }

◆ EndOfAthenaEvent()

virtual StatusCode FastSimulationBase::EndOfAthenaEvent ( )
inlineoverridevirtualinherited

End of an athena event - do any tidying up required at the end of each athena event.

Definition at line 45 of file FastSimulationBase.h.

45{ return StatusCode::SUCCESS; }

◆ getRegion()

G4Region * FastSimulationBase::getRegion ( ) const
protectedinherited

Definition at line 18 of file FastSimulationBase.cxx.

19{
20 if (m_regionName.value().empty()) {
21 return nullptr;
22 }
23 return G4RegionStore::GetInstance()->GetRegion(m_regionName.value());
24}
Gaudi::Property< std::string > m_regionName
The region to which this fast sim is assigned.

◆ initialize()

StatusCode StoppedParticleFastSimTool::initialize ( )
finaloverride

Definition at line 14 of file StoppedParticleFastSimTool.cxx.

15{
16 CHECK(m_trackFastSimSDTool.retrieve());
17 CHECK(m_trackFastSimSDTool->initializeSD());
18 return StatusCode::SUCCESS;
19}
#define CHECK(...)
Evaluate an expression and check for errors.

◆ initializeFastSim()

StatusCode FastSimulationBase::initializeFastSim ( )
overrideinherited

Construct and setup the fast simulation model.

This method invokes the makeFastSimModel of the derived concrete tool type. It is the derived class's responsibility to assign the fast simulation model to the correct regions. The fast simulation model is registered for deletion. In multi-threaded jobs, this method is called once on each geant4 worker thread during detector construction (ConstructSDandField).

Definition at line 28 of file FastSimulationBase.cxx.

28 {
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)

◆ makeFastSimModel()

G4VFastSimulationModel * StoppedParticleFastSimTool::makeFastSimModel ( )
finaloverrideprotectedvirtual

Method to make the actual fast simulation model itself, which will be owned by the tool.

Must be implemented in all concrete base classes.

Definition at line 21 of file StoppedParticleFastSimTool.cxx.

22{
23 ATH_MSG_DEBUG( "Initializing Fast Sim Model" );
24
25 // Create a fresh Fast Sim Model
26 return new StoppedParticleFastSim(name(), getRegion(), m_trackFastSimSDTool->name());
27}
#define ATH_MSG_DEBUG(x)
G4Region * getRegion() const

Member Data Documentation

◆ m_noRegions

Gaudi::Property<bool> FastSimulationBase::m_noRegions {this, "NoRegions", false}
protectedinherited

This Fast Simulation has no regions associated with it.

Definition at line 54 of file FastSimulationBase.h.

54{this, "NoRegions", false};

◆ m_regionName

Gaudi::Property<std::string> FastSimulationBase::m_regionName {this, "RegionName", ""}
protectedinherited

The region to which this fast sim is assigned.

Definition at line 52 of file FastSimulationBase.h.

52{this, "RegionName", ""};

◆ m_trackFastSimSDTool

ToolHandle<ISensitiveDetector> StoppedParticleFastSimTool::m_trackFastSimSDTool
private

Definition at line 28 of file StoppedParticleFastSimTool.h.


The documentation for this class was generated from the following files: