QwGeant4
QweakSimTriggerScintillator_DetectorHit.cc
Go to the documentation of this file.
1 // QweakSimTriggerScintillator_DetectorHit.cc
2 // Klaus Hans Grimm
3 // 2005-12-27
4 
5 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
6 
8 
9 // geant4 includes
10 #include "G4Circle.hh"
11 
12 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
13 G4Allocator<QweakSimTriggerScintillator_DetectorHit> QweakSimTriggerScintillator_DetectorHitAllocator;
14 
16 {
17  DetectorID = -1;
18  pLogV = 0;
19  time = 0.;
20 
21  originVertexPosition = G4ThreeVector(0.0,0.0,0.0);
22  originVertexMomentumDirection = G4ThreeVector(0.0,0.0,0.0);
25 
26  currentMomentumDirection = G4ThreeVector(0.0,0.0,0.0);
28  currentTotalEnergy = 0.;
29 
30  primaryQ2 = 0.;
31  crossSection = 0.;
32  crossSectionWeight = 0.;
33 
34  depositedEnergy = 0.;
35 }
36 
37 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
39 {
40 
41  DetectorID = detector_id;
42  time = 0.;
43  pLogV = 0;
44 
45 }
46 
47 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
49 {;}
50 
51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
53  : G4VHit() {
54 
55  DetectorID = right.DetectorID;
56 
57  cellPos = right.cellPos;
58  cellRot = right.cellRot;
59  pLogV = right.pLogV;
60 
61  worldPos = right.worldPos;
62  localPos = right.localPos;
65  time = right.time;
66  particleName = right.particleName;
67  particleType = right.particleType;
68 
73 
77 
79 }
80 
81 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83 {
84  DetectorID = right.DetectorID;
85 
86  cellPos = right.cellPos;
87  cellRot = right.cellRot;
88  pLogV = right.pLogV;
89 
90  worldPos = right.worldPos;
91  localPos = right.localPos;
94  time = right.time;
95  particleName = right.particleName;
96  particleType = right.particleType;
97 
102 
106 
108 
109  return *this;
110 }
111 
113 {
114  //return (this==&right) ? 1 : 0;
115 
116 return 0;
117 }
118 
119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
121 {
122  G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
123  if(pVVisManager)
124  {
125  // draw small yellow balls for the impact point
126  G4Circle circle(worldPos);
127  circle.SetScreenSize(0.01);
128  circle.SetFillStyle(G4Circle::filled);
129 
130  G4Colour colourHit(1.,1.,0.); // yellow
131 
132  G4VisAttributes attribs(colourHit);
133  circle.SetVisAttributes(attribs);
134 
135  pVVisManager->Draw(circle);
136 
137 // // draw/overlay a white drift cell for a hit
138 // G4Transform3D trans(cellRot.inverse(),cellPos);
139 // const G4VisAttributes* pVA = pLogV->GetVisAttributes();
140 // if(pVA) attribs = *pVA;
141 // G4Colour colourCell(1.,1.,1.);
142 // attribs.SetColour(colourCell);
143 // attribs.SetForceSolid(true);
144 // attribs.SetVisibility(true);
145 // pVVisManager->Draw(*pLogV,attribs,trans);
146 
147  }
148 
149 }
150 
151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
153 {
154 // G4cout << " TriggerScintillator[" << DetectorID << "] : time " << time/ns
155 // << " (nsec) --- local (x,y,z) [cm] "
156 // << localPos.x()/cm << ", "
157 // << localPos.y()/cm << ", "
158 // << localPos.z()/cm << ", "
159 // << G4endl;
160 }
161 
162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
163 
164 
int operator==(const QweakSimTriggerScintillator_DetectorHit &right) const
G4Allocator< QweakSimTriggerScintillator_DetectorHit > QweakSimTriggerScintillator_DetectorHitAllocator
const QweakSimTriggerScintillator_DetectorHit & operator=(const QweakSimTriggerScintillator_DetectorHit &right)