ATLAS Offline Software
Loading...
Searching...
No Matches
G4AtlasPrimaryGeneratorAction.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Local includes
7
8namespace G4UA
9{
10
11 //---------------------------------------------------------------------------
12 // Generate primaries action
13 //---------------------------------------------------------------------------
15 {
16 // Loop over my pre-actions and apply each one in turn
17 for(auto action : m_actions){
18 action->GeneratePrimaries(anEvent);
19 }
20 }
21
22 //---------------------------------------------------------------------------
23 // Add one action to the list
24 //---------------------------------------------------------------------------
25 void G4AtlasPrimaryGeneratorAction::addPrimaryGeneratorAction(G4VUserPrimaryGeneratorAction* action)
26 {
27 m_actions.push_back(action);
28 }
29
30} // namespace G4UA
std::vector< G4VUserPrimaryGeneratorAction * > m_actions
List of ATLAS primary generator actions.
void GeneratePrimaries(G4Event *anEvent) override final
Geant4 method for primary generation.
void addPrimaryGeneratorAction(G4VUserPrimaryGeneratorAction *action)
Add one action to the list.