BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Simulation/BOOST/TofSim/include/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 "G4Allocator.hh"
16#include "G4TDigiCollection.hh"
17#include "G4VDigi.hh"
18
19class BesTofDigi : public G4VDigi {
20public:
22 virtual ~BesTofDigi();
23
26
27 virtual G4int operator==( const BesTofDigi& ) const;
28 inline void* operator new( size_t );
29 inline void operator delete( void* );
30
31 virtual void Draw();
32 virtual void Print();
33
34public:
35 void SetTrackIndex( G4int index ) { m_trackIndex = index; }
36 void SetPartId( G4int partId ) { m_partId = partId; }
37 // Scintillator
38 void SetScinNb( G4int scinNb ) { m_scinNb = scinNb; }
39 void SetForwADC( G4double ADC ) { m_forwADC = ADC; }
40 void SetBackADC( G4double ADC ) { m_backADC = ADC; }
41 void SetForwTDC( G4double TDC ) { m_forwTDC = TDC; }
42 void SetBackTDC( G4double TDC ) { m_backTDC = TDC; }
43 // MRPC
44 void SetModule( G4int module ) { m_scinNb = module; }
45 void SetStrip( G4int strip ) { m_strip = strip; }
46 void SetForwT1( G4double t1 ) { m_forwTDC = t1; }
47 void SetBackT1( G4double t1 ) { m_backTDC = t1; }
48 void SetForwT2( G4double t2 ) { m_forwADC = t2; }
49 void SetBackT2( G4double t2 ) { m_backADC = t2; }
50
51 G4int GetTrackIndex() { return m_trackIndex; }
52 G4int GetPartId() { return m_partId; }
53 // Scintillator
54 G4int GetScinNb() { return m_scinNb; }
55 G4double GetForwADC() { return m_forwADC; }
56 G4double GetBackADC() { return m_backADC; }
57 G4double GetForwTDC() { return m_forwTDC; }
58 G4double GetBackTDC() { return m_backTDC; }
59 // MRPC
60 G4int GetModule() { return m_scinNb; }
61 G4int GetStrip() { return m_strip; }
62 G4double GetForwT1() { return m_forwTDC; }
63 G4double GetBackT1() { return m_backTDC; }
64 G4double GetForwT2() { return m_forwADC; }
65 G4double GetBackT2() { return m_backADC; }
66
67private:
68 G4int m_trackIndex;
69 G4int m_partId;
70 G4int m_scinNb;
71 G4int m_strip;
72 G4double m_forwADC;
73 G4double m_backADC;
74 G4double m_forwTDC;
75 G4double m_backTDC;
76};
77
78typedef G4TDigiCollection<BesTofDigi> BesTofDigitsCollection;
79
80extern G4Allocator<BesTofDigi> BesTofDigiAllocator;
81
82inline void* BesTofDigi::operator new( size_t ) {
83 void* aDigi;
84 aDigi = (void*)BesTofDigiAllocator.MallocSingle();
85 return aDigi;
86}
87
88inline void BesTofDigi::operator delete( void* aDigi ) {
89 BesTofDigiAllocator.FreeSingle( (BesTofDigi*)aDigi );
90}
91
92#endif
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