Message: Incorrect Hit position Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Incorrect Hit position 

Forum: Hits, Digitization and Pileup
Date: 08 Sep, 2016
From: Victor Meldrew <Victor Meldrew>

Hello All,

  In my simulation, a pencil beam is incident along the y-axis at a sensitive detector at point position [0,0,0]. However when I histogram the first interaction point, the position is not [0,y,0]. It seems to be spread all over the face of the SD but centered around [0,y,0]. 

  I expected the first interaction position to be [0,y,0].

  Could anyone help?

  Here are the relevant lines from my code:

---------------------------------

MACRO:
  /gps/pos/centre 0. 1 0 mm
  /gps/ang/type beam1d
  /gps/ang/rot1 1 0 0
  /gps/ang/rot2 0 0 1
  /gps/ang/mintheta 180 deg
  /gps/ang/maxtheta 180 deg
  /gps/ang/minphi 0 deg
  /gps/ang/maxphi 360 deg

---------------------------------

CODE: (for the sensitive detector)

  aHit->SetLocalPos(step->GetPostStepPoint()->GetPosition());
  process = step->GetPostStepPoint()->GetProcessDefinedStep();
  if (process != NULL ) {
	interactiontype =  process->GetProcessName();
  }
  if (interactiontype=="phot") {
     G4cout << step->GetPostStepPoint()->GetPosition() << G4endl;
  }

---------------------------------

Thanks, Victor.

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

1 None: Re: Incorrect Hit position   (Victor Meldrew - 09 Sep, 2016)
(_ None: Re: Incorrect Hit position   (Artem Zontikov - 10 Sep, 2016)
(_ None: Re: Incorrect Hit position   (Victor Meldrew - 10 Sep, 2016)
(_ None: Re: Incorrect Hit position   (Artem Zontikov - 11 Sep, 2016)
(_ None: [SOLVED] Re: Incorrect Hit position   (Victor Meldrew - 12 Sep, 2016)
 Add Message Add Message
to: "Incorrect Hit position"

 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 ]