ATLAS Offline Software
Loading...
Searching...
No Matches
TruthStrategyManager.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5// class header
7
8// Framework includes
10
12
13// Geant4 Includes
14#include "G4Event.hh"
15#include "G4EventManager.hh"
16#include "G4PhysicalVolumeStore.hh"
17#include "G4Step.hh"
18#include "G4TransportationManager.hh"
19#include "G4VPhysicalVolume.hh"
20#include "G4VSolid.hh"
21
22// ISF includes
26
27// DetectorDescription
31
37
39{
40 static const TruthStrategyManager theMgr;
41 return theMgr;
42}
43
44TruthStrategyManager& TruthStrategyManager::GetStrategyManager_nc ATLAS_NOT_THREAD_SAFE ()
45{
46 return const_cast<TruthStrategyManager&>(GetStrategyManager());
47}
48
50{
51 m_truthSvc = truthSvc;
52}
53
54
56{
57 m_geoIDSvc = geoIDSvc;
58}
59
60bool TruthStrategyManager::CreateTruthIncident(const G4Step* aStep, int subDetVolLevel) const
61{
63
64 iGeant4::Geant4TruthIncident truth(aStep, geoID);
65
66 m_truthSvc->registerTruthIncident(truth);
67 return false;
68}
69
TruthStrategyManager &TruthStrategyManager::GetStrategyManager_nc ATLAS_NOT_THREAD_SAFE()
Install fatal handler with default options.
The interface to chose between the sub geometry services, realized as an AlgTool since it does not ha...
Definition IGeoIDSvc.h:41
@ class ITruthSvc
Definition ITruthSvc.h:29
Singleton class for creating truth incidents.
ISF::ITruthSvc * m_truthSvc
ISF Services the TruthStrategyManager talks to.
ISF::IGeoIDSvc * m_geoIDSvc
void SetISFGeoIDSvc(ISF::IGeoIDSvc *geoIDSvc)
Define which ISF GeoIDSvc to use.
void SetISFTruthSvc(ISF::ITruthSvc *truthSvc)
Define which ISF TruthService to use.
bool CreateTruthIncident(const G4Step *, int subDetVolLevel) const
Returns true if any of the truth strategies return true.
static const TruthStrategyManager & GetStrategyManager()
Retrieve the (const) singleton instance.
ISF_Geant4 specific implementation of the ISF::ITruthIncident.
static AtlasDetDescr::AtlasRegion nextGeoId(const G4Step *aStep, int truthVolLevel, ISF::IGeoIDSvc *geoIDSvc)
AtlasRegion
A simple enum of ATLAS regions and sub-detectors.
Definition AtlasRegion.h:21