Belle II Software development
KLMStripEfficiencyCollectorModule.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/* KLM headers. */
12#include <klm/bklm/geometry/GeometryPar.h>
13#include <klm/dataobjects/eklm/EKLMElementNumbers.h>
14#include <klm/dataobjects/KLMDigit.h>
15#include <klm/dataobjects/KLMElementNumbers.h>
16#include <klm/dataobjects/KLMPlaneArrayIndex.h>
17#include <klm/dbobjects/KLMChannelStatus.h>
18
19/* Basf2 headers. */
20#include <analysis/dataobjects/ParticleList.h>
21#include <calibration/CalibrationCollectorModule.h>
22#include <framework/database/DBObjPtr.h>
23#include <framework/datastore/StoreArray.h>
24#include <framework/datastore/StoreObjPtr.h>
25#include <mdst/dataobjects/Track.h>
26#include <tracking/dataobjects/ExtHit.h>
27
28/* ROOT headers. */
29#include <TFile.h>
30#include <TH1F.h>
31#include <TTree.h>
32
33/* C++ headers. */
34#include <map>
35#include <string>
36
37namespace Belle2 {
50
51 private:
52
56 struct HitData {
57
60
63
65 int layer;
66
68 int sector;
69
71 int plane;
72
74 int strip;
75
78
80 const ExtHit* hit;
81
84
85 };
86
87 public:
88
93
98
102 void prepare() override;
103
107 void finish() override;
108
112 void collect() override;
113
117 void startRun() override;
118
122 void closeRun() override;
123
124 private:
125
132 void addHit(std::map<KLMPlaneNumber, struct HitData>& hitMap,
133 KLMPlaneNumber planeGlobal, struct HitData* hitData);
134
139 void findMatchingDigit(struct HitData* hitData);
140
148 bool collectDataTrack(const Particle* muon, TH1F* matchedDigitsInPlane,
149 TH1F* allExtHitsInPlane);
150
152 std::string m_MuonListName;
153
159
162
165
168
171
174
177
180
183
186
189
192
195
198
201
204
207
210
213
216
219
220 };
221
223}
Calibration collector module base class.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
EKLM element numbers.
Store one Ext hit as a ROOT object.
Definition: ExtHit.h:31
KLM digit (class representing a digitized hit in RPCs or scintillators).
Definition: KLMDigit.h:29
KLM element numbers.
KLM plane array index.
Module KLMStripEfficiencyCollectorModule.
const bklm::GeometryPar * m_GeometryBKLM
BKLM geometry.
void addHit(std::map< KLMPlaneNumber, struct HitData > &hitMap, KLMPlaneNumber planeGlobal, struct HitData *hitData)
Add hit to map.
DBObjPtr< KLMChannelStatus > m_ChannelStatus
Channel status.
void startRun() override
This method is called at the beginning of the run.
double m_MinimalMomentumNoOuterLayers
Minimal momentum in case there are no hits in outer layers.
const KLMElementNumbers * m_ElementNumbers
Element numbers.
const KLMPlaneArrayIndex * m_PlaneArrayIndex
Plane array index.
const EKLMElementNumbers * m_eklmElementNumbers
EKLM element numbers.
void findMatchingDigit(struct HitData *hitData)
Find matching digit.
void collect() override
This method is called for each event.
bool collectDataTrack(const Particle *muon, TH1F *matchedDigitsInPlane, TH1F *allExtHitsInPlane)
Collect the data for one muon.
void closeRun() override
This method is called at the end of run.
bool m_IgnoreBackwardPropagation
Whether to ignore ExtHits with backward propagation.
double m_AllowedDistance1D
Maximal distance in the units of strip number from ExtHit to matching KLMDigit.
int m_MinimalMatchingDigitsOuterLayers
Minimal number of matching digits in outer layers.
int m_MinimalMatchingDigits
Minimal number of matching digits.
Class to store reconstructed particles.
Definition: Particle.h:75
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
Provides BKLM geometry parameters for simulation, reconstruction etc (from Gearbox or DataBase)
Definition: GeometryPar.h:37
uint16_t KLMPlaneNumber
Plane number.
Abstract base class for different kinds of events.