124{
127
130
131
132
135 {
137 }
138
140 auto MaterialMap = it->second;
141
143 std::map<
G4double , std::pair<MolType, G4double>>
144 ReactionDataMap;
146
147 for(const auto& mat_it : MaterialMap)
148 {
149 auto matConf = mat_it.first;
152 matConf);
153 if(numMol == 0.0)
154 {
155 continue;
156 }
158 {
159 G4cout <<
" Material of " << matConf->GetName() <<
" : " << numMol
161 }
162
163 auto data = mat_it.second;
164 auto reactionRate = data->GetObservedReactionRateConstant();
166 numMol * reactionRate / (
fpBoundingBox->Volume() * Avogadro);
167 auto reactionData = std::make_pair(mat_it.first, propensity);
168 if(propensity == 0)
169 {
170 continue;
171 }
172 alpha0 += propensity;
173 ReactionDataMap[alpha0] = reactionData;
174 }
175 if(alpha0 == 0)
176 {
177 if(
State(fIsInGoodMaterial))
178 {
180 State(fIsInGoodMaterial) =
false;
181 }
183 }
184 auto rSelectedIter = ReactionDataMap.upper_bound(r1 * alpha0);
185
187
188 State(fIsInGoodMaterial) =
true;
190
191 if(
State(fPreviousTimeAtPreStepPoint) != -1)
192 {
193 previousTimeStep =
195 }
196
198
199
201
202 if((previousTimeStep <= 0.0) ||
203 (
fpState->theNumberOfInteractionLengthLeft <= 0.0))
204 {
206 }
207 else if(previousTimeStep > 0.0)
208 {
210 }
211
212 fpState->currentInteractionLength = 1 / (rSelectedIter->second.second);
215 {
216 value =
fpState->theNumberOfInteractionLengthLeft *
217 (
fpState->currentInteractionLength);
218 }
219#ifdef G4VERBOSE
221 {
222 G4cout <<
"G4DNAScavengerProcess::PostStepGetPhysicalInteractionLength:: "
223 << molConf->GetName() <<
G4endl;
224 G4cout <<
"theNumberOfInteractionLengthLeft : "
226 G4cout <<
"currentInteractionLength : " <<
fpState->currentInteractionLength
231 << " name : " << molConf->GetName()
234 }
235#endif
236
238 {
240 }
241
242 return value * -1;
243
244
245}
virtual void SubtractNumberOfInteractionLengthLeft(G4double previousStepSize)
G4shared_ptr< G4ProcessState > fpState
void ResetNumberOfInteractionLengthLeft() override