ATLAS Offline Software
Loading...
Searching...
No Matches
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"
15
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
34namespace G4UA{
35 namespace iGeant4 {
36 class MCTruthUserAction: public G4UserTrackingAction
37 {
38
39 public:
40
41 struct Config
42 {
44 ServiceHandle<ISF::ITruthSvc>("ISF_TruthRecordSvc", "MCTruthUserAction");
45
46 int ilevel=2;
47 unsigned int verboseLevel=0;
48 };
49
51 virtual void PreUserTrackingAction(const G4Track*) override;
52 virtual void PostUserTrackingAction(const G4Track*) override;
53 private:
56 }; // class MCTruthUserAction
57
58 } // namespace iGeant4
59
60} // namespace G4UA
61
62
63#endif // ISF_Geant4Tools_MCTruthUserAction_H
virtual void PreUserTrackingAction(const G4Track *) override
virtual void PostUserTrackingAction(const G4Track *) override
ISF::ITruthSvc * m_truthRecordSvcQuick
used for faster access
MCTruthUserAction(const Config &config)
@ class ITruthSvc
Definition ITruthSvc.h:29
ServiceHandle< ISF::ITruthSvc > truthRecordSvc