Belle II Software  release-05-02-19
KLMReconstructorModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2020 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Kirill Kirill Chilikin, Giacomo De Pietro, *
7  * Leo Piilonen, Timofey Uglov *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #pragma once
13 
14 /* KLM headers. */
15 #include <klm/bklm/geometry/GeometryPar.h>
16 #include <klm/dataobjects/bklm/BKLMHit1d.h>
17 #include <klm/dataobjects/bklm/BKLMHit2d.h>
18 #include <klm/dataobjects/eklm/EKLMAlignmentHit.h>
19 #include <klm/dataobjects/eklm/EKLMHit2d.h>
20 #include <klm/dataobjects/KLMDigit.h>
21 #include <klm/dbobjects/eklm/EKLMReconstructionParameters.h>
22 #include <klm/dbobjects/eklm/EKLMTimeCalibration.h>
23 #include <klm/dbobjects/KLMChannelStatus.h>
24 #include <klm/dbobjects/KLMTimeWindow.h>
25 #include <klm/eklm/geometry/GeometryData.h>
26 #include <klm/eklm/geometry/TransformData.h>
27 
28 /* Belle 2 headers. */
29 #include <framework/core/Module.h>
30 #include <framework/database/DBObjPtr.h>
31 #include <framework/datastore/StoreArray.h>
32 
33 namespace Belle2 {
43  class KLMReconstructorModule : public Module {
44 
45  public:
46 
51 
55  virtual ~KLMReconstructorModule();
56 
60  virtual void initialize() override;
61 
65  virtual void beginRun() override;
66 
70  virtual void event() override;
71 
75  virtual void endRun() override;
76 
80  virtual void terminate() override;
81 
82  private:
83 
87  void reconstructBKLMHits();
88 
92  void reconstructEKLMHits();
93 
98  bool isNormal(const KLMDigit* digit) const;
99 
100  /* EKLM methods. */
101 
107  double getTime(KLMDigit* d, double dist);
108 
110  double m_CoincidenceWindow;
111 
113  double m_PromptTime;
114 
116  double m_PromptWindow;
117 
120 
123 
124  /* BKLM parameters. */
125 
128 
130  bool m_bklmIfAlign;
131 
134 
137 
140 
141  /* EKLM parameters. */
142 
148 
151  const KLMElementNumbers* m_ElementNumbers;
152 
155 
157  int m_eklmNStrip;
158 
161 
164 
167 
170 
173 
176 
179 
182 
185 
186  };
188 } // end namespace Belle2
Belle2::KLMReconstructorModule::m_Digits
StoreArray< KLMDigit > m_Digits
KLM digits.
Definition: KLMReconstructorModule.h:131
Belle2::EKLM::TransformData
Transformation data.
Definition: TransformData.h:37
Belle2::KLMReconstructorModule::reconstructEKLMHits
void reconstructEKLMHits()
Reconstruct EKLMHit2d.
Definition: KLMReconstructorModule.cc:275
Belle2::KLMReconstructorModule::endRun
virtual void endRun() override
Called if the current run ends.
Definition: KLMReconstructorModule.cc:415
Belle2::EKLMElementNumbers
EKLM element numbers.
Definition: EKLMElementNumbers.h:34
Belle2::KLMReconstructorModule::m_CoincidenceWindow
double m_CoincidenceWindow
Half-width of the time coincidence window used to create a 2D hit from 1D digits/hits.
Definition: KLMReconstructorModule.h:119
Belle2::KLMReconstructorModule::m_TimeWindow
DBObjPtr< KLMTimeWindow > m_TimeWindow
KLM time window.
Definition: KLMReconstructorModule.h:128
Belle2::KLMReconstructorModule::m_ChannelStatus
DBObjPtr< KLMChannelStatus > m_ChannelStatus
Channel status.
Definition: KLMReconstructorModule.h:190
Belle2::KLMReconstructorModule::m_eklmElementNumbers
const EKLMElementNumbers * m_eklmElementNumbers
Element numbers.
Definition: KLMReconstructorModule.h:159
Belle2::KLMReconstructorModule::m_PromptWindow
double m_PromptWindow
Half-width of the time window relative to the prompt time for BKLMHit2ds.
Definition: KLMReconstructorModule.h:125
Belle2::KLMReconstructorModule::getTime
double getTime(KLMDigit *d, double dist)
Get 2d hit time corresponding to EKLM digit.
Definition: KLMReconstructorModule.cc:259
Belle2::KLMReconstructorModule::beginRun
virtual void beginRun() override
Called when entering a new run.
Definition: KLMReconstructorModule.cc:120
Belle2::KLMReconstructorModule::m_eklmTimeCalibration
DBObjPtr< EKLMTimeCalibration > m_eklmTimeCalibration
Time calibration data.
Definition: KLMReconstructorModule.h:175
Belle2::bklm::GeometryPar
Provides BKLM geometry parameters for simulation, reconstruction etc (from Gearbox or DataBase)
Definition: GeometryPar.h:48
Belle2::KLMReconstructorModule::m_bklmGeoPar
bklm::GeometryPar * m_bklmGeoPar
BKLM GeometryPar singleton.
Definition: KLMReconstructorModule.h:136
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::KLMReconstructorModule::m_bklmIfAlign
bool m_bklmIfAlign
Perform alignment correction (true) or not (false).
Definition: KLMReconstructorModule.h:139
Belle2::KLMReconstructorModule::event
virtual void event() override
Called for each event.
Definition: KLMReconstructorModule.cc:149
Belle2::KLMReconstructorModule::m_eklmCheckSegmentIntersection
bool m_eklmCheckSegmentIntersection
Check if segments intersect.
Definition: KLMReconstructorModule.h:156
Belle2::KLMReconstructorModule::m_bklmHit2ds
StoreArray< BKLMHit2d > m_bklmHit2ds
BKLM 2d hits.
Definition: KLMReconstructorModule.h:148
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::KLMReconstructorModule::m_eklmAlignmentHits
StoreArray< EKLMAlignmentHit > m_eklmAlignmentHits
Alignment Hits.
Definition: KLMReconstructorModule.h:187
Belle2::KLMReconstructorModule::m_IgnoreHotChannels
bool m_IgnoreHotChannels
Use only Normal and Dead (for debugging) channels during 2d hit reconstruction.
Definition: KLMReconstructorModule.h:193
Belle2::KLMReconstructorModule::m_eklmRecPar
DBObjPtr< EKLMReconstructionParameters > m_eklmRecPar
Reconstruction parameters.
Definition: KLMReconstructorModule.h:172
Belle2::KLMReconstructorModule::isNormal
bool isNormal(const KLMDigit *digit) const
Check if channel is normal or dead.
Definition: KLMReconstructorModule.cc:155
Belle2::EKLM::GeometryData
EKLM geometry data.
Definition: GeometryData.h:40
Belle2::KLMReconstructorModule::initialize
virtual void initialize() override
Initializer.
Definition: KLMReconstructorModule.cc:97
Belle2::KLMReconstructorModule::m_bklmIgnoreScintillators
bool m_bklmIgnoreScintillators
Ignore scintillators (to debug their electronics mapping).
Definition: KLMReconstructorModule.h:142
Belle2::KLMReconstructorModule::terminate
virtual void terminate() override
Called at the end of the event processing.
Definition: KLMReconstructorModule.cc:419
Belle2::KLMReconstructorModule::m_eklmNStrip
int m_eklmNStrip
Number of strips.
Definition: KLMReconstructorModule.h:166
Belle2::KLMReconstructorModule::m_bklmHit1ds
StoreArray< BKLMHit1d > m_bklmHit1ds
BKLM 1d hits.
Definition: KLMReconstructorModule.h:145
Belle2::EKLMTimeCalibrationData
EKLM time calibration data (for one strip).
Definition: EKLMTimeCalibrationData.h:33
Belle2::KLMReconstructorModule::m_eklmTransformData
EKLM::TransformData * m_eklmTransformData
Transformation data.
Definition: KLMReconstructorModule.h:169
Belle2::KLMElementNumbers
KLM element numbers.
Definition: KLMElementNumbers.h:37
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::KLMReconstructorModule::~KLMReconstructorModule
virtual ~KLMReconstructorModule()
Destructor.
Definition: KLMReconstructorModule.cc:93
Belle2::KLMReconstructorModule::m_eklmTimeCalibrationData
const EKLMTimeCalibrationData ** m_eklmTimeCalibrationData
Time calibration data for individual strips.
Definition: KLMReconstructorModule.h:178
Belle2::KLMReconstructorModule::reconstructBKLMHits
void reconstructBKLMHits()
Reconstruct BKLMHit1d and BKLMHit2d.
Definition: KLMReconstructorModule.cc:172
Belle2::KLMReconstructorModule::m_eklmHit2ds
StoreArray< EKLMHit2d > m_eklmHit2ds
EKLM 2d hits.
Definition: KLMReconstructorModule.h:184
Belle2::KLMReconstructorModule::KLMReconstructorModule
KLMReconstructorModule()
Constructor.
Definition: KLMReconstructorModule.cc:65
Belle2::KLMReconstructorModule::m_PromptTime
double m_PromptTime
Nominal time of prompt BKLMHit2ds.
Definition: KLMReconstructorModule.h:122
Belle2::KLMReconstructorModule::m_eklmGeoDat
const EKLM::GeometryData * m_eklmGeoDat
Geometry data.
Definition: KLMReconstructorModule.h:163
Belle2::KLMReconstructorModule::m_eklmDefaultTimeCalibrationData
EKLMTimeCalibrationData m_eklmDefaultTimeCalibrationData
Default time calibration data.
Definition: KLMReconstructorModule.h:181