Belle II Software development
TpcDigitizerModule.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#ifndef TPCDIGITIZERMODULE_H
10#define TPCDIGITIZERMODULE_H
11
12#include <framework/core/Module.h>
13#include <framework/datastore/StoreArray.h>
14#include <beast/microtpc/dataobjects/MicrotpcHit.h>
15
16#include <TF1.h>
17#include <Math/Vector3D.h>
18#include <Math/Vector2D.h>
19
20#include <vector>
21#include <map>
22#include <tuple>
23
25constexpr int MAXSIZE = 26880;
27constexpr int MAXtSIZE = 10000;
28
29namespace Belle2 {
34 namespace microtpc {
41 class TpcDigitizerModule : public Module {
42
43 public:
44
49
51 virtual ~TpcDigitizerModule();
52
56 virtual void initialize() override;
57
60 virtual void beginRun() override;
61
65 virtual void event() override;
66
69 virtual void endRun() override;
70
73 virtual void terminate() override;
74
75
76 private:
77
81 void getXMLData();
82
84 //bool Pixelization(int);
85 void Pixelization();
86
90 virtual void Drift(double, double, double, double&, double&, double&, double&, double, double, double);
91
93 ROOT::Math::XYVector GEMGeo1(double x1, double y1);
94
96 ROOT::Math::XYVector GEMGeo2(double x1, double y1);
97
99 Int_t m_phase;
135 double m_TOTA1;
137 double m_TOTB1;
139 double m_TOTC1;
141 double m_TOTQ1;
143 double m_TOTA2;
145 double m_TOTB2;
147 double m_TOTC2;
149 double m_TOTQ2;
151 double m_z_DG;
153 double m_z_TG;
155 double m_z_CG;
157 double m_Dt_DG;
159 double m_Dt_TG;
161 double m_Dt_CG;
163 double m_Dl_DG;
165 double m_Dl_TG;
167 double m_Dl_CG;
169 double m_v_DG;
171 double m_v_TG;
173 double m_v_CG;
175 double m_Workfct;
177 double m_Fanofac;
179 double m_GasAbs;
181 //int m_dchip[10][80][336][MAXtSIZE];
182 std::map<std::tuple<int, int, int>, int> m_dchip;
184 std::map<std::tuple<int, int>, int> m_dchip_map;
186 std::map<std::tuple<int, int>, int> m_dchip_pdg_map;
188 std::map<std::tuple<int, int>, int> m_dchip_trkID_map;
190 std::map<std::tuple<int, int>, int> m_dchip_detNb_map;
194 int m_nTPC = 0;
196 std::vector<ROOT::Math::XYZVector> m_TPCCenter;
198 std::vector<float> m_TPCAngleX;
200 std::vector<float> m_TPCAngleZ;
201
205 double m_upperTimingCut = 1000000;
206
208 int olddetNb = -1;
209
211 int oldtrkID = -1;
212
213 };
214
215 }
217}
218
219#endif /* TPCDIGITIZERMODULE_H */
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
double m_lowerTimingCut
Lower timing cut.
double m_ChipRowY
Chip row y dimension.
std::map< std::tuple< int, int >, int > m_dchip_pdg_map
chip pdg map arrays
int m_LookAtRec
Flag 0/1 only look at nuclear recoils.
double m_Dl_CG
Longitudinal diffusion in collection gap.
double m_Dl_DG
Longitudinal diffusion in drift gap.
std::map< std::tuple< int, int >, int > m_dchip_trkID_map
chip track ID map arrays
ROOT::Math::XYVector GEMGeo1(double x1, double y1)
GEMazition of GEM1.
virtual void initialize() override
Initialize the Module.
TF1 * fctToT_Calib1
Define ToT calib 1.
virtual void event() override
This method is the core of the module.
double m_v_DG
Drift velocity in drift gap.
virtual void endRun() override
This method is called if the current run ends.
double m_ChipColumnX
Chip column x dimension.
void getXMLData()
reads data from MICROTPC.xml: tube location, drift data filename, sigma of impulse response function
TpcDigitizerModule()
Constructor: Sets the description, the properties and the parameters of the module.
virtual void terminate() override
This method is called at the end of the event processing.
double m_upperTimingCut
Upper timing cut.
std::map< std::tuple< int, int, int >, int > m_dchip
chip store arrays
TF1 * fctToT_Calib2
Define ToT calib 2.
std::map< std::tuple< int, int >, int > m_dchip_detNb_map
chip Nb map arrays
virtual void beginRun() override
Called when entering a new run.
double m_Dt_CG
Transverse diffusion in collection gap.
std::vector< float > m_TPCAngleZ
TPC angle Z.
std::map< std::tuple< int, int >, int > m_dchip_map
chip map arrays
double m_Dt_TG
Transverse diffusion in transfer gap.
std::vector< float > m_TPCAngleX
TPC angle X.
int m_PixelTimeBinNb
Pixel time number of bin.
std::vector< ROOT::Math::XYZVector > m_TPCCenter
TPC coordinate.
double m_Dt_DG
Transverse diffusion in drift gap.
void Pixelization()
Produces the pixelization.
ROOT::Math::XYVector GEMGeo2(double x1, double y1)
GEMazition of GEM2.
StoreArray< MicrotpcHit > m_microtpcHit
Array for MicrotpcHit.
int m_PixelThresholdRMS
Pixel threshold RMS.
double m_v_CG
Drift velocity in collection gap.
virtual void Drift(double, double, double, double &, double &, double &, double &, double, double, double)
Drift ionization Make the ionization drifting from (x,y,z) to GEM1 top plane.
double m_Dl_TG
Longitudinal diffusion in transfer gap.
double m_v_TG
Drift velocity in transfer gap.
Abstract base class for different kinds of events.