Belle II Software development
arichBtestModule.h
1
2/**************************************************************************
3 * basf2 (Belle II Analysis Software Framework) *
4 * Author: The Belle II Collaboration *
5 * *
6 * See git log for contributors and copyright holders. *
7 * This file is licensed under LGPL-3.0, see LICENSE.md. *
8 **************************************************************************/
9#pragma once
10
11#include <framework/core/Module.h>
12
13#include <string>
14#include <vector>
15#include <time.h>
16#include <zlib.h>
17
18#include <Math/Vector3D.h>
19class TFile;
20
21namespace Belle2 {
27 //class MCParticle;
28 class ARICHTracking;
29
34 class arichBtestModule : public Module {
35
36 public:
37
43
45 virtual ~arichBtestModule() {}
46
48
51 virtual void initialize() override;
52
54
56 virtual void beginRun() override;
57
59
62 virtual void event() override;
63
65
67 virtual void endRun() override;
68
70
73 virtual void terminate() override;
74
75 protected:
76
77
79 int skipdata(gzFile fp);
81 void readmwpc(unsigned int* dbuf, unsigned int len, int print = 0);
83 int readhapd(unsigned int len, unsigned int* data);
85 int readdata(gzFile fp, int rec_id, int print);
87 gzFile m_fp;
89 int m_end;
93 TFile* m_file;
94
95 std::vector<std::string> m_runList;
96 std::vector<int> m_eveList;
98 std::vector<std::string>::iterator m_runCurrent;
100 std::string m_outFile;
102 std::vector<int> m_MwpcTrackMask;
108 int m_tdc[32];
110 int getTrack(int mask, ROOT::Math::XYZVector& r, ROOT::Math::XYZVector& dir);
111
112 private:
113
116 };
117
119} // end namespace Belle2
120
Beamtest ARICH Geometry Tracking Class.
Base class for Modules.
Definition: Module.h:72
The UserTutorial module.
std::string m_outFile
output file name
time_t m_timestart
time of the first processed event
ARICHTracking * m_mwpc
Pointer to the tracking chambers.
int m_tdc[32]
raw MWPC TDC buffer
std::vector< std::string >::iterator m_runCurrent
current run
TFile * m_file
pointer to the root file
double m_beamMomentum
Momentum of the particles in the beam [GeV].
std::vector< std::string > m_runList
The filenames of the runs.
int m_events
number of events
virtual ~arichBtestModule()
Destructor.
std::vector< int > m_MwpcTrackMask
Bit mask of the MWPC tracking chambers used for the track creation.
gzFile m_fp
file desriptor of the data file
std::vector< int > m_eveList
The eventnumbers for each of the runs.
int skipdata(gzFile fp)
Skip the data part of the record.
virtual void initialize() override
Initialize the Module.
virtual void event() override
Running over all events.
virtual void endRun() override
Is called after processing the last event of a run.
virtual void terminate() override
Is called at the end of your Module.
virtual void beginRun() override
Called when entering a new run.
int getTrack(int mask, ROOT::Math::XYZVector &r, ROOT::Math::XYZVector &dir)
Beamtest Track reconstruction.
void readmwpc(unsigned int *dbuf, unsigned int len, int print=0)
Read the MWPC information from the data buffer.
int readdata(gzFile fp, int rec_id, int print)
Read the data from the file (can be compressed)
int readhapd(unsigned int len, unsigned int *data)
Read the HAPD hits from the data buffer.
Abstract base class for different kinds of events.