Message: full track info Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question full track info  

Forum: Processes Involving Optical Photons
Date: 24 Jun, 2013
From: <bg92>

Dear all,

I have multiple Cerenkov photons emitted in a large phase space. In my stepping action, as soon as one of my photons hit a particular volume, I would like to recover the track info (GetPosition() and GetTrackLength() mainly) for all the steps from the beginning to the last step (corresponding to the case where the photon is absorbed within a particular volume). In other words, knowing that my photon has ended up in a particular volume, I would like to get back his track history.

I started writing the following code, but G4VTrajectoryPoint do not have all the track info (momentum, tracklength... ):

if(aStep->GetTrack()->GetVolume()->GetName() == "My_Detector" ) {

    const G4Event* My_evt= G4RunManager::GetRunManager()->GetCurrentEvent();
    G4TrajectoryContainer* trajectoryContainer = G4RunManager::GetRunManager()->GetCurrentEvent()->GetTrajectoryContainer();
    G4int n_trajectories = 0;
    if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();

    for (G4int i=0; i<n_trajectories; i++){ 
	  G4Trajectory* trj = (G4Trajectory*)((*(My_evt->GetTrajectoryContainer()))[i]);
	  G4VTrajectoryPoint* TrajectoryPoint= trj->GetPoint(i); 

          G4Vdouble p_X= TrajectoryPoint->GetPosition().x();
          G4Vdouble plen_X= TrajectoryPoint->GetTrackLength();    //not available


Do you have any idea what is the best way to proceed?

Thanks for your help.

Regards Baptiste

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

1 Feedback: Re: full track info   (Gumplinger Peter - 24 Jun, 2013)
 Add Message Add Message
to: "full track info "

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews