134{
135
136
137
138 G4String rName = track.GetStep()->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetRegion()->GetName();
139
140 if( rName != fEnvelopeName )
141 {
143 {
144 G4cout<<
"Go out from G4TauNeutrinoNucleusProcess::PostStepDoIt: wrong volume "<<
G4endl;
145 }
147 }
150 G4double weight = track.GetWeight();
152
153 if( track.GetTrackStatus() !=
fAlive )
154 {
156 }
157
158
159 if (track.GetTrackStatus() !=
fAlive &&
161 {
165 {
167 ed << "G4TauNeutrinoNucleusProcess: track in unusable state - "
168 << track.GetTrackStatus() <<
G4endl;
169 ed <<
"G4TauNeutrinoNucleusProcess: returning unchanged track " <<
G4endl;
172 }
173
175 }
176
177
179
180 G4double kineticEnergy = track.GetKineticEnergy();
184
185
186
187
189
192
193
194
195 const G4StepPoint* pPostStepPoint = step.GetPostStepPoint();
199
200 if( fNuNuclCcBias > 1.0 || fNuNuclNcBias > 1.0)
201 {
206
209
210 G4double forward = track.GetVolume()->GetLogicalVolume()->GetSolid()->DistanceToOut(localP, localV);
211 G4double backward = track.GetVolume()->GetLogicalVolume()->GetSolid()->DistanceToOut(localP, -localV);
212
213 G4double distance = forward+backward;
214
215
216
217
218
219
221
222 newPosition =
position + range*direction;
223
225
227 }
232 *targNucleus);
236
238 {
239
241
244
246
248
250
252 }
253 else
254 {
255
258
259 size_t idx = track.GetMaterialCutsCouple()->GetIndex();
260
262
264
266 {
267 G4cout <<
"G4TauNeutrinoNucleusProcess::PostStepDoIt for "
269 <<
" in " << material->
GetName()
272 }
273 try
274 {
276 }
278 {
282 ed << " Z= "
286 ed <<
" ApplyYourself failed" <<
G4endl;
287 G4Exception(
"G4TauNeutrinoNucleusProcess::PostStepDoIt",
"had006",
289 }
290
291
296
298 {
302 << " dir= " << outdir
304 }
305
306
309
310 if(efinal < 0.0) { efinal = 0.0; }
311 if(edep < 0.0) { edep = 0.0; }
312
313
314
315
316 if(efinal <= lowestEnergy)
317 {
318 edep += efinal;
319 efinal = 0.0;
320 }
321
322
324
326
327 if(efinal > 0.0)
328 {
332 }
333 else
334 {
336 {
338 }
339 else
340 {
342 }
344 }
345
346
348
349
350
352 {
354
356 {
359
360
361
362
365
366
367
369
370
371
373 track.GetPosition());
377 }
378 else
379 {
381 delete p;
382 }
383 }
387 }
389}
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)
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 G4double GetElementCrossSection(const G4DynamicParticle *dynPart, G4int Z, const G4Material *mat)
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()