55 fOldTouchableH(), fNewTouchableH(), fInitialTouchableH(), fFinalTouchableH()
76 delete fpEnergySplitter;
94 fNewTouchableH = fOldTouchableH;
148 G4ThreeVector preStepPosition, postStepPosition, direction, finalPostStepPosition;
156 fOldTouchableH = fInitialTouchableH;
157 fNewTouchableH= fOldTouchableH;
166 direction= (finalPostStepPosition - preStepPosition).unit();
170 postStepPosition= preStepPosition;
173 for ( iStep=0; iStep < numberVoxelsInStep; iStep++ ){
175 G4double stepLength=0.0, energyLoss= 0.0;
177 *fSplitPreStepPoint = *fSplitPostStepPoint;
178 fOldTouchableH = fNewTouchableH;
180 preStepPosition= postStepPosition;
181 fSplitPreStepPoint->
SetPosition( preStepPosition );
189 postStepPosition= preStepPosition + stepLength * direction;
190 fSplitPostStepPoint->
SetPosition(postStepPosition);
195 if( iStep < numberVoxelsInStep -1 ){
197 G4int nextVoxelId= -1;
198 fpEnergySplitter->
GetVoxelID( iStep+1, nextVoxelId );
202 CreateTouchableForSubStep( nextVoxelId, postStepPosition );
213 eLossFraction= (totalEnergyDeposit>0.0) ? energyLoss / totalEnergyDeposit : 1.0 ;
219 ptrSD->
Hit(fSplitStep);
230 G4ScoreSplittingProcess::CreateTouchableForSubStep(
G4int newVoxelNum,
G4ThreeVector )
236 GetNavigatorForTracking()->CreateTouchableHistory(oldTouchableHistory->
GetHistory());
258 G4cout <<
" Current volume type is not Parameterised. " <<
G4endl;
259 G4Exception(
"G4ScoreSplittingProcess::CreateTouchableForSubStep",
261 "Score Splitting Process is used for Regular Structure - but did not find one here.");
263 return ptrTouchableHistory;
266 void G4ScoreSplittingProcess::CopyStepStart(
const G4Step & step)
282 G4cout <<
"In mass geometry ------------------------------------------------" <<
G4endl;
285 G4cout <<
" PreStepPoint : "
290 {
G4cout <<
"NoProcessAssigned"; }
293 G4cout <<
" PostStepPoint : ";
297 {
G4cout <<
"OutOfWorld"; }
302 {
G4cout <<
"NoProcessAssigned"; }
306 G4cout <<
"In ghost geometry ------------------------------------------------" <<
G4endl;
308 <<
" TotalEnergyDeposit : "
310 G4cout <<
" PreStepPoint : "
317 {
G4cout <<
"NoProcessAssigned"; }
320 G4cout <<
" PostStepPoint : ";
328 {
G4cout <<
"OutOfWorld"; }
333 {
G4cout <<
"NoProcessAssigned"; }
381 return &dummyParticleChange;
G4double condition(const G4ErrorSymMatrix &m)
virtual ~G4ScoreSplittingProcess()
void SetStepLength(G4double value)
virtual void Initialize(const G4Track &)
G4VPhysicalVolume * GetTopVolume() const
void SetPosition(const G4ThreeVector &aValue)
void SetTrack(G4Track *value)
static constexpr double mm
void GetLengthAndEnergyDeposited(G4int stepNo, G4int &voxelID, G4double &stepLength, G4double &energyLoss)
G4double GetStepLength() const
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
G4StepStatus GetStepStatus() const
G4double GetNonIonizingEnergyDeposit() const
G4ScoreSplittingProcess(const G4String &processName="ScoreSplittingProc", G4ProcessType theType=fParameterisation)
G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
const std::vector< std::pair< G4int, G4double > > & GetStepLengths()
G4SteppingControl GetControlFlag() const
const G4VTouchable * GetTouchable() const
const G4Step * GetStep() const
void SetStepStatus(const G4StepStatus aValue)
G4ReferenceCountedHandle< G4VTouchable > G4TouchableHandle
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
G4StepPoint * GetPreStepPoint() const
void SetSensitiveDetector(G4VSensitiveDetector *)
G4GLOB_DLL std::ostream G4cout
G4VPhysicalVolume * GetPhysicalVolume() const
const G4String & GetName() const
const G4ThreeVector & GetPosition() const
void SetControlFlag(G4SteppingControl StepControlFlag)
EVolume GetTopVolumeType() const
virtual G4VPVParameterisation * GetParameterisation() const =0
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
const G4TouchableHandle & GetNextTouchableHandle() const
G4bool Hit(G4Step *aStep)
void Verbose(const G4Step &) const
const G4String & GetProcessName() const
const G4TouchableHandle & GetTouchableHandle() const
G4double GetTotalEnergyDeposit() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4TransportationManager * GetTransportationManager()
void StartTracking(G4Track *)
void NewLevel(G4VPhysicalVolume *pNewMother, EVolume vType=kNormal, G4int nReplica=-1)
const G4VProcess * GetProcessDefinedStep() const
const G4ThreeVector & GetMomentumDirection() const
G4LogicalVolume * GetLogicalVolume() const
void GetVoxelID(G4int stepNo, G4int &voxelID)
G4StepPoint * GetPostStepPoint() const
virtual void ComputeTransformation(const G4int, G4VPhysicalVolume *) const =0
G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
virtual G4int GetReplicaNumber(G4int depth=0) const
void SetNonIonizingEnergyDeposit(G4double value)
G4VParticleChange * pParticleChange
void ProposeSteppingControl(G4SteppingControl StepControlFlag)
G4VPhysicalVolume * GetVolume() const
static constexpr double MeV
void SetTotalEnergyDeposit(G4double value)
const G4NavigationHistory * GetHistory() const
G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
static G4RegularNavigationHelper * Instance()
virtual G4bool IsRegularStructure() const =0
G4Track * GetTrack() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
void SetMaterial(G4Material *pMaterial)
G4VSensitiveDetector * GetSensitiveDetector() const
G4int SplitEnergyInVolumes(const G4Step *aStep)
G4Material * GetVoxelMaterial(G4int stepNo)