Message: Re: Energy deposited in detector Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Energy deposited in detector 

Forum: Event and Track Management
Re: Question Energy deposited in detector (Kiran Bharwani)
Date: 16 Oct, 2004
From: Vladimir IVANTCHENKO <vnivanch@mail.cern.ch>

On Fri, 15 Oct 2004, Kiran Bharwani wrote:

> *** Discussion title: Event and Track Management
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/eventtrackmanage/219"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
> Hello,
>   I have created a simple simulation with a gamma source and a detector.
> I am trying to calculate the energy deposited by a gamma in the detector.
> I want to know the energy deposited by the gamma on first hit and all the
> secondaries (compton electrons etc.) created. So in my UserSteppingAction 
> I try to add the energies from the step if the volume is my detector.
> I use the method: step->GetTotalEnergyDeposit()
> This gives me the energy deposited from the compton electron but not from
> the gamma. It always returns a zero. What am I missing? 
>

In G4 gamma does not delivered energy to the media, only does exchage with 
the electron. As it is shown below.
 
> Here is a sample output:
> 
> 1 primaries are passed from G4EventTransformer. !!!!!!! Now start
> processing an event !!!!!!! ### pop requested out of 1 stacked tracks.
> 
> *********************************************************************************************************
> * G4Track Information:   Particle = gamma,   Track ID = 1,   Parent ID = 0
> *********************************************************************************************************
> 
> Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
>     0        0        0      138     0.662        0        0         0       World initStep
>     1     13.1    -14.6     38.1     0.662        0      102       102    detector Transportation
>     2     17.3    -19.3     6.07     0.303        0     32.6       135    detector compt
> energy deposited by trackid: 1 Energy: 0
>     3     21.9      -24     6.78     0.303        0      6.6       141    detector LowEnRayleigh
> energy deposited by trackid: 1 Energy: 0
>     4       26    -27.9     7.54     0.303        0     5.67       147       World Transportation
> energy deposited by trackid: 1 Energy: 0
>     5      100      -98     21.2     0.303        0      103       250  OutOfWorld Transportation
> Track (trackID 1, parentID 0) is processed with stopping code 2
> ### pop requested out of 1 stacked tracks.
> 
> *********************************************************************************************************
> * G4Track Information:   Particle = e-,   Track ID = 2,   Parent ID = 1
> *********************************************************************************************************
> 
> Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
>     0     17.3    -19.3     6.07     0.359        0        0         0    detector initStep
>     1     17.5    -19.2     5.98    0.0293     0.33    0.353     0.353    detector LowEnergyIoni
> energy deposited by trackid: 2 Energy: 0.32968912
>     2     17.5    -19.2     5.98         0   0.0503  0.00841     0.361    detector LowEnergyIoni
> energy deposited by trackid: 2 Energy: 0.37997666
> Track (trackID 2, parentID 1) is processed with stopping code 2
> ### pop requested out of 0 stacked tracks.
> ### 0 waiting tracks are re-classified to
>      0 urgent tracks and 0 waiting tracks.
> NULL returned from G4StackManager.
> Terminate current event processing.
> Run terminated.
> Run Summary
>   Number of events processed : 1
>   User=0.01s Real=0.201s Sys=0.02s
> Committing...
> Closing the tree...
> End of Run summary
> 
> Thanks for your help, KB
> 

Seems to be correct.

VI

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

 Add Message Add Message
to: "Re: Energy deposited in detector"

 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 ]