Belle II Software  release-06-02-00
TOPBunchFinderModule.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 <map>
13 #include <framework/datastore/StoreArray.h>
14 #include <framework/datastore/StoreObjPtr.h>
15 #include <top/dataobjects/TOPDigit.h>
16 #include <top/dataobjects/TOPRawDigit.h>
17 #include <mdst/dataobjects/Track.h>
18 #include <top/dataobjects/TOPRecBunch.h>
19 #include <top/dataobjects/TOPTimeZero.h>
20 #include <framework/dataobjects/MCInitialParticles.h>
21 #include <framework/dataobjects/EventT0.h>
22 #include <framework/database/DBObjPtr.h>
23 #include <top/dbobjects/TOPCalCommonT0.h>
24 #include <top/dbobjects/TOPFrontEndSetting.h>
25 
26 
27 namespace Belle2 {
37  class TOPBunchFinderModule : public Module {
38 
39  public:
40 
45 
50  virtual void initialize() override;
51 
55  virtual void beginRun() override;
56 
60  virtual void event() override;
61 
66  virtual void terminate() override;
67 
68  private:
69 
77 
78  // steering parameters
79  int m_numBins;
80  double m_timeRangeFine;
82  bool m_autoRange;
83  double m_sigmaSmear;
84  double m_minSignal;
85  double m_minSBRatio;
86  double m_minDERatio;
87  double m_maxDERatio;
88  double m_minPt;
89  double m_maxPt;
90  double m_maxD0;
91  double m_maxZ0;
93  bool m_useMCTruth;
95  double m_tau;
96  bool m_fineSearch;
102  // internal variables shared between events
103  double m_bunchTimeSep = 0;
104  std::map<int, double> m_priors;
105  double m_runningOffset = 0;
106  double m_runningError = 0;
107  bool m_HLTmode = false;
108  unsigned m_processed = 0;
109  unsigned m_success = 0;
110  int m_nodEdxCount = 0;
112  // collections
121  // database
125  };
126 
128 } // Belle2 namespace
129 
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:470
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:95
Bunch finder: searches for the bunch crossing where the interaction happened using track-based TOP li...
double m_maxD0
maximal absolute value of helix perigee distance
StoreObjPtr< TOPRecBunch > m_recBunch
reconstructed bunch
bool m_correctDigits
subtract bunch time in TOPDigits
DBObjPtr< TOPFrontEndSetting > m_feSetting
front-end settings
StoreObjPtr< EventT0 > m_eventT0
event T0
double m_minDERatio
minimal ratio of detected over expected photons
double m_sigmaSmear
additional smearing of PDF in [ns]
DBObjPtr< TOPCalCommonT0 > m_commonT0
common T0 calibration constants
bool m_HLTmode
use running average to correct digits
int m_nodEdxCount
counter of tracks with no dEdx, reset at each event
double m_runningError
error on running average
int m_bunchesPerSSTclk
number of bunches per SST clock
bool m_saveHistograms
flag to save histograms
double m_minSignal
minimal number of signal photons
double m_maxZ0
maximal absolute value of helix perigee z coordnate
int m_numBins
number of bins to which the fine search region is divided
bool m_subtractRunningOffset
subtract running offset when running in HLT mode
bool m_autoRange
determine coarse range automatically
double m_runningOffset
running average of bunch offset
int m_minNHitsCDC
minimal number of hits in CDC
unsigned m_success
events with reconstructed bunch
double m_timeRangeFine
time range in which to do fine search [ns]
StoreArray< Track > m_tracks
collection of tracks
bool m_useMCTruth
use MC truth for mass instead of dEdx most probable
double m_minPt
minimal p_T of track
double m_tau
first order filter time constant [events]
double m_maxDERatio
maximal ratio of detected over expected photons
bool m_usePIDLikelihoods
if true, use PIDLikelihoods (only on cdst files)
double m_maxPt
maximal p_T of track
StoreArray< TOPRawDigit > m_topRawDigits
collection of TOP raw digits
unsigned m_processed
processed events
StoreArray< TOPTimeZero > m_timeZeros
collection of T0 of individual tracks
double m_bunchTimeSep
time between two bunches
double m_timeRangeCoarse
time range in which to do coarse search if autoRange turned off [ns]
std::map< int, double > m_priors
map of PDG codes to prior probabilities
StoreArray< TOPDigit > m_topDigits
collection of TOP digits
StoreObjPtr< MCInitialParticles > m_initialParticles
simulated beam particles
double m_minSBRatio
minimal signal-to-background ratio
Class that bundles various TrackFitResults.
Definition: Track.h:25
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
Const::ChargedStable getMostProbable(const Track &track)
Returns most probable charged stable particle according to dEdx and predefined prior probabilities.
virtual void terminate() override
Termination action.
virtual void beginRun() override
Called when entering a new run.
Abstract base class for different kinds of events.