Message: a question about the source code in G4PSSphereSurfaceFlux.cc Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None a question about the source code in G4PSSphereSurfaceFlux.cc 

Forum: Biasing and Scoring
Date: 17 Apr, 2011
From: Fada Guan <Fada Guan>

Dear All:

I'm not if it is proper to ask this question in this category. I don't know how to contact with the authors: Tsukasa ASO, Akinori Kimura.

In G4PSSphereSurfaceFlux.cc

00079 G4bool G4PSSphereSurfaceFlux::ProcessHits(G4Step* aStep,G4TouchableHistory*) 00080 { 00081 G4StepPoint* preStep = aStep->GetPreStepPoint(); 00082 G4VPhysicalVolume* physVol = preStep->GetPhysicalVolume(); 00083 G4VPVParameterisation* physParam = physVol->GetParameterisation(); 00084 G4VSolid * solid = 0; 00085 if(physParam) 00086 { // for parameterized volume 00087 G4int idx = ((G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable())) 00088 ->GetReplicaNumber(indexDepth); 00089 solid = physParam->ComputeSolid(idx, physVol); 00090 solid->ComputeDimensions(physParam,idx,physVol); 00091 } 00092 else 00093 { // for ordinary volume 00094 solid = physVol->GetLogicalVolume()->GetSolid(); 00095 } 00096 00097 G4Sphere* sphereSolid = (G4Sphere*)(solid); 00098 00099 G4int dirFlag =IsSelectedSurface(aStep,sphereSolid); 00100 if ( dirFlag > 0 ) { 00101 if ( fDirection == fFlux_InOut || fDirection == dirFlag ){ 00102 00103 G4StepPoint* thisStep=0; 00104 if ( dirFlag == fFlux_In ){ 00105 thisStep = preStep; 00106 }else if ( dirFlag == fFlux_Out ){ 00107 thisStep = aStep->GetPreStepPoint(); 00108 }else{ 00109 return FALSE;

In line 00081   G4StepPoint* preStep = aStep->GetPreStepPoint();
        00105   thisStep = preStep;
in line 00107   thisStep = aStep->GetPreStepPoint();

Is there any difference between line 107 and line 105?

Thanks.

Fada

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: a question about the source code in G4PSSphereSurfaceFlux.cc   (Tsukasa Aso - 18 Apr, 2011)
(_ None: Re: a question about the source code in G4PSSphereSurfaceFlux.cc   (Fada Guan - 18 Apr, 2011)
 Add Message Add Message
to: "a question about the source code in G4PSSphereSurfaceFlux.cc"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews