BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
BesTofDigi.hh
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//---------------------------------------------------------------------------//
4//Description:
5//Author: Dengzy
6//Created: Mar, 2004
7//Modified:
8//Comment:
9//---------------------------------------------------------------------------//
10// $Id: BesTofDigi.hh
11
12#ifndef BesTofDigi_h
13#define BesTofDigi_h 1
14
15#include "G4VDigi.hh"
16#include "G4TDigiCollection.hh"
17#include "G4Allocator.hh"
18
19class BesTofDigi : public G4VDigi
20{
21 public:
22 BesTofDigi();
23 virtual ~BesTofDigi();
24
25 BesTofDigi(const BesTofDigi&);
26 const BesTofDigi& operator=(const BesTofDigi&);
27
28 virtual G4int operator==(const BesTofDigi&) const;
29 inline void* operator new(size_t);
30 inline void operator delete(void*);
31
32 virtual void Draw();
33 virtual void Print();
34
35 public:
36 void SetTrackIndex(G4int index) { m_trackIndex = index; }
37 void SetPartId(G4int partId) { m_partId = partId; }
38 // Scintillator
39 void SetScinNb(G4int scinNb) { m_scinNb = scinNb; }
40 void SetForwADC(G4double ADC) { m_forwADC = ADC; }
41 void SetBackADC(G4double ADC) { m_backADC = ADC; }
42 void SetForwTDC(G4double TDC) { m_forwTDC = TDC; }
43 void SetBackTDC(G4double TDC) { m_backTDC = TDC; }
44 // MRPC
45 void SetModule(G4int module) { m_scinNb = module; }
46 void SetStrip(G4int strip) { m_strip = strip; }
47 void SetForwT1(G4double t1) { m_forwTDC = t1; }
48 void SetBackT1(G4double t1) { m_backTDC = t1; }
49 void SetForwT2(G4double t2) { m_forwADC = t2; }
50 void SetBackT2(G4double t2) { m_backADC = t2; }
51
52 G4int GetTrackIndex() { return m_trackIndex; }
53 G4int GetPartId() { return m_partId; }
54 // Scintillator
55 G4int GetScinNb() { return m_scinNb; }
56 G4double GetForwADC() { return m_forwADC; }
57 G4double GetBackADC() { return m_backADC; }
58 G4double GetForwTDC() { return m_forwTDC; }
59 G4double GetBackTDC() { return m_backTDC; }
60 // MRPC
61 G4int GetModule() { return m_scinNb; }
62 G4int GetStrip() { return m_strip; }
63 G4double GetForwT1() { return m_forwTDC; }
64 G4double GetBackT1() { return m_backTDC; }
65 G4double GetForwT2() { return m_forwADC; }
66 G4double GetBackT2() { return m_backADC; }
67
68 private:
69 G4int m_trackIndex;
70 G4int m_partId;
71 G4int m_scinNb;
72 G4int m_strip;
73 G4double m_forwADC;
74 G4double m_backADC;
75 G4double m_forwTDC;
76 G4double m_backTDC;
77};
78
79typedef G4TDigiCollection<BesTofDigi> BesTofDigitsCollection;
80
81extern G4Allocator<BesTofDigi> BesTofDigiAllocator;
82
83inline void* BesTofDigi::operator new(size_t)
84{
85 void *aDigi;
86 aDigi = (void *) BesTofDigiAllocator.MallocSingle();
87 return aDigi;
88}
89
90inline void BesTofDigi::operator delete(void *aDigi)
91{
92 BesTofDigiAllocator.FreeSingle((BesTofDigi*) aDigi);
93}
94
95#endif
96
G4Allocator< BesTofDigi > BesTofDigiAllocator
Definition: BesTofDigi.cc:14
G4TDigiCollection< BesTofDigi > BesTofDigitsCollection
Definition: BesTofDigi.hh:79
virtual void Draw()
Definition: BesTofDigi.cc:68
void SetForwT1(G4double t1)
Definition: BesTofDigi.hh:47
G4double GetBackT2()
Definition: BesTofDigi.hh:66
G4int GetPartId()
Definition: BesTofDigi.hh:53
G4double GetForwT1()
Definition: BesTofDigi.hh:63
virtual ~BesTofDigi()
Definition: BesTofDigi.cc:29
void SetPartId(G4int partId)
Definition: BesTofDigi.hh:37
void SetForwADC(G4double ADC)
Definition: BesTofDigi.hh:40
G4double GetBackT1()
Definition: BesTofDigi.hh:64
void SetTrackIndex(G4int index)
Definition: BesTofDigi.hh:36
G4double GetForwTDC()
Definition: BesTofDigi.hh:58
void SetForwT2(G4double t2)
Definition: BesTofDigi.hh:49
void SetBackADC(G4double ADC)
Definition: BesTofDigi.hh:41
G4int GetScinNb()
Definition: BesTofDigi.hh:55
G4int GetModule()
Definition: BesTofDigi.hh:61
G4int GetTrackIndex()
Definition: BesTofDigi.hh:52
virtual G4int operator==(const BesTofDigi &) const
Definition: BesTofDigi.cc:62
G4double GetBackTDC()
Definition: BesTofDigi.hh:59
G4double GetForwT2()
Definition: BesTofDigi.hh:65
G4int GetStrip()
Definition: BesTofDigi.hh:62
void SetBackT1(G4double t1)
Definition: BesTofDigi.hh:48
G4double GetBackADC()
Definition: BesTofDigi.hh:57
virtual void Print()
Definition: BesTofDigi.cc:73
void SetForwTDC(G4double TDC)
Definition: BesTofDigi.hh:42
void SetModule(G4int module)
Definition: BesTofDigi.hh:45
const BesTofDigi & operator=(const BesTofDigi &)
Definition: BesTofDigi.cc:47
void SetScinNb(G4int scinNb)
Definition: BesTofDigi.hh:39
G4double GetForwADC()
Definition: BesTofDigi.hh:56
void SetBackT2(G4double t2)
Definition: BesTofDigi.hh:50
void SetStrip(G4int strip)
Definition: BesTofDigi.hh:46
void SetBackTDC(G4double TDC)
Definition: BesTofDigi.hh:43