Message: Re: Occurence of precise nuclear reaction from proton beam Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Occurence of precise nuclear reaction from proton beam 

Forum: Event and Track Management
Re: None Occurence of precise nuclear reaction from proton beam (Jefferson)
Date: 11 Feb, 2011
From: Pedro Arce <Pedro Arce>

Hi,

G4SteppingManager does not give you the secondaries of the current step, but the list of secondaries since the beginning of the track. A method like this one can do the job:

G4TrackVector GetSecondariesOfCurrentStep(G4SteppingManager* fpSteppingManager )
{
 // number of secondaries in current step
  G4int nSecoStep = fpSteppingManager->GetfN2ndariesAtRestDoIt() + fpSteppingManager->GetfN2ndariesAlongStepDoIt() + fpSteppingManager->GetfN2ndariesPostStepDoIt();
  // list of secondaries since the beginning of track
  const G4TrackVector* secondaryTracks = fpSteppingManager->GetSecondary();
  G4int nSecoTrack = G4int(secondaryTracks->size());
  // extract the last stepNseco tracks from the list
  G4int ii;
  G4TrackVector secondaries;
  for( ii = nSecoTrack-nSecoStep; ii < nSecoTrack; ii++ ){
    secondaries.push_back( (*secondaryTracks)[ii] );
  }

  return secondaries;
}

Pedro

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

1 Question: Re: Occurence of precise nuclear reaction from proton beam   (Gumplinger Peter - 11 Feb, 2011)
 Add Message Add Message
to: "Re: Occurence of precise nuclear reaction from proton beam"

 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 ]