ATLAS Offline Software
Simulation
ISF
ISF_Geant4
ISF_Geant4Tools
src
MCTruthUserAction.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ISF_Geant4Tools_MCTruthUserAction_H
6
#define ISF_Geant4Tools_MCTruthUserAction_H
7
8
9
10
#include <string>
11
12
#include "GaudiKernel/ServiceHandle.h"
13
#include "GaudiKernel/ToolHandle.h"
14
#include "
AthenaBaseComps/AthAlgTool.h
"
15
16
#include "
ISF_Interfaces/ITruthSvc.h
"
17
18
19
/*
20
Comments:
21
Existing implementation Simulation/G4Sim/MCTruth/MCTruth/MCTruthSteppingAction.h is a
22
G4UserSteppingAction and registers itself to FADS::SteppingAction::SetMCTSteppingAction
23
24
Notes:
25
26
employs ISFTruthService
27
needs to know the current geoID, may be obtained from iGeant4::TransportTool, or from current particle in IParticleBroker
28
m_particleBroker->current()->passport().nextGeo()
29
Thus it is defined as a AlgTool, to get these assigned easily via python.
30
*/
31
32
#include "G4UserTrackingAction.hh"
33
34
namespace
G4UA
{
35
namespace
iGeant4
{
36
class
MCTruthUserAction
:
public
G4UserTrackingAction
37
{
38
39
public
:
40
41
struct
Config
42
{
43
ServiceHandle<ISF::ITruthSvc>
truthRecordSvc
=
44
ServiceHandle<ISF::ITruthSvc>
(
"ISF_TruthRecordSvc"
,
"MCTruthUserAction"
);
45
46
int
ilevel
=2;
47
unsigned
int
verboseLevel
=0;
48
};
49
50
MCTruthUserAction
(
const
Config
&
config
);
51
virtual
void
PreUserTrackingAction
(
const
G4Track*)
override
;
52
virtual
void
PostUserTrackingAction
(
const
G4Track*)
override
;
53
private
:
54
Config
m_config
;
55
ISF::ITruthSvc
*
m_truthRecordSvcQuick
;
56
};
// class MCTruthUserAction
57
58
}
// namespace iGeant4
59
60
}
// namespace G4UA
61
62
63
#endif // ISF_Geant4Tools_MCTruthUserAction_H
G4UA::iGeant4::MCTruthUserAction::m_truthRecordSvcQuick
ISF::ITruthSvc * m_truthRecordSvcQuick
used for faster access
Definition:
MCTruthUserAction.h:55
G4UA
for nSW
Definition:
CalibrationDefaultProcessing.h:19
G4UA::iGeant4::MCTruthUserAction::MCTruthUserAction
MCTruthUserAction(const Config &config)
Definition:
MCTruthUserAction.cxx:38
config
Definition:
PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
G4UA::iGeant4::MCTruthUserAction::PostUserTrackingAction
virtual void PostUserTrackingAction(const G4Track *) override
Definition:
MCTruthUserAction.cxx:79
AthAlgTool.h
ISF::ITruthSvc
@ class ITruthSvc
Definition:
ITruthSvc.h:29
G4UA::iGeant4::MCTruthUserAction::PreUserTrackingAction
virtual void PreUserTrackingAction(const G4Track *) override
Definition:
MCTruthUserAction.cxx:60
G4UA::iGeant4::MCTruthUserAction
Definition:
MCTruthUserAction.h:37
G4UA::iGeant4::MCTruthUserAction::Config
Definition:
MCTruthUserAction.h:42
G4UA::iGeant4::MCTruthUserAction::Config::ilevel
int ilevel
Definition:
MCTruthUserAction.h:46
G4UA::iGeant4::MCTruthUserAction::Config::truthRecordSvc
ServiceHandle< ISF::ITruthSvc > truthRecordSvc
Definition:
MCTruthUserAction.h:43
G4UA::iGeant4::MCTruthUserAction::m_config
Config m_config
Definition:
MCTruthUserAction.h:54
ITruthSvc.h
ServiceHandle< ISF::ITruthSvc >
iGeant4
Definition:
Geant4TruthIncident.h:35
G4UA::iGeant4::MCTruthUserAction::Config::verboseLevel
unsigned int verboseLevel
Definition:
MCTruthUserAction.h:47
Generated on Sun Dec 22 2024 21:14:08 for ATLAS Offline Software by
1.8.18