Message: Re: parentID, StepNo Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: parentID, StepNo 

Forum: Hits, Digitization and Pileup
Re: Question parentID, StepNo (Victor Golovko)
Date: 15 May, 2007
From: Vladimir IVANTCHENKO <vnivanch@mail.cern.ch>

On Tue, 15 May 2007, Victor Golovko wrote:

> *** Discussion title: Hits, Digitization and Pileup
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/hitsdigits/149"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
> Hi,
> 
> I found some bizarre behavior in Geant4. Namely, I am trying to get
> information about initial step number and initial parent ID of
> registered particle in novice example # 2, using “sensitive detector”
> approach. For that I modified next file: ExN02TrackerSD.cc. Modification
> is given below:
> 
>   newHit->SetPos      (aStep->GetPostStepPoint()->GetPosition());
>   if ( (aStep->GetTrack()->GetParentID() == 0)&&
>        (aStep->GetTrack()->GetCurrentStepNumber() == 1) )
>   {
>     G4cout << "====> ExN02TrackerSD: (0) parentID: "<< aStep->GetTrack()->GetParentID()
>            << " StepNo: "  << aStep->GetTrack()->GetCurrentStepNumber()
>            <<  G4endl;
>     exit (-10);
>   }
>   trackerCollection->insert( newHit );
> 
> In principle, the executable for this example should be stopped right
> after first simulated particle, as it will be satisfy the case
> condition. In reality, the program just runs till the last simulated
> particle. I have tried to do the same modification in novice example #
> 4; however I have got the same results as for example # 2. How I have to
> modify code to get information that I would like to get?
> 
> I am using Scientific Linux 4 with gcc 4.5 and Geant4.8.3 version.
> 
> Regards, Victor Golovko. May 15, 2007
> 

Hello,

When particle enter a sensitive detector it may not be a first step or 
even it has inelastic interaction before and only secondary particles 
arrive there. Try to use TrackingAction for histories. Try also

/tracking/verbose 1

to be familiar with simulation history in your application.

VI

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

 Add Message Add Message
to: "Re: parentID, StepNo"

 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 ]