QwGeant4
QweakSimHDC_WirePlaneHit.cc
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // ---------------------------
4 // | Doxygen File Information |
5 // ---------------------------
6 //
7 /**
8 
9  \file QweakSimHDC_WirePlaneHit.cc
10 
11  $Revision: 1.3 $
12  $Date: 2006/05/05 21:39:20 $
13 
14  \author Klaus Hans Grimm
15 
16 */
17 //=============================================================================
18 
19 //=============================================================================
20 // -----------------------
21 // | CVS File Information |
22 // -----------------------
23 //
24 // Last Update: $Author: grimm $
25 // Update Date: $Date: 2006/05/05 21:39:20 $
26 // CVS/RCS Revision: $Revision: 1.3 $
27 // Status: $State: Exp $
28 //
29 // ===================================
30 // CVS Revision Log at end of file !!
31 // ===================================
32 //
33 //============================================================================
34 
35 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
36 
38 
39 // geant4 includes
40 #include "G4Circle.hh"
41 
42 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
43 
44 G4Allocator<QweakSimHDC_WirePlaneHit> QweakSimHDC_WirePlane_HitAllocator;
45 
46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
48 {
49 // G4cout << G4endl << "###### Calling QweakSimHDC_WirePlaneHit::QweakSimHDC_WirePlaneHit() " << G4endl << G4endl;
50 
51  HDCID = -1;
52  wireplaneID = -1;
53  time = 0.;
54 
55  originVertexPosition = G4ThreeVector(0.0,0.0,0.0);
56  originVertexMomentumDirection = G4ThreeVector(0.0,0.0,0.0);
59 
61  currentTotalEnergy = 0.;
62 
63  primaryQ2 = 0.;
64  crossSection = 0.;
65  crossSectionWeight = 0.;
66 
68 
69 // G4cout << G4endl << "###### Leaving QweakSimHDC_WirePlaneHit::QweakSimHDC_WirePlaneHit() " << G4endl << G4endl;
70 }
71 
72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
73 
74 QweakSimHDC_WirePlaneHit::QweakSimHDC_WirePlaneHit(G4int HDC_id, G4int wireplane_id)
75 {
76 // G4cout << G4endl << "###### Calling QweakSimHDC_WirePlaneHit::QweakSimHDC_WirePlaneHit(G4int z) " << G4endl << G4endl;
77 
78  HDCID = HDC_id;
79  wireplaneID = wireplane_id;
80  time = 0.;
81 
82 // G4cout << G4endl << "###### Leaving QweakSimHDC_WirePlaneHit::QweakSimHDC_WirePlaneHit(G4int z) " << G4endl << G4endl;
83 }
84 
85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
86 
88 {;}
89 
90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91 
93  : G4VHit() {
94 
95 // G4cout << G4endl << "###### Calling QweakSimHDC_WirePlaneHit::(const QweakSimHDC_WirePlaneHit &right) " << G4endl << G4endl;
96 
97  HDCID = right.HDCID;
98  wireplaneID = right.wireplaneID;
99 
100  worldPos = right.worldPos;
101  localPos = right.localPos;
102 
105 
108 
109  time = right.time;
110  particleName = right.particleName;
111  particleType = right.particleType;
112 
116 
117  //primaryQ2 = right.primaryQ2;
118  //primaryEventNumber = right.primaryEventNumber;
119 
120 // G4cout << G4endl << "###### Leaving QweakSimHDC_WirePlaneHit::(const QweakSimHDC_WirePlaneHit &right) " << G4endl << G4endl;
121 }
122 
123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
124 
126 {
127 // G4cout << G4endl << "###### Calling QweakSimHDC_WirePlaneHit::operator=(const QweakSimHDC_WirePlaneHit &right) " << G4endl << G4endl;
128 
129  HDCID = right.HDCID;
130  wireplaneID = right.wireplaneID;
131 
132  worldPos = right.worldPos;
133  localPos = right.localPos;
136 
139 
140  time = right.time;
141 
145 
146 // G4cout << G4endl << "###### Leaving QweakSimHDC_WirePlaneHit::operator=(const QweakSimHDC_WirePlaneHit &right) " << G4endl << G4endl;
147 
148  return *this;
149 }
150 
151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
152 
153 //int QweakSimHDC_WirePlaneHit::operator==(const QweakSimHDC_WirePlaneHit & right ) const
155 {
156 
157 // G4cout << G4endl << "###### Calling/Leaving QweakSimHDC_WirePlaneHit::operator==(const QweakSimHDC_WirePlaneHit &right) " << G4endl << G4endl;
158 
159  //return (this==&right) ? 1 : 0;
160 
161 return 0;
162 }
163 
164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
165 
167 {
168 // G4cout << G4endl << "###### Calling QweakSimHDC_WirePlaneHit::Draw() " << G4endl << G4endl;
169 
170  G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
171  if(pVVisManager)
172  {
173  G4Circle circle(worldPos);
174  circle.SetScreenSize(0.01);
175  circle.SetFillStyle(G4Circle::filled);
176  G4Colour colour(1.,1.,0.);
177  G4VisAttributes attribs(colour);
178  circle.SetVisAttributes(attribs);
179  pVVisManager->Draw(circle);
180  }
181 
182 // G4cout << G4endl << "###### Leaving QweakSimHDC_WirePlaneHit::Draw() " << G4endl << G4endl;
183 }
184 
185 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
186 
188 {
189 // G4cout << " HDC[" << HDCID << "] : WirePlane[" << wireplaneID << "] : time " << time/ns
190 // << " (nsec) --- local (x,y,z) [cm] "
191 // << localPos.x()/cm << ", "
192 // << localPos.y()/cm << ", "
193 // << localPos.z()/cm << ", "
194 // << G4endl;
195 }
196 
197 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
198 
199 //=======================================================
200 // -----------------------
201 // | CVS File Information |
202 // -----------------------
203 //
204 // $Revisions$
205 // $Log: QweakSimHDC_WirePlaneHit.cc,v $
206 // Revision 1.3 2006/05/05 21:39:20 grimm
207 // Records now the kinetic and total energy.
208 //
209 // Revision 1.2 2005/12/27 19:10:42 grimm
210 // - Redesign of Doxygen header containing CVS info like revision and date
211 // - Added CVS revision log at the end of file
212 //
213 //
G4Allocator< QweakSimHDC_WirePlaneHit > QweakSimHDC_WirePlane_HitAllocator
int operator==(const QweakSimHDC_WirePlaneHit &right) const
Handles hits of the HDC wire planes.
const QweakSimHDC_WirePlaneHit & operator=(const QweakSimHDC_WirePlaneHit &right)