ATLAS Offline Software
Loading...
Searching...
No Matches
TilePulseShapes.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TILECONDITIONS_TILEPULSESHAPES_H
6#define TILECONDITIONS_TILEPULSESHAPES_H
7
8#include <vector>
9#include <memory>
10#include "GaudiKernel/MsgStream.h"
11
13#define MAX_PMT 48
14
15#define MAX_SAMPLES 16
16
17#define MAX_LO_PULSE_CIS 100
18#define MAX_LO_PULSE_CIS_SMALL 100
19#define MAX_HI_PULSE_CIS 100
20#define MAX_HI_PULSE_CIS_SMALL 100
21#define MAX_LO_PULSE_PHYS 401
22#define MAX_HI_PULSE_PHYS 401
23#define MAX_LO_PULSE_LAS 100
24#define MAX_HI_PULSE_LAS 100
25
26// constants for digi data pulse fits
27#define EPS_DG 1.0E-8
28#define SATURATED_ADC_VALUE 1023.0
29#define DELTA_CHI2 0.01
30#define MAX_CHI2 1.0E+5
31
32typedef struct {
33
35 std::vector<double> m_tlcis; // CIS pulse shape, big cap 100 pF
36 std::vector<double> m_ylcis;
37 std::vector<double> m_tslcis; // CIS pulse shape, small cap 5.2 pF
38 std::vector<double> m_yslcis;
39 std::vector<double> m_tleaklo;
40 std::vector<double> m_leaklo;
41 std::vector<double> m_tsleaklo;
42 std::vector<double> m_sleaklo;
43
45 std::vector<double> m_thcis; // CIS pulse shape, big cap 100 pF
46 std::vector<double> m_yhcis;
47 std::vector<double> m_tshcis; // CIS pulse shape, small cap 5.2 pF
48 std::vector<double> m_yshcis;
49 std::vector<double> m_tleakhi;
50 std::vector<double> m_leakhi;
51 std::vector<double> m_tsleakhi;
52 std::vector<double> m_sleakhi;
53
55 std::vector<double> m_tlphys;
56 std::vector<double> m_ylphys;
57
59 std::vector<double> m_thphys;
60 std::vector<double> m_yhphys;
61
63 std::vector<double> m_tllas;
64 std::vector<double> m_yllas;
65
67 std::vector<double> m_thlas;
68 std::vector<double> m_yhlas;
69
70 // Derivatives of the pulse shapes:
71
73 std::vector<double> m_tdlcis;
74 std::vector<double> m_ydlcis;
75 std::vector<double> m_tdslcis;
76 std::vector<double> m_ydslcis;
77 std::vector<double> m_tdleaklo;
78 std::vector<double> m_dleaklo;
79 std::vector<double> m_tdsleaklo;
80 std::vector<double> m_dsleaklo;
81
83 std::vector<double> m_tdhcis;
84 std::vector<double> m_ydhcis;
85 std::vector<double> m_tdshcis;
86 std::vector<double> m_ydshcis;
87 std::vector<double> m_tdleakhi;
88 std::vector<double> m_dleakhi;
89 std::vector<double> m_tdsleakhi;
90 std::vector<double> m_dsleakhi;
91
93 std::vector<double> m_tdlphys;
94 std::vector<double> m_ydlphys;
95
97 std::vector<double> m_tdhphys;
98 std::vector<double> m_ydhphys;
99
101 std::vector<double> m_tdllas;
102 std::vector<double> m_ydllas;
103
105 std::vector<double> m_tdhlas;
106 std::vector<double> m_ydhlas;
107
108 // Digitizer noise RMS as a function of channel number
109
111 std::vector<double> m_noiseOrigLo;
112 std::vector<double> m_noiseOrigHi;
113
115 std::vector<double> m_noiseNkLo;
116 std::vector<double> m_noiseNkHi;
117
119
121
122friend class TileInfoLoader;
123
124 public:
125
128
129 void load(MsgStream &log);
130
131 const TilePulseShapesStruct * TilePSstruct () const { return m_shapes.get(); }
132
133 bool loaded() { return m_loaded; }
134
135 private:
136
137 // CIS Pulse shapes and derivatives
138 std::string m_filenameLoCIS;
140 std::string m_filenameSLoCIS;
142 std::string m_filenameHiCIS;
144 std::string m_filenameSHiCIS;
146
147 // CIS Leakage Pulse shapes and derivatives
148 std::string m_filenameSLeakLo;
149 std::string m_filenameLeakLo;
151 std::string m_filenameDLeakLo;
152 std::string m_filenameSLeakHi;
153 std::string m_filenameLeakHi;
155 std::string m_filenameDLeakHi;
156
157 // Physics Pulse shapes and derivatives
158 std::string m_filenameLoPhys;
159 std::string m_filenameHiPhys;
162
163 // Laser Pulse shapes and derivatives
164 std::string m_filenameLoLas;
165 std::string m_filenameHiLas;
168
169 // Digitizer noise RMS as a function of channel number
171 std::string m_filenameNkNoise;
172
174 std::unique_ptr<TilePulseShapesStruct> m_shapes;
175
176 bool ReadFile(MsgStream &log, const std::string& fname, const char *xname, const char * yname,
177 std::vector<double> & x, std::vector<double> & y, int nskip=0);
178};
179
180#endif // TILECONDITIONS_TILEPULSESHAPES_H
#define y
#define x
std::string m_filenameDSLeakHi
std::string m_filenameHiCIS
std::string m_filenameHiCISDer
std::string m_filenameLeakLo
std::string m_filenameLoCIS
std::string m_filenameLoPhys
std::string m_filenameSLoCISDer
const TilePulseShapesStruct * TilePSstruct() const
std::string m_filenameLeakHi
std::string m_filenameHiLasDer
std::string m_filenameSLoCIS
bool ReadFile(MsgStream &log, const std::string &fname, const char *xname, const char *yname, std::vector< double > &x, std::vector< double > &y, int nskip=0)
friend class TileInfoLoader
void load(MsgStream &log)
std::string m_filenameSLeakLo
std::string m_filenameHiPhysDer
std::string m_filenameDLeakLo
std::string m_filenameSHiCISDer
std::string m_filenameDLeakHi
std::string m_filenameOrigNoise
std::string m_filenameLoPhysDer
std::string m_filenameSHiCIS
std::unique_ptr< TilePulseShapesStruct > m_shapes
std::string m_filenameLoLas
std::string m_filenameSLeakHi
std::string m_filenameDSLeakLo
std::string m_filenameNkNoise
std::string m_filenameHiPhys
std::string m_filenameHiLas
std::string m_filenameLoCISDer
std::string m_filenameLoLasDer
std::vector< double > m_tdllas
Low Gain Pulse Laser.
std::vector< double > m_noiseNkLo
(2) Noise with resistors added to PMT channels (so-called noise-killers)
std::vector< double > m_noiseOrigHi
std::vector< double > m_leaklo
std::vector< double > m_yshcis
std::vector< double > m_tsleaklo
std::vector< double > m_tlcis
Low Gain Pulse CIS.
std::vector< double > m_leakhi
std::vector< double > m_tdsleaklo
std::vector< double > m_ylphys
std::vector< double > m_tlphys
Low Gain Pulse Physics.
std::vector< double > m_dleakhi
std::vector< double > m_yhphys
std::vector< double > m_dleaklo
std::vector< double > m_ydllas
std::vector< double > m_tdleakhi
std::vector< double > m_tllas
Low Gain Pulse Laser.
std::vector< double > m_noiseOrigLo
(1) Original noise
std::vector< double > m_tleakhi
std::vector< double > m_tdsleakhi
std::vector< double > m_tdslcis
std::vector< double > m_tsleakhi
std::vector< double > m_ydslcis
std::vector< double > m_ydhcis
std::vector< double > m_tdlphys
Low Gain Pulse Physics.
std::vector< double > m_ylcis
std::vector< double > m_dsleakhi
std::vector< double > m_ydlcis
std::vector< double > m_thphys
Hi Gain Pulse Physics.
std::vector< double > m_tdhcis
Hi Gain Pulse CIS.
std::vector< double > m_tdlcis
Low Gain Pulse CIS.
std::vector< double > m_tdleaklo
std::vector< double > m_yllas
std::vector< double > m_tleaklo
std::vector< double > m_tdshcis
std::vector< double > m_yslcis
std::vector< double > m_tdhlas
Hi Gain Pulse Laser.
std::vector< double > m_sleakhi
std::vector< double > m_yhcis
std::vector< double > m_ydshcis
std::vector< double > m_dsleaklo
std::vector< double > m_thcis
Hi Gain Pulse CIS.
std::vector< double > m_ydhphys
std::vector< double > m_tdhphys
Hi Gain Pulse Physics.
std::vector< double > m_ydlphys
std::vector< double > m_sleaklo
std::vector< double > m_tslcis
std::vector< double > m_tshcis
std::vector< double > m_thlas
Hi Gain Pulse Laser.
std::vector< double > m_ydhlas
std::vector< double > m_noiseNkHi
std::vector< double > m_yhlas