136{
137
138
139
140 G4String rName = track.GetStep()->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetRegion()->GetName();
141
142 if( rName != fEnvelopeName )
143 {
145 {
146 G4cout<<
"Go out from G4ElNeutrinoNucleusProcess::PostStepDoIt: wrong volume "<<
G4endl;
147 }
149 }
152 G4double weight = track.GetWeight();
154
155 if( track.GetTrackStatus() !=
fAlive )
156 {
158 }
159
160
161 if (track.GetTrackStatus() !=
fAlive &&
163 {
167 {
169 ed << "G4HadronicProcess: track in unusable state - "
170 << track.GetTrackStatus() <<
G4endl;
171 ed <<
"G4HadronicProcess: returning unchanged track " <<
G4endl;
174 }
175
177 }
178
179
181
182 G4double kineticEnergy = track.GetKineticEnergy();
186
187
188
189
191
194
195
196
197 const G4StepPoint* pPostStepPoint = step.GetPostStepPoint();
201
202 if( fNuNuclCcBias > 1.0 || fNuNuclNcBias > 1.0)
203 {
208
211
212 G4double forward = track.GetVolume()->GetLogicalVolume()->GetSolid()->DistanceToOut(localP, localV);
213 G4double backward = track.GetVolume()->GetLogicalVolume()->GetSolid()->DistanceToOut(localP, -localV);
214
215 G4double distance = forward+backward;
216
217
218
219
220
221
223
224 newPosition =
position + range*direction;
225
227
229 }
235 *targNucleus);
239
241 {
242
244
247
249
251
253
255 }
256 else
257 {
258
261
262 std::size_t idx = track.GetMaterialCutsCouple()->GetIndex();
263
265
267
269 {
270 G4cout <<
"G4ElNeutrinoNucleusProcess::PostStepDoIt for "
272 <<
" in " << material->
GetName()
275 }
276 try
277 {
279 }
281 {
285 ed << " Z= "
289 ed <<
" ApplyYourself failed" <<
G4endl;
290 G4Exception(
"G4ElNeutrinoNucleusProcess::PostStepDoIt",
"had006",
292 }
293
294
299
301 {
305 << " dir= " << outdir
307 }
308
309
312
313 if(efinal < 0.0) { efinal = 0.0; }
314 if(edep < 0.0) { edep = 0.0; }
315
316
317
318
319 if(efinal <= lowestEnergy)
320 {
321 edep += efinal;
322 efinal = 0.0;
323 }
324
325
327
329
330 if(efinal > 0.0)
331 {
335 }
336 else
337 {
339 {
341 }
342 else
343 {
345 }
347 }
348
349
351
352
353
355 {
357
359 {
362
363
364
365
368
369
370
372
373
374
376 track.GetPosition());
380 }
381 else
382 {
384 delete p;
385 }
386 }
390 }
392}
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 GetElementCrossSection(const G4DynamicParticle *dynPart, G4int Z, const G4Material *mat) override
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 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()