ATLAS Offline Software
Loading...
Searching...
No Matches
G4AtlasTrackingAction.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Local includes
7
8namespace G4UA
9{
10
11 //---------------------------------------------------------------------------
12 // Constructor
13 //---------------------------------------------------------------------------
17
18 //---------------------------------------------------------------------------
19 // Pre-tracking action
20 //---------------------------------------------------------------------------
22 {
23 // Loop over my pre-actions and apply each one in turn
24 for(auto action : m_trackActions){
25 action->PreUserTrackingAction(trk);
26 }
27 }
28
29 //---------------------------------------------------------------------------
30 // Post-tracking action
31 //---------------------------------------------------------------------------
33 {
34 // Loop over my post-actions and apply each one in turn
35 for(auto action : m_trackActions){
36 action->PostUserTrackingAction(trk);
37 }
38 }
39
40 //---------------------------------------------------------------------------
41 // Add one action to the list
42 //---------------------------------------------------------------------------
43 void G4AtlasTrackingAction::addTrackAction(G4UserTrackingAction* action)
44 {
45 m_trackActions.push_back(action);
46 }
47
48} // namespace G4UA
void PreUserTrackingAction(const G4Track *trk) override final
Geant4 method for pre-tracking action.
std::vector< G4UserTrackingAction * > m_trackActions
List of ATLAS actions.
void addTrackAction(G4UserTrackingAction *action)
Add one action to the list.
void PostUserTrackingAction(const G4Track *trk) override final
Geant4 method for post-tracking action.