MUSIC unknown
Analysis for the MUSIC active-target ionization chamber
Loading...
Searching...
No Matches

A view over one event's energies, decoding raw ADC into calibrated units. More...

#include <Normalization.hpp>

Public Member Functions

 EnergyView ()
 Construct detached, with zeroed values and no gains loaded.
Bool_t Attach (TTree *t)
 Bind to an events tree and set up the branch addresses.
void Decode ()
 Decode the currently loaded entry into the value members.
void LoadGains ()
 Load the calibration gains for the current file.
const char * Unit () const
 Unit label for the decoded values, for axis titles.

Public Attributes

UShort_t left_0_17_adc [18]
 Raw left-side strip ADC values.
UShort_t rightdE_adc [18]
 Raw right-side strip ADC values.
UShort_t hits_adc [36]
 Raw per-slot hit ADC values.
Short_t cathode_adc
 Raw cathode ADC value.
Short_t grid_adc
 Raw Frisch grid ADC value.
Float_t gain_left [18]
 Per-strip left-side gain.
Float_t gain_right [18]
 Per-strip right-side gain.
Float_t gain_cathode
 Cathode gain.
Bool_t is_normed
 Whether a calibration tree was found.
Float_t strip_factor [18]
 Per-strip multiplicative alignment, pol3_reference / centroid, applied to total after the per-channel gain.
TTree * tree_
 Events tree or chain bound by Attach(). Not owned.
Int_t loaded_tree_
 Tree number whose gains are loaded; -1 for none.
Decoded per-event values

In arbitrary units when is_normed, otherwise raw ADC.

Double_t left [18]
 Left-side energy per strip.
Double_t right [18]
 Right-side energy per strip.
Double_t total [18]
 Summed energy per strip, after strip_factor.
Double_t cathode
 Cathode energy.
Double_t grid
 Grid energy.

Detailed Description

A view over one event's energies, decoding raw ADC into calibrated units.

Binds to an events tree or chain, then decodes each entry: per-channel gains are applied, then per-strip alignment factors. Whether the result is in arbitrary calibrated units or still raw ADC depends on whether a calibration tree was found — see is_normed and Unit().

Note
Holds a non-owning pointer to the tree it is attached to, which must outlive it. Gains are reloaded automatically when a TChain rolls over to a new file, tracked by loaded_tree_.

Definition at line 21 of file Normalization.hpp.

Constructor & Destructor Documentation

◆ EnergyView()

EnergyView::EnergyView ( )
inline

Construct detached, with zeroed values and no gains loaded.

Definition at line 54 of file Normalization.hpp.

Member Function Documentation

◆ Attach()

Bool_t EnergyView::Attach ( TTree * t)

Bind to an events tree and set up the branch addresses.

Parameters
tTree or chain to read. Borrowed; must outlive this view.
Returns
kTRUE if the expected branches were found.

Definition at line 4 of file Normalization.cpp.

Referenced by EventsSummary::BuildNormedSummaryHistograms(), FindStripCentroidAlignment(), and SaveDynamicRangeOverlay().

◆ Decode()

void EnergyView::Decode ( )

Decode the currently loaded entry into the value members.

Applies the per-channel gains, then strip_factor to total.

Note
Reads whichever entry the bound tree has loaded, so call GetEntry() first.

Definition at line 58 of file Normalization.cpp.

Referenced by EventsSummary::BuildNormedSummaryHistograms(), FindStripCentroidAlignment(), and SaveDynamicRangeOverlay().

◆ LoadGains()

void EnergyView::LoadGains ( )

Load the calibration gains for the current file.

Note
Called automatically when a chain rolls over to a new tree; only needed directly when driving decoding by hand.

Definition at line 20 of file Normalization.cpp.

Referenced by Attach(), and Decode().

◆ Unit()

const char * EnergyView::Unit ( ) const

Unit label for the decoded values, for axis titles.

Returns
Arbitrary units when is_normed, otherwise an ADC label.

