Message: Re: Sensitive detector to secondary particles Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Sensitive detector to secondary particles 

Forum: Event and Track Management
Re: None Sensitive detector to secondary particles (Annette Pressman)
Re: None Re: Sensitive detector to secondary particles (Annette Pressman)
Re: None Re: Sensitive detector to secondary particles (Marc Verderi)
Date: 09 Apr, 2013
From: Annette Pressman <Annette Pressman>

Dear Marc,

Thank you, that helps! I'm trying to simulate a synchrotron radiation 'fan' from an electron beam being curved into an interaction region, so that I can model absorbers for the fan. The synch radiation model is based on TestEm15 with gamma energies and steplengths obtained in SteppingAction. I am interested to know how much energy will be deposited in the absorber and beampipe from this secondary radiation.

Most of the secondary gamma rays do not, and never will, interact with my absorber or the surrounding beampipe. I think this is why I am struggling to make my absorber and beampipe 'sensitive' - that ProcessHits isn't being initiated for most particles?

As an alternative to the sensitive detector I have tried to obtain the deposited energy from SteppingAction directly using the following code, or variations on this theme (based on analysis example AnaEx02).

G4Track* theTrack = aStep->GetTrack();

G4VPhysicalVolume* volume = aStep->GetPreStepPoint()->GetTouchableHandle()->GetVolume();

if (aStep->GetTrack()->GetDefinition()->GetPDGCharge() == 0.){
    G4double edep = aStep->GetTotalEnergyDeposit();
    G4double stepl = 0.;
    stepl = aStep->GetStepLength();

    if (volume == fDetector->GetPipe())      fEventAction->AddPipe    (edep,stepl);
}

However no matter how I alter this to fill only with the (secondary) SR photons I only ever obtain deposited energy for the primary electrons - which is zero. However from what you say, I guess the secondaries will each be processed eventually by G4Step so the deposited energy should be available?

Thanks again for your help! Annette

On Tue, 09 Apr 2013 11:01:15 GMT, Marc Verderi wrote:

> Dear Annette,
> 
>      Please let me remind a few basics of how the simulation works.
> 
>      Geant4 starts with -say- a primary particle generated by the 
> primary generator action. This primary is then tracked, step by step, by 
> Geant4. When doing a step, Geant4 invokes all necessary physics 
> computation, and leads to:
>      - an energy deposit in the current material during this current step
>      - a change of energy/momentum of this primary
>      - a potential creation of secondary particles, coming from 
> interactions during this step.
>      This step by step progression continues up to the point the primary 
> is killed (by interaction, or leaving the world volume).
>      Then one of the produced secondary (by default the last one) is 
> taken by Geant4, and this becomes the current primary particle. The same 
> above step by step game is played, with secondaries creation, etc. The 
> event simulation is finished when the particles (generated by the 
> primary generator action, or subsequently by any interactions) have been 
> all tracked and finally killed.
> 
>      The secondary particles are, as you understood, G4Track objects. 
> You can actually know in your G4VSensitiveDetector what are the 
> secondary particles produced by the current primary. But please note, at 
> the very point it has been created, that you will not be able to get any 
> information on a secondary energy deposit: this will and can only come 
> when this secondary will be tracked.
> 
>      I hope these explanations will help you to reconsider how to 
> organize your sensitive detector code. Also, for further help, you may 
> provide a bit more information on your setup.
> 
> Cheers,
> Marc
> 
> On 04/09/2013 12:34 PM, Annette Pressman wrote:
> > *** Discussion title: Event and Track Management
> >
> > I've been looking at alternatives to making the detector sensitive and
> > would like to check - it seems that secondary particles are G4Track
> > objects. Does this mean that I cannot get the TotalEnergyDepost G4Step
> > information about the secondaries in the way I can for the primaries? I
> > am very much a novice programmer and really want to find out if I'm
> > going down a dead end or not. Thanks for your help. Annette
> >
> > On Mon, 01 Apr 2013 20:45:40 GMT, Annette Pressman wrote:
> >
> >> Hi, I'm trying to make an absorber sensitive to synchrotron radiation
> >> from an electron beam to obtain the deposited energy. I've tried
> >> emulating examples B2 and B4d from the basic examples but in both
> >> versions of my code I get a segmentation violation at
> >> SensitiveDetector::ProcessHits(G4Step*, G4TouchableHistory*)() (in the
> >> B2 version) and at G4PSEnergyDeposit::ProcessHits(G4Step*,
> >> G4TouchableHistory*)() in the B4d version. I feel I must be missing
> >> something, probably quite simple, could anyone point me in the right
> >> direction? Many thanks! Annette
> >>
> > -------------------------------------------------------------
> > Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or unsubscribe) at:
> > http://hypernews.slac.stanford.edu/HyperNews/geant4/get/eventtrackmanage/1105/1.html
> 

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

1 None: Re: Sensitive detector to secondary particles   (Marc Verderi - 09 Apr, 2013)
(_ None: Re: Sensitive detector to secondary particles   (Annette Pressman - 09 Apr, 2013)
 Add Message Add Message
to: "Re: Sensitive detector to secondary particles"

 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 ]