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 {
43
44 public:
45
50
55 {}
56
61 virtual void initialize() override;
62
67 virtual void beginRun() override;
68
72 virtual void event() override;
73
78 virtual void terminate() override;
79
80 private:
81
87
91 enum {c_numModules = 16,
92 };
93
94 // module parameters
96 double m_timeRange;
97 double m_sigmaSmear;
98 std::string m_sample;
100 double m_deltaEcms;
101 double m_dr;
102 double m_dz;
103 double m_minZ;
104 double m_maxZ;
105 std::string m_outFileName;
106 std::string m_pdfOption;
108 // procedure
113 // datastore objects
119 // database
122 // output root file
123 TFile* m_file = 0;
125 // histograms
126 TH1F m_hits1D;
127 TH2F m_hits2D;
129 // tree and its variables
130 TTree* m_tree = 0;
131 int m_moduleID = 0;
132 int m_numPhotons = 0;
133 float m_x = 0;
134 float m_y = 0;
135 float m_z = 0;
136 float m_p = 0;
137 float m_theta = 0;
138 float m_phi = 0;
139 float m_pocaR = 0;
140 float m_pocaZ = 0;
141 float m_pocaX = 0;
142 float m_pocaY = 0;
143 float m_cmsE = 0;
144 int m_charge = 0;
145 int m_PDG = 0;
147 };
148
150} // Belle2 namespace
151
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 module T0 calibration with collision data (dimuons or bhabhas) Useful when the geometric...
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.
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.
virtual void beginRun() override
Called when entering a new run.
Abstract base class for different kinds of events.