148 G4ThreeVector preStepPosition, postStepPosition, direction, finalPostStepPosition;
151 G4double totalEnergyDeposit= step.GetTotalEnergyDeposit();
152 G4StepStatus fullStepStatus= step.GetPostStepPoint()->GetStepStatus();
164 preStepPosition= step.GetPreStepPoint()->GetPosition();
165 finalPostStepPosition= step.GetPostStepPoint()->GetPosition();
166 direction= (finalPostStepPosition - preStepPosition).unit();
170 postStepPosition= preStepPosition;
173 for ( iStep=0; iStep < numberVoxelsInStep; iStep++ ){
175 G4double stepLength=0.0, energyLoss= 0.0;
180 preStepPosition= postStepPosition;
189 postStepPosition= preStepPosition + stepLength * direction;
194 fSplitStep->SetTotalEnergyDeposit(energyLoss);
195 if( iStep < numberVoxelsInStep -1 ){
196 fSplitStep->GetPostStepPoint()->SetStepStatus( fGeomBoundary );
197 G4int nextVoxelId= -1;
206 fSplitStep->GetPostStepPoint()->SetStepStatus( fullStepStatus );
213 eLossFraction= (totalEnergyDeposit>0.0) ? energyLoss / totalEnergyDeposit : 1.0 ;
214 fSplitStep->SetNonIonizingEnergyDeposit(step.GetNonIonizingEnergyDeposit()*eLossFraction);
G4TouchableHistory * CreateTouchableForSubStep(G4int newVoxelNum, G4ThreeVector newPosition)
void GetLengthAndEnergyDeposited(G4int stepNo, G4int &voxelID, G4double &stepLength, G4double &energyLoss)
void Verbose(const G4Step &) const
const std::vector< std::pair< G4int, G4double > > & GetStepLengths()
G4StepPoint * fSplitPostStepPoint
void CopyStepStart(const G4Step &step)
G4ReferenceCountedHandle< G4VTouchable > G4TouchableHandle
G4bool Hit(G4Step *aStep)
G4TouchableHandle fOldTouchableH
void GetVoxelID(G4int stepNo, G4int &voxelID)
G4EnergySplitter * fpEnergySplitter
G4VParticleChange * pParticleChange
G4TouchableHandle fNewTouchableH
G4VSensitiveDetector * GetSensitiveDetector() const
G4StepPoint * fSplitPreStepPoint
static G4RegularNavigationHelper * Instance()
G4TouchableHandle fFinalTouchableH
virtual G4bool IsRegularStructure() const =0
G4LogicalVolume * GetLogicalVolume() const
void SetMaterial(G4Material *pMaterial)
G4int SplitEnergyInVolumes(const G4Step *aStep)
G4Material * GetVoxelMaterial(G4int stepNo)
G4TouchableHandle fInitialTouchableH