Message: Getting primary event energy Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Getting primary event energy 

Keywords: Primary particle energy
Forum: Event and Track Management
Date: 29 Nov, 2006
From: Hugh Lippincott <walter.lippincott@yale.edu>

I'm running a simulation in which I shoot neutrons into liquid argon and observe the recoiling argon nucleus. I've successfully adapted ExN02 to do this. I now want to be able to record the energy of the neutron when it interacts in the liquid, as many times it will already have scattered once in my apparatus and therefore will no longer have its initial energy.

I've tried adding code as described in http://geant4.slac.stanford.edu/Tips/ particularly part 1, "How can I get the information of the original primary particle?" but my code crashes. It compiles fine, but then when it tries to execute the following line:

 T01TrackInformation* info = (T01TrackInformation*)(aStep->GetTrack()->GetUserInformation();

from TrackerSD.cc, it fails. Can someone help me figure out why it's doing this?

Many thanks, Hugh

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

1 None: Re: Getting primary event energy   (Makoto Asai - 29 Nov, 2006)
 Add Message Add Message
to: "Getting primary event energy"

 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 ]