Message: aStep, ParentID, TrackID, Sencitive Detectors. Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question aStep, ParentID, TrackID, Sencitive Detectors. 

Keywords: Sensitive detectors, aStep, ParentID, TrackID
Forum: Event and Track Management
Date: 12 May, 2007
From: Victor Golovko <vgolovko@comp.tamu.edu>

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 12, 2007

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

 Add Message Add Message
to: "aStep, ParentID, TrackID, Sencitive Detectors."

 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 ]