134{
135 G4String rName = track.GetStep()->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetRegion()->GetName();
136
137 if( rName != fEnvelopeName )
138 {
140 {
141 G4cout<<
"Go out from G4NeutrinoElectronProcess::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();
180
181
182
183
185
188
189
190
191 const G4StepPoint* pPostStepPoint = step.GetPostStepPoint();
195
196 if( fNuEleCcBias > 1.0 || fNuEleNcBias > 1.0)
197 {
202
205
206 G4double forward = track.GetVolume()->GetLogicalVolume()->GetSolid()->DistanceToOut(localP, localV);
207 G4double backward = track.GetVolume()->GetLogicalVolume()->GetSolid()->DistanceToOut(localP, -localV);
208
209 G4double distance = forward+backward;
210
211
212
213
214
215
217
218 newPosition =
position + range*direction;
219
221
223 }
227
228
230
231 try
232 {
234 *targNucleus);
235 }
237 {
241 ed <<
" PostStepDoIt failed on element selection" <<
G4endl;
242 G4Exception(
"G4NeutrinoElectronProcess::PostStepDoIt",
"had003",
244 }
245
247
249 {
250
252
254
256
258
260
262 }
263 else
264 {
265
267
268 size_t idx = track.GetMaterialCutsCouple()->GetIndex();
269
271
273
275 {
276 G4cout <<
"G4NeutrinoElectronProcess::PostStepDoIt for "
278 <<
" in " << material->
GetName()
281 }
282 try
283 {
285 }
287 {
291 ed <<
"Target element "<< elm->
GetName()<<
" Z= "
295 ed <<
" ApplyYourself failed" <<
G4endl;
296 G4Exception(
"G4NeutrinoElectronProcess::PostStepDoIt",
"had006",
298 }
299
300
305
307 {
311 << " dir= " << outdir
313 }
314
315
318
319 if(efinal < 0.0) { efinal = 0.0; }
320 if(edep < 0.0) { edep = 0.0; }
321
322
323
324
325 if(efinal <= lowestEnergy)
326 {
327 edep += efinal;
328 efinal = 0.0;
329 }
330
331
333
335
336 if(efinal > 0.0)
337 {
341 }
342 else
343 {
345 {
347 }
348 else
349 {
351 }
353 }
354
355
357
358
359
361 {
363
365 {
368
369
370
371
374
375
376
378
379
380
382 track.GetPosition());
386 }
387 else
388 {
390 delete p;
391 }
392 }
396 }
398}
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
const G4String & GetName() 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 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()