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
Fun4AllDstPileupInputManager.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Fun4AllDstPileupInputManager.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef G4MAIN_FUN4ALLDSTPILEUPINPUTMANAGER_H
4
#define G4MAIN_FUN4ALLDSTPILEUPINPUTMANAGER_H
5
11
#include <
fun4all/Fun4AllInputManager.h
>
12
#include <
fun4all/Fun4AllReturnCodes.h
>
// for SYNC_NOOBJECT, SYNC_OK
13
14
#include <
phool/PHCompositeNode.h
>
// for PHCompositeNode
15
#include <
phool/PHNodeIOManager.h
>
// for PHNodeIOManager
16
17
#include <gsl/gsl_rng.h>
18
19
#include <map>
20
#include <memory>
21
#include <string>
22
23
class
SyncObject
;
24
29
class
Fun4AllDstPileupInputManager
:
public
Fun4AllInputManager
30
{
31
public
:
32
Fun4AllDstPileupInputManager
(
const
std::string
&
name
=
"DUMMY"
,
const
std::string
&nodename =
"DST"
,
const
std::string
&topnodename =
"TOP"
);
33
int
fileopen
(
const
std::string
&filenam)
override
;
34
int
fileclose
()
override
;
35
int
run
(
const
int
nevents
= 0)
override
;
36
int
BranchSelect
(
const
std::string
&branch,
const
int
iflag)
override
;
37
int
setBranches
()
override
;
38
void
Print
(
const
std::string
&what =
"ALL"
)
const override
;
39
int
PushBackEvents
(
const
int
i
)
override
;
40
41
// Effectivly turn off the synchronization checking (copy from Fun4AllNoSyncDstInputManager)
42
int
SyncIt
(
const
SyncObject
*
/*mastersync*/
)
override
{
return
Fun4AllReturnCodes::SYNC_OK
; }
43
int
GetSyncObject
(
SyncObject
**
/*mastersync*/
)
override
{
return
Fun4AllReturnCodes::SYNC_NOOBJECT
; }
44
int
NoSyncPushBackEvents
(
const
int
nevt)
override
{
return
PushBackEvents
(nevt); }
45
47
void
setCollisionRate
(
double
Hz)
48
{
m_collision_rate
= Hz; }
49
51
void
setTimeBetweenCrossings
(
double
nsec)
52
{
m_time_between_crossings
= nsec; }
53
55
void
setPileupTimeWindow
(
double
tmin,
double
tmax)
56
{
57
m_tmin
= tmin;
58
m_tmax
= tmax;
59
}
61
void
setDetectorActiveCrossings
(
const
std::string
&
name
,
const
int
nbcross);
62
63
void
setDetectorActiveCrossings
(
const
std::string
&
name
,
const
int
min
,
const
int
max);
64
65
private
:
66
68
int
runOne
(
const
int
nevents
= 0);
69
71
72
bool
m_ReadRunTTree
=
true
;
73
int
m_ievent_total
= 0;
74
int
m_ievent_thisfile
= 0;
76
77
std::string
m_fullfilename
;
78
std::string
m_RunNode
=
"RUN"
;
79
std::map<const std::string, int>
m_branchread
;
80
82
PHCompositeNode
*
m_dstNode
=
nullptr
;
83
85
PHCompositeNode
*
m_runNode
=
nullptr
;
86
88
std::unique_ptr<PHCompositeNode>
m_dstNodeInternal
;
89
91
92
std::unique_ptr<PHCompositeNode>
m_runNodeCopy
;
93
std::unique_ptr<PHCompositeNode>
m_runNodeSum
;
95
97
98
std::unique_ptr<PHNodeIOManager>
m_IManager
;
99
101
double
m_time_between_crossings
= 106;
102
104
double
m_collision_rate
= 5e4;
105
107
double
m_tmin
= -13500;
108
110
double
m_tmax
= 13500;
111
113
class
Deleter
114
{
115
public
:
116
void
operator()
(gsl_rng*
rng
)
const
{ gsl_rng_free(rng); }
117
};
118
119
std::unique_ptr<gsl_rng, Deleter>
m_rng
;
120
121
std::map<std::string,std::pair<double,double>>
m_DetectorTiming
;
122
123
};
124
125
#endif
/* __Fun4AllDstPileupInputManager_H__ */
coresoftware
blob
master
simulation
g4simulation
g4main
Fun4AllDstPileupInputManager.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:15
using
1.8.2 with
sPHENIX GitHub integration