Definition at line 110 of file Normalization.cpp.

Member Data Documentation

◆ cathode

Double_t EnergyView::cathode

Cathode energy.

Definition at line 46 of file Normalization.hpp.

Referenced by EventsSummary::BuildNormedSummaryHistograms(), Decode(), and EnergyView().

◆ cathode_adc

Short_t EnergyView::cathode_adc

Raw cathode ADC value.

Definition at line 25 of file Normalization.hpp.

Referenced by Attach(), Decode(), and EnergyView().

◆ gain_cathode

Float_t EnergyView::gain_cathode

Cathode gain.

Definition at line 30 of file Normalization.hpp.

Referenced by Decode(), EnergyView(), and LoadGains().

◆ gain_left

Float_t EnergyView::gain_left[18]

Per-strip left-side gain.

Definition at line 28 of file Normalization.hpp.

Referenced by Decode(), and LoadGains().

◆ gain_right

Float_t EnergyView::gain_right[18]

Per-strip right-side gain.

Definition at line 29 of file Normalization.hpp.

Referenced by Decode(), and LoadGains().

◆ grid

Double_t EnergyView::grid

Grid energy.

Definition at line 47 of file Normalization.hpp.

Referenced by EventsSummary::BuildNormedSummaryHistograms(), Decode(), and EnergyView().

◆ grid_adc

Short_t EnergyView::grid_adc

Raw Frisch grid ADC value.

Definition at line 26 of file Normalization.hpp.

Referenced by Attach(), Decode(), and EnergyView().

◆ hits_adc

UShort_t EnergyView::hits_adc[36]

Raw per-slot hit ADC values.

Definition at line 24 of file Normalization.hpp.

Referenced by Attach(), and EventsSummary::BuildNormedSummaryHistograms().

◆ is_normed

Bool_t EnergyView::is_normed

Whether a calibration tree was found.

When true, the decoded values are in arbitrary calibrated units; when false they remain raw ADC.

Definition at line 33 of file Normalization.hpp.

Referenced by Attach(), EventsSummary::BuildNormedSummaryHistograms(), Decode(), EnergyView(), FindStripCentroidAlignment(), LoadGains(), SaveDynamicRangeOverlay(), and Unit().

◆ left

Double_t EnergyView::left[18]

Left-side energy per strip.

Definition at line 43 of file Normalization.hpp.

Referenced by EventsSummary::BuildNormedSummaryHistograms(), and Decode().

◆ left_0_17_adc

UShort_t EnergyView::left_0_17_adc[18]

Raw left-side strip ADC values.

Definition at line 22 of file Normalization.hpp.

Referenced by Attach(), and Decode().

◆ loaded_tree_

Int_t EnergyView::loaded_tree_

Tree number whose gains are loaded; -1 for none.

Definition at line 51 of file Normalization.hpp.

Referenced by Attach(), Decode(), and EnergyView().

◆ right

Double_t EnergyView::right[18]

Right-side energy per strip.

Definition at line 44 of file Normalization.hpp.

Referenced by EventsSummary::BuildNormedSummaryHistograms(), and Decode().

◆ rightdE_adc

UShort_t EnergyView::rightdE_adc[18]

Raw right-side strip ADC values.

Definition at line 23 of file Normalization.hpp.

Referenced by Attach(), and Decode().

◆ strip_factor

Float_t EnergyView::strip_factor[18]

Per-strip multiplicative alignment, pol3_reference / centroid, applied to total after the per-channel gain.

Identity (1.0) when no alignment is loaded, so an unaligned dataset decodes unchanged.

Definition at line 38 of file Normalization.hpp.

Referenced by Decode(), and LoadGains().

◆ total

Double_t EnergyView::total[18]

◆ tree_

TTree* EnergyView::tree_

Events tree or chain bound by Attach(). Not owned.

Definition at line 50 of file Normalization.hpp.

Referenced by Attach(), Decode(), EnergyView(), and LoadGains().


The documentation for this struct was generated from the following files: