Message: Problem with tracking in the stepping action Not Logged In (login)

## Problem with tracking in the stepping action

Forum: Event and Track Management
Date: 01 Oct, 2003
From: Kondo <Kondo>

 Hi, I'm novice on GEANT4 that I use to simulate particles interactions with Gaseous detectors. So forgive me if my question is too trivial. Based on the /examples/extended/electromagnetic/TestEm5/, I have built my steppingAction.cc to obtain the angle distribution and energy loss in the different layers of a Gaseous detectors. Below is an excerpts of the steppingAction.cc : ``` G4String nextVolumeName = "OutOfWorld"; if (track->GetNextVolume()) nextVolumeName = track->GetNextVolume()->GetName(); if ( nextVolumeName != "OutOfWorld" && track->GetTrackID() == 1 && aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()=="Window" && nextVolumeName =="DriftElectrode" && track->GetMomentumDirection().z() > 0. ) { Theta = acos(track->GetMomentumDirection().z()) ; }``` ``` if ( nextVolumeName != "OutOfWorld" && track->GetTrackID() == 1 && aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()=="DriftElectrode" && nextVolumeName =="GasChamber" && track->GetMomentumDirection().z() > 0. ) { Theta = acos(track->GetMomentumDirection().z()) ; }``` As you can see, here, the angle distribution is calculated by projecting the momentum direction of each particle at the exitof the layer on z axis (the initial particle gun momentum direction). What I want is to have the angle distribution for each layer by taking the difference of the momentum direction at the entrance and at the exit of the layer. What do I need to modify, or to add to also have the momentum direction at the entrance of the layer. Hope that somebody would help me. thank U Kondo

 Inline Depth: Outline Depth: Add message:

 to: "Problem with tracking in the stepping action "
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 ]