CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemSim-01-00-41/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 SetIsSecondary ( G4int isSec ) {m_isSecondary = isSec ;};
78 void SetLayerID ( G4int f_ID_layer ) {m_ID_layer = f_ID_layer ;};
79 void SetPDGCode ( G4int f_pdg_code ) {m_pdg_code = f_pdg_code ;};
80 void SetParentID ( G4int f_ID_parent ) {m_ID_parent = f_ID_parent ;};
81 void SetGlobalTime ( G4double f_global_time ) {m_global_time = f_global_time ;};
82 void SetTotalEnergyDeposit ( G4double f_E_deposit ) {m_E_deposit = f_E_deposit ;};
83 void SetStepLength ( G4double f_L_step ) {m_L_step = f_L_step ;};
84 void SetPositionOfPrePoint ( G4ThreeVector f_XYZ_pre ) {m_XYZ_pre = f_XYZ_pre ;};
85 void SetPositionOfPostPoint ( G4ThreeVector f_XYZ_post ) {m_XYZ_post = f_XYZ_post ;};
86 void SetPositionOfPrePointAlign ( G4ThreeVector f_XYZ_pre ) {m_XYZ_pre_align = f_XYZ_pre;};
87 void SetPositionOfPostPointAlign ( G4ThreeVector f_XYZ_post ) {m_XYZ_post_align= f_XYZ_post;};
88 void SetMomentumOfPrePoint ( G4ThreeVector f_P_pre ) {m_P_pre = f_P_pre ;};
89 void SetMomentumOfPostPoint ( G4ThreeVector f_P_post ) {m_P_post = f_P_post ;};
90 //void SetPrePositionInCu ( G4ThreeVector f_Cu_pre ) {m_Cu_pre = f_Cu_pre ;};
91 //void SetPostPositionInCu ( G4ThreeVector f_Cu_post ) {m_Cu_post = f_Cu_post ;};
92 //void SetMomentumOfCuPre ( G4ThreeVector f_P_Cu_pre ) {m_P_Cu_pre = f_P_Cu_pre ;};
93 //void SetMomentumOfCuPost ( G4ThreeVector f_P_Cu_post ) {m_P_Cu_post = f_P_Cu_post ;};
94 //Add by sunxh
95 void AddIdentifier ( G4int f_ID_Identifier[2000] , G4int N_dim ) {m_ID_Identifier.Set(N_dim, f_ID_Identifier); };
96 //end
97 void SetCreatorProcess(G4String proName) {m_creatorProcess=proName;};
98 //void SetCurrentTrkID(G4int id) {m_ID_current_track=id;};
99 //void SetCurrentPdgCode(G4int code) {m_current_pdgcode=id;};
100 void SetFlightLengthPrePoint(G4double len) {m_flightLength_pre =len;};
101 void SetFlightLengthPostPoint(G4double len) {m_flightLength_post=len;};
102 void AddDigiIdxQ(G4int id) { m_vecDigiIdx_Q.push_back(id); };
103 void SetDigiIdxT(G4int id) { m_digiIdx_T=id; };
104
105 /* Get methods */
106 //Add by sunxh
107 G4int GetRdtEl () const {return m_RdtElectron ;};
108 G4int GetHitID () const {return m_ID_hit ;};
109 //end
110 G4int GetTrackID () const {return m_ID_track ;};
111 G4int GetIsSecondary () const {return m_isSecondary ;};
112 G4int GetLayerID () const {return m_ID_layer ;};
113 G4int GetPDGCode () const {return m_pdg_code ;};
114 G4int GetParentID () const {return m_ID_parent ;};
115 G4double GetGlobalTime () const {return m_global_time ;};
116 G4double GetTotalEnergyDeposit () const {return m_E_deposit ;};
117 G4double GetStepLength () const {return m_L_step ;};
118 G4ThreeVector GetPositionOfPrePoint () const {return m_XYZ_pre ;};
119 G4ThreeVector GetPositionOfPostPoint () const {return m_XYZ_post ;};
120 G4ThreeVector GetPositionOfPrePointAlign () const {return m_XYZ_pre_align;};
121 G4ThreeVector GetPositionOfPostPointAlign () const {return m_XYZ_post_align;};
122 G4ThreeVector GetMomentumOfPrePoint () const {return m_P_pre ;};
123 G4ThreeVector GetMomentumOfPostPoint () const {return m_P_post ;};
124 //G4ThreeVector GetPrePositionInCu () const {return m_Cu_pre ;};
125 //G4ThreeVector GetPostPositionInCu () const {return m_Cu_post ;};
126 //G4ThreeVector GetMomentumOfCuPre () const {return m_P_Cu_pre ;};
127 //G4ThreeVector GetMomentumOfCuPost () const {return m_P_Cu_post ;};
128 //Add by sunxh
129 TArrayI GetIdentifier () const {return m_ID_Identifier;};
130 //end
131 G4String GetCreatorProcess() const {return m_creatorProcess;};
132 //G4int GetCurrentTrkID() const {return m_ID_current_track;};
133 //G4int GetCurrentPdgCode() const {return m_current_pdgcode;};
134 G4int GetFlightLengthPrePoint() const {return m_flightLength_pre;};
135 G4int GetFlightLengthPostPoint() const {return m_flightLength_post;};
136 const vector<G4int>& GetVecDigiIdxQ() const {return m_vecDigiIdx_Q;};
137 G4int GetDigiIdxT() const {return m_digiIdx_T;};
138
139
140 private:
141 //Add by sunxh
142 G4int m_RdtElectron;
143 G4int m_ID_hit;
144 //end
145 G4int m_ID_track; /* trk index of current track, could be mother or mother's mother or ... */
146 //G4int m_ID_current_track; /* G4 index of current track */
147 //G4int m_current_pdgcode; /* pdg code of current track */
148 G4int m_isSecondary; /* if the hit from the track index directly */
149 G4int m_ID_layer; /* ID of CgemLayer Hits belong to */
150 G4int m_pdg_code; /* PDG code of the track particle */
151 G4int m_ID_parent; /* parent ID of the track particle */
152 G4double m_global_time; /* Time since the current event began */
153 G4double m_E_deposit; /* Total energy deposited during the step */
154 G4double m_L_step; /* Step length */
155 G4ThreeVector m_XYZ_pre; /* Position of Pre Point */
156 G4ThreeVector m_XYZ_post; /* Position of Post Point */
157 G4ThreeVector m_XYZ_pre_align; /* Position of Pre Point after alignment conversion */
158 G4ThreeVector m_XYZ_post_align; /* Position of Post Point after alignment conversion */
159 G4ThreeVector m_P_pre; /* Momentum of Pre Point */
160 G4ThreeVector m_P_post; /* Momentum of post point */
161 G4double m_flightLength_pre;
162 G4double m_flightLength_post;
163 G4String m_creatorProcess; /* Name of the generation process */
164 //G4ThreeVector m_Cu_pre; //position of pre point in Cu//
165 //G4ThreeVector m_Cu_post; //position of post point in Cu//
166 //G4ThreeVector m_P_Cu_pre; //momentum of pre point in Cu//
167 //G4ThreeVector m_P_Cu_post; //momentum of post point in Cu//
168 //Add by sunxh
169 TArrayI m_ID_Identifier;
170 vector<G4int> m_vecDigiIdx_Q;// cgem digi indexes whose Q are (partly) from this true hit
171 G4int m_digiIdx_T; // cgem digi index whose T is from this true hit
172 //end
173
174};
175
176//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
177typedef G4THitsCollection<BesCgemHit> BesCgemHitsCollection;
178
179//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
180extern G4Allocator<BesCgemHit> BesCgemHitAllocator;
181
182//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
183inline void* BesCgemHit::operator new(size_t)
184{
185 void *hit;
186 hit = (void *) BesCgemHitAllocator.MallocSingle();
187 return hit;
188}
189
190//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
191inline void BesCgemHit::operator delete(void *hit)
192{
193 BesCgemHitAllocator.FreeSingle((BesCgemHit*) hit);
194}
195
196//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
197#endif
G4THitsCollection< BesCgemHit > BesCgemHitsCollection
G4Allocator< BesCgemHit > BesCgemHitAllocator
void SetTotalEnergyDeposit(G4double f_E_deposit)
const BesCgemHit & operator=(const BesCgemHit &)
void SetGlobalTime(G4double f_global_time)
G4ThreeVector GetPositionOfPrePoint() const
void AddIdentifier(G4int f_ID_Identifier[2000], G4int N_dim)
G4ThreeVector GetMomentumOfPostPoint() const
void SetMomentumOfPostPoint(G4ThreeVector f_P_post)
const vector< G4int > & GetVecDigiIdxQ() const
void SetPDGCode(G4int f_pdg_code)
virtual void Print()
G4ThreeVector GetPositionOfPostPointAlign() const
G4ThreeVector GetPositionOfPrePointAlign() const
void SetLayerID(G4int f_ID_layer)
void SetRdtEl(G4int f_RdtElectron)
G4int operator==(const BesCgemHit &) const
void SetParentID(G4int f_ID_parent)
void SetFlightLengthPostPoint(G4double len)
void SetTrackID(G4int f_ID_track)
G4ThreeVector GetPositionOfPostPoint() const
void SetPositionOfPrePoint(G4ThreeVector f_XYZ_pre)
void SetFlightLengthPrePoint(G4double len)
void SetMomentumOfPrePoint(G4ThreeVector f_P_pre)
G4ThreeVector GetMomentumOfPrePoint() const
void SetCreatorProcess(G4String proName)
BesCgemHit(const BesCgemHit &)
void SetPositionOfPostPointAlign(G4ThreeVector f_XYZ_post)
void SetPositionOfPrePointAlign(G4ThreeVector f_XYZ_pre)
void SetPositionOfPostPoint(G4ThreeVector f_XYZ_post)
void SetStepLength(G4double f_L_step)