Message: Re: Storing Path Lengths Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Storing Path Lengths 

Forum: Event and Track Management
Re: None Storing Path Lengths
Date: Aug 24, 13:02
From: michel maire <michel maire>

On Mon, 24 Aug 2009 12:41:13 GMT, Bluehat85 wrote:
> Hi all,
> 
> I've got a scintillation detector model and I'm interested in seeing how
> many times the optical photons bounce around inside of the detector
> before escaping or being absorbed. Therefore I'd like to do something
> like GetStepLength() for each step of an optical photon, add them up,
> and store that value in an array of many similar values for other
> optical photons.
> 
> My problem is trying to tell Geant when to start counting the pathlength
> anew for a new optical photon. In other words, after one photon has
> "died" how can I say: add all the step lengths you have up and store
> that value, reset to zero and start counting again for a new optical
> photon? Currently I'm just counting all the step lengths from many
> photons because I don't know how to make Geant distinguish between or
> "name" seperate photons and store their calculations seperately.
> 
> Ideas?
> 
> Thanks!
> 

 In class TrackingAction (derived from G4UserTrackingAction), you have the control at begin and at end of each track (an optical photon is a track). 

 See example of such class in examples/extended/electromagnetic/TestEm1 or many others TestEm

     Cheers,   Michel

 Add Message Add Message
to: "Re: Storing Path Lengths"

 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 ]