Message: stepping action Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question stepping action 

Forum: Event and Track Management
Date: 12 Mar, 2012
From: Aram Teymurazyan <Aram Teymurazyan>

Hi All, I have a following user stepping action:

void SteppingAction::UserSteppingAction(const G4Step* aStep)
{
       G4Track* aTrack = aStep->GetTrack();
  	  G4ParticleDefinition  *particleDefinition = aTrack->GetDefinition();
	  G4double energy = aTrack->GetTotalEnergy()/MeV;
	  G4String name = particleDefinition->GetParticleName();
	  if(energy>2.0 && name =="gamma")
	    G4cout<<"energy = "<<energy<<": name = "<<name<<G4endl;
}

and I get output even when energy is exactly 2 MeV:

 energy = 2: name = gamma
 energy = 2: name = gamma
 energy = 2: name = gamma
 Idle> exit
 Graphics systems deleted.
 Visualization Manager deleting...

any ideas what could cause this? (geant4 4.9.3p01 on OSX 10.6.8)

Thanks in advance, Aram

 Add Message Add Message
to: "stepping action"

 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 ]