Message: Re: Keeping track of coincident events Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Keeping track of coincident events 

Forum: Event and Track Management
Re: Question Keeping track of coincident events (Jeff)
Re: Feedback Re: Keeping track of coincident events (Gumplinger Peter)
Re: Question Re: Keeping track of coincident events (Jeff)
Date: 20 Sep, 2010
From: Gumplinger Peter <Gumplinger Peter>

Hi Jeff,

What you need to add is:

G4int scintnumber=aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber();

(Please, see the G4 manual for the definition of Pre and Post StepPoints - but in a nutshell - the PostStepPoint, when on a geometry boundary already points into the "next" volume, while ProcessHits is called for every step where the PreStepPoint points to the sensitive detector volume.)

GetCopyNumber() assumes that the volume at the deepest level in the volume tree is the one with the varying copy numbers. Depending on how you constructed your geometry, this may not be true, and you may need to get at the copy number one or more levels up in the volume hierarchy (with GetCopyNumber(1) etc.)

> scintHit->Setscintnumber(ScintNumber);

So, you added a method to the hit class called Setscintnumber. You probably also added a method called Getscintnumber. It is this method you now need to call in EndofEventAction to get at this information again.

 Add Message Add Message
to: "Re: Keeping track of coincident events"

 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 ]