MUSIC unknown
Analysis for the MUSIC active-target ionization chamber
Loading...
Searching...
No Matches
PulseHistory.hpp File Reference

Pole-zero pulse-history correction on the raw hit stream. More...

#include "BinaryUtils.hpp"
#include <Rtypes.h>
#include <TString.h>
#include <vector>
Include dependency graph for PulseHistory.hpp:

Go to the source code of this file.

Classes

struct  PulseHistory::Kernel
 The fitted correction for one channel group. More...
struct  PulseHistory::Result
 Everything one subfile's pulse-history pass produced. More...

Namespaces

namespace  PulseHistory

Enumerations

enum  PulseHistory::Group {
  PulseHistory::kNone = 0 , PulseHistory::kLongLeft = 1 , PulseHistory::kLongRight = 2 , PulseHistory::kShortLeft = 3 ,
  PulseHistory::kShortRight = 4 , PulseHistory::kGuard0 = 5 , PulseHistory::kGuard17 = 6 , PulseHistory::kNGroups = 7
}
 Channel groups, one kernel each. More...

Functions

const char * PulseHistory::GroupName (Int_t g)
 Human-readable name of a Group.
const char * PulseHistory::GroupTag (Int_t g)
 Short tag for filenames: L, R, Ls, Rs, S0, S17.
Int_t PulseHistory::ChainOf (Int_t g)
 Which readout chain a group belongs to.
Bool_t PulseHistory::IsLongGroup (Int_t g)
 Whether a group is a long end rather than a short end or guard.
Int_t PulseHistory::BinOf (Double_t dt_s)
 Kernel bin for a time since the previous pulse.
Double_t PulseHistory::BinCentreUs (Int_t b)
 Centre of a kernel bin, in microseconds, for reports.
Int_t PulseHistory::AmpBinOf (Double_t e_prev, Double_t mode, Int_t n_amp)
 Amplitude band of a previous pulse.
std::vector< Int_t > PulseHistory::BuildGroupMap ()
 Group lookup for every (board, channel) under the active map.
Bool_t PulseHistory::Measure (std::vector< RawHit > &hits, const std::vector< Int_t > &group_of, Result &res, const TString &file_label)
 Measure the kernels on this subfile's beam-like events.
void PulseHistory::Apply (std::vector< RawHit > &hits, const std::vector< Int_t > &group_of, Result &res)
 Apply the measured kernels to the hit stream, in place.
TString PulseHistory::Report (const Result &res, const TString &file_label)
 Format the pass as a human-readable report.
void PulseHistory::SavePlots (Result &res, const TString &file_label)
 Draw and save the diagnostics, then free them.
void PulseHistory::WriteToEventsFile (const TString &events_subpath, const Result &res)
 Record the kernels and counters alongside a subfile's events.

Variables

const UInt_t PulseHistory::kFlagClamped = 0x2000
 Flag set on a hit whose correction was clamped rather than applied in full.
const Int_t PulseHistory::kNBins = 12
 Bins in the kernel, spanning kLogLo to kLogHi in log10 of dt.
const Double_t PulseHistory::kLogLo = -6.0
 Lowest dt bin edge: log10 of 1 us in seconds.
const Double_t PulseHistory::kLogHi
 Highest dt bin edge: log10 of 100 us in seconds.
const Int_t PulseHistory::kMaxAmpBins = 6
 Maximum amplitude bands a kernel may split the previous pulse into.

Detailed Description

Pole-zero pulse-history correction on the raw hit stream.

A preamplifier's response to a pulse does not settle instantly, so a hit arriving soon after a previous one sits on the tail of that earlier pulse and reads high. This measures that shift per channel group as a kernel over the time since the previous pulse, then subtracts it.

The kernel is measured on each subfile's own beam-like events rather than assumed, so it tracks whatever the electronics were doing during that run.

Definition in file PulseHistory.hpp.