Message: Re: Finding all particles involved in an interaction Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Ok Re: Finding all particles involved in an interaction 

Forum: Event and Track Management
Re: None Finding all particles involved in an interaction (Karen Pease)
Re: Feedback Re: Finding all particles involved in an interaction (Michael H. Kelsey)
Re: None Re: Finding all particles involved in an interaction (michel maire)
Date: 13 Jul, 2015
From: Michael H. Kelsey <Michael H. Kelsey>

On Mon, 13 Jul 2015 12:34:25 GMT, michel maire wrote:
> On Mon, 13 Jul 2015 05:32:19 GMT, Michael H. Kelsey wrote:
> > Unfortunately, that is the only way. The underlying "problem" is that
> > the material does not consist of "particles" in the G4 sense. Each
> > process knows what the tracked particle is, and it knows the material.
> > For hadronic interactions [like (n,gamma) or (n,alpha)], the process
> > uses the material composition and cross-sections to choose the specific
> > isotope for the interaction. Then it creates a strictly internal object
> > (a G4Nucleus, usually) as the target, and passes the track and target
> > into the appropriate model (G4HadronicInteraction subclass).
> > 
> > That target object is internal to the hadronic interaction code, and is
> > never visible outside. 
> > 
>   In example Hadr03, SteppingAction, I read :
>   //initialisation of the nuclear channel identification
>   //
>   G4ParticleDefinition* particle = aStep->GetTrack()->GetDefinition();
>   G4String partName = particle->GetParticleName();
>   //
>   G4HadronicProcess* hproc = (G4HadronicProcess*) process;
>   const G4Isotope* target = hproc->GetTargetIsotope();
>   if (target) targetName = target->GetName();
>    It works !  (even with neutronHP ...)

Thanks for the reminder, Michel. I had forgotten about that hack we put in to solve exactly this problem :-)

Karen, in the code fragment above, "process" is accessed via the step; it works because all hadronic interactions are G4VDiscreteProcess subclasses, and therefore are guaranteed to be the step-limiting one. The "GetTargetIsotope()" function returnes a cached G4Ions version of the target nucleus I had described previously. If you call it "out of band" (i.e., you save a pointer to the hadronic process, and call the functions somewhere other than SteppingAction), the result is not likely to be meaningful.

      -- Michael Kelsey

 Add Message Add Message
to: "Re: Finding all particles involved in an interaction"

 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 ]