MUSIC
unknown
Analysis for the MUSIC active-target ionization chamber
Toggle main menu visibility
Loading...
Searching...
No Matches
Normalization.hpp
Go to the documentation of this file.
1
#ifndef NORMALIZATION_HPP
2
#define NORMALIZATION_HPP
3
4
#include "
Constants.hpp
"
5
#include <Rtypes.h>
6
#include <TTree.h>
7
26
struct
EnergyView
{
29
UShort_t
leftdE_adc
[16];
30
UShort_t
rightdE_adc
[16];
31
UShort_t
strip0_adc
;
32
UShort_t
strip17_adc
;
33
UShort_t
hits_adc
[36];
34
Short_t
cathode_adc
;
35
Short_t
grid_adc
;
37
40
Float_t
gain_left
[16];
41
Float_t
gain_right
[16];
46
Float_t
offset_left
[16];
47
Float_t
offset_right
[16];
48
Float_t
gain_strip0
;
49
Float_t
gain_strip17
;
50
Float_t
gain_cathode
;
54
Float_t
gain_grid
;
58
Float_t
strip_factor
[18];
65
Float_t
strip_offset
[18];
68
Bool_t
is_normed
;
70
77
Double_t
left
[16];
78
Double_t
right
[16];
79
Double_t
strip0
;
80
Double_t
strip17
;
81
Double_t
cathode
;
82
Double_t
grid
;
84
85
TTree *
tree_
;
86
Int_t
loaded_tree_
;
87
89
EnergyView
()
90
:
strip0_adc
(0),
strip17_adc
(0),
cathode_adc
(0),
grid_adc
(0),
91
gain_strip0
(0.0f),
gain_strip17
(0.0f),
gain_cathode
(0.0f),
92
gain_grid
(0.0f),
is_normed
(kFALSE),
strip0
(0.0),
strip17
(0.0),
93
cathode
(0.0),
grid
(0.0),
tree_
(nullptr),
loaded_tree_
(-1) {
94
for
(Int_t k = 0; k < 16; k++) {
95
leftdE_adc
[k] = 0;
96
rightdE_adc
[k] = 0;
97
gain_left
[k] = 0.0f;
98
gain_right
[k] = 0.0f;
99
offset_left
[k] = 0.0f;
100
offset_right
[k] = 0.0f;
101
left
[k] = 0.0;
102
right
[k] = 0.0;
103
}
104
for
(Int_t s = 0; s < 18; s++) {
105
strip_factor
[s] = 1.0f;
106
strip_offset
[s] = 0.0f;
107
}
108
}
109
115
Bool_t
Attach
(TTree *t);
116
128
void
Decode
();
129
133
void
LoadGains
();
134
137
Double_t
Total
(Int_t strip)
const
{
138
if
(strip <= 0)
139
return
strip0
;
140
if
(strip >= 17)
141
return
strip17
;
142
return
left
[strip - 1] +
right
[strip - 1];
143
}
144
146
Double_t
Axis
(Int_t axis)
const
{
147
return
axis ==
GATE_AXIS_GRID
?
grid
:
Total
(axis);
148
}
149
151
void
Totals
(Double_t *out)
const
{
152
for
(Int_t s = 0; s < 18; s++)
153
out[s] =
Total
(s);
154
}
155
};
156
157
#endif
Constants.hpp
Dataset configuration.
GATE_AXIS_GRID
const Int_t GATE_AXIS_GRID
Options which govern the reaction search in the 2D histograms (strip-sum-scatter).
Definition
Constants.hpp:56
EnergyView::gain_strip0
Float_t gain_strip0
Strip 0 gain.
Definition
Normalization.hpp:48
EnergyView::rightdE_adc
UShort_t rightdE_adc[16]
Right end of strips 1-16, index strip - 1.
Definition
Normalization.hpp:30
EnergyView::tree_
TTree * tree_
Events tree or chain bound by Attach(). Not owned.
Definition
Normalization.hpp:85
EnergyView::offset_left
Float_t offset_left[16]
ADC subtracted from an end before its gain, only when that end fired: a short end's energy carries a ...
Definition
Normalization.hpp:46
EnergyView::offset_right
Float_t offset_right[16]
Definition
Normalization.hpp:47
EnergyView::strip17
Double_t strip17
Strip 17.
Definition
Normalization.hpp:80
EnergyView::Decode
void Decode()
Decode the currently loaded entry into the value members.
Definition
Normalization.cpp:99
EnergyView::gain_grid
Float_t gain_grid
Grid gain: the reciprocal of its modal beam peak, so the grid reads 1.0 for a beam event.
Definition
Normalization.hpp:54
EnergyView::cathode_adc
Short_t cathode_adc
Raw cathode ADC value.
Definition
Normalization.hpp:34
EnergyView::LoadGains
void LoadGains()
Load the calibration gains for the current file.
Definition
Normalization.cpp:28
EnergyView::strip_offset
Float_t strip_offset[18]
Per-strip additive alignment in calibrated units, indexed by strip 0-17.
Definition
Normalization.hpp:65
EnergyView::loaded_tree_
Int_t loaded_tree_
Tree number whose gains are loaded; -1 for none.
Definition
Normalization.hpp:86
EnergyView::Attach
Bool_t Attach(TTree *t)
Bind to an events tree and set up the branch addresses.
Definition
Normalization.cpp:6
EnergyView::Total
Double_t Total(Int_t strip) const
A strip's deposit: the sum of its ends, or the unsegmented value.
Definition
Normalization.hpp:137
EnergyView::left
Double_t left[16]
Left end of strips 1-16, index strip - 1.
Definition
Normalization.hpp:77
EnergyView::strip_factor
Float_t strip_factor[18]
Per-strip multiplicative alignment, indexed by strip 0-17 and applied to every end of the strip after...
Definition
Normalization.hpp:58
EnergyView::is_normed
Bool_t is_normed
Whether a calibration tree was found.
Definition
Normalization.hpp:68
EnergyView::gain_right
Float_t gain_right[16]
Right-end gain of strips 1-16.
Definition
Normalization.hpp:41
EnergyView::Axis
Double_t Axis(Int_t axis) const
The value on a beam-gate axis: a strip's deposit, or the grid (GATE_AXIS_GRID) over its anchor.
Definition
Normalization.hpp:146
EnergyView::Totals
void Totals(Double_t *out) const
Every strip's deposit at once, for code that wants an array.
Definition
Normalization.hpp:151
EnergyView::leftdE_adc
UShort_t leftdE_adc[16]
Left end of strips 1-16, index strip - 1.
Definition
Normalization.hpp:29
EnergyView::strip17_adc
UShort_t strip17_adc
Strip 17, unsegmented.
Definition
Normalization.hpp:32
EnergyView::gain_left
Float_t gain_left[16]
Left-end gain of strips 1-16, index strip - 1.
Definition
Normalization.hpp:40
EnergyView::EnergyView
EnergyView()
Construct detached, with zeroed values and no gains loaded.
Definition
Normalization.hpp:89
EnergyView::strip0
Double_t strip0
Strip 0.
Definition
Normalization.hpp:79
EnergyView::strip0_adc
UShort_t strip0_adc
Strip 0, unsegmented.
Definition
Normalization.hpp:31
EnergyView::right
Double_t right[16]
Right end of strips 1-16, index strip - 1.
Definition
Normalization.hpp:78
EnergyView::grid_adc
Short_t grid_adc
Raw Frisch grid ADC value.
Definition
Normalization.hpp:35
EnergyView::gain_cathode
Float_t gain_cathode
Cathode gain.
Definition
Normalization.hpp:50
EnergyView::hits_adc
UShort_t hits_adc[36]
Raw per-slot hit ADC values.
Definition
Normalization.hpp:33
EnergyView::gain_strip17
Float_t gain_strip17
Strip 17 gain.
Definition
Normalization.hpp:49
EnergyView::grid
Double_t grid
Grid energy.
Definition
Normalization.hpp:82
EnergyView::cathode
Double_t cathode
Cathode energy.
Definition
Normalization.hpp:81
tooling
include
Normalization.hpp
Generated by
1.17.0