Belle II Software
release-08-01-10
|
KLM time calibration algorithm. More...
#include <KLMTimeAlgorithm.h>
Classes | |
struct | Event |
Event data. More... | |
Public Types | |
enum | ChannelCalibrationStatus { c_NotEnoughData = 0 , c_FailedFit = 1 , c_SuccessfulCalibration = 2 } |
Channel calibration status. | |
enum | EResult { c_OK , c_Iterate , c_NotEnoughData , c_Failure , c_Undefined } |
The result of calibration. More... | |
Public Member Functions | |
KLMTimeAlgorithm () | |
Constructor. | |
~KLMTimeAlgorithm () | |
Destructor. | |
void | setDebug () |
Turn on debug mode (prints histograms and output running log). | |
void | setMC (bool mc) |
Set flag indicating whether the input is MC sample. More... | |
void | useEvtT0 () |
Use event T0 as the initial time point or not. | |
void | setMinimalDigitNumber (int minimalDigitNumber) |
Set minimal digit number (total). | |
void | setLowerLimit (int counts) |
Set the lower number of hits collected on one sigle strip. More... | |
void | saveHist () |
Save histograms to file. | |
double | esti_timeShift (const KLMChannelIndex &klmChannel) |
Estimate value of calibration constant for uncalibrated channels. More... | |
std::pair< int, double > | tS_upperStrip (const KLMChannelIndex &klmChannel) |
Tracing avaiable channels with increasing strip number. More... | |
std::pair< int, double > | tS_lowerStrip (const KLMChannelIndex &klmChannel) |
Tracing avaiable channels with decreasing strip number. More... | |
double | esti_timeRes (const KLMChannelIndex &klmChannel) |
Estimate value of calibration constant for calibrated channels. More... | |
std::pair< int, double > | tR_upperStrip (const KLMChannelIndex &klmChannel) |
Tracing avaiable channels with increasing strip number. More... | |
std::pair< int, double > | tR_lowerStrip (const KLMChannelIndex &klmChannel) |
Tracing avaiable channels with decreasing strip number. More... | |
std::string | getPrefix () const |
Get the prefix used for getting calibration data. | |
bool | checkPyExpRun (PyObject *pyObj) |
Checks that a PyObject can be successfully converted to an ExpRun type. More... | |
Calibration::ExpRun | convertPyExpRun (PyObject *pyObj) |
Performs the conversion of PyObject to ExpRun. More... | |
std::string | getCollectorName () const |
Alias for prefix. More... | |
void | setPrefix (const std::string &prefix) |
Set the prefix used to identify datastore objects. | |
void | setInputFileNames (PyObject *inputFileNames) |
Set the input file names used for this algorithm from a Python list. More... | |
PyObject * | getInputFileNames () |
Get the input file names used for this algorithm and pass them out as a Python list of unicode strings. | |
std::vector< Calibration::ExpRun > | getRunListFromAllData () const |
Get the complete list of runs from inspection of collected data. | |
RunRange | getRunRangeFromAllData () const |
Get the complete RunRange from inspection of collected data. | |
IntervalOfValidity | getIovFromAllData () const |
Get the complete IoV from inspection of collected data. | |
void | fillRunToInputFilesMap () |
Fill the mapping of ExpRun -> Files. | |
std::string | getGranularity () const |
Get the granularity of collected data. | |
EResult | execute (std::vector< Calibration::ExpRun > runs={}, int iteration=0, IntervalOfValidity iov=IntervalOfValidity()) |
Runs calibration over vector of runs for a given iteration. More... | |
EResult | execute (PyObject *runs, int iteration=0, IntervalOfValidity iov=IntervalOfValidity()) |
Runs calibration over Python list of runs. Converts to C++ and then calls the other execute() function. | |
std::list< Database::DBImportQuery > & | getPayloads () |
Get constants (in TObjects) for database update from last execution. | |
std::list< Database::DBImportQuery > | getPayloadValues () |
Get constants (in TObjects) for database update from last execution but passed by VALUE. | |
bool | commit () |
Submit constants from last calibration into database. | |
bool | commit (std::list< Database::DBImportQuery > payloads) |
Submit constants from a (potentially previous) set of payloads. | |
const std::string & | getDescription () const |
Get the description of the algoithm (set by developers in constructor) | |
bool | loadInputJson (const std::string &jsonString) |
Load the m_inputJson variable from a string (useful from Python interface). The rturn bool indicates success or failure. | |
const std::string | dumpOutputJson () const |
Dump the JSON string of the output JSON object. | |
const std::vector< Calibration::ExpRun > | findPayloadBoundaries (std::vector< Calibration::ExpRun > runs, int iteration=0) |
Used to discover the ExpRun boundaries that you want the Python CAF to execute on. This is optional and only used in some. | |
template<> | |
std::shared_ptr< TTree > | getObjectPtr (const std::string &name, const std::vector< Calibration::ExpRun > &requestedRuns) |
Specialization of getObjectPtr<TTree>. | |
Protected Member Functions | |
virtual EResult | calibrate () override |
Run algorithm on data. More... | |
void | setInputFileNames (std::vector< std::string > inputFileNames) |
Set the input file names used for this algorithm. More... | |
virtual bool | isBoundaryRequired (const Calibration::ExpRun &) |
Given the current collector data, make a decision about whether or not this run should be the start of a payload boundary. | |
virtual void | boundaryFindingSetup (std::vector< Calibration::ExpRun >, int) |
If you need to make some changes to your algorithm class before 'findPayloadBoundaries' is run, make them in this function. | |
virtual void | boundaryFindingTearDown () |
Put your algorithm back into a state ready for normal execution if you need to. | |
const std::vector< Calibration::ExpRun > & | getRunList () const |
Get the list of runs for which calibration is called. | |
int | getIteration () const |
Get current iteration. | |
std::vector< std::string > | getVecInputFileNames () const |
Get the input file names used for this algorithm as a STL vector. | |
template<class T > | |
std::shared_ptr< T > | getObjectPtr (const std::string &name, const std::vector< Calibration::ExpRun > &requestedRuns) |
Get calibration data object by name and list of runs, the Merge function will be called to generate the overall object. | |
template<class T > | |
std::shared_ptr< T > | getObjectPtr (std::string name) |
Get calibration data object (for all runs the calibration is requested for) This function will only work during or after execute() has been called once. | |
template<> | |
shared_ptr< TTree > | getObjectPtr (const string &name, const vector< ExpRun > &requestedRuns) |
We cheekily cast the TChain to TTree for the returned pointer so that the user never knows Hopefully this doesn't cause issues if people do low level stuff to the tree... | |
std::string | getGranularityFromData () const |
Get the granularity of collected data. | |
void | saveCalibration (TClonesArray *data, const std::string &name) |
Store DBArray payload with given name with default IOV. | |
void | saveCalibration (TClonesArray *data, const std::string &name, const IntervalOfValidity &iov) |
Store DBArray with given name and custom IOV. | |
void | saveCalibration (TObject *data) |
Store DB payload with default name and default IOV. | |
void | saveCalibration (TObject *data, const IntervalOfValidity &iov) |
Store DB payload with default name and custom IOV. | |
void | saveCalibration (TObject *data, const std::string &name) |
Store DB payload with given name with default IOV. | |
void | saveCalibration (TObject *data, const std::string &name, const IntervalOfValidity &iov) |
Store DB payload with given name and custom IOV. | |
void | updateDBObjPtrs (const unsigned int event, const int run, const int experiment) |
Updates any DBObjPtrs by calling update(event) for DBStore. | |
void | setDescription (const std::string &description) |
Set algorithm description (in constructor) | |
void | clearCalibrationData () |
Clear calibration data. | |
Calibration::ExpRun | getAllGranularityExpRun () const |
Returns the Exp,Run pair that means 'Everything'. Currently unused. | |
void | resetInputJson () |
Clears the m_inputJson member variable. | |
void | resetOutputJson () |
Clears the m_outputJson member variable. | |
template<class T > | |
void | setOutputJsonValue (const std::string &key, const T &value) |
Set a key:value pair for the outputJson object, expected to used interally during calibrate() | |
template<class T > | |
const T | getOutputJsonValue (const std::string &key) const |
Get a value using a key from the JSON output object, not sure why you would want to do this. | |
template<class T > | |
const T | getInputJsonValue (const std::string &key) const |
Get an input JSON value using a key. The normal exceptions are raised when the key doesn't exist. | |
const nlohmann::json & | getInputJsonObject () const |
Get the entire top level JSON object. We explicitly say this must be of object type so that we might pick. | |
bool | inputJsonKeyExists (const std::string &key) const |
Test for a key in the input JSON object. | |
Protected Attributes | |
std::vector< Calibration::ExpRun > | m_boundaries |
When using the boundaries functionality from isBoundaryRequired, this is used to store the boundaries. It is cleared when. | |
Private Member Functions | |
void | setupDatabase () |
Setup the database. | |
CalibrationAlgorithm::EResult | readCalibrationData () |
Read calibration data. More... | |
void | createHistograms () |
Create histograms. More... | |
void | fillTimeDistanceProfiles (TProfile *profileRpcPhi, TProfile *profileRpcZ, TProfile *profileBKLMScintillatorPhi, TProfile *profileBKLMScintillatorZ, TProfile *profileEKLMScintillatorPlane1, TProfile *profileEKLMScintillatorPlane2, bool fill2dHistograms) |
Fill profiles of time versus distance. More... | |
void | timeDistance2dFit (const std::vector< std::pair< KLMChannelNumber, unsigned int > > &channels, double &delay, double &delayError) |
Two-dimensional fit for individual channels. More... | |
std::string | getExpRunString (Calibration::ExpRun &expRun) const |
Gets the "exp.run" string repr. of (exp,run) | |
std::string | getFullObjectPath (const std::string &name, Calibration::ExpRun expRun) const |
constructs the full TDirectory + Key name of an object in a TFile based on its name and exprun | |
Private Attributes | |
std::map< KLMChannelNumber, std::vector< struct Event > > | m_evts |
Container of hit information. More... | |
std::map< KLMChannelNumber, int > | m_cFlag |
Calibration flag if the channel has enough hits collected and fitted OK. | |
std::map< KLMChannelNumber, double > | m_timeShift |
Shift values of each channel. | |
std::map< KLMChannelNumber, double > | m_timeRes |
Resolution values of each channel. | |
std::map< KLMChannelNumber, double > | m_time_channel |
Time distribution central value of each channel. | |
std::map< KLMChannelNumber, double > | m_etime_channel |
Time distribution central value Error of each channel. | |
std::map< KLMChannelNumber, double > | m_ctime_channel |
Calibrated time distribution central value of each channel. | |
std::map< KLMChannelNumber, double > | mc_etime_channel |
Calibrated time distribution central value Error of each channel. | |
double | m_LowerTimeBoundaryRPC = -10.0 |
Lower time boundary for RPC. | |
double | m_UpperTimeBoundaryRPC = 10.0 |
Upper time boundary for RPC. | |
double | m_LowerTimeBoundaryScintilltorsBKLM = 20.0 |
Lower time boundary for BKLM scintillators. | |
double | m_UpperTimeBoundaryScintilltorsBKLM = 70.0 |
Upper time boundary for BKLM scintillators. | |
double | m_LowerTimeBoundaryScintilltorsEKLM = 20.0 |
Lower time boundary for EKLM scintillators. | |
double | m_UpperTimeBoundaryScintilltorsEKLM = 70.0 |
Upper time boundary for BKLM scintillators. | |
double | m_LowerTimeBoundaryCalibratedRPC = -40.0 |
Lower time boundary for RPC (calibrated data). | |
double | m_UpperTimeBoundaryCalibratedRPC = 40.0 |
Upper time boundary for RPC (calibrated data). | |
double | m_LowerTimeBoundaryCalibratedScintilltorsBKLM = -40.0 |
Lower time boundary for BKLM scintillators (calibrated data). | |
double | m_UpperTimeBoundaryCalibratedScintilltorsBKLM = 40.0 |
Upper time boundary for BKLM scintillators (calibrated data). | |
double | m_LowerTimeBoundaryCalibratedScintilltorsEKLM = -40.0 |
Lower time boundary for EKLM scintillators (calibrated data). | |
double | m_UpperTimeBoundaryCalibratedScintilltorsEKLM = 40.0 |
Upper time boundary for BKLM scintillators (calibrated data). | |
double | m_time_channelAvg_rpc = 0.0 |
Central value of the global time distribution (BKLM RPC part). | |
double | m_etime_channelAvg_rpc = 0.0 |
Central value error of the global time distribution (BKLM RPC part). | |
double | m_time_channelAvg_scint = 0.0 |
Central value of the global time distribution (BKLM scintillator part). | |
double | m_etime_channelAvg_scint = 0.0 |
Central value error of the global time distribution (BKLM scintillator part). | |
double | m_time_channelAvg_scint_end = 0.0 |
Central value of the global time distribution (EKLM scintillator part). | |
double | m_etime_channelAvg_scint_end = 0.0 |
Central value error of the global time distribution (EKLM scintillator part). | |
double | m_ctime_channelAvg_rpc = 0.0 |
Calibrated central value of the global time distribution (BKLM RPC part). | |
double | mc_etime_channelAvg_rpc = 0.0 |
Calibrated central value error of the global time distribution (BKLM RPC part). | |
double | m_ctime_channelAvg_scint = 0.0 |
Calibrated central value of the global time distribution (BKLM scintillator part). | |
double | mc_etime_channelAvg_scint = 0.0 |
Calibrated central value error of the global time distribution (BKLM scintillator part). | |
double | m_ctime_channelAvg_scint_end = 0.0 |
Calibrated central value of the global time distribution (EKLM scintillator part). | |
double | mc_etime_channelAvg_scint_end = 0.0 |
Calibrated central value error of the global time distribution (EKLM scintillator part). | |
int | m_MinimalDigitNumber = 100000000 |
Minimal digit number (total). | |
int | m_lower_limit_counts = 50 |
Lower limit of hits collected for on single channel. | |
const KLMElementNumbers * | m_ElementNumbers |
Element numbers. | |
const bklm::GeometryPar * | m_BKLMGeometry = nullptr |
BKLM geometry data. | |
const EKLM::GeometryData * | m_EKLMGeometry = nullptr |
EKLM geometry data. | |
KLMChannelIndex | m_klmChannels |
KLM ChannelIndex object. | |
ROOT::Math::MinimizerOptions | m_minimizerOptions |
Minimization options. | |
KLMTimeConstants * | m_timeConstants = nullptr |
DBObject of time cost on some parts of the detector. | |
KLMTimeCableDelay * | m_timeCableDelay = nullptr |
DBObject of the calibration constant of each channel due to cable decay. | |
KLMTimeResolution * | m_timeResolution = nullptr |
DBObject of time resolution. | |
bool | m_debug = false |
Debug mode. | |
bool | m_mc = false |
MC or data. | |
bool | m_useEventT0 = true |
Whether to use event T0 from CDC. | |
TH1I * | h_calibrated = nullptr |
Calibration statistics for each channel. | |
TH1I * | hc_calibrated = nullptr |
Calibration statistics for each channel. | |
TH1F * | h_diff = nullptr |
Distance between global and local position. | |
TGraphErrors * | gre_time_channel_rpc = nullptr |
BKLM RPC. | |
TGraphErrors * | gre_time_channel_scint = nullptr |
BKLM Scintillator. | |
TGraphErrors * | gre_time_channel_scint_end = nullptr |
EKLM. | |
TGraphErrors * | gre_ctime_channel_rpc = nullptr |
BKLM RPC. | |
TGraphErrors * | gre_ctime_channel_scint = nullptr |
BKLM Scintillator. | |
TGraphErrors * | gre_ctime_channel_scint_end = nullptr |
EKLM. | |
TGraph * | gr_timeShift_channel_rpc = nullptr |
BKLM RPC. | |
TGraph * | gr_timeShift_channel_scint = nullptr |
BKLM scintillator. | |
TGraph * | gr_timeShift_channel_scint_end = nullptr |
EKLM. | |
TGraph * | gr_timeRes_channel_rpc = nullptr |
BKLM RPC. | |
TGraph * | gr_timeRes_channel_scint = nullptr |
BKLM scintillator. | |
TGraph * | gr_timeRes_channel_scint_end = nullptr |
EKLM. | |
TProfile * | m_ProfileRpcPhi = nullptr |
For BKLM RPC phi plane. | |
TProfile * | m_ProfileRpcZ = nullptr |
For BKLM RPC z plane. | |
TProfile * | m_ProfileBKLMScintillatorPhi = nullptr |
For BKLM scintillator phi plane. | |
TProfile * | m_ProfileBKLMScintillatorZ = nullptr |
For BKLM scintillator z plane. | |
TProfile * | m_ProfileEKLMScintillatorPlane1 = nullptr |
For EKLM scintillator plane1. | |
TProfile * | m_ProfileEKLMScintillatorPlane2 = nullptr |
For EKLM scintillator plane2. | |
TProfile * | m_Profile2RpcPhi = nullptr |
For BKLM RPC phi plane. | |
TProfile * | m_Profile2RpcZ = nullptr |
For BKLM RPC z plane. | |
TProfile * | m_Profile2BKLMScintillatorPhi = nullptr |
For BKLM scintillator phi plane. | |
TProfile * | m_Profile2BKLMScintillatorZ = nullptr |
For BKLM scintillator z plane. | |
TProfile * | m_Profile2EKLMScintillatorPlane1 = nullptr |
For EKLM scintillator plane1. | |
TProfile * | m_Profile2EKLMScintillatorPlane2 = nullptr |
For EKLM scintillator plane2. | |
TH1F * | h_time_rpc_tc = nullptr |
BKLM RPC part. | |
TH1F * | h_time_scint_tc = nullptr |
BKLM scintillator part. | |
TH1F * | h_time_scint_tc_end = nullptr |
EKLM part. | |
TH1F * | h_time_rpc = nullptr |
BKLM RPC part. | |
TH1F * | h_time_scint = nullptr |
BKLM scintillator part. | |
TH1F * | h_time_scint_end = nullptr |
EKLM part. | |
TH1F * | hc_time_rpc = nullptr |
BKLM RPC part. | |
TH1F * | hc_time_scint = nullptr |
BKLM scintillator part. | |
TH1F * | hc_time_scint_end = nullptr |
EKLM part. | |
TH1F * | h_timeF_rpc [2] = {nullptr} |
BKLM RPC part. | |
TH1F * | h_timeF_scint [2] = {nullptr} |
BKLM scintillator part. | |
TH1F * | h_timeF_scint_end [2] = {nullptr} |
EKLM part. | |
TH1F * | hc_timeF_rpc [2] = {nullptr} |
BKLM RPC part. | |
TH1F * | hc_timeF_scint [2] = {nullptr} |
BKLM scintillator part. | |
TH1F * | hc_timeF_scint_end [2] = {nullptr} |
EKLM part. | |
TH2F * | h2_timeF_rpc [2] = {nullptr} |
BKLM RPC part. | |
TH2F * | h2_timeF_scint [2] = {nullptr} |
BKLM scintillator part. | |
TH2F * | h2_timeF_scint_end [2] = {nullptr} |
EKLM part. | |
TH2F * | h2c_timeF_rpc [2] = {nullptr} |
BKLM RPC part. | |
TH2F * | h2c_timeF_scint [2] = {nullptr} |
BKLM scintillator part. | |
TH2F * | h2c_timeF_scint_end [2] = {nullptr} |
EKLM part. | |
TH1F * | h_timeFS_rpc [2][8] = {{nullptr}} |
BKLM RPC part. | |
TH1F * | h_timeFS_scint [2][8] = {{nullptr}} |
BKLM scintillator part. | |
TH1F * | h_timeFS_scint_end [2][4] = {{nullptr}} |
EKLM part. | |
TH1F * | hc_timeFS_rpc [2][8] = {{nullptr}} |
BKLM RPC part. | |
TH1F * | hc_timeFS_scint [2][8] = {{nullptr}} |
BKLM scintillator part. | |
TH1F * | hc_timeFS_scint_end [2][4] = {{nullptr}} |
EKLM part. | |
TH2F * | h2_timeFS [2][8] = {{nullptr}} |
BKLM part. | |
TH2F * | h2_timeFS_end [2][4] = {{nullptr}} |
EKLM part. | |
TH2F * | h2c_timeFS [2][8] = {{nullptr}} |
BKLM part. | |
TH2F * | h2c_timeFS_end [2][4] = {{nullptr}} |
EKLM part. | |
TH1F * | h_timeFSL [2][8][15] = {{{nullptr}}} |
BKLM part. | |
TH1F * | h_timeFSL_end [2][4][14] = {{{nullptr}}} |
EKLM part. | |
TH1F * | hc_timeFSL [2][8][15] = {{{nullptr}}} |
BKLM part. | |
TH1F * | hc_timeFSL_end [2][4][14] = {{{nullptr}}} |
EKLM part. | |
TH1F * | h_timeFSLP [2][8][15][2] = {{{{nullptr}}}} |
BKLM part. | |
TH1F * | h_timeFSLP_end [2][4][14][2] = {{{{nullptr}}}} |
EKLM part. | |
TH1F * | hc_timeFSLP [2][8][15][2] = {{{{nullptr}}}} |
BKLM part. | |
TH1F * | hc_timeFSLP_end [2][4][14][2] = {{{{nullptr}}}} |
EKLM part. | |
TH2F * | h2_timeFSLP [2][8][15][2] = {{{{nullptr}}}} |
BKLM part. | |
TH2F * | h2_timeFSLP_end [2][4][14][2] = {{{{nullptr}}}} |
EKLM part. | |
TH2F * | h2c_timeFSLP [2][8][15][2] = {{{{nullptr}}}} |
BKLM part. | |
TH2F * | h2c_timeFSLP_end [2][4][14][2] = {{{{nullptr}}}} |
EKLM part. | |
TH1F * | h_timeFSLPC_tc [2][8][15][2][54] = {{{{{nullptr}}}}} |
BKLM part, used for effective light speed estimation. | |
TH1F * | h_timeFSLPC [2][8][15][2][54] = {{{{{nullptr}}}}} |
BKLM part. | |
TH2F * | m_HistTimeLengthBKLM [2][8][15][2][54] = {{{{{nullptr}}}}} |
Two-dimensional distributions of time versus propagation length. | |
TH1F * | h_timeFSLPC_tc_end [2][4][14][2][75] = {{{{{nullptr}}}}} |
EKLM part, used for effective light speed estimation. | |
TH1F * | h_timeFSLPC_end [2][4][14][2][75] = {{{{{nullptr}}}}} |
EKLM part. | |
TH2F * | m_HistTimeLengthEKLM [2][4][14][2][75] = {{{{{nullptr}}}}} |
Two-dimensional distributions of time versus propagation length. | |
TH1F * | hc_timeFSLPC [2][8][15][2][54] = {{{{{nullptr}}}}} |
BKLM part. | |
TH1F * | hc_timeFSLPC_end [2][4][14][2][75] = {{{{{nullptr}}}}} |
EKLM part. | |
TF1 * | fcn_pol1 = nullptr |
Pol1 function. More... | |
TF1 * | fcn_const = nullptr |
Const function. More... | |
TF1 * | fcn_gaus = nullptr |
Gaussian function. More... | |
TF1 * | fcn_land = nullptr |
Landau function. More... | |
TFile * | m_outFile = nullptr |
Output file. | |
std::vector< std::string > | m_inputFileNames |
List of input files to the Algorithm, will initially be user defined but then gets the wildcards expanded during execute() | |
std::map< Calibration::ExpRun, std::vector< std::string > > | m_runsToInputFiles |
Map of Runs to input files. Gets filled when you call getRunRangeFromAllData, gets cleared when setting input files again. | |
std::string | m_granularityOfData |
Granularity of input data. This only changes when the input files change so it isn't specific to an execution. | |
ExecutionData | m_data |
Data specific to a SINGLE execution of the algorithm. Gets reset at the beginning of execution. | |
std::string | m_description {""} |
Description of the algorithm. | |
std::string | m_prefix {""} |
The name of the TDirectory the collector objects are contained within. | |
nlohmann::json | m_jsonExecutionInput = nlohmann::json::object() |
Optional input JSON object used to make decisions about how to execute the algorithm code. | |
nlohmann::json | m_jsonExecutionOutput = nlohmann::json::object() |
Optional output JSON object that can be set during the execution by the underlying algorithm code. | |
Static Private Attributes | |
static const Calibration::ExpRun | m_allExpRun = make_pair(-1, -1) |
allExpRun | |
KLM time calibration algorithm.
Definition at line 41 of file KLMTimeAlgorithm.h.
|
inherited |
The result of calibration.
Definition at line 40 of file CalibrationAlgorithm.h.
|
overrideprotectedvirtual |
Run algorithm on data.
=======================================================================================
Implements CalibrationAlgorithm.
Definition at line 740 of file KLMTimeAlgorithm.cc.
|
inherited |
Checks that a PyObject can be successfully converted to an ExpRun type.
Checks if the PyObject can be converted to ExpRun.
Definition at line 28 of file CalibrationAlgorithm.cc.
|
inherited |
Performs the conversion of PyObject to ExpRun.
Converts the PyObject to an ExpRun. We've preoviously checked the object so this assumes a lot about the PyObject.
Definition at line 70 of file CalibrationAlgorithm.cc.
|
private |
Create histograms.
Hist declaration Global time distribution
Definition at line 174 of file KLMTimeAlgorithm.cc.
double esti_timeRes | ( | const KLMChannelIndex & | klmChannel | ) |
Estimate value of calibration constant for calibrated channels.
[in] | klmChannel | KLM channel index. |
Definition at line 1633 of file KLMTimeAlgorithm.cc.
double esti_timeShift | ( | const KLMChannelIndex & | klmChannel | ) |
Estimate value of calibration constant for uncalibrated channels.
[in] | klmChannel | KLM channel index. |
Definition at line 1553 of file KLMTimeAlgorithm.cc.
|
inherited |
Runs calibration over vector of runs for a given iteration.
You can also specify the IoV to save the database payload as. By default the Algorithm will create an IoV from your requested ExpRuns, or from the overall ExpRuns of the input data if you haven't specified ExpRuns in this function.
No checks are performed to make sure that a IoV you specify matches the data you ran over, it simply labels the IoV to commit to the database later.
Definition at line 114 of file CalibrationAlgorithm.cc.
|
private |
Fill profiles of time versus distance.
[out] | profileRpcPhi | BKLM RPC phi plane. |
[out] | profileRpcZ | BKLM RPC z plane. |
[out] | profileBKLMScintillatorPhi | BKLM scintillator phi plane. |
[out] | profileBKLMScintillatorZ | BKLM scintillator z plane. |
[out] | profileEKLMScintillatorPlane1 | EKLM scintillator plane1. |
[out] | profileEKLMScintillatorPlane2 | EKLM scintillator plane2. |
[in] | fill2dHistograms | Whether to fill 2d histograms. |
Definition at line 595 of file KLMTimeAlgorithm.cc.
|
inlineinherited |
Alias for prefix.
For convenience and less writing, we say developers to set this to default collector module name in constructor of base class. One can however use the dublets of collector+algorithm multiple times with different settings. To bind these together correctly, the prefix has to be set the same for algo and collector. So we call the setter setPrefix rather than setModuleName or whatever. This getter will work out of the box for default cases -> return the name of module you have to add to your path to collect data for this algorihtm.
Definition at line 164 of file CalibrationAlgorithm.h.
|
private |
Read calibration data.
Definition at line 141 of file KLMTimeAlgorithm.cc.
|
inherited |
Set the input file names used for this algorithm from a Python list.
Set the input file names used for this algorithm and resolve the wildcards.
Definition at line 166 of file CalibrationAlgorithm.cc.
|
protectedinherited |
Set the input file names used for this algorithm.
Set the input file names used for this algorithm and resolve the wildcards.
Definition at line 194 of file CalibrationAlgorithm.cc.
|
inline |
Set the lower number of hits collected on one sigle strip.
If the hit number is lower than the limit, the strip will not be calibrated and set the average value of the calibration constant.
Definition at line 161 of file KLMTimeAlgorithm.h.
|
inline |
Set flag indicating whether the input is MC sample.
The histogram ranges are different for data and MC. This setting cannot be determined automatically, because the collector output does not contain metadata.
Definition at line 135 of file KLMTimeAlgorithm.h.
|
private |
Two-dimensional fit for individual channels.
[in] | channels | Channels. |
[out] | delay | Delay (ns / cm). |
[out] | delayError | Delay error. |
Definition at line 656 of file KLMTimeAlgorithm.cc.
std::pair< int, double > tR_lowerStrip | ( | const KLMChannelIndex & | klmChannel | ) |
Tracing avaiable channels with decreasing strip number.
[in] | klmChannel | KLM channel index. |
Definition at line 1690 of file KLMTimeAlgorithm.cc.
std::pair< int, double > tR_upperStrip | ( | const KLMChannelIndex & | klmChannel | ) |
Tracing avaiable channels with increasing strip number.
[in] | klmChannel | KLM channel index. |
Definition at line 1664 of file KLMTimeAlgorithm.cc.
std::pair< int, double > tS_lowerStrip | ( | const KLMChannelIndex & | klmChannel | ) |
Tracing avaiable channels with decreasing strip number.
[in] | klmChannel | KLM channel index. |
Definition at line 1610 of file KLMTimeAlgorithm.cc.
std::pair< int, double > tS_upperStrip | ( | const KLMChannelIndex & | klmChannel | ) |
Tracing avaiable channels with increasing strip number.
[in] | klmChannel | KLM channel index. |
Definition at line 1584 of file KLMTimeAlgorithm.cc.
|
private |
Const function.
Global time distribution fitting.
Definition at line 744 of file KLMTimeAlgorithm.h.
|
private |
Gaussian function.
Scitillator time ditribution fitting.
Definition at line 747 of file KLMTimeAlgorithm.h.
|
private |
|
private |
|
private |
Container of hit information.
the global element number of the strip is used as the key.
Definition at line 279 of file KLMTimeAlgorithm.h.