82{
85 assert(
dynamic_cast<G4Tubs*
>(solid));
86
87 auto tubsSolid =
static_cast<G4Tubs*
>(solid);
88
90
91 if(dirFlag > 0)
92 {
93 if(fDirection ==
fFlux_InOut || dirFlag == fDirection)
94 {
97 {
98 thisStep = preStep;
99 }
101 {
103 }
104 else
105 {
106 return false;
107 }
108
117 (localdir.
x() * localpos.
x() + localdir.
y() * localpos.
y()) /
118 std::sqrt(localdir.
x() * localdir.
x() + localdir.
y() * localdir.
y() +
119 localdir.
z() * localdir.
z()) /
120 std::sqrt(localpos.
x() * localpos.
x() + localpos.
y() * localpos.
y());
121
122 if(angleFactor < 0)
123 angleFactor *= -1.;
124 G4double square = 2. * tubsSolid->GetZHalfLength() *
125 tubsSolid->GetInnerRadius() *
126 tubsSolid->GetDeltaPhiAngle() / radian;
127
129 if(weighted)
131
132
133 flux = flux / angleFactor;
134 if(divideByArea)
135 flux /= square;
136
138 EvtMap->
add(index, flux);
139
141 {
143 if(filler == nullptr)
144 {
145 G4Exception(
"G4PSCylinderSurfaceFlux::ProcessHits",
"SCORER0123",
147 "G4TScoreHistFiller is not instantiated!! Histogram is "
148 "not filled.");
149 }
150 else
151 {
153 }
154 }
155
156 return true;
157 }
158
159 return false;
160 }
161
162 return false;
163}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4int IsSelectedSurface(G4Step *, G4Tubs *)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4double GetWeight() const
std::map< G4int, G4int > hitIDMap
virtual G4int GetIndex(G4Step *)
G4VSolid * ComputeCurrentSolid(G4Step *aStep)
static G4VScoreHistFiller * Instance()
size_t add(const G4int &key, U *&aHit) const