CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
BesCgemHit.cc
Go to the documentation of this file.
1//-------------------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//-------------------------------------------------------------------------------------//
4/*
5 * =====================================================================================
6 *
7 * Filename: BesCgemHit.cc
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/* Header file: BOSS */
39#include "BesCgemHit.hh"
40
41/* Header file: Geant4 */
42#include "globals.hh"
43#include "G4UnitsTable.hh"
44#include "G4VVisManager.hh"
45#include "G4Circle.hh"
46#include "G4Colour.hh"
47#include "G4VisAttributes.hh"
48
49/* Header file: C++ */
50#include <iostream>
51#include <iomanip>
52#include <vector>
53#include <string>
54
55using namespace std;
56
57//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58G4Allocator<BesCgemHit> BesCgemHitAllocator;
59
60//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
62 :G4VHit()
63{
64 m_ID_hit = -1;
65 m_ID_track = -1;
66 m_ID_layer = -1;
67 m_pdg_code = 0;
68 m_ID_parent = 0;
69 m_global_time = 0;
70 m_E_deposit = 0.;
71 m_L_step = 0.;
72 m_XYZ_pre = G4ThreeVector(0., 0., 0.);
73 m_XYZ_post = G4ThreeVector(0., 0., 0.);
74 m_P_pre = G4ThreeVector(0., 0., 0.);
75 m_P_post = G4ThreeVector(0., 0., 0.);
76 m_creatorProcess = "Unknown";
77 //Add by sunxh
78 m_ID_Identifier.Reset();
79 //end
80}
81
82//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84{
85}
86
87//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
89 : G4VHit()
90{
91 m_ID_hit = right.m_ID_hit;
92 m_ID_track = right.m_ID_track;
93 m_ID_layer = right.m_ID_layer;
94 m_pdg_code = right.m_pdg_code;
95 m_ID_parent = right.m_ID_parent;
96 m_global_time = right.m_global_time;
97 m_E_deposit = right.m_E_deposit;
98 m_L_step = right.m_L_step;
99 m_XYZ_pre = right.m_XYZ_pre;
100 m_XYZ_post = right.m_XYZ_post;
101 m_P_pre = right.m_P_pre;
102 m_P_post = right.m_P_post;
103 m_creatorProcess = right.m_creatorProcess;
104 //Add by sunxh
105 m_ID_Identifier = right.m_ID_Identifier;
106 //end
107}
108
109//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111{
112 m_ID_hit = right.m_ID_hit;
113 m_ID_track = right.m_ID_track;
114 m_ID_layer = right.m_ID_layer;
115 m_pdg_code = right.m_pdg_code;
116 m_ID_parent = right.m_ID_parent;
117 m_global_time = right.m_global_time;
118 m_E_deposit = right.m_E_deposit;
119 m_L_step = right.m_L_step;
120 m_XYZ_pre = right.m_XYZ_pre;
121 m_XYZ_post = right.m_XYZ_post;
122 m_P_pre = right.m_P_pre;
123 m_P_post = right.m_P_post;
124 m_creatorProcess = right.m_creatorProcess;
125 //Add by sunxh
126 m_ID_Identifier = right.m_ID_Identifier;
127 //end
128
129 return *this;
130}
131
132//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
133G4int BesCgemHit::operator==(const BesCgemHit& right) const
134{
135 return ( this == &right ) ? 1 : 0;
136}
137
138//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
140{
141 G4cout << "INFO : BesCgemHit::Print, Hit information: " << endl;
142
143 G4cout << setw(19) << "TrackID: " << m_ID_track << endl;
144 G4cout << setw(19) << "LayerID: " << m_ID_layer << endl;
145 G4cout << setw(19) << "PDGCode: " << m_pdg_code << endl;
146 G4cout << setw(19) << "ParentID: " << m_ID_parent << endl;
147 G4cout << setw(19) << "CreatorProcess: " << m_creatorProcess << endl;
148 G4cout << setw(19) << "GlobalT: " << G4BestUnit(m_global_time , "Time") << endl;
149 G4cout << setw(19) << "DepositE: " << G4BestUnit(m_E_deposit , "Energy") << endl;
150 G4cout << setw(19) << "StepLength: " << G4BestUnit(m_L_step , "Length") << endl;
151 G4cout << setw(19) << "PrePointXYZ: " << G4BestUnit(m_XYZ_pre , "length") << endl;
152 G4cout << setw(19) << "PostPointXYZ: " << G4BestUnit(m_XYZ_post , "length") << endl;
153 G4cout << setw(19) << "PrePointP: " << G4BestUnit(m_P_pre , "Energy/Length") << endl;
154 G4cout << setw(19) << "PrePointPdirection: " << G4BestUnit(m_P_post , "Energy/Length") << endl;
155}
156
157//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4Allocator< BesCgemHit > BesCgemHitAllocator
Definition: BesCgemHit.cc:58
const BesCgemHit & operator=(const BesCgemHit &)
Definition: BesCgemHit.cc:110
G4int operator==(const BesCgemHit &) const
Definition: BesCgemHit.cc:133
virtual void Print()
Definition: BesCgemHit.cc:139