Belle II Software development
eclTimeShiftsPlottingCollectorModule.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 * A code to collect just the calibration constants to be then plotted *
12 * by the algorithm to see how much they jump from run to run. This *
13 * collector does not need to look at individual events as the *
14 * calibration constants are constant over all the events in a single *
15 * file (run or bucket of data). *
16 **************************************************************************/
17
18#pragma once
19
20/* ECL headers. */
21#include <ecl/dataobjects/ECLElementNumbers.h>
22
23/* Basf2 headers. */
24#include <calibration/CalibrationCollectorModule.h>
25#include <framework/database/DBObjPtr.h>
26#include <framework/dataobjects/EventMetaData.h>
27
28class TTree;
29
30namespace Belle2 {
35 class ECLCrystalCalib;
36 class ECLReferenceCrystalPerCrateCalib;
37
38
44
45 public:
46
49
54
56 void inDefineHisto() override;
57
59 void prepare() override;
60
62 void collect() override;
63
64 private:
65
68 std::vector<float> m_CrystalTime;
69 std::vector<float> m_CrystalTimeUnc;
73 std::vector<float> m_CrateTime;
74 std::vector<float> m_CrateTimeUnc;
78 std::vector<short> m_RefCrystalsCalib;
82 /*** tree branches ***/
83 double m_crateTimeConst = -1;
84 double m_crystalTimeConst = -1;
85 double m_crateTimeConstUnc = -1;
87 int m_crystalID = -1;
88 int m_crateID = -1;
89 int m_refCrystalID = -1;
90 int m_run = -1;
91 int m_exp = -1;
93 /*** tree branches END ***/
94
95 int m_previousExp = -2;
98 int m_previousRun = -2;
104 };
106}
107
Calibration collector module base class.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
This modules looks up crystal and crate time offset constants from the database and saves them to a t...
std::vector< float > m_CrateTime
vector obtained from DB object
DBObjPtr< ECLCrystalCalib > m_CrateTimeDB
Time offset from crate time calibration (also this calibration) from database.
int m_previousRun
Previous run number, in case we run over several runs.
std::vector< float > m_CrystalTimeUnc
vector obtained from DB object
DBObjPtr< ECLCrystalCalib > m_CrystalTimeDB
Time offset from previous crystal time calibration (this calibration) from database.
DBObjPtr< ECLReferenceCrystalPerCrateCalib > m_RefCrystalsCalibDB
Crystal IDs of the one reference crystal per crate from database.
std::vector< short > m_RefCrystalsCalib
vector obtained from DB object
double m_crystalTimeConstUnc
crystal time uncertainty in ticks
void collect() override
Select events and crystals and accumulate histograms.
std::vector< float > m_CrateTimeUnc
uncertainty vector obtained from DB object
StoreObjPtr< EventMetaData > m_evtMetaData
Event meta data.
int m_refCrystalID
reference crystal identification number
void prepare() override
Define histograms and read payloads from DB.
std::vector< float > m_CrystalTime
vector obtained from DB object
int m_previousExp
Previous experiment number, in case we run over several runs.
void inDefineHisto() override
Replacement for defineHisto() in CalibrationCollector modules.
const int c_NCrystals
Number of crystals.
Abstract base class for different kinds of events.