EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
src
algorithms
digi
PhotoMultiplierHitDigiConfig.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: LGPL-3.0-or-later
2
// Copyright (C) 2022, 2023, Christopher Dilks, Luigi Dello Stritto
3
4
#pragma once
5
6
#include <spdlog/spdlog.h>
7
8
namespace
eicrecon
{
9
class
PhotoMultiplierHitDigiConfig
{
10
public
:
11
// Detector and readout identifiers
12
std::string
detectorName
{
""
};
13
std::string
readoutClass
{
""
};
14
15
// triggering
16
double
hitTimeWindow
=
17
20.0;
// time gate in which 2 input hits will be grouped to 1 output hit // [ns]
18
double
timeResolution
= 1 / 16.0;
// time resolution (= 1 / TDC counts per unit time) // [ns]
19
double
speMean
= 80.0;
// mean ADC counts for a single photon
20
double
speError
= 16.0;
// sigma of ADC counts for a single photon
21
double
pedMean
= 200.0;
// mean ADC counts for the pedestal
22
double
pedError
= 3.0;
// sigma of ADC counts for the pedestal
23
24
// noise
25
bool
enableNoise
=
false
;
26
double
noiseRate
= 20000;
// [Hz]
27
double
noiseTimeWindow
= 20.0;
// [ns]
28
29
// SiPM pixels
30
bool
enablePixelGaps
=
false
;
// enable/disable removal of hits in gaps between pixels
31
32
// overall safety factor
33
/* simulations assume the detector is ideal and perfect, but reality is
34
* often neither; use this safety factor to reduce the number of initial
35
* photon hits for a more conservative estimate of the number of
36
* photoelectrons, or set to 1 to apply no such factor
37
*/
38
double
safetyFactor
= 1.0;
// allowed range: (0,1]
39
40
// quantum efficiency
41
bool
enableQuantumEfficiency
=
true
;
42
// - wavelength units are [nm]
43
// FIXME: figure out how users can override this, maybe an external `yaml` file
44
std::vector<std::pair<double, double>>
quantumEfficiency
= {
45
{315, 0.00}, {325, 0.04}, {340, 0.10}, {350, 0.20}, {370, 0.30}, {400, 0.35},
46
{450, 0.40}, {500, 0.38}, {550, 0.35}, {600, 0.27}, {650, 0.20}, {700, 0.15},
47
{750, 0.12}, {800, 0.08}, {850, 0.06}, {900, 0.04}, {1000, 0.00}};
48
49
/*
50
std::vector<std::pair<double, double> > quantumEfficiency = { // test unit QE
51
{325, 1.00},
52
{900, 1.00}
53
};
54
*/
55
56
friend
std::ostream&
operator<<
(std::ostream& os,
const
PhotoMultiplierHitDigiConfig
& cfg);
57
};
58
59
std::ostream&
operator<<
(std::ostream& os,
const
PhotoMultiplierHitDigiConfig
& cfg) {
60
os << fmt::format(
"{:=^60}"
,
" PhotoMultiplierHitDigiConfig Settings "
) << std::endl;
61
auto
print_param = [&os](
auto
name,
auto
val) {
62
os << fmt::format(
" {:>20} = {:<}"
, name, val) << std::endl;
63
};
64
print_param(
"hitTimeWindow"
, cfg.
hitTimeWindow
);
65
print_param(
"timeResolution"
, cfg.
timeResolution
);
66
print_param(
"speMean"
, cfg.
speMean
);
67
print_param(
"speError"
, cfg.
speError
);
68
print_param(
"pedMean"
, cfg.
pedMean
);
69
print_param(
"pedError"
, cfg.
pedError
);
70
print_param(
"enablePixelGaps"
, cfg.
enablePixelGaps
);
71
print_param(
"safetyFactor"
, cfg.
safetyFactor
);
72
print_param(
"enableNoise"
, cfg.
enableNoise
);
73
print_param(
"noiseRate"
, cfg.
noiseRate
);
74
print_param(
"noiseTimeWindow"
, cfg.
noiseTimeWindow
);
75
os << fmt::format(
"{:-^60}"
,
" Quantum Efficiency vs. Wavelength "
) << std::endl;
76
for
(
auto
& [wl, qe] : cfg.
quantumEfficiency
)
77
os << fmt::format(
" {:>10} {:<}"
, wl, qe) << std::endl;
78
return
os;
79
}
80
81
}
// namespace eicrecon
eicrecon::PhotoMultiplierHitDigiConfig
Definition
PhotoMultiplierHitDigiConfig.h:9
eicrecon::PhotoMultiplierHitDigiConfig::speMean
double speMean
Definition
PhotoMultiplierHitDigiConfig.h:19
eicrecon::PhotoMultiplierHitDigiConfig::detectorName
std::string detectorName
Definition
PhotoMultiplierHitDigiConfig.h:12
eicrecon::PhotoMultiplierHitDigiConfig::noiseRate
double noiseRate
Definition
PhotoMultiplierHitDigiConfig.h:26
eicrecon::PhotoMultiplierHitDigiConfig::readoutClass
std::string readoutClass
Definition
PhotoMultiplierHitDigiConfig.h:13
eicrecon::PhotoMultiplierHitDigiConfig::operator<<
friend std::ostream & operator<<(std::ostream &os, const PhotoMultiplierHitDigiConfig &cfg)
Definition
PhotoMultiplierHitDigiConfig.h:59
eicrecon::PhotoMultiplierHitDigiConfig::pedError
double pedError
Definition
PhotoMultiplierHitDigiConfig.h:22
eicrecon::PhotoMultiplierHitDigiConfig::hitTimeWindow
double hitTimeWindow
Definition
PhotoMultiplierHitDigiConfig.h:16
eicrecon::PhotoMultiplierHitDigiConfig::safetyFactor
double safetyFactor
Definition
PhotoMultiplierHitDigiConfig.h:38
eicrecon::PhotoMultiplierHitDigiConfig::quantumEfficiency
std::vector< std::pair< double, double > > quantumEfficiency
Definition
PhotoMultiplierHitDigiConfig.h:44
eicrecon::PhotoMultiplierHitDigiConfig::pedMean
double pedMean
Definition
PhotoMultiplierHitDigiConfig.h:21
eicrecon::PhotoMultiplierHitDigiConfig::timeResolution
double timeResolution
Definition
PhotoMultiplierHitDigiConfig.h:18
eicrecon::PhotoMultiplierHitDigiConfig::speError
double speError
Definition
PhotoMultiplierHitDigiConfig.h:20
eicrecon::PhotoMultiplierHitDigiConfig::noiseTimeWindow
double noiseTimeWindow
Definition
PhotoMultiplierHitDigiConfig.h:27
eicrecon::PhotoMultiplierHitDigiConfig::enableQuantumEfficiency
bool enableQuantumEfficiency
Definition
PhotoMultiplierHitDigiConfig.h:41
eicrecon::PhotoMultiplierHitDigiConfig::enablePixelGaps
bool enablePixelGaps
Definition
PhotoMultiplierHitDigiConfig.h:30
eicrecon::PhotoMultiplierHitDigiConfig::enableNoise
bool enableNoise
Definition
PhotoMultiplierHitDigiConfig.h:25
eicrecon
-client
Definition
CalorimeterClusterRecoCoG.cc:37
eicrecon::operator<<
std::ostream & operator<<(std::ostream &out, const ImagingTopoClusterConfig::ELayerMode &layerMode)
Definition
ImagingTopoClusterConfig.h:68
Generated by
1.9.8