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
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
#include <TNtuple.h>
10
11
#include <cmath>
12
#include <string>
// for string, allocator
13
#include <vector>
// for vector
14
15
class
PHG4HitContainer
;
16
class
SvtxTrackMap
;
17
class
PHG4TruthInfoContainer
;
18
class
PHCompositeNode
;
19
20
class
PHG4TpcDirectLaser
:
public
SubsysReco
,
public
PHParameterInterface
21
{
22
public
:
24
PHG4TpcDirectLaser
(
const
std::string
&
name
=
"PHG4TpcDirectLaser"
);
25
27
~PHG4TpcDirectLaser
()
override
=
default
;
28
30
int
InitRun
(
PHCompositeNode
*)
override
;
31
33
int
process_event
(
PHCompositeNode
*)
override
;
34
36
void
SetDefaultParameters
()
override
;
37
39
void
Detector
(
const
std::string
&d)
40
{
41
detector
= d;
42
}
43
45
void
SetPhiStepping
(
int
n
,
double
min
,
double
max);
46
48
void
SetThetaStepping
(
int
n
,
double
min
,
double
max);
49
51
void
SetFileStepping
(
int
n
);
52
53
55
int
GetNpatternSteps
()
const
56
{
57
return
nPhiSteps
*
nThetaSteps
;
58
};
59
61
void
SetCurrentPatternStep
(
int
value
)
62
{
63
currentPatternStep
=
value
;
64
}
65
67
void
SetDirectLaserAuto
(
bool
value
)
68
{
69
m_autoAdvanceDirectLaser
=
value
;
70
};
71
73
void
SetDirectLaserPatternfromFile
(
bool
value
)
74
{
75
m_steppingpattern
=
value
;
76
};
77
78
void
SetArbitraryThetaPhi
(
double
theta
,
double
phi
)
79
{
80
arbitrary_theta
=
theta
;
81
arbitrary_phi
=
phi
;
82
}
83
84
private
:
86
/* by default there are 4 lasers on each side of the TPC */
87
void
SetupLasers
();
88
90
void
AimToThetaPhi
(
double
theta
,
double
phi
);
91
93
void
AimToPatternStep
(
int
n
);
94
96
void
AimToPatternStep_File
(
int
n
);
97
98
float
theta_p
,
phi_p
;
99
TNtuple *
pattern
=
nullptr
;
100
102
void
AimToNextPatternStep
();
103
105
class
Laser
106
{
107
public
:
109
TVector3
m_position
;
110
112
double
m_phi
= 0;
113
115
int
m_direction
= 1;
116
};
117
119
void
AppendLaserTrack
(
double
theta
,
double
phi
,
const
Laser
&);
120
122
std::string
detector
=
"TPC"
;
123
125
std::string
hitnodename
;
126
128
std::vector<Laser>
m_lasers
;
129
131
int
electrons_per_cm
= 300;
132
133
// number of electrons per deposited GeV in TPC gas
139
double
electrons_per_gev
= NAN;
140
141
double
arbitrary_theta
= -30.0;
// degrees
142
double
arbitrary_phi
= -30.0;
// degrees
143
145
146
int
nPhiSteps
= 1;
147
int
nThetaSteps
= 1;
148
int
nTotalSteps
= 1;
149
double
minPhi
= 0;
150
double
maxPhi
= 0;
151
double
minTheta
= 0;
152
double
maxTheta
= 0;
154
155
// current patter step
156
int
currentPatternStep
= 0;
157
159
bool
m_autoAdvanceDirectLaser
=
false
;
160
162
bool
m_steppingpattern
=
false
;
163
164
166
PHG4HitContainer
*
m_g4hitcontainer
=
nullptr
;
167
169
PHG4TruthInfoContainer
*
m_g4truthinfo
=
nullptr
;
170
172
std::string
m_track_map_name
=
"SvtxTrackMap"
;
173
SvtxTrackMap
*
m_track_map
=
nullptr
;
174
};
175
176
#endif
coresoftware
blob
master
simulation
g4simulation
g4tpc
PHG4TpcDirectLaser.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:16
using
1.8.2 with
sPHENIX GitHub integration