Belle II Software release-09-00-00
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 {
44 class TpcDigitizerModule : public Module {
45
46 public:
47
52
54 virtual ~TpcDigitizerModule();
55
59 virtual void initialize() override;
60
63 virtual void beginRun() override;
64
68 virtual void event() override;
69
72 virtual void endRun() override;
73
76 virtual void terminate() override;
77
78
79 private:
80
84 void getXMLData();
85
87 //bool Pixelization(int);
88 void Pixelization();
89
93 virtual void Drift(double, double, double, double&, double&, double&, double&, double, double, double);
94
96 ROOT::Math::XYVector GEMGeo1(double x1, double y1);
97
99 ROOT::Math::XYVector GEMGeo2(double x1, double y1);
100
102 Int_t m_phase;
138 double m_TOTA1;
140 double m_TOTB1;
142 double m_TOTC1;
144 double m_TOTQ1;
146 double m_TOTA2;
148 double m_TOTB2;
150 double m_TOTC2;
152 double m_TOTQ2;
154 double m_z_DG;
156 double m_z_TG;
158 double m_z_CG;
160 double m_Dt_DG;
162 double m_Dt_TG;
164 double m_Dt_CG;
166 double m_Dl_DG;
168 double m_Dl_TG;
170 double m_Dl_CG;
172 double m_v_DG;
174 double m_v_TG;
176 double m_v_CG;
178 double m_Workfct;
180 double m_Fanofac;
182 double m_GasAbs;
184 //int m_dchip[10][80][336][MAXtSIZE];
185 std::map<std::tuple<int, int, int>, int> m_dchip;
187 std::map<std::tuple<int, int>, int> m_dchip_map;
189 std::map<std::tuple<int, int>, int> m_dchip_pdg_map;
191 std::map<std::tuple<int, int>, int> m_dchip_trkID_map;
193 std::map<std::tuple<int, int>, int> m_dchip_detNb_map;
197 int m_nTPC = 0;
199 std::vector<ROOT::Math::XYZVector> m_TPCCenter;
201 std::vector<float> m_TPCAngleX;
203 std::vector<float> m_TPCAngleZ;
204
208 double m_upperTimingCut = 1000000;
209
211 int olddetNb = -1;
212
214 int oldtrkID = -1;
215
216 };
217
218 }
220}
221
222#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.