CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
BesCgemDigi.hh
Go to the documentation of this file.
1//-------------------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//-------------------------------------------------------------------------------------//
4/*
5 * =====================================================================================
6 *
7 * Filename: BesCgemDigi.hh
8 * Description:
9 * Conventions:
10 * f_ : variable used in function parameter list
11 * gv_ : global variable
12 * lv_ : local variable used in function
13 * lvd_ : local variable double
14 * m_* : normal member of class
15 * sm_* : static member of class
16 * m_M_* : class data member, material of each layer
17 * m_N_* : class data member, number of layers (CgemLayer,GemFoil)
18 * m_R_* : class data member, radius of each (material) layer, and so on
19 * m_L_* : class data member, length of each layer or hole pitch
20 * m_T_* : class data member, thickness of each (material) layer
21 * m_A_* : class data member, angle of anode VStrip
22 * Version: CgemSim-01-00-00
23 * Created: 01/05/2014 09:49:21 PM
24 * Revision: CgemSim-00-00-01(in CMT version CgemBoss-0.0.1 written by xiuql)
25 * Compiler: gcc
26 * Author: [email protected]
27 * Organization: DG1,EPC,IHEP
28 * History:
29 * <Num> <Author> <Time> <Version> <remark>
30 * 0 juxd 20140105 01-00-00 created,
31 *
32 * =====================================================================================
33 */
34
35//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
36#ifndef BesCgemDigi_h
37#define BesCgemDigi_h 1
38
39/* Header file: Geant4 */
40#include "G4VDigi.hh"
41#include "G4TDigiCollection.hh"
42#include "G4Allocator.hh"
43#include "G4ThreeVector.hh"
44
45//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46class BesCgemDigi : public G4VDigi
47{
48 public:
50 virtual ~BesCgemDigi();
51
53 const BesCgemDigi& operator=(const BesCgemDigi&);
54
55 virtual G4int operator==(const BesCgemDigi&) const;
56 inline void* operator new(size_t);
57 inline void operator delete(void*);
58
59 virtual void Print();
60
61 public:
62 /* Set method */
63 void SetTrackID (G4int f_ID_track) { m_ID_track = f_ID_track ;};
64 void SetLayerID (G4int f_ID_layer) { m_ID_layer = f_ID_layer ;};
65 void SetSheetID (G4int f_ID_sheet) { m_ID_sheet = f_ID_sheet ;};
66 void SetStripType (G4int f_F_XV) { m_F_XV = f_F_XV ;};
67 void SetStripID (G4int f_ID_strip) { m_ID_strip = f_ID_strip ;};
68 void SetEnergyDeposit (G4double f_E_deposit) { m_E_deposit = f_E_deposit ;};
69 void SetGlobalTime (G4double f_global_time) { m_global_time = f_global_time ;};
70
71 /* Get mothod */
72 G4int GetTrackID () const {return m_ID_track ;};
73 G4int GetLayerID () const {return m_ID_layer ;};
74 G4int GetSheetID () const {return m_ID_sheet ;};
75 G4int GetStripType () const {return m_F_XV ;};
76 G4int GetStripID () const {return m_ID_strip ;};
77 G4double GetEnergyDeposit () const {return m_E_deposit ;};
78 G4double GetGlobalTime () const {return m_global_time ;};
79 private:
80 /* Digi member (variables got from electronics) */
81 G4int m_ID_track; /* ID of hit track */
82 G4int m_ID_layer; /* ID of CgemLayer */
83 G4int m_ID_sheet; /* ID of Readout sheet */
84 G4int m_F_XV; /* Flag of Strip: 0-X; 1-V */
85 G4int m_ID_strip; /* ID of Readout strip */
86 G4double m_E_deposit; /* Deposit energy (Q) */
87 G4double m_global_time; /* Time since the event was created */
88};
89
90//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91typedef G4TDigiCollection<BesCgemDigi> BesCgemDigisCollection;
92
93//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
94extern G4Allocator<BesCgemDigi> BesCgemDigiAllocator;
95
96//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
97inline void* BesCgemDigi::operator new(size_t)
98{
99 void *aDigi;
100 aDigi = (void *) BesCgemDigiAllocator.MallocSingle();
101 return aDigi;
102}
103
104//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
105inline void BesCgemDigi::operator delete(void *aDigi)
106{
107 BesCgemDigiAllocator.FreeSingle((BesCgemDigi*) aDigi);
108}
109
110#endif
111//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4TDigiCollection< BesCgemDigi > BesCgemDigisCollection
Definition: BesCgemDigi.hh:91
G4Allocator< BesCgemDigi > BesCgemDigiAllocator
Definition: BesCgemDigi.cc:57
void SetLayerID(G4int f_ID_layer)
Definition: BesCgemDigi.hh:64
G4int GetSheetID() const
Definition: BesCgemDigi.hh:74
void SetGlobalTime(G4double f_global_time)
Definition: BesCgemDigi.hh:69
void SetStripType(G4int f_F_XV)
Definition: BesCgemDigi.hh:66
G4double GetGlobalTime() const
Definition: BesCgemDigi.hh:78
void SetEnergyDeposit(G4double f_E_deposit)
Definition: BesCgemDigi.hh:68
G4double GetEnergyDeposit() const
Definition: BesCgemDigi.hh:77
virtual G4int operator==(const BesCgemDigi &) const
Definition: BesCgemDigi.cc:104
void SetStripID(G4int f_ID_strip)
Definition: BesCgemDigi.hh:67
void SetSheetID(G4int f_ID_sheet)
Definition: BesCgemDigi.hh:65
virtual ~BesCgemDigi()
Definition: BesCgemDigi.cc:72
G4int GetStripType() const
Definition: BesCgemDigi.hh:75
void SetTrackID(G4int f_ID_track)
Definition: BesCgemDigi.hh:63
virtual void Print()
Definition: BesCgemDigi.cc:110
G4int GetLayerID() const
Definition: BesCgemDigi.hh:73
const BesCgemDigi & operator=(const BesCgemDigi &)
Definition: BesCgemDigi.cc:90
G4int GetStripID() const
Definition: BesCgemDigi.hh:76
G4int GetTrackID() const
Definition: BesCgemDigi.hh:72