Message: Re: counting particles crossing the boundary Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: counting particles crossing the boundary 

Forum: Event and Track Management
Re: Question counting particles crossing the boundary (Summit)
Date: 22 Feb, 2014
From: Summit <Summit>

Hi Peter,

Thanks for reply!!!
I have tried the following:
    if(step->GetTrack()->GetParentID() == 0) {
   G4StepPoint* point = step->GetPostStepPoint();
   G4StepPoint* point2 = step->GetPreStepPoint();
   G4VPhysicalVolume* thePostPV = point->GetPhysicalVolume();
   G4VPhysicalVolume* thePrePV = point2->GetPhysicalVolume();

   if(thePrePV->GetName()=="Target1" && thePostPV->GetName()=="Target2") {
   inparticlecount ++;

   if(thePrePV->GetName()=="Target2" && thePostPV->GetName()=="Target3") {
   outparticlecount ++;


Here, I have got inparticlecount and outparticlecount in polyethylene for 28Si ions. The ratio of inparticlecount and outparticlecount is much smaller than quoted by experimentalists in literature. I have tried with different models and with different thicknesses. From reverse calculations shows that outparticlecount is much smaller in comparison to reported by experimentalists. To calculate total fragmentation cross section, 28Si is simulated for 10000 events, inparticlecount/outparticlecount = (9936/9429) = 1.0538 for 1 cm thick target but reverse calculations shows that it should be about 1.0977. I have tried in 9.5 and 9.6 versions.

Can you please me what should to do to get ratio close to the experiments???

And in the method AddTargetStep(const G4Step* step), I have tried to find out the secondary tracks as:

   if(step->GetTrack()->GetParentID() != 0)
   G4cout<<"Secondary particle tracked...!!!\n";

But I have not got any secondary tracks. In the method ScoreNewTrack(const G4Track* track), I am getting histograms (Z versus Fragmentation Cross Sections). This means that there are secondary particles but AddTargetStep() is not able to get these.

What modifications should I made to get parentID???



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

1 Feedback: Re: counting particles crossing the boundary   (Gumplinger Peter - 28 Feb, 2014)
(_ None: Re: counting particles crossing the boundary   (Summit - 03 Mar, 2014)
(_ None: Re: counting particles crossing the boundary   (Summit - 15 Apr, 2014)
(_ Feedback: Re: counting particles crossing the boundary   (Gumplinger Peter - 16 Apr, 2014)
 Add Message Add Message
to: "Re: counting particles crossing the boundary"

 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 ]