CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemSim-01-00-40/src/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_XYZ_pre_align = G4ThreeVector(0., 0., 0.);
75 m_XYZ_post_align = G4ThreeVector(0., 0., 0.);
76 m_P_pre = G4ThreeVector(0., 0., 0.);
77 m_P_post = G4ThreeVector(0., 0., 0.);
78 m_creatorProcess = "Unknown";
79 //Add by sunxh
80 m_ID_Identifier.Reset();
81 //end
82}
83
84//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
88
89//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91: G4VHit()
92{
93 m_ID_hit = right.m_ID_hit;
94 m_ID_track = right.m_ID_track;
95 m_ID_layer = right.m_ID_layer;
96 m_pdg_code = right.m_pdg_code;
97 m_ID_parent = right.m_ID_parent;
98 m_global_time = right.m_global_time;
99 m_E_deposit = right.m_E_deposit;
100 m_L_step = right.m_L_step;
101 m_XYZ_pre = right.m_XYZ_pre;
102 m_XYZ_post = right.m_XYZ_post;
103 m_XYZ_pre_align = right.m_XYZ_pre_align;
104 m_XYZ_post_align = right.m_XYZ_post_align;
105 m_P_pre = right.m_P_pre;
106 m_P_post = right.m_P_post;
107 m_creatorProcess = right.m_creatorProcess;
108 //Add by sunxh
109 m_ID_Identifier = right.m_ID_Identifier;
110 //end
111}
112
113//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
115{
116 m_ID_hit = right.m_ID_hit;
117 m_ID_track = right.m_ID_track;
118 m_ID_layer = right.m_ID_layer;
119 m_pdg_code = right.m_pdg_code;
120 m_ID_parent = right.m_ID_parent;
121 m_global_time = right.m_global_time;
122 m_E_deposit = right.m_E_deposit;
123 m_L_step = right.m_L_step;
124 m_XYZ_pre = right.m_XYZ_pre;
125 m_XYZ_post = right.m_XYZ_post;
126 m_XYZ_pre_align = right.m_XYZ_pre_align;
127 m_XYZ_post_align = right.m_XYZ_post_align;
128 m_P_pre = right.m_P_pre;
129 m_P_post = right.m_P_post;
130 m_creatorProcess = right.m_creatorProcess;
131 //Add by sunxh
132 m_ID_Identifier = right.m_ID_Identifier;
133 //end
134
135 return *this;
136}
137
138//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
139G4int BesCgemHit::operator==(const BesCgemHit& right) const
140{
141 return ( this == &right ) ? 1 : 0;
142}
143
144//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
146{
147 G4cout << "INFO : BesCgemHit::Print, Hit information: " << endl;
148
149 G4cout << setw(19) << "TrackID: " << m_ID_track << endl;
150 G4cout << setw(19) << "LayerID: " << m_ID_layer << endl;
151 G4cout << setw(19) << "PDGCode: " << m_pdg_code << endl;
152 G4cout << setw(19) << "ParentID: " << m_ID_parent << endl;
153 G4cout << setw(19) << "CreatorProcess: " << m_creatorProcess << endl;
154 G4cout << setw(19) << "GlobalT: " << G4BestUnit(m_global_time , "Time") << endl;
155 G4cout << setw(19) << "DepositE: " << G4BestUnit(m_E_deposit , "Energy") << endl;
156 G4cout << setw(19) << "StepLength: " << G4BestUnit(m_L_step , "Length") << endl;
157 G4cout << setw(19) << "PrePointXYZ: " << G4BestUnit(m_XYZ_pre , "length") << endl;
158 G4cout << setw(19) << "PostPointXYZ: " << G4BestUnit(m_XYZ_post , "length") << endl;
159 G4cout << setw(19) << "PrePointXYZ_align: " << G4BestUnit(m_XYZ_pre_align, "length") << endl;
160 G4cout << setw(19) << "PostPointXYZ_align: " << G4BestUnit(m_XYZ_post_align,"length") << endl;
161 G4cout << setw(19) << "PrePointP: " << G4BestUnit(m_P_pre , "Energy/Length") << endl;
162 G4cout << setw(19) << "PrePointPdirection: " << G4BestUnit(m_P_post , "Energy/Length") << endl;
163}
164
165//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4Allocator< BesCgemHit > BesCgemHitAllocator
const BesCgemHit & operator=(const BesCgemHit &)
G4int operator==(const BesCgemHit &) const