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
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 <
fun4all/SubsysReco.h
>
10
#include <
trackbase/TrkrDefs.h
>
11
#include <
trackbase/ActsSurfaceMaps.h
>
12
#include <
trackbase/ActsTrackingGeometry.h
>
13
#include <
trackbase_historic/ActsTransformations.h
>
14
15
#include <map>
16
#include <set>
17
#include <string>
18
#include <vector>
19
#include <TRandom.h>
20
21
#include "
DSTCompressor.h
"
22
23
class
PHG4Hit
;
24
class
PHG4HitContainer
;
25
class
PHG4Particle
;
26
class
PHG4TruthInfoContainer
;
27
class
SvtxTrack
;
28
class
SvtxTrackMap
;
29
class
TrackEvaluationContainerv1
;
30
class
TrkrCluster
;
31
class
TrkrClusterContainer
;
32
class
TrkrClusterHitAssoc
;
33
class
TrkrHitSetContainer
;
34
class
TrkrHitTruthAssoc
;
35
36
class
TFile;
37
class
TNtuple;
38
39
class
DSTEmulator
:
public
SubsysReco
40
{
41
public
:
42
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
:
63
65
int
load_nodes
(
PHCompositeNode
* );
66
68
void
evaluate_tracks
();
69
float
compress_dx
(
float
in_val);
70
float
compress_dy
(
float
in_val);
71
// get geant hits associated to a cluster
72
using
G4HitSet
= std::set<PHG4Hit*>;
73
G4HitSet
find_g4hits
(
TrkrDefs::cluskey
)
const
;
74
Acts::Vector3D
getGlobalPosition
(
TrkrCluster
*)
const
;
76
std::pair<int,int>
get_max_contributor
(
SvtxTrack
* )
const
;
77
79
int
get_embed
(
PHG4Particle
*)
const
;
80
82
TrackEvaluationContainerv1
*
m_container
=
nullptr
;
83
85
TrkrHitSetContainer
*
m_hitsetcontainer
=
nullptr
;
86
88
TrkrClusterContainer
*
m_cluster_map
=
nullptr
;
89
91
TrkrClusterHitAssoc
*
m_cluster_hit_map
=
nullptr
;
92
94
TrkrHitTruthAssoc
*
m_hit_truth_map
=
nullptr
;
95
97
SvtxTrackMap
*
m_track_map
=
nullptr
;
98
100
101
PHG4HitContainer
*
m_g4hits_tpc
=
nullptr
;
102
PHG4HitContainer
*
m_g4hits_intt
=
nullptr
;
103
PHG4HitContainer
*
m_g4hits_mvtx
=
nullptr
;
104
PHG4HitContainer
*
m_g4hits_micromegas
=
nullptr
;
106
108
PHG4TruthInfoContainer
*
m_g4truthinfo
=
nullptr
;
109
110
// map cluster keys to g4hits
111
using
G4HitMap
= std::map<TrkrDefs::cluskey,G4HitSet>;
112
mutable
G4HitMap
m_g4hit_map
;
113
114
ActsSurfaceMaps
*
m_surfMaps
=
nullptr
;
115
ActsTrackingGeometry
*
m_tGeometry
=
nullptr
;
116
ActsTransformations
m_transform
;
117
118
TNtuple *
_dst_data
;
119
120
// output file
121
std::string
_filename
;
122
TFile *
_tfile
;
123
124
DSTCompressor
*
m_compressor
;
125
126
// Number of bits for the integer representation after compression
127
int
nBits
= 8;
128
// replace the decompressed residuals by a large number
129
int
sabotage
= 0;
130
// random seed
131
TRandom
rnd
;
132
// switch to apply the compressed residuals to cluster positions
133
bool
apply_compression
=
true
;
134
135
};
136
137
#endif // G4EVAL_DSTEMULATOR_H
coresoftware
blob
master
simulation
g4simulation
g4eval
DSTEmulator.h
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:42
using
1.8.2 with
ECCE GitHub integration