Message: Re: fGeomBoundary and SensitiveDetector problem Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

More Re: fGeomBoundary and SensitiveDetector problem 

Forum: Event and Track Management
Re: Question fGeomBoundary and SensitiveDetector problem (Gergely Soti)
Re: Disagree Re: fGeomBoundary and SensitiveDetector problem (Gumplinger Peter)
Re: More Re: fGeomBoundary and SensitiveDetector problem (Gergely Soti)
Re: Feedback Re: fGeomBoundary and SensitiveDetector problem (Gumplinger Peter)
Date: 22 Jan, 2009
From: Gergely Soti <Gergely Soti>

Dear Peter,

I tried to use your last suggestion (to add the deposited energy of the step to the track's energy).

G4double edep = theStep->GetTotalEnergyDeposit();
G4StepPoint* point1 = theStep->GetPreStepPoint();
G4Track* track = theStep->GetTrack();
if(track->GetDefinition()->GetParticleName()=="gamma"){
   G4cout << "Step no. " <<stepcount<<" with dep.energy "<<edep/keV << " keV"<<G4endl;
   G4cout << "TrackKineticEnergy "<<track->GetKineticEnergy()/keV<<"; Step Edep " <<edep/keV<<" Particle "<<track->GetDynamicParticle()->GetTotalEnergy()<<G4endl;
 
  G4cout << "Particle type: " << track->GetDefinition()->GetParticleName()<<" ; Energy "<<TotalEnergy/keV<<" keV"<<G4endl;
}

I use the if condition to filter for gammas. I get the following:

Step no. 1 with dep.energy 0 keV
TrackKineticEnergy 555.735; Step Edep 0 Particle 0.555735
Particle type: gamma; Energy 555.735 keV

Step no. 2 with dep.energy 0 keV
TrackKineticEnergy 555.735; Step Edep 0 Particle 0.555735
Particle type: gamma; Energy 555.735 keV

By using /tracking/verbose 2 I know that the first step is a Compton scattering, and the electron gets 444.3 keV. But somehow theStep->GetTotalEnergyDeposit(); is returning 0. Shouldn't it return the electron's kinetic energy 444.3 keV?
I didn't check the boundary condition - i get 0 Energy deposit in every step!
It seems that GetTotalEnergyDeposit() is returning non zero values only for the secondary electrons.

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

1 Sad: Re: fGeomBoundary and SensitiveDetector problem   (Gumplinger Peter - 22 Jan, 2009)
 Add Message Add Message
to: "Re: fGeomBoundary and SensitiveDetector problem"

 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 ]