Message: Re: How to get track length of a primary particle at the end of event in the digitization Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: How to get track length of a primary particle at the end of event in the digitization 

Forum: Hits, Digitization and Pileup
Re: Question How to get track length of a primary particle at the end of event in the digitization (Soman)
Re: Idea Re: How to get track length of a primary particle at the end of event in the digitization (Michael H. Kelsey)
Re: Question Re: How to get track length of a primary particle at the end of event in the digitization (Soman)
Re: None Re: How to get track length of a primary particle at the end of event in the digitization (Michael H. Kelsey)
Re: Question Re: How to get track length of a primary particle at the end of event in the digitization (Soman)
Date: 21 Jul, 2017
From: Michael H. Kelsey <Michael H. Kelsey>

Soman writes:
> Thanks a lot for your explanations. It cleared up my mind about the
> G4Trajectory capabilities. So I guess you recommend to implement it
> through G4VTrajectory in the G4UserTrackingAction. Right?

No.  If you decide to write your own G4UserTrackingAction subclass, then you
will be able to access the G4Track* directly and you won't need to deal with
trajectory objects at all.  

However, you should know that that action is called for _each_ track, during
the event, not all at once at the end.  So your code should include a way
for you to save the information during an event, then save it out as desired
at the end.

I recommend reading the Developer's Guide to get an overview, and to also
look at some of the examples to see how TrackingAction can work for you.

      -- Mike Kelsey

 Add Message Add Message
to: "Re: How to get track length of a primary particle at the end of event in the digitization"

 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 ]