Message: Wrong Hit position giving half/ distorted image output Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Wrong Hit position giving half/ distorted image output 

Forum: Hits, Digitization and Pileup
Date: 15 Dec, 2016
From: fracskira <fracskira>

Hello,

I am trying to simulate digital radiography in order to obtain images that are recorded as interaction (photon counting) in a flat detector geometry placed at [-10,0,0], a source at [10,0,0] and a spherical object at [0,0,0].

ISSUES:

1. The image produced show only half of the projection maybe because it is just recording the deposition for positive coordinates (x,y) and not for negatives (-x,-y).

2. The image does not cover the entire 512x512 pixel grid.

The line hitx seems to have the problem. Could any one help with this?

---------------------------------------
 CODE:

  G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
  G4TouchableHandle theTouchable = preStepPoint->GetTouchableHandle();

  G4ThreeVector worldPos = preStepPoint->GetPosition();
  G4ThreeVector localPos = theTouchable->GetHistory()->GetTopTransform().TransformPoint(worldPos);

  G4double phi = localPos.getPhi(); 

  hitx=(int)((fmod(phi+M_PI,M_PI))*(G4double)resolutionX); 

  hitz=(int)(localPos.z()/pixelSizeY+resolutionY/2);

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2016/12/15/10.13-95091-IMAGE.jpg
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2016/12/15/10.13-26971-axis.jpg

 Add Message Add Message
to: "Wrong Hit position giving half/ distorted image output"

 Subscribe Subscribe

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


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]