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
EicProtoGenerator.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file EicProtoGenerator.h
1
2
#include <
FairGenerator.h
>
3
#include <
FairPrimaryGenerator.h
>
4
5
#ifndef _EIC_PROTO_GENERATOR_
6
#define _EIC_PROTO_GENERATOR_
7
8
class
EicProtoGenerator
:
public
FairGenerator
9
{
10
public
:
11
EicProtoGenerator
(
const
char
*
name
):
FairGenerator
(name),
mVerticalBeamDivergence
(0.0),
12
mHorizontalBeamDivergence
(0.0),
mHorizontalBeamRotation
(0.0) {
13
memset(
mCoord
, 0x00,
sizeof
(
mCoord
));
14
memset(
mCoordSigma
, 0x00,
sizeof
(
mCoordSigma
));
15
memset(
mCoordRange
, 0x00,
sizeof
(
mCoordRange
));
16
17
mGaussianCoordinateSmearing
=
true
;
18
};
19
~EicProtoGenerator
() {};
20
21
// This stuff is only good for rough forward proton modeling estimates;
22
// a random 3D rotation with these parameters in [rad] will be applied to the
23
// outgoing particles;
24
void
SetNaiveVerticalBeamDivergence
(
double
value
) {
mVerticalBeamDivergence
=
value
; };
25
void
SetNaiveHorizontalBeamDivergence
(
double
value
) {
mHorizontalBeamDivergence
=
value
; };
26
27
void
SetNaiveHorizontalBeamRotation
(
double
value
) {
mHorizontalBeamRotation
=
value
; };
28
29
// Well, do I need more intelligent access methods here?; FIXME: should be moved
30
// to EicProtoGenerator at some point;
31
void
SetVertex
(
double
x
,
double
y
,
double
z
= 0.0) {
32
mCoord
[0] =
x
;
mCoord
[1] =
y
;
mCoord
[2] =
z
;
33
};
34
double
GetVx
()
const
{
return
mCoord
[0]; };
35
double
GetVy
()
const
{
return
mCoord
[1]; };
36
double
GetVz
()
const
{
return
mCoord
[2]; };
37
void
SetVertexSmearing
(
double
sx,
double
sy,
double
sz = 0.0) {
38
mCoordSigma
[0] = sx;
mCoordSigma
[1] = sy;
mCoordSigma
[2] = sz;
39
mGaussianCoordinateSmearing
=
true
;
40
};
41
void
SetVertexRange
(
double
rx,
double
ry,
double
rz = 0.0) {
42
mCoordRange
[0] = rx;
mCoordRange
[1] = ry;
mCoordRange
[2] = rz;
43
mGaussianCoordinateSmearing
=
false
;
44
};
45
46
double
GetVxSmearing
()
const
{
return
mCoordSigma
[0]; };
47
double
GetVySmearing
()
const
{
return
mCoordSigma
[1]; };
48
double
GetVzSmearing
()
const
{
return
mCoordSigma
[2]; };
49
50
TVector3
GetSimulatedPrimaryVertex
(
void
);
51
52
TVector3
GetModifiedTrack
(
const
TVector3 track);
53
54
double
mVerticalBeamDivergence
,
mHorizontalBeamDivergence
,
mHorizontalBeamRotation
;
55
56
Double_t
mCoord
[3];
// (average) vertex coordinates in [cm]; default: (0,0,0)
57
Double_t
mCoordSigma
[3];
// gaussian vertex smearing (if any) in [cm]; default: (0,0,0)
58
Double_t
mCoordRange
[3];
// uniform vertex range (if any) in [cm]; default: (0,0,0)
59
Bool_t
mGaussianCoordinateSmearing
;
// use gaussian coordinate smearing (default);
60
61
ClassDef
(
EicProtoGenerator
,1);
62
};
63
64
#endif
EicRoot
blob
master
eic
proto
EicProtoGenerator.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:35
using
1.8.2 with
EIC GitHub integration