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
PHG4PileupGenerator.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4PileupGenerator.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef G4MAIN_PHG4PILEUPGENERATOR_H
4
#define G4MAIN_PHG4PILEUPGENERATOR_H
5
6
#include "
PHG4ParticleGeneratorBase.h
"
7
8
#include <string>
// for string
9
10
class
PHCompositeNode
;
11
12
class
PHG4PileupGenerator
:
public
PHG4ParticleGeneratorBase
13
{
14
public
:
15
PHG4PileupGenerator
(
const
std::string &
name
=
"PILEUPGENERATOR"
);
16
~PHG4PileupGenerator
()
override
;
17
18
int
Init
(
PHCompositeNode
*topNode)
override
;
19
int
InitRun
(
PHCompositeNode
*topNode)
override
;
20
int
process_event
(
PHCompositeNode
*topNode)
override
;
21
int
Reset
(
PHCompositeNode
*topNode)
override
;
22
int
ResetEvent
(
PHCompositeNode
*topNode)
override
;
23
int
EndRun
(
const
int
runnumber)
override
;
24
int
End
(
PHCompositeNode
*topNode)
override
;
25
26
void
set_generator
(
PHG4ParticleGeneratorBase
*
generator
) {
_generator
=
generator
; }
27
29
void
set_time_window
(
double
past_nsec,
double
future_nsec)
30
{
31
_min_integration_time
= past_nsec;
32
_max_integration_time
= future_nsec;
33
}
34
void
set_collision_rate
(
double
kHz) {
_collision_rate
= kHz; }
35
void
set_time_between_crossings
(
double
nsec) {
_time_between_crossings
= nsec; }
36
37
private
:
38
PHG4ParticleGeneratorBase
*
_generator
=
nullptr
;
39
40
double
_min_integration_time
= -1000.;
41
double
_max_integration_time
= 1000.;
42
double
_collision_rate
= 100.;
// kHz
43
double
_time_between_crossings
= 106.;
44
45
double
_ave_coll_per_crossing
= 1.;
// recalculated
46
int
_min_crossing
= 0;
// recalculated
47
int
_max_crossing
= 0;
// recalculated
48
};
49
50
#endif
coresoftware
blob
master
simulation
g4simulation
g4main
PHG4PileupGenerator.h
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:44
using
1.8.2 with
ECCE GitHub integration