EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
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
8namespace eicrecon {
10public:
11 // Detector and readout identifiers
12 std::string detectorName{""};
13 std::string readoutClass{""};
14
15 // triggering
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
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
59std::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
Definition PhotoMultiplierHitDigiConfig.h:9
double speMean
Definition PhotoMultiplierHitDigiConfig.h:19
std::string detectorName
Definition PhotoMultiplierHitDigiConfig.h:12
double noiseRate
Definition PhotoMultiplierHitDigiConfig.h:26
std::string readoutClass
Definition PhotoMultiplierHitDigiConfig.h:13
friend std::ostream & operator<<(std::ostream &os, const PhotoMultiplierHitDigiConfig &cfg)
Definition PhotoMultiplierHitDigiConfig.h:59
double pedError
Definition PhotoMultiplierHitDigiConfig.h:22
double hitTimeWindow
Definition PhotoMultiplierHitDigiConfig.h:16
double safetyFactor
Definition PhotoMultiplierHitDigiConfig.h:38
std::vector< std::pair< double, double > > quantumEfficiency
Definition PhotoMultiplierHitDigiConfig.h:44
double pedMean
Definition PhotoMultiplierHitDigiConfig.h:21
double timeResolution
Definition PhotoMultiplierHitDigiConfig.h:18
double speError
Definition PhotoMultiplierHitDigiConfig.h:20
double noiseTimeWindow
Definition PhotoMultiplierHitDigiConfig.h:27
bool enableQuantumEfficiency
Definition PhotoMultiplierHitDigiConfig.h:41
bool enablePixelGaps
Definition PhotoMultiplierHitDigiConfig.h:30
bool enableNoise
Definition PhotoMultiplierHitDigiConfig.h:25
-client
Definition CalorimeterClusterRecoCoG.cc:37
std::ostream & operator<<(std::ostream &out, const ImagingTopoClusterConfig::ELayerMode &layerMode)
Definition ImagingTopoClusterConfig.h:68