QwGeant4
QweakSimCerenkov_DetectorHit.cc
Go to the documentation of this file.
2 
3 G4Allocator<QweakSimCerenkov_DetectorHit> QweakSimCerenkovDetectorHitAllocator;
4 
6 {
7  DetectorID = -1;
8  pLogV = 0;
9  time = 0.;
10 
11  originVertexPosition = G4ThreeVector(0.0,0.0,0.0);
12  originVertexMomentumDirection = G4ThreeVector(0.0,0.0,0.0);
15 
16  currentMomentumDirection = G4ThreeVector(0.0,0.0,0.0);
18  currentTotalEnergy = 0.;
19  currentPolarization = G4ThreeVector(0.0,0.0,0.0);
20 
21  primaryQ2 = 0.;
22  crossSection = 0.;
23  crossSectionWeight = 0.;
24 
25  particleName = "None";
26  CreatorProcessName = "None";
27  TrackID = -1;
28  ParentID = -1;
29  particleType = -1;
30 }
31 
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34 {
35  DetectorID = detector_id;
36  time = 0.;
37  pLogV = 0;
38 }
39 
40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 : G4VHit()
46 {
47  DetectorID = right.DetectorID;
48  TrackID = right.TrackID;
49  ParentID = right.ParentID;
50 
51  cellPos = right.cellPos;
52  cellRot = right.cellRot;
53  pLogV = right.pLogV;
54 
55  worldPos = right.worldPos;
56  localPos = right.localPos;
59 
60  time = right.time;
61 
66 
71 
72  particleName = right.particleName;
74  particleType = right.particleType;
75 }
76 
77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79 {
80  DetectorID = right.DetectorID;
81  TrackID = right.TrackID;
82  ParentID = right.ParentID;
83 
84  cellPos = right.cellPos;
85  cellRot = right.cellRot;
86  pLogV = right.pLogV;
87 
88  worldPos = right.worldPos;
89  localPos = right.localPos;
92  time = right.time;
93 
98 
103 
104  particleName = right.particleName;
106  particleType = right.particleType;
107 
108  return *this;
109 }
110 
112 {
113  //return (this==&right) ? 1 : 0;
114  return 0;
115 }
116 
117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119 {
120  G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
121  if(pVVisManager)
122  {
123  // draw small yellow balls for the impact point
124 // G4Circle circle(worldPos);
125 // circle.SetScreenSize(0.01);
126 // circle.SetFillStyle(G4Circle::filled);
127 // G4Colour colourHit(1.,1.,0.); // yellow
128 // G4VisAttributes attribs(colourHit);
129 // circle.SetVisAttributes(attribs);
130 // pVVisManager->Draw(circle);
131 
132 // // draw/overlay a white drift cell for a hit
133 // G4Transform3D trans(cellRot.inverse(),cellPos);
134 // const G4VisAttributes* pVA = pLogV->GetVisAttributes();
135 // if(pVA) attribs = *pVA;
136 // G4Colour colourCell(1.,1.,1.);
137 // attribs.SetColour(colourCell);
138 // attribs.SetForceSolid(true);
139 // attribs.SetVisibility(true);
140 // pVVisManager->Draw(*pLogV,attribs,trans);
141 
142  }
143 
144 }
145 
146 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
148 {
149  G4cout << " CerenkovDetector[" << DetectorID << "] : time " << time/ns
150  << " (nsec) --- local (x,y,z) [cm] "
151  << localPos.x()/cm << ", "
152  << localPos.y()/cm << ", "
153  << localPos.z()/cm << ", "
154  << "--- world (x,y,z) [cm] "
155  << worldPos.x()/cm << ", "
156  << worldPos.y()/cm << ", "
157  << worldPos.z()/cm << ", "
158  << G4endl;
159 }
160 
161 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Handling of a hit in the Cerenkov detector.
G4Allocator< QweakSimCerenkov_DetectorHit > QweakSimCerenkovDetectorHitAllocator
int operator==(const QweakSimCerenkov_DetectorHit &right) const
const QweakSimCerenkov_DetectorHit & operator=(const QweakSimCerenkov_DetectorHit &right)