EIC Software
Reference for
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
PHG4TpcDirectLaser.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4TpcDirectLaser.h
1
#ifndef G4TPC_PHG4TPCDIRECTLASER_H
2
#define G4TPC_PHG4TPCDIRECTLASER_H
3
4
#include <
fun4all/SubsysReco.h
>
5
6
#include <phparameter/PHParameterInterface.h>
7
8
#include <TVector3.h>
9
10
#include <cmath>
11
#include <string>
// for string, allocator
12
#include <vector>
// for vector
13
14
class
PHG4HitContainer
;
15
class
SvtxTrackMap
;
16
class
PHG4TruthInfoContainer
;
17
class
PHCompositeNode
;
18
19
class
PHG4TpcDirectLaser
:
public
SubsysReco
,
public
PHParameterInterface
20
{
21
public
:
23
PHG4TpcDirectLaser
(
const
std::string &
name
=
"PHG4TpcDirectLaser"
);
24
26
~PHG4TpcDirectLaser
()
override
=
default
;
27
29
int
InitRun
(
PHCompositeNode
*)
override
;
30
32
int
process_event
(
PHCompositeNode
*)
override
;
33
35
void
SetDefaultParameters
()
override
;
36
38
void
Detector
(
const
std::string &
d
)
39
{
40
detector
=
d
;
41
}
42
44
void
SetPhiStepping
(
int
n
,
double
min
,
double
max
);
45
47
void
SetThetaStepping
(
int
n
,
double
min
,
double
max
);
48
50
int
GetNpatternSteps
()
const
51
{
52
return
nPhiSteps
*
nThetaSteps
;
53
};
54
56
void
SetCurrentPatternStep
(
int
value
)
57
{
58
currentPatternStep
=
value
;
59
}
60
62
void
SetDirectLaserAuto
(
bool
value
)
63
{
64
m_autoAdvanceDirectLaser
=
value
;
65
};
66
67
private
:
69
/* by default there are 4 lasers on each side of the TPC */
70
void
SetupLasers
();
71
73
void
AimToThetaPhi
(
double
theta
,
double
phi
);
74
76
void
AimToPatternStep
(
int
n
);
77
79
void
AimToNextPatternStep
();
80
82
class
Laser
83
{
84
public
:
86
TVector3
m_position
;
87
89
double
m_phi
= 0;
90
92
int
m_direction
= 1;
93
};
94
96
void
AppendLaserTrack
(
double
theta
,
double
phi
,
const
Laser
&);
97
99
std::string
detector
=
"TPC"
;
100
102
std::string
hitnodename
;
103
105
std::vector<Laser>
m_lasers
;
106
108
int
electrons_per_cm
= 300;
109
110
// number of electrons per deposited GeV in TPC gas
116
double
electrons_per_gev
= NAN;
117
119
120
int
nPhiSteps
= 1;
121
int
nThetaSteps
= 1;
122
int
nTotalSteps
= 1;
123
double
minPhi
= 0;
124
double
maxPhi
= 0;
125
double
minTheta
= 0;
126
double
maxTheta
= 0;
128
129
// current patter step
130
int
currentPatternStep
= 0;
131
133
bool
m_autoAdvanceDirectLaser
=
false
;
134
136
PHG4HitContainer
*
m_g4hitcontainer
=
nullptr
;
137
139
PHG4TruthInfoContainer
*
m_g4truthinfo
=
nullptr
;
140
142
std::string
m_track_map_name
=
"SvtxTrackMap"
;
143
SvtxTrackMap
*
m_track_map
=
nullptr
;
144
};
145
146
#endif
fun4all_coresoftware
blob
master
simulation
g4simulation
g4tpc
PHG4TpcDirectLaser.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:50
using
1.8.2 with
EIC GitHub integration