Class for managing waveform construction for all events and channels.
More...
#include <bar.hh>
|
| BarLYSO (const char *inputFilename, Int_t threadID) |
| Constructor of the class.
|
|
| ~BarLYSO () |
| Destructor of the class.
|
|
void | SetParsDistro () |
| Sets the 3D histogram hPars.
|
|
void | InitializeBaselines (Int_t event) |
| Method to initialize the entire fFront and fBack with a noise baseline.
|
|
void | ClearContainers () |
| Method to add a I-Phel waveform to the corresponding event and channel of the Front-Detector.
|
|
void | SetSamplingTimes () |
|
void | SetFrontWaveform (Int_t channel, Double_t start) |
|
void | SetBackWaveform (Int_t channel, Double_t start) |
| Method to add a I-Phel waveform to the corresponding event and channel of the Back-Detector.
|
|
void | SaveEvent () |
| Saves all the samples from fFront and fBack into a text file.
|
|
void | SaveBar () |
|
void | SetSigmaNoise (Double_t newSigmaNoise) |
| Set fSigmaNoise, the noise of the DAQ.
|
|
void | SetInputFilename (std::string newInputFilename) |
| Set the name of the text file of the best fit parameters data.
|
|
void | SetChargeCuts (Double_t min, Double_t max) |
| Set the cuts in the charge spectrum of input best fit parameters data.
|
|
void | SetHisto_A (Double_t nbins, Double_t min, Double_t max) |
| Set the number of bins, the lower and the upper limit related to parameter A for the histogram hPars.
|
|
void | SetHisto_Tau_rise (Double_t nbins, Double_t min, Double_t max) |
| Set the number of bins, the lower and the upper limit related to parameter Tau_rise for the histogram hPars.
|
|
void | SetHisto_Tau_dec (Double_t nbins, Double_t min, Double_t max) |
| Set the number of bins, the lower and the upper limit related to parameter Tau_dec for the histogram hPars.
|
|
void | SetEvents (Int_t events) |
|
Int_t | GetEvents () const |
| Returns the number of events in the run.
|
|
Int_t | GetID () const |
| Returns the ID of the Monte Carlo.
|
|
DAQ * | GetDAQ () const |
|
|
std::string | GenerateOutputFilename (const char *inputFilename) |
|
Double_t | Add_Noise () |
| Returns the value of the noise.
|
|
Double_t | Wave_OnePhel (Double_t t, Double_t A, Double_t tau_rise, Double_t tau_dec, Double_t timePhel) |
| Returns the value at t of the analytical form of the One Photo-Electron waveform.
|
|
|
Int_t | fEvent |
| Number of events in the run.
|
|
Int_t | fID |
| Run ID of the Monte Carlo.
|
|
Int_t | EVENTS |
|
Int_t | fThreadID |
|
std::vector< std::vector< Double_t > > | fFront |
| Container for Front-Detector waveforms: a 3-dimensional matrix with indices for event, channel, and bin.
|
|
std::vector< std::vector< Double_t > > | fBack |
| Container for Back-Detector waveforms: a 3-dimensional matrix with indices for event, channel, and bin.
|
|
std::vector< std::vector< Double_t > > | fTimes_F |
|
std::vector< std::vector< Double_t > > | fTimes_B |
|
TH3D * | hPars |
| 3D Histogram of One-Phel waveform parameters from which sampling will occur
|
|
TRandom3 * | fRandPars |
| Random generator for SetFrontWaveform() and SetBackWaveform()
|
|
TRandom3 * | fRandNoise |
| Random generator for Add_Noise()
|
|
Double_t | fSigmaNoise |
| Noise of the DAQ, evaluated as the stDev of the pedestal distribution.
|
|
std::string | fInputFilename |
| Name of the txt file of the best fit parameters data. See the introduction for more details about the file format.
|
|
Double_t | fChargeCuts [2] |
| Cuts in the charge spectrum of input best fit parameters data; [0] represents the minimum, [1] represents the maximum.
|
|
Double_t | fHisto_A [3] |
| Settings for histogram hPars related to parameter A: [0] for number of bins, [1] for the lower limit, [2] for the upper limit.
|
|
Double_t | fHisto_Tau_rise [3] |
| Settings for histogram hPars related to parameter Tau_rise: [0] for number of bins, [1] for the lower limit, [2] for the upper limit.
|
|
Double_t | fHisto_Tau_dec [3] |
| Settings for histogram hPars related to parameter Tau_dec: [0] for number of bins, [1] for the lower limit, [2] for the upper limit.
|
|
DAQ * | fDAQ |
|
TFile * | fOutFile = nullptr |
|
TTree * | fOutTree = nullptr |
|
Class for managing waveform construction for all events and channels.
Definition at line 27 of file bar.hh.
◆ BarLYSO()
BarLYSO::BarLYSO |
( |
const char * | inputFilename, |
|
|
Int_t | threadID ) |
Constructor of the class.
It takes as argument the MC-filename and sets the simulation ID (fID)
- Parameters
-
inputFilename | MC-filename used in the simulation. |
Definition at line 11 of file bar.cc.
◆ ~BarLYSO()
Destructor of the class.
Definition at line 45 of file bar.cc.
◆ Add_Noise()
Double_t BarLYSO::Add_Noise |
( |
| ) |
|
|
inlineprivate |
Returns the value of the noise.
This function provides a random value sampled from a normal distribution \(N\)(0, sigmaNoise). It's important to note that the value of \( \sigma \) should be derived from experimental data, based on the pedestal's distribution.
Definition at line 197 of file bar.hh.
◆ ClearContainers()
void BarLYSO::ClearContainers |
( |
| ) |
|
Method to add a I-Phel waveform to the corresponding event and channel of the Front-Detector.
This function samples parameters ( \(A \), \( \tau_{RISE} \), \(
\tau_{DEC} \)) from hPars, evaluates Wave_OnePhel() in each bin, and finally sums it at the correct event and channel indices of fFront.
- Parameters
-
event | Event index |
channel | Channel index |
start | Scintillation photon arrival time, provided to Wave_OnePhel() as the timePhel ( \( t_{phel} \)) input parameter |
Definition at line 219 of file bar.cc.
◆ GenerateOutputFilename()
string BarLYSO::GenerateOutputFilename |
( |
const char * | inputFilename | ) |
|
|
private |
◆ GetDAQ()
DAQ * BarLYSO::GetDAQ |
( |
| ) |
const |
|
inline |
◆ GetEvents()
Int_t BarLYSO::GetEvents |
( |
| ) |
const |
|
inline |
Returns the number of events in the run.
Definition at line 154 of file bar.hh.
◆ GetID()
Int_t BarLYSO::GetID |
( |
| ) |
const |
|
inline |
Returns the ID of the Monte Carlo.
Definition at line 155 of file bar.hh.
◆ InitializeBaselines()
void BarLYSO::InitializeBaselines |
( |
Int_t | event | ) |
|
Method to initialize the entire fFront and fBack with a noise baseline.
This function sets the number of events in the run (EVENTS = newEvents) and fills every bin in every channel and event with Add_Noise()
- Parameters
-
newEvents | Number of events in the MC-Simulation |
Definition at line 210 of file bar.cc.
◆ SaveBar()
void BarLYSO::SaveBar |
( |
| ) |
|
◆ SaveEvent()
void BarLYSO::SaveEvent |
( |
| ) |
|
Saves all the samples from fFront and fBack into a text file.
This method is designed to save the data samples contained in the objects fFront and fBack into a text file. The file naming convention is based on the RunID fID extracted from the MC input file. The output file is named as "BarID_fID.txt". Refer to the introduction for details about the file format.
Definition at line 263 of file bar.cc.
◆ SetBackWaveform()
void BarLYSO::SetBackWaveform |
( |
Int_t | channel, |
|
|
Double_t | start ) |
Method to add a I-Phel waveform to the corresponding event and channel of the Back-Detector.
This function samples parameters ( \(A \), \( \tau_{RISE} \), \(
\tau_{DEC} \)) from hPars, evaluates Wave_OnePhel() in each bin, and finally sums it at the correct event and channel indices of fBack.
- Parameters
-
event | Event index |
channel | Channel index |
start | Scintillation photon arrival time, provided to Wave_OnePhel() as the timePhel ( \( t_{phel} \)) input parameter |
Definition at line 248 of file bar.cc.
◆ SetChargeCuts()
void BarLYSO::SetChargeCuts |
( |
Double_t | min, |
|
|
Double_t | max ) |
|
inline |
Set the cuts in the charge spectrum of input best fit parameters data.
Definition at line 117 of file bar.hh.
◆ SetEvents()
void BarLYSO::SetEvents |
( |
Int_t | events | ) |
|
|
inline |
◆ SetFrontWaveform()
void BarLYSO::SetFrontWaveform |
( |
Int_t | channel, |
|
|
Double_t | start ) |
◆ SetHisto_A()
void BarLYSO::SetHisto_A |
( |
Double_t | nbins, |
|
|
Double_t | min, |
|
|
Double_t | max ) |
|
inline |
Set the number of bins, the lower and the upper limit related to parameter A for the histogram hPars.
Definition at line 126 of file bar.hh.
◆ SetHisto_Tau_dec()
void BarLYSO::SetHisto_Tau_dec |
( |
Double_t | nbins, |
|
|
Double_t | min, |
|
|
Double_t | max ) |
|
inline |
Set the number of bins, the lower and the upper limit related to parameter Tau_dec for the histogram hPars.
Definition at line 146 of file bar.hh.
◆ SetHisto_Tau_rise()
void BarLYSO::SetHisto_Tau_rise |
( |
Double_t | nbins, |
|
|
Double_t | min, |
|
|
Double_t | max ) |
|
inline |
Set the number of bins, the lower and the upper limit related to parameter Tau_rise for the histogram hPars.
Definition at line 136 of file bar.hh.
◆ SetInputFilename()
void BarLYSO::SetInputFilename |
( |
std::string | newInputFilename | ) |
|
|
inline |
Set the name of the text file of the best fit parameters data.
Definition at line 112 of file bar.hh.
◆ SetParsDistro()
void BarLYSO::SetParsDistro |
( |
| ) |
|
Sets the 3D histogram hPars.
This function takes all the best-fit parameters ( \(A \), \(
\tau_{RISE} \), \( \tau_{DEC} \)) obtained from the fitted I-Phel data waveforms, defines and populates the histogram hPars (from which sampling will occur) with settings fHisto_A, fHisto_Tau_rise and fHisto_Tau_dec. It specifically considers entries within the charge range [fChargeCuts[0], fChargeCuts[1]] and with a converged fit status.
Definition at line 157 of file bar.cc.
◆ SetSamplingTimes()
void BarLYSO::SetSamplingTimes |
( |
| ) |
|
◆ SetSigmaNoise()
void BarLYSO::SetSigmaNoise |
( |
Double_t | newSigmaNoise | ) |
|
|
inline |
◆ Wave_OnePhel()
Double_t BarLYSO::Wave_OnePhel |
( |
Double_t | t, |
|
|
Double_t | A, |
|
|
Double_t | tau_rise, |
|
|
Double_t | tau_dec, |
|
|
Double_t | timePhel ) |
|
private |
Returns the value at t of the analytical form of the One Photo-Electron waveform.
\[
\text{wave}(t) = -A \Bigg( \exp \Bigg( -\frac{t - t_{phel}}{\tau_{\text{RISE}}} \Bigg) - \exp \Bigg( -\frac{t - t_{phel}}{\tau_{\text{DEC}}} \Bigg) \Bigg) \theta( t - t_{phel} )
\]
Definition at line 193 of file bar.cc.
◆ EVENTS
◆ fBack
std::vector<std::vector<Double_t> > BarLYSO::fBack |
|
private |
Container for Back-Detector waveforms: a 3-dimensional matrix with indices for event, channel, and bin.
Definition at line 165 of file bar.hh.
◆ fChargeCuts
Double_t BarLYSO::fChargeCuts[2] |
|
private |
Cuts in the charge spectrum of input best fit parameters data; [0] represents the minimum, [1] represents the maximum.
Definition at line 177 of file bar.hh.
◆ fDAQ
◆ fEvent
Number of events in the run.
Definition at line 159 of file bar.hh.
◆ fFront
std::vector<std::vector<Double_t> > BarLYSO::fFront |
|
private |
Container for Front-Detector waveforms: a 3-dimensional matrix with indices for event, channel, and bin.
Definition at line 164 of file bar.hh.
◆ fHisto_A
Double_t BarLYSO::fHisto_A[3] |
|
private |
Settings for histogram hPars related to parameter A: [0] for number of bins, [1] for the lower limit, [2] for the upper limit.
Definition at line 178 of file bar.hh.
◆ fHisto_Tau_dec
Double_t BarLYSO::fHisto_Tau_dec[3] |
|
private |
Settings for histogram hPars related to parameter Tau_dec: [0] for number of bins, [1] for the lower limit, [2] for the upper limit.
Definition at line 180 of file bar.hh.
◆ fHisto_Tau_rise
Double_t BarLYSO::fHisto_Tau_rise[3] |
|
private |
Settings for histogram hPars related to parameter Tau_rise: [0] for number of bins, [1] for the lower limit, [2] for the upper limit.
Definition at line 179 of file bar.hh.
◆ fID
Run ID of the Monte Carlo.
Definition at line 160 of file bar.hh.
◆ fInputFilename
std::string BarLYSO::fInputFilename |
|
private |
Name of the txt file of the best fit parameters data. See the introduction for more details about the file format.
Definition at line 176 of file bar.hh.
◆ fOutFile
TFile* BarLYSO::fOutFile = nullptr |
|
private |
◆ fOutTree
TTree* BarLYSO::fOutTree = nullptr |
|
private |
◆ fRandNoise
TRandom3* BarLYSO::fRandNoise |
|
private |
◆ fRandPars
TRandom3* BarLYSO::fRandPars |
|
private |
◆ fSigmaNoise
Double_t BarLYSO::fSigmaNoise |
|
private |
Noise of the DAQ, evaluated as the stDev of the pedestal distribution.
Definition at line 174 of file bar.hh.
◆ fThreadID
◆ fTimes_B
std::vector<std::vector<Double_t> > BarLYSO::fTimes_B |
|
private |
◆ fTimes_F
std::vector<std::vector<Double_t> > BarLYSO::fTimes_F |
|
private |
◆ hPars
3D Histogram of One-Phel waveform parameters from which sampling will occur
Definition at line 169 of file bar.hh.
The documentation for this class was generated from the following files: