Message: Re: primary particle number Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: primary particle number  

Forum: Particles
Re: Question primary particle number (riazi)
Date: 31 Jan, 2010
From: michel maire <michel maire>

On Sun, 31 Jan 2010 11:56:05 GMT, riazi wrote:
>  Dear all
> I need to count the number of primary protons which can reach to a fantom or detector after traveling a beamline. would you please help me to do this?.
> 
> thanks a lot for your time and consideration riazi
> 
  As explained in Application Developers Guide (5.1.2), each tracked particle has an ID, the primary particle being ID=1

 For instance in TestEm1, SteppingAction::UserSteppingAction() you will find :

   // step length of primary particle
  G4int ID         = aStep->GetTrack()->GetTrackID();
  G4double steplen = aStep->GetStepLength();
  if (ID == 1) ...

 (TestEm1 in examples/extended/electromagnetic)

 To know where the particle is :

  // get volume of the current step
  G4VPhysicalVolume* volume 
  = aStep->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
  if (volume == detector->GetAbsorber()) ... 

 (examples/novice/N03)

 More generaly, the attached text (in FAQ), may help.

  Michel

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2010/01/31/13.30-88897-StepAction2.faq.txt

 Add Message Add Message
to: "Re: primary particle number "

 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 ]