Belle II Software development
TOPModuleT0CalibratorModule.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/TOPCalModuleT0.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 {
37
43
44 public:
45
50
55 virtual void initialize() override;
56
61 virtual void beginRun() override;
62
66 virtual void event() override;
67
72 virtual void terminate() override;
73
74 private:
75
81
85 enum {c_numModules = 16,
86 };
87
88 // module 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;
101
102 // procedure
106
107 // datastore objects
112
113 // database
115
116 // output root file
117 TFile* m_file = 0;
118
119 // histograms
120 TH1F m_hits1D;
121 TH2F m_hits2D;
122
123 // tree and its variables
124 TTree* m_tree = 0;
125 int m_moduleID = 0;
126 int m_numPhotons = 0;
127 float m_x = 0;
128 float m_y = 0;
129 float m_z = 0;
130 float m_p = 0;
131 float m_theta = 0;
132 float m_phi = 0;
133 float m_pocaR = 0;
134 float m_pocaZ = 0;
135 float m_pocaX = 0;
136 float m_pocaY = 0;
137 float m_cmsE = 0;
138 int m_charge = 0;
139 int m_PDG = 0;
140
141 };
142
144} // Belle2 namespace
145
Class for accessing objects in the database.
Definition DBObjPtr.h:21
Module()
Constructor.
Definition Module.cc:30
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
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
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
TOP::Chi2MinimumFinder1D m_finders[2][c_numModules]
finders
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
DBObjPtr< TOPCalModuleT0 > m_moduleT0
module T0 calibration constants
std::string m_outFileName
Root output file name containing results.
TH1F m_hits1D
number 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.
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.
virtual void beginRun() override
Called when entering a new run.
Abstract base class for different kinds of events.