Belle II Software development
|
This module is the fitter for the CAF collector TOPLaserCalibratorCollector. More...
#include <TOPLocalCalFitter.h>
Public Types | |
enum | EResult { c_OK , c_Iterate , c_NotEnoughData , c_Failure , c_Undefined } |
The result of calibration. More... | |
Public Member Functions | |
TOPLocalCalFitter () | |
Constructor. | |
virtual | ~TOPLocalCalFitter () |
Destructor. | |
void | setMinEntries (int minEntries) |
Sets the minimum number of entries to perform the calibration in one channel. | |
void | setOutputFileName (const std::string &output) |
Sets the name of the output root file. | |
void | setFitConstraintsFileName (const std::string &fitConstraints) |
Sets the name of the root file containing the laser MC time corrections and the fit constraints. | |
void | setTTSFileName (const std::string &TTSData) |
Sets the name of the root file containing the TTS parameters. | |
void | setFitMode (const std::string &fitterMode) |
Sets the fitter mode. | |
void | fitInAmpliduteBins (bool isFitInAmplitudeBins) |
Enables the fit amplitude bins. | |
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. | |
Calibration::ExpRun | convertPyExpRun (PyObject *pyObj) |
Performs the conversion of PyObject to ExpRun. | |
std::string | getCollectorName () const |
Alias for prefix. | |
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. | |
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. | |
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 algorithm (set by developers in constructor) | |
bool | loadInputJson (const std::string &jsonString) |
Load the m_inputJson variable from a string (useful from Python interface). The return 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 | |
void | setupOutputTreeAndFile () |
prepares the output tree | |
void | loadMCInfoTrees () |
loads the TTS parameters and the MC truth info | |
void | determineFitStatus () |
determines if the constant obtained by the fit are good or not | |
void | fitChannel (short, short, TH1 *) |
Fits the laser light on one channel. | |
void | fitPulser (TH1 *, TH1 *) |
Fits the two pulsers. | |
void | calculateChennelT0 () |
Calculates the commonT0 calibration after the fits have been done. | |
virtual EResult | calibrate () override |
Runs the algorithm on events. | |
void | setInputFileNames (std::vector< std::string > inputFileNames) |
Set the input file names used for this algorithm. | |
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 internally 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 | |
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 | |
int | m_minEntries = 50 |
Minimum number of entries to perform the fit. | |
std::string | m_output = "laserFitResult.root" |
Name of the output file. | |
std::string | m_fitConstraints |
File with the TTS parametrization. | |
std::string | m_TTSData |
File with the Fit constraints and MC info. | |
std::string | m_fitterMode = "calibration" |
Fit mode. | |
bool | m_isFitInAmplitudeBins = false |
Enables the fit in amplitude bins. | |
std::vector< float > | m_binEdges = {50, 100, 130, 160, 190, 220, 250, 280, 310, 340, 370, 400, 430, 460, 490, 520, 550, 580, 610, 640, 670, 700, 800, 900, 1000, 1200, 1500, 2000} |
Amplitude bins. | |
TFile * | m_inputTTS = nullptr |
File containing m_treeTTS. | |
TFile * | m_inputConstraints = nullptr |
File containing m_treeConstraints. | |
TTree * | m_treeTTS = nullptr |
Input to the fitter. | |
TTree * | m_treeConstraints |
Input to the fitter. | |
TFile * | m_histFile = nullptr |
Output of the fitter. | |
TTree * | m_fitTree = nullptr |
Output of the fitter. | |
TTree * | m_timewalkTree |
Output of the fitter. | |
float | m_mean2 = 0 |
Position of the second gaussian of the TTS parametrization with respect to the first one. | |
float | m_sigma1 = 0 |
Width of the first gaussian on the TTS parametrization. | |
float | m_sigma2 = 0 |
Width of the second gaussian on the TTS parametrization. | |
float | m_f1 = 0 |
Fraction of the first gaussian on the TTS parametrization. | |
float | m_f2 = 0 |
Fraction of the second gaussian on the TTS parametrization. | |
short | m_pixelRow = 0 |
Pixel row. | |
short | m_pixelCol = 0 |
Pixel column. | |
float | m_peakTimeConstraints = 0 |
Time of the main laser peak in the MC simulation (aka MC correction) | |
float | m_deltaTConstraints = 0 |
Distance between the main and the secondary laser peak. | |
float | m_fractionConstraints = 0 |
Fraction of the main peak. | |
float | m_timeExtraConstraints = 0 |
Position of the guassian used to describe the extra peak on the timing distribution tail. | |
float | m_sigmaExtraConstraints = 0 |
Width of the guassian used to describe the extra peak on the timing distribution tail. | |
float | m_alphaExtraConstraints = 0. |
alpha parameter of the tail of the extra peak. | |
float | m_nExtraConstraints = 0. |
parameter n of the tail of the extra peak | |
float | m_timeBackgroundConstraints = 0. |
Position of the gaussian used to describe the background, w/ respect to peakTime. | |
float | m_sigmaBackgroundConstraints = 0. |
Sigma of the gaussian used to describe the background. | |
float | m_binLowerEdge = 0 |
Lower edge of the amplitude bin in which this fit is performed. | |
float | m_binUpperEdge = 0 |
Upper edge of the amplitude bin in which this fit is performed. | |
short | m_channel = 0 |
Channel number (0-511) | |
short | m_slot = 0 |
Slot ID (1-16) | |
short | m_row = 0 |
Pixel row. | |
short | m_col = 0 |
Pixel column. | |
float | m_peakTime = 0 |
Fitted time of the main (i.e. | |
float | m_deltaT |
Time difference between the main peak and the secondary peak. | |
float | m_sigma = 0. |
Gaussian time resolution, fitted. | |
float | m_fraction = 0. |
Fraction of events in the secondary peak. | |
float | m_yieldLaser = 0. |
Total number of laser hits from the fitting function integral. | |
float | m_histoIntegral = 0. |
Integral of the fitted histogram. | |
float | m_peakTimeErr = 0 |
Statistical error on peakTime. | |
float | m_deltaTErr = 0 |
Statistical error on deltaT. | |
float | m_sigmaErr = 0. |
Statistical error on sigma. | |
float | m_fractionErr = 0. |
Statistical error on fraction. | |
float | m_yieldLaserErr = 0. |
Statistical error on yield. | |
float | m_timeExtra = 0. |
Position of the extra peak seen in the timing tail, w/ respect to peakTime. | |
float | m_sigmaExtra = 0. |
Gaussian sigma of the extra peak in the timing tail | |
float | m_yieldLaserExtra = 0. |
Integral of the extra peak. | |
float | m_alphaExtra = 0. |
alpha parameter of the tail of the extra peak. | |
float | m_nExtra = 0. |
parameter n of the tail of the extra peak | |
float | m_timeBackground = 0. |
Position of the gaussian used to describe the background, w/ respect to peakTime. | |
float | m_sigmaBackground = 0. |
Sigma of the gaussian used to describe the background. | |
float | m_yieldLaserBackground = 0. |
Integral of the background gaussian. | |
float | m_fractionMC = 0. |
Fraction of events in the secondary peak form the MC simulation. | |
float | m_deltaTMC = 0. |
Time difference between the main peak and the secondary peak in the MC simulation. | |
float | m_peakTimeMC |
Time of the main peak in teh MC simulation, i.e. | |
float | m_chi2 = 0 |
Reduced chi2 of the fit. | |
float | m_rms = 0 |
RMS of the histogram used for the fit. | |
float | m_channelT0 |
Raw, channelT0 calibration, defined as peakTime-peakTimeMC. | |
float | m_channelT0Err = 0. |
Statistical error on channelT0. | |
float | m_firstPulserTime = 0. |
Average time of the first electronic pulse respect to the reference pulse, from a Gaussian fit. | |
float | m_firstPulserSigma = 0. |
Time resolution from the fit of the first electronic pulse, from a Gaussian fit. | |
float | m_secondPulserTime |
Average time of the second electronic pulse respect to the reference pulse, from a gaussian fit. | |
float | m_secondPulserSigma = 0. |
Time resolution from the fit of the first electronic pulse, from a Gaussian fit. | |
short | m_fitStatus = 1 |
Fit quality flag, propagated to the constants. | |
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 | |
This module is the fitter for the CAF collector TOPLaserCalibratorCollector.
It analyzes the tree containing the timing of the laser and pulser hits produced by the collector, returning a tree with the fit results and the histograms for each channel. It can be used to produce both channelT0 calibrations and to analyze the daily, low statistics laser runs
Definition at line 27 of file TOPLocalCalFitter.h.
|
inherited |
The result of calibration.
Definition at line 40 of file CalibrationAlgorithm.h.
Constructor.
Definition at line 103 of file TOPLocalCalFitter.cc.
|
inlinevirtual |
|
inlineprotectedvirtualinherited |
If you need to make some changes to your algorithm class before 'findPayloadBoundaries' is run, make them in this function.
Reimplemented in TestBoundarySettingAlgorithm, TestCalibrationAlgorithm, PXDAnalyticGainCalibrationAlgorithm, PXDValidationAlgorithm, SVD3SampleCoGTimeCalibrationAlgorithm, SVD3SampleELSTimeCalibrationAlgorithm, and SVDCoGTimeCalibrationAlgorithm.
Definition at line 252 of file CalibrationAlgorithm.h.
|
inlineprotectedvirtualinherited |
Put your algorithm back into a state ready for normal execution if you need to.
Definition at line 257 of file CalibrationAlgorithm.h.
|
protected |
Calculates the commonT0 calibration after the fits have been done.
It also saves the constants in a localDB and in the output tree
Definition at line 475 of file TOPLocalCalFitter.cc.
|
overrideprotectedvirtual |
Runs the algorithm on events.
Currently, it always returns c_OK despite of the actual result of the fitting procedure. This is not an issue since this moduleis not intended to be used in the automatic calibration.
Implements CalibrationAlgorithm.
Definition at line 533 of file TOPLocalCalFitter.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.
|
inlineprotectedinherited |
Clear calibration data.
Definition at line 324 of file CalibrationAlgorithm.h.
|
inherited |
Submit constants from last calibration into database.
Definition at line 302 of file CalibrationAlgorithm.cc.
|
inherited |
Submit constants from a (potentially previous) set of payloads.
Definition at line 311 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.
|
protected |
determines if the constant obtained by the fit are good or not
Definition at line 464 of file TOPLocalCalFitter.cc.
|
inlineinherited |
Dump the JSON string of the output JSON object.
Definition at line 223 of file CalibrationAlgorithm.h.
|
inherited |
Runs calibration over Python list of runs. Converts to C++ and then calls the other execute() function.
Definition at line 83 of file CalibrationAlgorithm.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.
|
inherited |
Fill the mapping of ExpRun -> Files.
Definition at line 330 of file CalibrationAlgorithm.cc.
|
inherited |
Used to discover the ExpRun boundaries that you want the Python CAF to execute on. This is optional and only used in some.
Definition at line 520 of file CalibrationAlgorithm.cc.
|
protected |
Fits the laser light on one channel.
Definition at line 241 of file TOPLocalCalFitter.cc.
|
inline |
|
protected |
Fits the two pulsers.
Definition at line 426 of file TOPLocalCalFitter.cc.
|
inlineprotectedinherited |
Returns the Exp,Run pair that means 'Everything'. Currently unused.
Definition at line 327 of file CalibrationAlgorithm.h.
|
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 algorithm.
Definition at line 164 of file CalibrationAlgorithm.h.
|
inlineinherited |
Get the description of the algorithm (set by developers in constructor)
Definition at line 216 of file CalibrationAlgorithm.h.
|
privateinherited |
Gets the "exp.run" string repr. of (exp,run)
Definition at line 254 of file CalibrationAlgorithm.cc.
|
privateinherited |
constructs the full TDirectory + Key name of an object in a TFile based on its name and exprun
Definition at line 263 of file CalibrationAlgorithm.cc.
|
inlineinherited |
Get the granularity of collected data.
Definition at line 188 of file CalibrationAlgorithm.h.
|
protectedinherited |
Get the granularity of collected data.
Definition at line 383 of file CalibrationAlgorithm.cc.
|
inherited |
Get the input file names used for this algorithm and pass them out as a Python list of unicode strings.
Definition at line 245 of file CalibrationAlgorithm.cc.
|
inlineprotectedinherited |
Get the entire top level JSON object. We explicitly say this must be of object type so that we might pick.
Definition at line 357 of file CalibrationAlgorithm.h.
|
inlineprotectedinherited |
Get an input JSON value using a key. The normal exceptions are raised when the key doesn't exist.
Definition at line 350 of file CalibrationAlgorithm.h.
|
inherited |
Get the complete IoV from inspection of collected data.
Definition at line 325 of file CalibrationAlgorithm.cc.
|
inlineprotectedinherited |
Get current iteration.
Definition at line 269 of file CalibrationAlgorithm.h.
|
inlineprotectedinherited |
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.
Definition at line 285 of file CalibrationAlgorithm.h.
|
inlineprotectedinherited |
Get a value using a key from the JSON output object, not sure why you would want to do this.
Definition at line 342 of file CalibrationAlgorithm.h.
|
inlineinherited |
Get constants (in TObjects) for database update from last execution.
Definition at line 204 of file CalibrationAlgorithm.h.
|
inlineinherited |
Get constants (in TObjects) for database update from last execution but passed by VALUE.
Definition at line 207 of file CalibrationAlgorithm.h.
|
inlineinherited |
Get the prefix used for getting calibration data.
Definition at line 146 of file CalibrationAlgorithm.h.
|
inlineprotectedinherited |
Get the list of runs for which calibration is called.
Definition at line 266 of file CalibrationAlgorithm.h.
|
inherited |
Get the complete list of runs from inspection of collected data.
Definition at line 318 of file CalibrationAlgorithm.cc.
|
inherited |
Get the complete RunRange from inspection of collected data.
Definition at line 361 of file CalibrationAlgorithm.cc.
|
inlineprotectedinherited |
Get the input file names used for this algorithm as a STL vector.
Definition at line 275 of file CalibrationAlgorithm.h.
|
inlineprotectedinherited |
|
inlineprotectedvirtualinherited |
Given the current collector data, make a decision about whether or not this run should be the start of a payload boundary.
Reimplemented in TestBoundarySettingAlgorithm, PXDAnalyticGainCalibrationAlgorithm, PXDValidationAlgorithm, TestCalibrationAlgorithm, SVD3SampleCoGTimeCalibrationAlgorithm, SVD3SampleELSTimeCalibrationAlgorithm, and SVDCoGTimeCalibrationAlgorithm.
Definition at line 243 of file CalibrationAlgorithm.h.
|
inherited |
Load the m_inputJson variable from a string (useful from Python interface). The return bool indicates success or failure.
Definition at line 502 of file CalibrationAlgorithm.cc.
|
protected |
loads the TTS parameters and the MC truth info
Definition at line 113 of file TOPLocalCalFitter.cc.
|
inlineprotectedinherited |
Clears the m_inputJson member variable.
Definition at line 330 of file CalibrationAlgorithm.h.
|
inlineprotectedinherited |
Clears the m_outputJson member variable.
Definition at line 333 of file CalibrationAlgorithm.h.
|
protectedinherited |
Store DBArray payload with given name with default IOV.
Definition at line 297 of file CalibrationAlgorithm.cc.
|
protectedinherited |
Store DBArray with given name and custom IOV.
Definition at line 276 of file CalibrationAlgorithm.cc.
|
protectedinherited |
Store DB payload with default name and default IOV.
Definition at line 287 of file CalibrationAlgorithm.cc.
|
protectedinherited |
Store DB payload with default name and custom IOV.
Definition at line 282 of file CalibrationAlgorithm.cc.
|
protectedinherited |
Store DB payload with given name with default IOV.
Definition at line 292 of file CalibrationAlgorithm.cc.
|
protectedinherited |
Store DB payload with given name and custom IOV.
Definition at line 270 of file CalibrationAlgorithm.cc.
|
inlineprotectedinherited |
Set algorithm description (in constructor)
Definition at line 321 of file CalibrationAlgorithm.h.
|
inline |
Sets the name of the root file containing the laser MC time corrections and the fit constraints.
If the monitoringFit option is used (low statistics sample), this file must be the result of an high-statistics fit.
Definition at line 51 of file TOPLocalCalFitter.h.
|
inline |
Sets the fitter mode.
The options are 'calibration' (default), 'monitoring' or 'MC'. The mode affects the number of parameters that are fixed. Use calibration if you are fitting a large sample (1 M events or more) to derive a set of channelT0 calibrations. Use monitoring if you are fitting a smaller sample. The light path fractions and the tail parameters will be constrained according to the constraint file you passed to the fitter (usually teh result fo a high-statistics fit). Use MC to fit the MC sample and calculate a new set of prism corrections. No parameter is fixed, but the tail components are removed form the fit.
Definition at line 70 of file TOPLocalCalFitter.h.
|
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 |
Sets the minimum number of entries to perform the calibration in one channel.
Definition at line 37 of file TOPLocalCalFitter.h.
|
inline |
Sets the name of the output root file.
Definition at line 43 of file TOPLocalCalFitter.h.
|
inlineprotectedinherited |
Set a key:value pair for the outputJson object, expected to used internally during calibrate()
Definition at line 337 of file CalibrationAlgorithm.h.
|
inlineinherited |
Set the prefix used to identify datastore objects.
Definition at line 167 of file CalibrationAlgorithm.h.
|
inline |
Sets the name of the root file containing the TTS parameters.
Definition at line 57 of file TOPLocalCalFitter.h.
|
protected |
prepares the output tree
Definition at line 151 of file TOPLocalCalFitter.cc.
|
protectedinherited |
Updates any DBObjPtrs by calling update(event) for DBStore.
Definition at line 404 of file CalibrationAlgorithm.cc.
|
staticprivateinherited |
allExpRun
Definition at line 364 of file CalibrationAlgorithm.h.
|
private |
alpha parameter of the tail of the extra peak.
Definition at line 185 of file TOPLocalCalFitter.h.
|
private |
alpha parameter of the tail of the extra peak.
Definition at line 155 of file TOPLocalCalFitter.h.
|
private |
Amplitude bins.
Definition at line 127 of file TOPLocalCalFitter.h.
|
private |
Lower edge of the amplitude bin in which this fit is performed.
Definition at line 162 of file TOPLocalCalFitter.h.
|
private |
Upper edge of the amplitude bin in which this fit is performed.
Definition at line 163 of file TOPLocalCalFitter.h.
|
protectedinherited |
When using the boundaries functionality from isBoundaryRequired, this is used to store the boundaries. It is cleared when.
Definition at line 261 of file CalibrationAlgorithm.h.
|
private |
Channel number (0-511)
Definition at line 164 of file TOPLocalCalFitter.h.
|
private |
Raw, channelT0 calibration, defined as peakTime-peakTimeMC.
This constant is not yet normalized to the average constant in the slot, since that part is currently done by the DB importer. When the DB import functionalities will be added to this module, it will be set to the proper channeT0
Definition at line 200 of file TOPLocalCalFitter.h.
|
private |
Statistical error on channelT0.
Definition at line 202 of file TOPLocalCalFitter.h.
|
private |
Reduced chi2 of the fit.
Definition at line 197 of file TOPLocalCalFitter.h.
|
private |
Pixel column.
Definition at line 167 of file TOPLocalCalFitter.h.
|
privateinherited |
Data specific to a SINGLE execution of the algorithm. Gets reset at the beginning of execution.
Definition at line 382 of file CalibrationAlgorithm.h.
|
private |
Time difference between the main peak and the secondary peak.
Can be either fixed to the MC value or fitted.
Definition at line 169 of file TOPLocalCalFitter.h.
|
private |
Distance between the main and the secondary laser peak.
Definition at line 151 of file TOPLocalCalFitter.h.
|
private |
Statistical error on deltaT.
Definition at line 177 of file TOPLocalCalFitter.h.
|
private |
Time difference between the main peak and the secondary peak in the MC simulation.
Definition at line 193 of file TOPLocalCalFitter.h.
|
privateinherited |
Description of the algorithm.
Definition at line 385 of file CalibrationAlgorithm.h.
|
private |
Fraction of the first gaussian on the TTS parametrization.
Definition at line 144 of file TOPLocalCalFitter.h.
|
private |
Fraction of the second gaussian on the TTS parametrization.
Definition at line 145 of file TOPLocalCalFitter.h.
|
private |
Time resolution from the fit of the first electronic pulse, from a Gaussian fit.
Definition at line 205 of file TOPLocalCalFitter.h.
|
private |
Average time of the first electronic pulse respect to the reference pulse, from a Gaussian fit.
Definition at line 204 of file TOPLocalCalFitter.h.
|
private |
File with the TTS parametrization.
Definition at line 121 of file TOPLocalCalFitter.h.
|
private |
Fit quality flag, propagated to the constants.
1 if fit did not converge, 0 if it is fine.
Definition at line 211 of file TOPLocalCalFitter.h.
|
private |
Fit mode.
Can be 'calibration', 'monitoring' or 'MC'
Definition at line 125 of file TOPLocalCalFitter.h.
|
private |
Output of the fitter.
The tree containg the fit results.
Definition at line 135 of file TOPLocalCalFitter.h.
|
private |
Fraction of events in the secondary peak.
Definition at line 172 of file TOPLocalCalFitter.h.
|
private |
Fraction of the main peak.
Definition at line 152 of file TOPLocalCalFitter.h.
|
private |
Statistical error on fraction.
Definition at line 179 of file TOPLocalCalFitter.h.
|
private |
Fraction of events in the secondary peak form the MC simulation.
Definition at line 192 of file TOPLocalCalFitter.h.
|
privateinherited |
Granularity of input data. This only changes when the input files change so it isn't specific to an execution.
Definition at line 379 of file CalibrationAlgorithm.h.
|
private |
Output of the fitter.
The file containing the output trees and histograms
Definition at line 134 of file TOPLocalCalFitter.h.
|
private |
Integral of the fitted histogram.
Definition at line 174 of file TOPLocalCalFitter.h.
|
private |
File containing m_treeConstraints.
Definition at line 129 of file TOPLocalCalFitter.h.
|
privateinherited |
List of input files to the Algorithm, will initially be user defined but then gets the wildcards expanded during execute()
Definition at line 373 of file CalibrationAlgorithm.h.
|
private |
File containing m_treeTTS.
Definition at line 128 of file TOPLocalCalFitter.h.
|
private |
Enables the fit in amplitude bins.
Definition at line 126 of file TOPLocalCalFitter.h.
|
privateinherited |
Optional input JSON object used to make decisions about how to execute the algorithm code.
Definition at line 397 of file CalibrationAlgorithm.h.
|
privateinherited |
Optional output JSON object that can be set during the execution by the underlying algorithm code.
Definition at line 403 of file CalibrationAlgorithm.h.
|
private |
Position of the second gaussian of the TTS parametrization with respect to the first one.
Definition at line 141 of file TOPLocalCalFitter.h.
|
private |
Minimum number of entries to perform the fit.
Currently not used
Definition at line 119 of file TOPLocalCalFitter.h.
|
private |
parameter n of the tail of the extra peak
Definition at line 186 of file TOPLocalCalFitter.h.
|
private |
parameter n of the tail of the extra peak
Definition at line 156 of file TOPLocalCalFitter.h.
|
private |
Name of the output file.
Definition at line 120 of file TOPLocalCalFitter.h.
|
private |
|
private |
Time of the main laser peak in the MC simulation (aka MC correction)
Definition at line 150 of file TOPLocalCalFitter.h.
|
private |
Statistical error on peakTime.
Definition at line 176 of file TOPLocalCalFitter.h.
|
private |
Time of the main peak in teh MC simulation, i.e.
time of propagation of the light in the prism. This factor is used to get the channelT0 calibration
Definition at line 194 of file TOPLocalCalFitter.h.
|
private |
Pixel column.
Definition at line 147 of file TOPLocalCalFitter.h.
|
private |
Pixel row.
Definition at line 146 of file TOPLocalCalFitter.h.
|
privateinherited |
The name of the TDirectory the collector objects are contained within.
Definition at line 388 of file CalibrationAlgorithm.h.
|
private |
RMS of the histogram used for the fit.
Definition at line 198 of file TOPLocalCalFitter.h.
|
private |
Pixel row.
Definition at line 166 of file TOPLocalCalFitter.h.
|
privateinherited |
Map of Runs to input files. Gets filled when you call getRunRangeFromAllData, gets cleared when setting input files again.
Definition at line 376 of file CalibrationAlgorithm.h.
|
private |
Time resolution from the fit of the first electronic pulse, from a Gaussian fit.
Definition at line 209 of file TOPLocalCalFitter.h.
|
private |
Average time of the second electronic pulse respect to the reference pulse, from a gaussian fit.
Definition at line 207 of file TOPLocalCalFitter.h.
|
private |
Gaussian time resolution, fitted.
Definition at line 171 of file TOPLocalCalFitter.h.
|
private |
Width of the first gaussian on the TTS parametrization.
Definition at line 142 of file TOPLocalCalFitter.h.
|
private |
Width of the second gaussian on the TTS parametrization.
Definition at line 143 of file TOPLocalCalFitter.h.
|
private |
Sigma of the gaussian used to describe the background.
Definition at line 189 of file TOPLocalCalFitter.h.
|
private |
Sigma of the gaussian used to describe the background.
Definition at line 158 of file TOPLocalCalFitter.h.
|
private |
Statistical error on sigma.
Definition at line 178 of file TOPLocalCalFitter.h.
|
private |
Gaussian sigma of the extra peak in the timing tail
Definition at line 183 of file TOPLocalCalFitter.h.
|
private |
Width of the guassian used to describe the extra peak on the timing distribution tail.
Definition at line 154 of file TOPLocalCalFitter.h.
|
private |
Slot ID (1-16)
Definition at line 165 of file TOPLocalCalFitter.h.
|
private |
Position of the gaussian used to describe the background, w/ respect to peakTime.
Definition at line 188 of file TOPLocalCalFitter.h.
|
private |
Position of the gaussian used to describe the background, w/ respect to peakTime.
Definition at line 157 of file TOPLocalCalFitter.h.
|
private |
Position of the extra peak seen in the timing tail, w/ respect to peakTime.
Definition at line 182 of file TOPLocalCalFitter.h.
|
private |
Position of the guassian used to describe the extra peak on the timing distribution tail.
Definition at line 153 of file TOPLocalCalFitter.h.
|
private |
Output of the fitter.
The tree containg the fit results to be used to study timewalk and asymptotic time resolution.
Definition at line 136 of file TOPLocalCalFitter.h.
|
private |
Input to the fitter.
A tree containing the laser MC corrections and all the paraeters to be fixed in the fit
Definition at line 132 of file TOPLocalCalFitter.h.
|
private |
Input to the fitter.
A tree containing the TTS parametrization for each channel
Definition at line 131 of file TOPLocalCalFitter.h.
|
private |
File with the Fit constraints and MC info.
Definition at line 123 of file TOPLocalCalFitter.h.
|
private |
Total number of laser hits from the fitting function integral.
Definition at line 173 of file TOPLocalCalFitter.h.
|
private |
Integral of the background gaussian.
Definition at line 190 of file TOPLocalCalFitter.h.
|
private |
Statistical error on yield.
Definition at line 180 of file TOPLocalCalFitter.h.
|
private |
Integral of the extra peak.
Definition at line 184 of file TOPLocalCalFitter.h.