Belle II Software  release-06-01-15
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 #include <framework/core/Module.h>
12 #include <ecl/utility/ECLChannelMapper.h>
13 
14 #include <calibration/CalibrationCollectorModule.h>
15 #include <framework/database/DBObjPtr.h>
16 #include <framework/datastore/StoreArray.h>
17 #include <framework/dataobjects/EventT0.h>
18 
19 #include <mdst/dataobjects/SoftwareTriggerResult.h>
20 class TTree ;
21 
22 namespace Belle2 {
27  class ECLDigit ;
28  class ECLCalDigit ;
29  class Track ;
30  class ECLCrystalCalib ;
31  class ECLCluster ;
32  class ECLChannelMapper;
33 
34 
40 
41  public:
42 
45 
50 
52  void inDefineHisto() override;
53 
55  void prepare() override;
56 
58  void collect() override;
59 
60  private:
61 
63  bool m_saveTree ;
64 
73  std::unique_ptr< Belle2::ECL::ECLChannelMapper> m_crystalMapper =
74  std::make_unique<Belle2::ECL::ECLChannelMapper>();
75 
76 
82 
84  TTree* m_dbg_tree_event ;
85  TTree* m_dbg_tree_run ;
87  /*** tree branches ***/
88  /*** See inDefineHisto method for branches description ***/
89  int m_tree_evt_num = -1;
90  int m_tree_run = -1;
91  int m_tree_cid = -1;
92  double m_tree_dt99 = -1;
93  double m_tree_time = -1;
95  double m_tree_time_fromE0 = -1;
96  double m_tree_time_fromE1 = -1;
97  double m_tree_E0 = -1;
98  double m_tree_E1 = -1;
100  double m_tree_t0 = -1;
101  double m_tree_t0_unc = -1;
103  int m_NtightTracks = -1;
106  // for crate time plotting
108  std::vector<float> m_CrateTime;
109  std::vector<float> m_CrateTimeUnc;
117  int m_tree_crateid = -1;
118  double m_tree_tcrate = -1;
119  double m_tree_tcrate_unc = -1;
122  /*** tree branches END ***/
123 
124  std::vector<float> m_EperCrys ;
126  double m_E_electron_clust = -1 ;
129  /****** Parameters for cuts ******/
130  short m_timeAbsMax ;
132  double m_looseTrkZ0 ;
133  double m_tightTrkZ0 ;
134  double m_looseTrkD0 ;
135  double m_tightTrkD0 ;
137  bool skipTrgSel;
139  } ;
141 }
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:95
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.
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.