QwGeant4
QweakSimLumi_DetectorHit.cc
Go to the documentation of this file.
1 /*
2 
3  \file QweakSimLumi_DetectorHit.cc
4  \author Wade Duvall
5 
6 */
7 
8 #include "G4Circle.hh"
10 
11 // G4Allocator... what does this do again?
12 G4Allocator<QweakSimLumi_DetectorHit> QweakSimLumi_DetectorHitAllocator;
13 
15  detectorID = -1;
16  primaryEventNumber = -1;
17  trackID = -1.;
18 
19  particleName = "None";
20  particleType = -1;
21 
22  time = 0.;
23 
24  hasBeenHit = 0;
25  edgeEventFlag = 0;
26  nbOfHits = 0;
27 
28  worldPos = G4ThreeVector(0.0,0.0,0.0);
29  localPos = G4ThreeVector(0.0,0.0,0.0);
30  localExitPos = G4ThreeVector(0.0,0.0,0.0);
31  originVertexPosition = G4ThreeVector(0.0,0.0,0.0);
32 
33  worldMomentum = G4ThreeVector(0.0,0.0,0.0);
34  localMomentum = G4ThreeVector(0.0,0.0,0.0);
35  currentMomentumDirection = G4ThreeVector(0.0,0.0,0.0);
36  originVertexMomentumDirection = G4ThreeVector(0.0,0.0,0.0);
37 
40 
42  currentTotalEnergy = 0.;
43 
44  depositedEnergyHit = 0.;
45 
46  pLogV = 0;
47 }
48 
50  detectorID = detector_id;
51  time = 0.;
52  pLogV = 0;
53 }
54 
56 
58 : G4VHit() {
59  detectorID = right.detectorID;
61  trackID = right.trackID;
62 
63  particleName = right.particleName;
64  particleType = right.particleType;
65 
66  time = right.time;
67 
68  hasBeenHit = right.hasBeenHit;
70  nbOfHits = right.nbOfHits;
71 
72  worldPos = right.worldPos;
73  localPos = right.localPos;
74  localExitPos = right.localExitPos;
76 
81 
84 
87 
89 
90  cellPos = right.cellPos;
91  cellRot = right.cellRot;
92 
93  pLogV = right.pLogV;
94 }
95 
97  detectorID = right.detectorID;
99  trackID = right.trackID;
100 
101  particleName = right.particleName;
102  particleType = right.particleType;
103 
104  time = right.time;
105 
106  hasBeenHit = right.hasBeenHit;
108  nbOfHits = right.nbOfHits;
109 
110  worldPos = right.worldPos;
111  localPos = right.localPos;
112  localExitPos = right.localExitPos;
114 
119 
122 
125 
127 
128  cellPos = right.cellPos;
129  cellRot = right.cellRot;
130  pLogV = right.pLogV;
131 
132  return *this;
133 }
134 
136  return 0;
137 }
138 
140  G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
141 
142  if(pVVisManager) {
143  G4Colour colourHit (255/255., 255/255., 0/255.); // yellow
144 
145  G4VisAttributes attribs(colourHit);
146 
147  G4Circle circle(worldPos);
148  circle.SetScreenSize(0.01);
149  circle.SetFillStyle(G4Circle::filled);
150  circle.SetVisAttributes(attribs);
151 
152  pVVisManager->Draw(circle);
153  }
154 }
155 
157  G4cout << " Lumi[" << detectorID << "] : time " << time/ns
158  << " (nsec) --- local (x,y,z) [cm] "
159  << worldPos.x()/cm << ", "
160  << worldPos.y()/cm << ", "
161  << worldPos.z()/cm
162  << G4endl << G4endl;
163 }
const QweakSimLumi_DetectorHit & operator=(const QweakSimLumi_DetectorHit &right)
G4Allocator< QweakSimLumi_DetectorHit > QweakSimLumi_DetectorHitAllocator
int operator==(const QweakSimLumi_DetectorHit &right) const