CGEM BOSS 6.6.5.i
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: June,2011 : Add variables and function for new MRPC Detector
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
27 const BesTofDigi& operator=(const BesTofDigi&); //Der Operator = wird her ueberschrieben....
28
29 virtual G4int operator==(const BesTofDigi&) const; //Der Operator == wird hier mit einer neuen Funktion überladen, die als Rueckgabewert G4int hat und als Eingabe BestTofDigi nimmt.
30 //const --> ReadOnly Funktionen: Kann keine Parameter aendern oder Funktionen aufrufen, die das koennne
31 inline void* operator new(size_t); //Der Operator new wird überladen (Ersetzt hier nur die "standardmethode" mit malloc (= memoryallocation))
32 inline void operator delete(void*); //Der Operator delete wird überladen (Analog zu oben)
33
34 virtual void Draw();
35 virtual void Print();
36
37 public:
38 void SetTrackIndex(G4int index) { m_trackIndex = index; }
39 void SetPartId(G4int partId) { m_partId = partId; };
40 void SetScinNb(G4int scinNb) { m_scinNb = scinNb; };
41 void SetForwADC(G4double ADC) { m_forwADC = ADC; };
42 void SetBackADC(G4double ADC) { m_backADC = ADC; };
43 void SetForwTDC(G4double TDC) { m_forwTDC=TDC;};
44 void SetBackTDC(G4double TDC) { m_backTDC=TDC;};
45 //#Matthias
46 void SetModule_mrpc(G4int module_mrpc) { m_scinNb=module_mrpc;};
47 void SetTime1_mrpc(G4double time_mrpc) { m_forwTDC=time_mrpc;};
48 void SetTime2_mrpc(G4double time_mrpc2) { m_backTDC=time_mrpc2;};
49 void SetTrackIndex_mrpc(G4int index) { m_trackIndex = index; };//same function as above, but different name
50 void SetPartId_mrpc(G4int partId) { m_partId = partId; };//same function as above, but different name
51
52
53
54 G4int GetTrackIndex() { return m_trackIndex; }
55 G4int GetPartId() { return m_partId;};
56 G4int GetScinNb() { return m_scinNb; };
57 G4double GetForwADC() { return m_forwADC; };
58 G4double GetBackADC() { return m_backADC; };
59 G4double GetForwTDC() { return m_forwTDC;};
60 G4double GetBackTDC() { return m_backTDC;};
61 //#Matthias
62 G4int GetModule_mrpc(){return m_scinNb;};
63 G4double GetTime1_mrpc(){return m_forwTDC;};
64 G4double GetTime2_mrpc(){return m_backTDC;};
65 G4int GetTrackIndex_mrpc() { return m_trackIndex;}; //same function as above, but different name
66 G4int GetPartId_mrpc() { return m_partId;}; //same function as above, but different name
67
68
69 private:
70 G4int m_trackIndex;
71 G4int m_partId;
72 G4int m_scinNb;
73 G4double m_forwADC;
74 G4double m_backADC;
75 G4double m_forwTDC;
76 G4double m_backTDC;
77
78
79
80
81};
82
83typedef G4TDigiCollection<BesTofDigi> BesTofDigitsCollection;
84
85extern G4Allocator<BesTofDigi> BesTofDigiAllocator;
86
87inline void* BesTofDigi::operator new(size_t)
88{
89 void *aDigi;
90 aDigi = (void *) BesTofDigiAllocator.MallocSingle();
91 return aDigi;
92}
93
94inline void BesTofDigi::operator delete(void *aDigi)
95{
96 BesTofDigiAllocator.FreeSingle((BesTofDigi*) aDigi);
97}
98
99#endif
100
G4Allocator< BesTofDigi > BesTofDigiAllocator
Definition BesTofDigi.cc:14
G4TDigiCollection< BesTofDigi > BesTofDigitsCollection
Definition BesTofDigi.hh:83
virtual void Draw()
Definition BesTofDigi.cc:68
G4int GetPartId()
Definition BesTofDigi.hh:55
G4double GetTime2_mrpc()
Definition BesTofDigi.hh:64
G4int GetTrackIndex_mrpc()
Definition BesTofDigi.hh:65
void SetTime1_mrpc(G4double time_mrpc)
Definition BesTofDigi.hh:47
virtual ~BesTofDigi()
Definition BesTofDigi.cc:29
void SetPartId(G4int partId)
Definition BesTofDigi.hh:39
void SetForwADC(G4double ADC)
Definition BesTofDigi.hh:41
void SetTrackIndex(G4int index)
Definition BesTofDigi.hh:38
void SetTrackIndex_mrpc(G4int index)
Definition BesTofDigi.hh:49
G4double GetForwTDC()
Definition BesTofDigi.hh:59
void SetBackADC(G4double ADC)
Definition BesTofDigi.hh:42
G4int GetScinNb()
Definition BesTofDigi.hh:56
void SetTime2_mrpc(G4double time_mrpc2)
Definition BesTofDigi.hh:48
G4int GetTrackIndex()
Definition BesTofDigi.hh:54
G4int GetModule_mrpc()
Definition BesTofDigi.hh:62
virtual G4int operator==(const BesTofDigi &) const
Definition BesTofDigi.cc:62
G4double GetTime1_mrpc()
Definition BesTofDigi.hh:63
G4double GetBackTDC()
Definition BesTofDigi.hh:60
void SetModule_mrpc(G4int module_mrpc)
Definition BesTofDigi.hh:46
G4double GetBackADC()
Definition BesTofDigi.hh:58
virtual void Print()
Definition BesTofDigi.cc:73
void SetForwTDC(G4double TDC)
Definition BesTofDigi.hh:43
const BesTofDigi & operator=(const BesTofDigi &)
Definition BesTofDigi.cc:47
void SetPartId_mrpc(G4int partId)
Definition BesTofDigi.hh:50
void SetScinNb(G4int scinNb)
Definition BesTofDigi.hh:40
G4double GetForwADC()
Definition BesTofDigi.hh:57
G4int GetPartId_mrpc()
Definition BesTofDigi.hh:66
void SetBackTDC(G4double TDC)
Definition BesTofDigi.hh:44