ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
MMPrimaryGeneratorAction.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file MMPrimaryGeneratorAction.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2017 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
10
// MMPrimaryGeneratorAction.hpp
12
13
#pragma once
14
15
#include <memory>
16
17
#include "
G4SystemOfUnits.hh
"
18
#include "
G4ThreeVector.hh
"
19
#include "
G4VUserPrimaryGeneratorAction.hh
"
20
#include "
globals.hh
"
21
22
class
G4ParticleGun
;
23
class
G4Event
;
24
25
namespace
FW {
26
namespace
Geant4 {
27
37
class
MMPrimaryGeneratorAction
:
public
G4VUserPrimaryGeneratorAction
{
38
public
:
40
MMPrimaryGeneratorAction
(
const
G4String
& particleName =
"geantino"
,
41
G4double
energy
= 1000. *
MeV
,
42
G4int
randomSeed1 = 12345,
43
G4int
randomSeed2 = 23456);
45
~MMPrimaryGeneratorAction
()
override
;
46
48
static
MMPrimaryGeneratorAction
*
Instance
();
49
51
void
GeneratePrimaries
(
G4Event
*)
final
override
;
52
54
G4ThreeVector
direction
() {
return
m_direction
; }
55
57
G4ThreeVector
startPosition
() {
return
m_position
; }
58
59
private
:
61
static
MMPrimaryGeneratorAction
*
fgInstance
;
62
64
std::unique_ptr<G4ParticleGun>
fParticleGun
;
65
67
G4ThreeVector
m_position
;
69
G4ThreeVector
m_direction
;
70
};
71
72
}
// namespace Geant4
73
}
// namespace FW
acts
blob
master
Examples
Algorithms
Geant4
include
ACTFW
Plugins
Geant4
MMPrimaryGeneratorAction.hpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:23
using
1.8.2 with
ECCE GitHub integration