37 #include "G4ParticleChange.hh" 40 #include "G4ParticleChange.hh" 41 #include "G4StepPoint.hh" 55 fOldTouchableH(), fNewTouchableH(), fInitialTouchableH(), fFinalTouchableH()
89 const G4Step* pStep= trk->GetStep();
118 *condition = StronglyForced;
135 const G4Track&
track,
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);
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;
269 fSplitStep->SetStepLength(step.GetStepLength());
270 fSplitStep->SetTotalEnergyDeposit(step.GetTotalEnergyDeposit());
271 fSplitStep->SetNonIonizingEnergyDeposit(step.GetNonIonizingEnergyDeposit());
272 fSplitStep->SetControlFlag(step.GetControlFlag());
282 G4cout <<
"In mass geometry ------------------------------------------------" <<
G4endl;
283 G4cout <<
" StepLength : " << step.GetStepLength()/
mm <<
" TotalEnergyDeposit : " 284 << step.GetTotalEnergyDeposit()/
MeV <<
G4endl;
285 G4cout <<
" PreStepPoint : " 286 << step.GetPreStepPoint()->GetPhysicalVolume()->GetName() <<
" - ";
287 if(step.GetPreStepPoint()->GetProcessDefinedStep())
288 {
G4cout << step.GetPreStepPoint()->GetProcessDefinedStep()->GetProcessName(); }
290 {
G4cout <<
"NoProcessAssigned"; }
292 G4cout <<
" " << step.GetPreStepPoint()->GetPosition() <<
G4endl;
293 G4cout <<
" PostStepPoint : ";
294 if(step.GetPostStepPoint()->GetPhysicalVolume())
295 {
G4cout << step.GetPostStepPoint()->GetPhysicalVolume()->GetName(); }
297 {
G4cout <<
"OutOfWorld"; }
299 if(step.GetPostStepPoint()->GetProcessDefinedStep())
300 {
G4cout << step.GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName(); }
302 {
G4cout <<
"NoProcessAssigned"; }
304 G4cout <<
" " << step.GetPostStepPoint()->GetPosition() <<
G4endl;
306 G4cout <<
"In ghost geometry ------------------------------------------------" <<
G4endl;
308 <<
" TotalEnergyDeposit : " 310 G4cout <<
" PreStepPoint : " 311 <<
fSplitStep->GetPreStepPoint()->GetPhysicalVolume()->GetName() <<
" [" 312 <<
fSplitStep->GetPreStepPoint()->GetTouchable()->GetReplicaNumber()
314 if(
fSplitStep->GetPreStepPoint()->GetProcessDefinedStep())
315 {
G4cout <<
fSplitStep->GetPreStepPoint()->GetProcessDefinedStep()->GetProcessName(); }
317 {
G4cout <<
"NoProcessAssigned"; }
320 G4cout <<
" PostStepPoint : ";
321 if(
fSplitStep->GetPostStepPoint()->GetPhysicalVolume())
323 G4cout <<
fSplitStep->GetPostStepPoint()->GetPhysicalVolume()->GetName() <<
" [" 324 <<
fSplitStep->GetPostStepPoint()->GetTouchable()->GetReplicaNumber()
328 {
G4cout <<
"OutOfWorld"; }
330 if(
fSplitStep->GetPostStepPoint()->GetProcessDefinedStep())
331 {
G4cout <<
fSplitStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName(); }
333 {
G4cout <<
"NoProcessAssigned"; }
336 <<
fSplitStep->GetTrack()->GetMomentumDirection()
352 *condition = NotForced;
365 G4GPILSelection* selection)
367 *selection = NotCandidateForSelection;
376 const G4Track&
track,
const G4Step& )
388 const G4Track&
track,
G4double condition(const G4ErrorSymMatrix &m)
G4TouchableHistory * CreateTouchableForSubStep(G4int newVoxelNum, G4ThreeVector newPosition)
virtual ~G4ScoreSplittingProcess()
void GetLengthAndEnergyDeposited(G4int stepNo, G4int &voxelID, G4double &stepLength, G4double &energyLoss)
EVolume GetTopVolumeType() const
G4ParticleChange xParticleChange
void Verbose(const G4Step &) const
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
const G4NavigationHistory * GetHistory() const
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
G4ScoreSplittingProcess(const G4String &processName="ScoreSplittingProc", G4ProcessType theType=fParameterisation)
G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
const std::vector< std::pair< G4int, G4double > > & GetStepLengths()
G4StepPoint * fSplitPostStepPoint
void CopyStepStart(const G4Step &step)
G4ReferenceCountedHandle< G4VTouchable > G4TouchableHandle
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
const G4String & GetProcessName() const
G4GLOB_DLL std::ostream G4cout
virtual G4VPVParameterisation * GetParameterisation() const =0
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
G4bool Hit(G4Step *aStep)
G4VPhysicalVolume * GetTopVolume() 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)
G4TouchableHandle fOldTouchableH
void GetVoxelID(G4int stepNo, G4int &voxelID)
virtual void ComputeTransformation(const G4int, G4VPhysicalVolume *) const =0
G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
G4EnergySplitter * fpEnergySplitter
G4VParticleChange * pParticleChange
G4TouchableHandle fNewTouchableH
G4VSensitiveDetector * GetSensitiveDetector() const
G4StepPoint * fSplitPreStepPoint
G4VParticleChange dummyParticleChange
G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
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