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

None Re: Energy Leakage 

Forum: Event and Track Management
Re: Question Energy Leakage (AJ Richards)
Date: 29 Apr, 2010
From: michel maire <michel maire>

On Thu, 29 Apr 2010 15:22:34 GMT, AJ Richards wrote:
> Hi,
>   I am trying to measure the energy deposited in a layer of diamond by incident
> particles (protons, pions, and betas).  I am currently using
> getTotalEnergyDeposit(), but I am worried about the following scenario:  What if
> some of the secondary particles escape the sensitive detector region?  I only
> want to include the energy deposited within the diamond region, not the energy
> that escapes via the original particle or the secondaries.  Is
> getTotalEnergyDeposit() the right tool for the job?  Or will this include the
> energy escaping via the secondaries?  Thanks.  -AJ

 I recopy below example/novice/N03 SteppingAction.

 void ExN03SteppingAction::UserSteppingAction(const G4Step* aStep)
  // get volume of the current step
  G4VPhysicalVolume* volume 
  = aStep->GetPreStepPoint()->GetTouchableHandle()->GetVolume();

  // collect energy and track length step by step
  G4double edep = aStep->GetTotalEnergyDeposit();

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

  if (volume == detector->GetAbsorber()) eventaction->AddAbs(edep,stepl);
  if (volume == detector->GetGap())      eventaction->AddGap(edep,stepl);

 See also following attachment.

  Cheers,   Michel   


 Add Message Add Message
to: "Re: Energy Leakage"

 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 ]