CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
Simulation/BOOST/CgemSim/CgemSim-01-00-32/CgemSim/BesCgemHit.hh
Go to the documentation of this file.
1//-------------------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//-------------------------------------------------------------------------------------//
4/*
5 * =====================================================================================
6 *
7 * Filename: BesCgemHit.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 * m_E_* : class data member, Energy
23 * m_P_* : class data member, P(Momentum)
24 * Version: CgemSim-01-00-00
25 * Created: 01/02/2014 16:59:21 PM
26 * Revision: CgemSim-00-00-01(in CMT version CgemBoss-0.0.1 written by xiuql)
27 * Compiler: gcc
28 * Author: [email protected]
29 * Organization: DG1,EPC,IHEP
30 * History:
31 * <Num> <Author> <Time> <Version> <remark>
32 * 0 juxd 20140102 01-00-00 created,
33 *
34 * =====================================================================================
35 */
36
37//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
38#ifndef BesCgemHit_h
39#define BesCgemHit_h 1
40
41/* Header file: Geant4 */
42#include "G4VHit.hh"
43#include "G4THitsCollection.hh"
44#include "G4Allocator.hh"
45#include "G4ThreeVector.hh"
46
47/* Header file: C++ */
48#include <vector>
49#include "TArrayI.h"
50
51using namespace std;
52
53class BesCgemHit : public G4VHit
54{
55 public:
59
60 /* Operator */
62 G4int operator==(const BesCgemHit&) const;
63
64 inline void* operator new(size_t);
65 inline void operator delete(void*);
66
67 /* Function inherit from base class */
68 virtual void Draw(){};
69 virtual void Print();
70
71 /* Set methods */
72 //Add by sunxh
73 void SetRdtEl ( G4int f_RdtElectron ) {m_RdtElectron = f_RdtElectron ;};
74 void SetHitID ( G4int f_ID_hit ) {m_ID_hit = f_ID_hit ;};
75 //end
76 void SetTrackID ( G4int f_ID_track ) {m_ID_track = f_ID_track ;};
77 void SetLayerID ( G4int f_ID_layer ) {m_ID_layer = f_ID_layer ;};
78 void SetPDGCode ( G4int f_pdg_code ) {m_pdg_code = f_pdg_code ;};
79 void SetParentID ( G4int f_ID_parent ) {m_ID_parent = f_ID_parent ;};
80 void SetGlobalTime ( G4double f_global_time ) {m_global_time = f_global_time ;};
81 void SetTotalEnergyDeposit ( G4double f_E_deposit ) {m_E_deposit = f_E_deposit ;};
82 void SetStepLength ( G4double f_L_step ) {m_L_step = f_L_step ;};
83 void SetPositionOfPrePoint ( G4ThreeVector f_XYZ_pre ) {m_XYZ_pre = f_XYZ_pre ;};
84 void SetPositionOfPostPoint ( G4ThreeVector f_XYZ_post ) {m_XYZ_post = f_XYZ_post ;};
85 void SetMomentumOfPrePoint ( G4ThreeVector f_P_pre ) {m_P_pre = f_P_pre ;};
86 void SetMomentumOfPostPoint ( G4ThreeVector f_P_post ) {m_P_post = f_P_post ;};
87 //void SetPrePositionInCu ( G4ThreeVector f_Cu_pre ) {m_Cu_pre = f_Cu_pre ;};
88 //void SetPostPositionInCu ( G4ThreeVector f_Cu_post ) {m_Cu_post = f_Cu_post ;};
89 //void SetMomentumOfCuPre ( G4ThreeVector f_P_Cu_pre ) {m_P_Cu_pre = f_P_Cu_pre ;};
90 //void SetMomentumOfCuPost ( G4ThreeVector f_P_Cu_post ) {m_P_Cu_post = f_P_Cu_post ;};
91 //Add by sunxh
92 void AddIdentifier ( G4int f_ID_Identifier[2000] , G4int N_dim ) {m_ID_Identifier.Set(N_dim, f_ID_Identifier); };
93 //end
94 void SetCreatorProcess(G4String proName) {m_creatorProcess=proName;};
95
96 /* Get methods */
97 //Add by sunxh
98 G4int GetRdtEl () const {return m_RdtElectron ;};
99 G4int GetHitID () const {return m_ID_hit ;};
100 //end
101 G4int GetTrackID () const {return m_ID_track ;};
102 G4int GetLayerID () const {return m_ID_layer ;};
103 G4int GetPDGCode () const {return m_pdg_code ;};
104 G4int GetParentID () const {return m_ID_parent ;};
105 G4double GetGlobalTime () const {return m_global_time ;};
106 G4double GetTotalEnergyDeposit () const {return m_E_deposit ;};
107 G4double GetStepLength () const {return m_L_step ;};
108 G4ThreeVector GetPositionOfPrePoint () const {return m_XYZ_pre ;};
109 G4ThreeVector GetPositionOfPostPoint () const {return m_XYZ_post ;};
110 G4ThreeVector GetMomentumOfPrePoint () const {return m_P_pre ;};
111 G4ThreeVector GetMomentumOfPostPoint () const {return m_P_post ;};
112 //G4ThreeVector GetPrePositionInCu () const {return m_Cu_pre ;};
113 //G4ThreeVector GetPostPositionInCu () const {return m_Cu_post ;};
114 //G4ThreeVector GetMomentumOfCuPre () const {return m_P_Cu_pre ;};
115 //G4ThreeVector GetMomentumOfCuPost () const {return m_P_Cu_post ;};
116 //Add by sunxh
117 TArrayI GetIdentifier () const {return m_ID_Identifier;};
118 //end
119 G4String GetCreatorProcess() const {return m_creatorProcess;};
120
121 private:
122 //Add by sunxh
123 G4int m_RdtElectron;
124 G4int m_ID_hit;
125 //end
126 G4int m_ID_track; /* ID of current track */
127 G4int m_ID_layer; /* ID of CgemLayer Hits belong to */
128 G4int m_pdg_code; /* PDG code of the track particle */
129 G4int m_ID_parent; /* PDG code of the track particle */
130 G4double m_global_time; /* Time since the current event began */
131 G4double m_E_deposit; /* Total energy deposited during the step */
132 G4double m_L_step; /* Step length */
133 G4ThreeVector m_XYZ_pre; /* Position of Pre Point */
134 G4ThreeVector m_XYZ_post; /* Position of Post Point */
135 G4ThreeVector m_P_pre; /* Momentum of Pre Point */
136 G4ThreeVector m_P_post; /* Momentum of post point */
137 G4String m_creatorProcess; /* Name of the generation process */
138 //G4ThreeVector m_Cu_pre; //position of pre point in Cu//
139 //G4ThreeVector m_Cu_post; //position of post point in Cu//
140 //G4ThreeVector m_P_Cu_pre; //momentum of pre point in Cu//
141 //G4ThreeVector m_P_Cu_post; //momentum of post point in Cu//
142 //Add by sunxh
143 TArrayI m_ID_Identifier;
144 //end
145
146};
147
148//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
149typedef G4THitsCollection<BesCgemHit> BesCgemHitsCollection;
150
151//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
152extern G4Allocator<BesCgemHit> BesCgemHitAllocator;
153
154//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
155inline void* BesCgemHit::operator new(size_t)
156{
157 void *hit;
158 hit = (void *) BesCgemHitAllocator.MallocSingle();
159 return hit;
160}
161
162//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
163inline void BesCgemHit::operator delete(void *hit)
164{
165 BesCgemHitAllocator.FreeSingle((BesCgemHit*) hit);
166}
167
168//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
169#endif
G4THitsCollection< BesCgemHit > BesCgemHitsCollection
G4Allocator< BesCgemHit > BesCgemHitAllocator
Definition: BesCgemHit.cc:58
const BesCgemHit & operator=(const BesCgemHit &)
void AddIdentifier(G4int f_ID_Identifier[2000], G4int N_dim)
virtual void Print()
G4int operator==(const BesCgemHit &) const
BesCgemHit(const BesCgemHit &)