1#ifndef __CDCALIBRATOR_HH
2#define __CDCALIBRATOR_HH
20#include <TGProgressBar.h>
33#ifndef __CALIBRATION_HH
38#ifndef __DATAPACKETS_HH
51 void SetInputFile( std::vector<std::string> input_file_names );
55 void SetOutput( std::string output_file_name,
bool cWrite =
false );
75 bool FindCDChannels(
int det,
int sec,
int side,
int strip,
int &adc,
int &ch );
76 bool FindCDChannels(
int det,
int sec,
int side,
int strip,
int &sfp,
int &board,
int &ch );
83 std::cout <<
"Writing output file...\r";
86 std::cout <<
"Writing output file... Done!" << std::endl << std::endl;
116 std::shared_ptr<MiniballCalibration>
cal;
120 std::shared_ptr<MiniballSettings>
set;
124 std::shared_ptr<TGProgressBar>
prog;
191 std::vector<std::vector<std::vector<TH2F*>>>
cd_nQ_pQ;
unsigned long long myeventid
MBS event id.
unsigned long long mytime
absolute timestamp
std::shared_ptr< TGProgressBar > prog
unsigned long long time_max
void SetOutput(std::string output_file_name, bool cWrite=false)
unsigned char myboard
febex board number
bool mythres
above threshold?
unsigned char mysfp
sfp number
float myenergy
calibrated energy
unsigned long long preveventid
previous MBS event id
std::vector< unsigned int > cd_Q_list
list of CD uncalibrated energies for ParticleFinder
long myhittime
hit time with respect to event time
unsigned long long time_first
std::vector< std::vector< std::vector< TH2F * > > > cd_pen_nQ
void SetNsideTagId(unsigned char id)
MBSInfoPackets * mbs_info
unsigned char myadc
ADC module number.
std::shared_ptr< FebexData > febex_data
bool FindCDChannels(int det, int sec, int side, int strip, int &adc, int &ch)
std::vector< unsigned char > cd_side_list
list of CD side IDs; 0 = p, 1 = n
unsigned long long time_prev
std::vector< std::vector< std::vector< TH2F * > > > cd_pen_nen
bool mypileup
pileup flag?
MiniballCDCalibrator(std::shared_ptr< MiniballSettings > myset)
std::shared_ptr< InfoData > info_data
void PurgeOutput()
Closes the output files from this class.
unsigned long FillHists()
void AddProgressBar(std::shared_ptr< TGProgressBar > myprog)
unsigned char mych
channel number
void Initialise()
called for every event
std::vector< std::vector< std::vector< TH2F * > > > cd_nQ_pQ
std::shared_ptr< MiniballCalibration > cal
std::vector< unsigned char > cd_det_list
list of CD detector IDs
void SetInputFile(std::vector< std::string > input_file_names)
void SetPsideTagId(unsigned char id)
unsigned long n_mbs_entries
std::vector< float > cd_en_list
list of CD energies for ParticleFinder
std::vector< unsigned char > cd_strip_list
list of CD strip IDs
std::vector< unsigned char > cd_sec_list
list of CD sector IDs
void SetInputTree(TTree *user_tree)
void AddCalibration(std::shared_ptr< MiniballCalibration > mycal)
bool myclipped
clipped flag?
void StartFile()
called for every file
unsigned long long myeventtime
MBS event time.
std::vector< unsigned long long > cd_ts_list
list of CD timestamps for ParticleFinder
std::shared_ptr< MiniballSettings > set
std::shared_ptr< DgfData > dgf_data
MiniballDataPackets * in_data
void SetMBSInfoTree(TTree *user_tree)
std::shared_ptr< AdcData > adc_data
std::vector< std::vector< std::vector< TH2F * > > > cd_nen_pen
unsigned long long time_min
TFile * output_file
Outputs.
TFile * input_file
Input tree.
bool flag_close_event
length of build window in ns
std::shared_ptr< MiniballSettings > myset
std::shared_ptr< MiniballCalibration > mycal