134{
135 G4String rName = track.GetStep()->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetRegion()->GetName();
136
137 if( rName != fEnvelopeName )
138 {
140 {
141 G4cout<<
"Go out from G4MuNeutrinoNucleusProcess::PostStepDoIt: wrong volume "<<
G4endl;
142 }
144 }
147 G4double weight = track.GetWeight();
149
150 if( track.GetTrackStatus() !=
fAlive )
151 {
153 }
154
155
156 if (track.GetTrackStatus() !=
fAlive &&
158 {
162 {
164 ed << "G4HadronicProcess: track in unusable state - "
165 << track.GetTrackStatus() <<
G4endl;
166 ed <<
"G4HadronicProcess: returning unchanged track " <<
G4endl;
169 }
170
172 }
173
174
176
177 G4double kineticEnergy = track.GetKineticEnergy();
181
182
183
184
186
189
190
191
192 const G4StepPoint* pPostStepPoint = step.GetPostStepPoint();
196
197 if( fNuNuclCcBias > 1.0 || fNuNuclNcBias > 1.0)
198 {
203
206
207 G4double forward = track.GetVolume()->GetLogicalVolume()->GetSolid()->DistanceToOut(localP, localV);
208 G4double backward = track.GetVolume()->GetLogicalVolume()->GetSolid()->DistanceToOut(localP, -localV);
209
210 G4double distance = forward+backward;
211
212
213
214
215
216
218
219 newPosition =
position + range*direction;
220
222
224 }
233
235 {
236
238
241
243
245
247
249 }
250 else
251 {
254
255 std::size_t idx = track.GetMaterialCutsCouple()->GetIndex();
256
258
260
262 {
263 G4cout <<
"G4MuNeutrinoNucleusProcess::PostStepDoIt for "
265 <<
" in " << material->
GetName()
268 }
269 try
270 {
272 }
274 {
278 ed << " Z= "
282 ed <<
" ApplyYourself failed" <<
G4endl;
283 G4Exception(
"G4MuNeutrinoNucleusProcess::PostStepDoIt",
"had006",
285 }
286
287
292
294 {
298 << " dir= " << outdir
300 }
301
302
305
306 if(efinal < 0.0) { efinal = 0.0; }
307 if(edep < 0.0) { edep = 0.0; }
308
309
310
311
312 if(efinal <= lowestEnergy)
313 {
314 edep += efinal;
315 efinal = 0.0;
316 }
317
318
320
322
323 if(efinal > 0.0)
324 {
328 }
329 else
330 {
332 {
334 }
335 else
336 {
338 }
340 }
341
342
344
345
346
348 {
350
352 {
355
356
357
358
361
362
363
365
366
367
369 track.GetPosition());
373 }
374 else
375 {
377 delete p;
378 }
379 }
383 }
385}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
@ fKillTrackAndSecondaries
G4GLOB_DLL std::ostream G4cout
Hep3Vector & rotateUz(const Hep3Vector &)
Hep3Vector & rotate(double, const Hep3Vector &)
const G4Element * SampleZandA(const G4DynamicParticle *, const G4Material *, G4Nucleus &target)
void SetMomentumDirection(const G4ThreeVector &aDirection)
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double GetEnergyChange() const
void SetTrafoToLab(const G4LorentzRotation &aT)
G4double GetLocalEnergyDeposit() const
const G4ThreeVector & GetMomentumChange() const
std::size_t GetNumberOfSecondaries() const
G4HadSecondary * GetSecondary(size_t i)
void Initialise(const G4Track &aT)
G4LorentzRotation & GetTrafoToLab()
G4DynamicParticle * GetParticle()
void Report(std::ostream &aS) const
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
const G4String & GetModelName() const
void SetRecoilEnergyThreshold(G4double val)
void FillResult(G4HadFinalState *aR, const G4Track &aT)
G4Nucleus * GetTargetNucleusPointer()
G4ParticleChange * theTotalResult
std::vector< G4HadronicInteraction * > & GetHadronicInteractionList()
void DumpState(const G4Track &, const G4String &, G4ExceptionDescription &)
const G4String & GetName() const
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
virtual G4double GetElementCrossSection(const G4DynamicParticle *dynPart, G4int Z, const G4Material *mat)
void AddSecondary(G4Track *aSecondary)
void ProposePosition(G4double x, G4double y, G4double z)
void Initialize(const G4Track &) override
void ProposeEnergy(G4double finalEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
const std::vector< G4double > * GetEnergyCutsVector(std::size_t pcIdx) const
static G4ProductionCutsTable * GetProductionCutsTable()
void ReLocateWithinVolume(const G4ThreeVector &pGlobalPoint)
const G4VTouchable * GetTouchable() const
const G4ThreeVector & GetPosition() const
virtual const G4RotationMatrix * GetRotation(G4int depth=0) const
virtual const G4ThreeVector & GetTranslation(G4int depth=0) const
void SetWeight(G4double aValue)
void SetTouchableHandle(const G4TouchableHandle &apValue)
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
void ProposeTrackStatus(G4TrackStatus status)
void ProposeNonIonizingEnergyDeposit(G4double anEnergyPart)
void ProposeWeight(G4double finalWeight)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetNumberOfSecondaries(G4int totSecondaries)
void ClearNumberOfInteractionLengthLeft()