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
PHG4MvtxDigitizer.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4MvtxDigitizer.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
4
#ifndef G4MVTX_PHG4MVTXDIGITIZER_H
5
#define G4MVTX_PHG4MVTXDIGITIZER_H
6
7
#include <
fun4all/SubsysReco.h
>
8
9
#include <gsl/gsl_rng.h>
10
11
#include <map>
12
#include <string>
// for string
13
#include <utility>
// for pair, make_pair
14
#include <vector>
15
16
17
class
PHCompositeNode
;
18
19
class
PHG4MvtxDigitizer
:
public
SubsysReco
20
{
21
public
:
22
PHG4MvtxDigitizer
(
const
std::string &
name
=
"PHG4MvtxDigitizer"
);
23
~PHG4MvtxDigitizer
()
override
;
24
26
int
Init
(
PHCompositeNode
*
/*topNode*/
)
override
{
return
0; }
27
29
int
InitRun
(
PHCompositeNode
*topNode)
override
;
30
32
int
process_event
(
PHCompositeNode
*topNode)
override
;
33
35
int
End
(
PHCompositeNode
*
/*topNode*/
)
override
{
return
0; };
36
37
void
set_adc_scale
(
const
int
layer
,
const
unsigned
short
max_adc,
const
float
energy_per_adc)
38
{
39
_max_adc
.insert(std::make_pair(layer, max_adc));
40
_energy_scale
.insert(std::make_pair(layer, energy_per_adc));
41
}
42
43
void
set_energy_threshold
(
const
float
threshold)
44
{
45
_energy_threshold
= threshold;
46
}
47
48
float
get_energy_threshold
() {
return
_energy_threshold
; }
49
50
private
:
51
void
CalculateMvtxLadderCellADCScale
(
PHCompositeNode
*topNode);
52
void
DigitizeMvtxLadderCells
(
PHCompositeNode
*topNode);
53
54
std::vector<float>
adc_input
;
55
std::vector<int>
is_populated
;
56
57
// settings
58
std::map<int, unsigned short>
_max_adc
;
59
std::map<int, float>
_energy_scale
;
60
float
_energy_threshold
;
61
63
gsl_rng *
RandomGenerator
;
64
};
65
66
#endif
fun4all_coresoftware
blob
master
simulation
g4simulation
g4mvtx
PHG4MvtxDigitizer.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:50
using
1.8.2 with
EIC GitHub integration