#include <Calibrate.h>
A tool for applying calibration to data. Currently can either mark a PMT channel as no to be used, or apply a scaling factor to the charge.
- Author:
- A. Finch
- Date:
- 2020/11/13 12:22
Contact: A.Fin.nosp@m.ch@l.nosp@m.ancas.nosp@m.ter..nosp@m.ac.uk
Definition at line 23 of file Calibrate.h.
Log level enumerations.
Enumerator |
---|
FATAL |
|
ERROR |
|
WARN |
|
INFO |
|
DEBUG1 |
|
DEBUG2 |
|
DEBUG3 |
|
Definition at line 72 of file Calibrate.h.
Constructor. Sets validCalibrationDataFound false.
Definition at line 5 of file Calibrate.cpp.
void Calibrate::ApplyCalibration |
( |
std::vector< SubSample > & |
samples | ) |
|
|
private |
Apply calibration to data to a sample of hits
- Parameters
-
[in] | samples | a std::vector of SubSamples to calibrate |
Definition at line 72 of file Calibrate.cpp.
void Calibrate::ApplyCalibration |
( |
const int & |
PMTid, |
|
|
float & |
charge, |
|
|
TimeDelta::short_time_t & |
time, |
|
|
bool & |
masked |
|
) |
| |
|
private |
Calibrate an individual hit. The parameters charge, time and masked are set and returned.
- Parameters
-
[in] | PMTid | An integer identifying an individual PMT |
[in,out] | charge | The charge measured by the PMT |
[in,out] | time | The time measured by the PMT |
[in,out] | masked | A mask to turn the PMT on or off |
Definition at line 59 of file Calibrate.cpp.
Print out contents of one hit
- Parameters
-
[in] | PMTid | An integer identifying an individual PMT |
[in] | charge | The charge measured by the PMT |
[in] | time | The time measured by the PMT |
[in] | masked | A mask to turn the PMT on or off |
Definition at line 171 of file Calibrate.cpp.
void Calibrate::DumpHits |
( |
std::vector< SubSample > & |
samples | ) |
|
|
private |
Dump contents of sample of hits
- Parameters
-
[in] | samples | a std::vector of SubSample to calibrate |
Definition at line 153 of file Calibrate.cpp.
bool Calibrate::Execute |
( |
| ) |
|
Applly the calibration to the contents of m_data . Calls ApplyCalibration to do the work.
Definition at line 24 of file Calibrate.cpp.
bool Calibrate::Finalise |
( |
| ) |
|
bool Calibrate::Initialise |
( |
std::string |
configfile, |
|
|
DataModel & |
data |
|
) |
| |
Function for setting up Tool resources. Calls readCalibration function to read in calibration constants.
- Parameters
-
configfile[in] | The pathname of the dynamic configuration file to read in. |
data[in] | A reference to the transient data class used to pass information between Tools. |
Definition at line 6 of file Calibrate.cpp.
void Calibrate::readCalibration |
( |
std::string |
calibrationFileName | ) |
|
|
private |
Read in the calibration data
- Parameters
-
[in] | calibrationFileName | The name of a file containing calibration data |
Definition at line 92 of file Calibrate.cpp.
void Calibrate::StreamToLog |
( |
int |
level | ) |
|
|
inlineprivate |
Print the current value of the streamer at the set log level, then clear the streamer
Definition at line 82 of file Calibrate.h.
Calibration data store.
Definition at line 94 of file Calibrate.h.
std::string Calibrate::m_calibration_file_name {""} |
|
private |
File name for file containg calibration information.
Definition at line 69 of file Calibrate.h.
std::stringstream Calibrate::m_ss |
|
private |
For easy formatting of Log messages.
Definition at line 78 of file Calibrate.h.
The stopwatch, if we're using one.
Definition at line 65 of file Calibrate.h.
std::string Calibrate::m_stopwatch_file_name {""} |
|
private |
Image filename to save the histogram to, if required.
Definition at line 67 of file Calibrate.h.
int Calibrate::m_verbose {ERROR} |
|
private |
Verbosity level, as defined in tool parameter file.
Definition at line 75 of file Calibrate.h.
bool Calibrate::validCalibrationDataFound =false |
|
static |
Remember whether a valid calibration data file has been read in or not.
Definition at line 29 of file Calibrate.h.
The documentation for this class was generated from the following files: