7 #include "G4VParticleChange.hh" 8 #include "G4ProcessManager.hh" 9 #include "G4ProcessVector.hh" 10 #include "G4VProcess.hh" 11 #include "G4GPILSelection.hh" 13 using namespace CLHEP;
39 particleChange->UpdateStepForPostStep(const_cast<G4Step *> (&step));
56 G4TrackVector* fSecondary = (
const_cast<G4Step *
> (&
step))->GetfSecondary();
57 G4int nSecondarySave = fSecondary->size();
60 G4Track* tempSecondaryTrack;
62 for(G4int DSecLoop=0 ; DSecLoop< num2ndaries; DSecLoop++){
66 tempSecondaryTrack->SetCreatorProcess( pRegProcess );
69 fSecondary->push_back( tempSecondaryTrack );
86 pmanager = track.GetDefinition()->GetProcessManager();
88 G4double testGPIL = DBL_MAX;
89 G4double fStepLength = 0.0;
90 G4ForceCondition fForceCondition = InActivated;
92 fStepLength = step.GetStepLength();
100 const G4TrackStatus keepStatus = track.GetTrackStatus();
102 (
const_cast<G4Track *
> (&
track))->SetTrackStatus(fPostponeToNextEvent);
107 if (
fProcess->GetProcessType() == fParameterisation ) {
110 testGPIL =
fProcess->PostStepGPIL(track,fStepLength,&fForceCondition );
115 if( fForceCondition == ExclusivelyForced) {
120 for(G4int DSecLoop=0 ; DSecLoop< nsec ; DSecLoop++){
121 G4Track* tempSecondaryTrack =
particleChange->GetSecondary(DSecLoop);
122 delete tempSecondaryTrack;
129 (
const_cast<G4Step *
> (&
step))->SetStepLength(testGPIL);
130 (
const_cast<G4Track *
> (&
track))->SetStepLength(testGPIL);
132 step.GetPostStepPoint()->SetStepStatus(fExclusivelyForcedProc);;
133 step.GetPostStepPoint()->SetProcessDefinedStep(
fProcess);
134 step.GetPostStepPoint()->SetSafety(0.0);
140 particleChange->UpdateStepForPostStep(const_cast<G4Step *> (&step));
143 (
const_cast<G4Step *
> (&
step))->UpdateTrack();
147 step.GetPostStepPoint()->SetSafety(0.0);
154 (
const_cast<G4Track *
> (&
track))->SetTrackStatus(keepStatus);
166 G4TrackVector::iterator itv = fSecondary->begin();
167 itv += nSecondarySave;
170 fSecondary->erase(itv,itv+num2ndaries);
179 std::cout <<
" GflashHadronWrapperProcess ProcessName, PreStepPosition, preStepPoint KE, PostStepPoint KE, DeltaEnergy Nsec \n " 180 << step.GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName() <<
" " 181 << step.GetPostStepPoint()->GetPosition() <<
" " 182 << step.GetPreStepPoint()->GetKineticEnergy()/
GeV <<
" " 183 << step.GetPostStepPoint()->GetKineticEnergy()/
GeV <<
" " 184 << step.GetDeltaEnergy()/
GeV <<
" "
GflashHadronWrapperProcess(G4String processName)
G4ProcessVector * fProcessVector
virtual ~GflashHadronWrapperProcess()
G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &step)
G4ProcessManager * pmanager
void Print(const G4Step &astep)
G4VParticleChange * particleChange