Belle II Software development
eclTimeShiftsAlgorithm.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9/**************************************************************************
10 * Description: *
11 * Plot the ecl times (crystal and crate) *
12 **************************************************************************/
13
14#pragma once
15
16/* ECL headers. */
17#include <ecl/dataobjects/ECLElementNumbers.h>
18#include <ecl/dbobjects/ECLCrystalCalib.h>
19#include <ecl/dbobjects/ECLReferenceCrystalPerCrateCalib.h>
20
21/* Basf2 headers. */
22#include <calibration/CalibrationAlgorithm.h>
23#include <framework/database/DBObjPtr.h>
24
25/* C++ headers. */
26#include <string>
27
28namespace Belle2 {
33 namespace ECL {
34
37 public:
38
41
44
45
46 /*** Parameters ***/
47
49 std::string debugFilenameBase;
50
54
61
62 protected:
63
65 EResult calibrate() override;
66
67 private:
68
71
74
77
80
82 const int m_numCrates = 52;
83
84 // Variables to be read in from the per-crystal tree
90 Double_t m_crateTimeUnc;
92 Int_t m_crateID;
94 // Variables to be read in from the per-crate tree
95 //Int_t m_run_perCrate;
96 //Int_t m_exp_perCrate;
99 // Cuts for runs to plot
100 double m_tcrate_min_cut = -150;
101 double m_tcrate_max_cut = 150;
102 double m_tcrate_unc_min_cut = 0.0001 ;
103 double m_tcrate_unc_max_cut = 0.4 ;
106 };
107 }
109} // namespace Belle2
110
111
Base class for calibration algorithms.
EResult
The result of calibration.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Calibrate ecl crystals using previously created payloads.
Double_t m_crateTimeConst
Crate time calibration constant.
double m_tcrate_unc_min_cut
Minimum value cut for the crate time calibration constant uncertainty for plotting.
bool algorithmReadPayloads
Whether or not to have the algorithm code to loop over all the runs and read the payloads itself.
const int m_numCrates
Number of Crates expected.
double m_tcrate_max_cut
Maximum value cut for the crate time calibration constant for plotting
double m_tcrate_min_cut
Minimum value cut for the crate time calibration constant for plotting.
const int m_numCrystals
Number of Crystals expected.
Double_t m_crystalTimeUnc
Uncertainty on the crystal time calibration constant.
Double_t m_crateTimeUnc
Uncertainty on the crate time calibration constant.
DBObjPtr< ECLReferenceCrystalPerCrateCalib > m_refCrysIDzeroingCrate
payload that we want to read from the DB
double m_tcrate_unc_max_cut
Maximum value cut for the crate time calibration constant uncertainty for plotting.
DBObjPtr< ECLCrystalCalib > m_ECLCrateTimeOffset
ECLCrateTimeOffset payload that we want to read from the DB.
Double_t m_crystalTimeConst
Crystal time calibration constant.
Int_t m_refCrystalID
Crystal ID number for the reference crystal.
EResult calibrate() override
..Run algorithm
double crysCrateShift_max
Plotting time max for crystal+crate shift plots.
double crysCrateShift_min
Plotting time min for crystal+crate shift plots.
std::string debugFilenameBase
Name of file with debug output, eclTimeShiftsAlgorithm.root by default.
DBObjPtr< ECLCrystalCalib > m_ECLCrystalTimeOffset
ECLCrystalTimeOffset payload that we want to read from the DB.
double timeShiftForPlotStyle[52]
List of time offsets, one per crate, used just to centre the time constants around zero.
const int c_NCrystals
Number of crystals.
Abstract base class for different kinds of events.