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
DSTEmulator.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file DSTEmulator.h
1
#ifndef G4EVAL_DSTEMULATOR_H
2
#define G4EVAL_DSTEMULATOR_H
3
9
#include "
DSTCompressor.h
"
10
11
#include <
trackbase/ActsGeometry.h
>
12
#include <
trackbase/TrkrDefs.h
>
13
#include <
trackbase_historic/ActsTransformations.h
>
14
15
#include <
fun4all/SubsysReco.h
>
16
17
#include <TRandom.h>
18
19
#include <map>
20
#include <set>
21
#include <string>
22
#include <vector>
23
24
class
PHG4Hit
;
25
class
PHG4HitContainer
;
26
class
PHG4Particle
;
27
class
PHG4TruthInfoContainer
;
28
class
SvtxTrack
;
29
class
SvtxTrackMap
;
30
class
TrackEvaluationContainerv1
;
31
class
TrkrCluster
;
32
class
TrkrClusterContainer
;
33
class
TrkrClusterHitAssoc
;
34
class
TrkrHitSetContainer
;
35
class
TrkrHitTruthAssoc
;
36
37
class
TFile;
38
class
TNtuple;
39
40
class
DSTEmulator
:
public
SubsysReco
41
{
42
public
:
44
DSTEmulator
(
const
std::string
& =
"DSTEmulator"
,
45
const
std::string
&
filename
=
"DSTana.root"
,
46
int
nBits
= 8,
47
int
sabotage
= 0,
48
bool
compress =
true
);
49
51
int
Init
(
PHCompositeNode
*)
override
;
52
54
int
InitRun
(
PHCompositeNode
*)
override
;
55
57
int
process_event
(
PHCompositeNode
*)
override
;
58
60
int
End
(
PHCompositeNode
*)
override
;
61
62
private
:
64
int
load_nodes
(
PHCompositeNode
*);
65
67
void
evaluate_tracks
();
68
float
compress_dx
(
float
in_val);
69
float
compress_dy
(
float
in_val);
70
// get geant hits associated to a cluster
71
using
G4HitSet
= std::set<PHG4Hit*>;
72
G4HitSet
find_g4hits
(
TrkrDefs::cluskey
)
const
;
73
Acts::Vector3
getGlobalPosition
(
TrkrDefs::cluskey
,
TrkrCluster
*)
const
;
75
std::pair<int, int>
get_max_contributor
(
SvtxTrack
*)
const
;
76
78
int
get_embed
(
PHG4Particle
*)
const
;
79
81
TrackEvaluationContainerv1
*
m_container
=
nullptr
;
82
84
TrkrHitSetContainer
*
m_hitsetcontainer
=
nullptr
;
85
87
TrkrClusterContainer
*
m_cluster_map
=
nullptr
;
88
90
TrkrClusterHitAssoc
*
m_cluster_hit_map
=
nullptr
;
91
93
TrkrHitTruthAssoc
*
m_hit_truth_map
=
nullptr
;
94
96
SvtxTrackMap
*
m_track_map
=
nullptr
;
97
99
100
PHG4HitContainer
*
m_g4hits_tpc
=
nullptr
;
101
PHG4HitContainer
*
m_g4hits_intt
=
nullptr
;
102
PHG4HitContainer
*
m_g4hits_mvtx
=
nullptr
;
103
PHG4HitContainer
*
m_g4hits_micromegas
=
nullptr
;
105
107
PHG4TruthInfoContainer
*
m_g4truthinfo
=
nullptr
;
108
109
// map cluster keys to g4hits
110
using
G4HitMap
= std::map<TrkrDefs::cluskey, G4HitSet>;
111
mutable
G4HitMap
m_g4hit_map
;
112
113
ActsGeometry
*
m_tGeometry
=
nullptr
;
114
ActsTransformations
m_transform
;
115
116
TNtuple*
_dst_data
{};
117
118
// output file
119
std::string
_filename
;
120
TFile*
_tfile
;
121
122
DSTCompressor
*
m_compressor
{};
123
124
// Number of bits for the integer representation after compression
125
int
nBits
= 8;
126
// replace the decompressed residuals by a large number
127
int
sabotage
= 0;
128
// random seed
129
TRandom
rnd
;
130
// switch to apply the compressed residuals to cluster positions
131
bool
apply_compression
=
true
;
132
};
133
134
#endif // G4EVAL_DSTEMULATOR_H
coresoftware
blob
master
simulation
g4simulation
g4eval
DSTEmulator.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:13
using
1.8.2 with
sPHENIX GitHub integration