QwGeant4
QweakSimVDC_WirePlaneHit.cc
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // ---------------------------
4 // | Doxygen File Information |
5 // ---------------------------
6 //
7 /**
8 
9  \file QweakSimVDC_WirePlaneHit.cc
10 
11  $Revision: 1.3 $
12  $Date: 2006/05/05 21:50:55 $
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:50:55 $
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<QweakSimVDC_WirePlaneHit> QweakSimVDC_WirePlane_HitAllocator;
45 
46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
48 {
49 // G4cout << G4endl << "###### Calling QweakSimVDC_WirePlaneHit::QweakSimVDC_WirePlaneHit() " << G4endl << G4endl;
50 
51  vdcID = -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 QweakSimVDC_WirePlaneHit::QweakSimVDC_WirePlaneHit() " << G4endl << G4endl;
70 }
71 
72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
73 
74 QweakSimVDC_WirePlaneHit::QweakSimVDC_WirePlaneHit(G4int vdc_id, G4int wireplane_id)
75 {
76 // G4cout << G4endl << "###### Calling QweakSimVDC_WirePlaneHit::QweakSimVDC_WirePlaneHit(G4int z) " << G4endl << G4endl;
77 
78  vdcID = vdc_id;
79  wireplaneID = wireplane_id;
80  time = 0.;
81 
82 // G4cout << G4endl << "###### Leaving QweakSimVDC_WirePlaneHit::QweakSimVDC_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 QweakSimVDC_WirePlaneHit::(const QweakSimVDC_WirePlaneHit &right) " << G4endl << G4endl;
96 
97  vdcID = right.vdcID;
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 // G4cout << G4endl << "###### Leaving QweakSimVDC_WirePlaneHit::(const QweakSimVDC_WirePlaneHit &right) " << G4endl << G4endl;
118 }
119 
120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
121 
123 {
124 // G4cout << G4endl << "###### Calling QweakSimVDC_WirePlaneHit::operator=(const QweakSimVDC_WirePlaneHit &right) " << G4endl << G4endl;
125 
126  vdcID = right.vdcID;
127  wireplaneID = right.wireplaneID;
128 
129  worldPos = right.worldPos;
130  localPos = right.localPos;
131 
134 
137 
138  time = right.time;
139  particleName = right.particleName;
140  particleType = right.particleType;
141 
145 
146 // G4cout << G4endl << "###### Leaving QweakSimVDC_WirePlaneHit::operator=(const QweakSimVDC_WirePlaneHit &right) " << G4endl << G4endl;
147 
148  return *this;
149 }
150 
151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
152 
153 //int QweakSimVDC_WirePlaneHit::operator==(const QweakSimVDC_WirePlaneHit & right ) const
155 {
156 
157 // G4cout << G4endl << "###### Calling/Leaving QweakSimVDC_WirePlaneHit::operator==(const QweakSimVDC_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 QweakSimVDC_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 QweakSimVDC_WirePlaneHit::Draw() " << G4endl << G4endl;
183 }
184 
185 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
186 
188 {
189 // G4cout << " VDC[" << vdcID << "] : 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: QweakSimVDC_WirePlaneHit.cc,v $
206 // Revision 1.3 2006/05/05 21:50:55 grimm
207 // Records now the kinetic and total energy of track/particle
208 //
209 // Revision 1.2 2005/12/27 19:19:46 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 //
214 
const QweakSimVDC_WirePlaneHit & operator=(const QweakSimVDC_WirePlaneHit &right)
int operator==(const QweakSimVDC_WirePlaneHit &right) const
G4Allocator< QweakSimVDC_WirePlaneHit > QweakSimVDC_WirePlane_HitAllocator
Handling of a U-WirePlane and/or V-WirePlane Hit of the VDC.