Belle II Software  release-08-00-10
eclBhabhaTimeCalibrationValidationCollectorModule.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 #pragma once
10 
11 /* ECL headers. */
12 #include <ecl/mapper/ECLChannelMapper.h>
13 
14 /* Basf2 headers. */
15 #include <calibration/CalibrationCollectorModule.h>
16 #include <framework/core/Module.h>
17 #include <framework/database/DBObjPtr.h>
18 #include <framework/dataobjects/EventMetaData.h>
19 #include <framework/dataobjects/EventT0.h>
20 #include <framework/datastore/StoreArray.h>
21 #include <mdst/dataobjects/SoftwareTriggerResult.h>
22 
23 class TTree ;
24 
25 namespace Belle2 {
30  class ECLDigit ;
31  class ECLCalDigit ;
32  class Track ;
33  class ECLCrystalCalib ;
34  class ECLCluster ;
35  class ECLChannelMapper;
36 
37 
43 
44  public:
45 
48 
53 
55  void inDefineHisto() override;
56 
58  void prepare() override;
59 
61  void collect() override;
62 
63  private:
64 
66  bool m_saveTree ;
67 
76  std::unique_ptr< Belle2::ECL::ECLChannelMapper> m_crystalMapper =
77  std::make_unique<Belle2::ECL::ECLChannelMapper>();
78 
81 
87 
89  TTree* m_dbg_tree_event ;
90  TTree* m_dbg_tree_run ;
92  /*** tree branches ***/
93  /*** See inDefineHisto method for branches description ***/
94  int m_tree_evt_num = -1;
95  int m_tree_run = -1;
96  int m_tree_cid = -1;
97  double m_tree_dt99 = -1;
98  double m_tree_time = -1;
100  double m_tree_time_fromE0 = -1;
101  double m_tree_time_fromE1 = -1;
102  double m_tree_E0 = -1;
103  double m_tree_E1 = -1;
105  double m_tree_t0 = -1;
106  double m_tree_t0_unc = -1;
108  int m_NtightTracks = -1;
111  // for crate time plotting
113  std::vector<float> m_CrateTime;
114  std::vector<float> m_CrateTimeUnc;
119  int m_tree_crateid = -1;
120  double m_tree_tcrate = -1;
121  double m_tree_tcrate_unc = -1;
124  /*** tree branches END ***/
125 
126  std::vector<float> m_EperCrys ;
128  double m_E_electron_clust = -1 ;
131  /****** Parameters for cuts ******/
132  short m_timeAbsMax ;
134  double m_looseTrkZ0 ;
135  double m_tightTrkZ0 ;
136  double m_looseTrkD0 ;
137  double m_tightTrkD0 ;
139  bool skipTrgSel;
141  } ;
143 }
Calibration collector module base class.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
This module generates 'TimevsCrys' histogram to later (in eclBhabhaTAlgorithm) find time offset from ...
int m_tree_PreviousRun
Run number for the previous run for debug TTree output.
StoreArray< ECLCluster > m_eclClusterArray
Required input array of ECLClusters.
short m_timeAbsMax
Events with abs(time) > m_timeAbsMax are excluded, mostly for histogram x-range purposes.
int m_tree_cid
ECL Cell ID (1..ECLElementNumbers::c_NCrystals) for debug TTree output.
DBObjPtr< Belle2::ECLChannelMap > m_channelMapDB
Mapper of ecl channels to various other objects, like crates.
void collect() override
Select events and crystals and accumulate histograms.
std::vector< float > m_CrateTimeUnc
uncertainty vector obtained from DB object
StoreArray< ECLCalDigit > m_eclCalDigitArray
Required input array of ECLCalDigits.
void inDefineHisto() override
Replacement for defineHisto() in CalibrationCollector modules.
std::unique_ptr< Belle2::ECL::ECLChannelMapper > m_crystalMapper
ECL object for keeping track of mapping between crystals and crates etc.
StoreObjPtr< SoftwareTriggerResult > m_TrgResult
Store array for Trigger selection.
Abstract base class for different kinds of events.