CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemSim-01-00-41/CgemSim/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
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
G4Allocator< BesCgemDigi > BesCgemDigiAllocator
void SetLayerID(G4int f_ID_layer)
virtual void Print()
void SetGlobalTime(G4double f_global_time)
void SetEnergyDeposit(G4double f_E_deposit)
virtual ~BesCgemDigi()
virtual G4int operator==(const BesCgemDigi &) const
void SetStripID(G4int f_ID_strip)
void SetSheetID(G4int f_ID_sheet)
void SetTrackID(G4int f_ID_track)
BesCgemDigi(const BesCgemDigi &)
const BesCgemDigi & operator=(const BesCgemDigi &)