Message: Re: Forcing a particle to interact Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Forcing a particle to interact 

Forum: Event and Track Management
Re: Question Forcing a particle to interact (Enrico Farnea)
Date: 20 Jan, 2006
From: Tom Roberts <Tom Roberts>

Yes.

In my case, I wanted to force a Decay in a specific physical volume for a specific list of particle types. I derived my own class from G4Decay, removed the Decay process from the desired particle(s), and added my class to their process list.

In AtRestGetPhysicalInteractionLength() and in PostStepGetPhysicalInteractionLength(),
if the current physical volume is the desired one, it does:
        *condition = Forced;
        return DBL_MIN;
in all other physical volumes it does:
        *condition = NotForced;
        return DBL_MAX;

That causes G4Decay to perform the decay at the end of the step in the desired volume, and to never decay anywhere else. The advantage of this approach is that I don't need to understand how G4Decay does its thing. I of course based this on what G4Decay does in those functions.

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

 Add Message Add Message
to: "Re: Forcing a particle to interact"

 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 ]