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

None Re: Energy deposited by secondary particles 

Forum: Hadronic Processes
Re: None Energy deposited by secondary particles
Re: None Re: Energy deposited by secondary particles (Miguel Cortes-Giraldo)
Date: 10 Apr, 2014
From: Miguel Cortes-Giraldo <Miguel Cortes-Giraldo>

Oops, there is a typo. Sorry about that. The correct line is:

edep = aStep->GetTotalEnergyDeposit();

Cheers, Miguel

On Thu, 10 Apr 2014 09:57:28 GMT, Miguel Cortes-Giraldo wrote:

> Hi Sarah,
> 
> If you need the energy deposited by each *individual* secondary particle
> you could use the track ID to later identify which track deposited the
> energy. Thus, you would have the information about the energy deposition
> by each track independently. A small example of code is:
> 
> G4double edep;
> G4int trackID;
> if ( aStep->GetTrack()->GetParentID() != 0 )  // This is true only for sec.
> {
>   edep = aStep->GetTotalEnergydeposit();
>   trackID = aStep->GetTrack()->GetTrackID();
> }
> 
> If you want to accumulate the energy deposition by each kind of
> secondary particle, then you need the info about energy deposition and
> particle definition:
> 
> G4double edep;
> G4ParticleDefinition* parDef = 0;
> if ( aStep->GetTrack()->GetParentID() != 0 )  // This is true only for sec.
> {
>   edep = aStep->GetTotalEnergydeposit();
>   pardef = aStep->GetTrack()->GetParticleDefinition();
> }
> 
> In both cases, you can use such information to later produce hits, fill
> histograms, etc. This depends on the kind of output you need...
> 
> Hope this helps,
> 
> Miguel
> 

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

1 None: Re: Energy deposited by secondary particles   (Sarah - 12 Apr, 2014)
2 None: Re: Energy deposited by secondary particles   (Ivan Brilkov - 22 Apr, 2014)
1 None: Re: Energy deposited by secondary particles   (Miguel Cortes-Giraldo - 29 Apr, 2014)
(_ None: Re: Energy deposited by secondary particles   (Miguel Cortes-Giraldo - 29 Apr, 2014)
 Add Message Add Message
to: "Re: Energy deposited by 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 ]