Belle II Software development
TOPCommonT0CalibratorModule.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 <framework/database/DBObjPtr.h>
23#include <top/dbobjects/TOPCalCommonT0.h>
24
25#include <string>
26
27#include <TFile.h>
28#include <TTree.h>
29#include <TH1F.h>
30#include <TH2F.h>
31
32namespace 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
80
84 enum {c_numModules = 16,
85 c_numSets = 32,
86 };
87
88 // steering parameters
90 double m_timeRange;
91 double m_sigmaSmear;
92 std::string m_sample;
94 double m_deltaEcms;
95 double m_dr;
96 double m_dz;
97 double m_minZ;
98 double m_maxZ;
99 std::string m_outFileName;
100 std::string m_pdfOption;
102 // procedure
106 double m_bunchTimeSep = 0;
108 // datastore objects
114 // database
117 // output root file
118 TFile* m_file = 0;
120 // control histograms
121 TH1F m_hits1D;
122 TH2F m_hits2D;
124 // tree and its variables
125 TTree* m_tree = 0;
126 int m_moduleID = 0;
127 int m_numPhotons = 0;
128 float m_x = 0;
129 float m_y = 0;
130 float m_z = 0;
131 float m_p = 0;
132 float m_theta = 0;
133 float m_phi = 0;
134 float m_pocaR = 0;
135 float m_pocaZ = 0;
136 float m_pocaX = 0;
137 float m_pocaY = 0;
138 float m_cmsE = 0;
139 int m_charge = 0;
140 int m_PDG = 0;
142 };
143
145} // Belle2 namespace
146
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
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 common T0 calibration with collision data (dimuons or bhabhas)
StoreObjPtr< TOPRecBunch > m_recBunch
reconstructed bunch
TOP::Chi2MinimumFinder1D m_finders[c_numSets]
finders
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)
DBObjPtr< TOPCalCommonT0 > m_commonT0
common T0 calibration constants
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
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
@ c_numSets
number of statistically independent subsamples
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.
double m_bunchTimeSep
time between two bunches
TH1F m_hits1D
number of photon hits in a slot
float m_z
track: extrapolated hit coordinate in local (module) frame
float m_x
track: extrapolated hit coordinate in local (module) frame
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.
bool isRunningOffsetSubtracted()
Checks if running offset is subtracted in TOPDigits.
Abstract base class for different kinds of events.