BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
Simulation/BOOST/TofSim/TofSim-00-02-37/TofSim/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:
23 virtual ~BesTofDigi();
24
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
BesTofDigi(const BesTofDigi &)
virtual void Print()
virtual ~BesTofDigi()
const BesTofDigi & operator=(const BesTofDigi &)
virtual void Draw()
virtual G4int operator==(const BesTofDigi &) const