Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PrimaryGeneratorAction.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PrimaryGeneratorAction.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2020 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#pragma once
10
11
#include "
ActsExamples/EventData/SimParticle.hpp
"
12
13
#include <memory>
14
15
#include <G4ParticleTable.hh>
16
#include <G4SystemOfUnits.hh>
17
#include <G4ThreeVector.hh>
18
#include <G4VUserPrimaryGeneratorAction.hh>
19
#include <globals.hh>
20
21
class
G4ParticleGun;
22
class
G4Event;
23
24
namespace
ActsExamples {
25
26
namespace
Geant4::HepMC3 {
27
31
class
PrimaryGeneratorAction
:
public
G4VUserPrimaryGeneratorAction {
32
public
:
34
PrimaryGeneratorAction
(G4int randomSeed1 = 12345, G4int randomSeed2 = 23456);
36
~PrimaryGeneratorAction
()
override
;
37
39
static
PrimaryGeneratorAction
*
instance
();
40
42
void
GeneratePrimaries
(G4Event*
event
)
override
;
43
45
void
prepareParticleGun
(
const
ActsExamples::SimParticle
& part);
46
47
private
:
49
static
PrimaryGeneratorAction
*
s_instance
;
50
52
std::unique_ptr<G4ParticleGun>
m_particleGun
;
54
G4ParticleTable*
m_particleTable
;
55
};
56
}
// namespace Geant4::HepMC3
57
58
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Algorithms
Geant4HepMC
src
PrimaryGeneratorAction.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:36
using
1.8.2 with
sPHENIX GitHub integration