Belle II Software  release-08-00-10
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 #include <ecl/mapper/ECLChannelMapper.h>
23 
24 /* Basf2 headers. */
25 #include <calibration/CalibrationCollectorModule.h>
26 #include <framework/core/Module.h>
27 #include <framework/database/DBObjPtr.h>
28 #include <framework/dataobjects/EventMetaData.h>
29 #include <framework/datastore/StoreArray.h>
30 
31 class TTree;
32 
33 namespace Belle2 {
38  class ECLCrystalCalib;
39  class ECLReferenceCrystalPerCrateCalib;
40  class ECLChannelMapper;
41 
42 
48 
49  public:
50 
53 
58 
60  void inDefineHisto() override;
61 
63  void prepare() override;
64 
66  void collect() override;
67 
68  private:
69 
72  std::vector<float> m_CrystalTime;
73  std::vector<float> m_CrystalTimeUnc;
77  std::vector<float> m_CrateTime;
78  std::vector<float> m_CrateTimeUnc;
82  std::vector<short> m_RefCrystalsCalib;
86  /*** tree branches ***/
87  double m_crateTimeConst = -1;
88  double m_crystalTimeConst = -1;
89  double m_crateTimeConstUnc = -1;
90  double m_crystalTimeConstUnc = -1;
91  int m_crystalID = -1;
92  int m_crateID = -1;
93  int m_refCrystalID = -1;
94  int m_run = -1;
95  int m_exp = -1;
97  /*** tree branches END ***/
98 
99  int m_previousExp = -2;
102  int m_previousRun = -2;
108  };
110 }
111 
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.