Message: Drawing only relevant Trajectories Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Drawing only relevant Trajectories 

Keywords: Draw relevant hit trajectory only
Forum: Event and Track Management
Date: 24 Feb, 2003
From: Jeremy <>

Is there a way to have geant4 store and draw only the trajectories that relate to a hit in my detector? I don't care about any of the particles that don't make it to my SD but for the ones that do I'd like to see the path they took draw on the geometry. I don't know where to put the code telling geant4 not to store a trajectory unless a detector hit has ocurred. Currently all I have is this in my EventAction:

void Parity28EventAction::EndOfEventAction(const G4Event* evt)
   G4int event_id = evt->GetEventID();

   G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
  G4int n_trajectories = 0;
  if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();

 if (G4VVisManager::GetConcreteInstance())
     for (G4int i=0; i<n_trajectories; i++) 
        { G4Trajectory* trj = (G4Trajectory*) ((*(evt->GetTrajectoryContainer()))[i]);

Thank you for any help


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

 Add Message Add Message
to: "Drawing only relevant Trajectories"

 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 ]