Message: Scored the wrong angle, really bad thing Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Scored the wrong angle, really bad thing 

Forum: Biasing and Scoring
Date: 16 Nov, 2014
From: Geng <Geng>

Dear experts,
I am doing a simulation with Geant4.10.p03.
I tried to score the particle angles emitted from the upper side of a box.
I am using the following code to judge the surface from the upper side of a box.
   if (aStep->GetPostStepPoint()->GetStepStatus() == fGeomBoundary ){
    // Exiting Geometry
    G4ThreeVector stppos2= aStep->GetPostStepPoint()->GetPosition();
    G4ThreeVector localpos2 = 
      theTouchable->GetHistory()->GetTopTransform().TransformPoint(stppos2);
    if(std::fabs( localpos2.z() + boxSolid->GetZHalfLength())<kCarTolerance ){
      return fCurrent_Out;
    }
and, using the following to get the angle. 
Angle=(aStep->GetPostStepPoint()-> GetMomentumDirection().z())/degree;

In my personal sense, the angels should distribute in the range of 90-180 degree, however, the strange thing is, there is a lot of the angles are much less than 90 degree?

I cannot figure out where I am wrong, so, could anyone give me some suggestions?

Thanks and best regards. Geng

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

1 Ok: Re: Scored the wrong angle, really bad thing   (Geng - 16 Nov, 2014)
 Add Message Add Message
to: "Scored the wrong angle, really bad thing"

 Subscribe Subscribe

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