Belle II Software  release-08-01-10
TOPChannelT0CalibratorModule.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 <framework/datastore/StoreArray.h>
13 #include <framework/datastore/StoreObjPtr.h>
14 #include <mdst/dataobjects/Track.h>
15 #include <tracking/dataobjects/ExtHit.h>
16 #include <top/dataobjects/TOPDigit.h>
17 #include <top/dataobjects/TOPRecBunch.h>
18 #include <top/utilities/TrackSelector.h>
19 #include <top/utilities/Chi2MinimumFinder1D.h>
20 #include <top/reconstruction_cpp/PDFConstructor.h>
21 
22 #include <string>
23 #include <vector>
24 
25 #include <TFile.h>
26 #include <TTree.h>
27 #include <TH1F.h>
28 #include <TH2F.h>
29 
30 namespace Belle2 {
42 
43  public:
44 
49 
54  {}
55 
60  virtual void initialize() override;
61 
65  virtual void event() override;
66 
71  virtual void terminate() override;
72 
73  private:
74 
78  enum {c_numModules = 16,
79  c_numChannels = 512
80  };
81 
82  // module parameters
83  int m_numBins;
84  double m_timeRange;
85  double m_sigmaSmear;
86  std::string m_sample;
87  double m_minMomentum;
88  double m_deltaEcms;
89  double m_dr;
90  double m_dz;
91  double m_minZ;
92  double m_maxZ;
93  std::string m_outFileName;
94  std::string m_pdfOption;
96  // procedure
101  // datastore objects
107  // output root file
108  TFile* m_file = 0;
110  // histograms
111  std::vector<TH1F> m_hits1D;
112  std::vector<TH2F> m_hits2D;
114  // tree and its variables
115  TTree* m_tree = 0;
116  int m_moduleID = 0;
117  int m_numPhotons = 0;
118  float m_x = 0;
119  float m_y = 0;
120  float m_z = 0;
121  float m_p = 0;
122  float m_theta = 0;
123  float m_phi = 0;
124  float m_pocaR = 0;
125  float m_pocaZ = 0;
126  float m_pocaX = 0;
127  float m_pocaY = 0;
128  float m_cmsE = 0;
129  int m_charge = 0;
130  int m_PDG = 0;
132  };
133 
135 } // Belle2 namespace
136 
Base class for Modules.
Definition: Module.h:72
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
A module for alternative channel T0 calibration with collision data Note: after this kind of calibrat...
StoreObjPtr< TOPRecBunch > m_recBunch
reconstructed bunch
TTree * m_tree
TTree containing selected track parameters etc.
TOP::TrackSelector m_selector
track selection utility
double m_sigmaSmear
additional smearing of PDF in [ns]
int m_PDG
track MC truth (simulated data only)
float m_phi
track: extrapolated hit momentum in local (module) frame
double m_minMomentum
minimal track momentum if sample is "cosmics"
int m_numBins
number of bins to which search region is divided
int m_numPhotons
number of photons in this slot
double m_maxZ
maximal local z of extrapolated hit
int m_moduleID
slot to which the track is extrapolated to
std::vector< TH1F > m_hits1D
number photon hits in a channel
@ c_numChannels
number of channels per module
TOP::PDFConstructor::EPDFOption m_PDFOption
PDF option.
double m_minZ
minimal local z of extrapolated hit
float m_p
track: extrapolated hit momentum in local (module) frame
StoreArray< Track > m_tracks
collection of tracks
double m_deltaEcms
c.m.s energy window if sample is "dimuon" or "bhabha"
double m_timeRange
time range in which to search for the minimum [ns]
float m_y
track: extrapolated hit coordinate in local (module) frame
StoreArray< TOPDigit > m_digits
collection of digits
StoreArray< ExtHit > m_extHits
collection of extrapolated hits
std::string m_outFileName
Root output file name containing results.
float m_z
track: extrapolated hit coordinate in local (module) frame
float m_x
track: extrapolated hit coordinate in local (module) frame
TOP::Chi2MinimumFinder1D m_finders[2][c_numModules][c_numChannels]
finders
float m_theta
track: extrapolated hit momentum in local (module) frame
Minimum finder using tabulated chi^2 values in one dimension.
EPDFOption
Signal PDF construction options.
@ c_Rough
no dependence on y
Utility for the track selection - used in various calibration modules.
Definition: TrackSelector.h:27
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
virtual void terminate() override
Termination action.
Abstract base class for different kinds of events.