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
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
class
PHCompositeNode
;
17
18
class
PHG4MvtxDigitizer
:
public
SubsysReco
19
{
20
public
:
21
PHG4MvtxDigitizer
(
const
std::string
&
name
=
"PHG4MvtxDigitizer"
);
22
~PHG4MvtxDigitizer
()
override
;
23
25
int
Init
(
PHCompositeNode
*
/*topNode*/
)
override
{
return
0; }
26
28
int
InitRun
(
PHCompositeNode
*topNode)
override
;
29
31
int
process_event
(
PHCompositeNode
*topNode)
override
;
32
34
int
End
(
PHCompositeNode
*
/*topNode*/
)
override
{
return
0; };
35
36
void
set_adc_scale
(
const
int
layer
,
const
unsigned
short
max_adc,
const
float
energy_per_adc)
37
{
38
_max_adc
.insert(std::make_pair(layer, max_adc));
39
_energy_scale
.insert(std::make_pair(layer, energy_per_adc));
40
}
41
42
void
set_energy_threshold
(
const
float
threshold)
43
{
44
_energy_threshold
= threshold;
45
}
46
47
float
get_energy_threshold
() {
return
_energy_threshold
; }
48
49
private
:
50
void
CalculateMvtxLadderCellADCScale
(
PHCompositeNode
*topNode);
51
void
DigitizeMvtxLadderCells
(
PHCompositeNode
*topNode);
52
53
std::vector<float>
adc_input
;
54
std::vector<int>
is_populated
;
55
56
// settings
57
std::map<int, unsigned short>
_max_adc
;
58
std::map<int, float>
_energy_scale
;
59
float
_energy_threshold
;
60
62
gsl_rng *
RandomGenerator
;
63
};
64
65
#endif
coresoftware
blob
master
simulation
g4simulation
g4mvtx
PHG4MvtxDigitizer.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:16
using
1.8.2 with
sPHENIX GitHub integration