Message: Re: Relation between physical particles and G4Tracks Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Relation between physical particles and G4Tracks 

Forum: Event and Track Management
Re: None Relation between physical particles and G4Tracks (Erik Dietz-Laursonn)
Re: Question Re: Relation between physical particles and G4Tracks (Marcus O'Flaherty)
Date: 01 Dec, 2015
From: Gumplinger Peter <Gumplinger Peter>

Hi Marcus,

> It seems that trajectory points are correctly being retrived, but that
> AppendPoint() is actually only storing points in a buffer, and this
> buffer is written to the TrajectoryPoints collection AFTER the
> postusertrackingaction.

Don't you have your own derived G4VTrajectory class - a la:

http://www-geant4.kek.jp/lxr/source/examples/extended/optical/wls/include/WLSTrajectory.hh

In it, YOU define:

typedef std::vector<G4VTrajectoryPoint*> WLSTrajectoryPointContainer;

and:

fpPointsContainer = new WLSTrajectoryPointContainer();

and you code in your AppendStep:

fpPointsContainer->push_back(new WLSTrajectoryPoint(aStep));

> Along with the loss of points I also observe segmentation faults when
> more than one event is run - that is, if my run contains more than one
> event, a SegV occurs following EndOfEventAction. If my run only contains
> 1 event, no SegV occurs, but re-running /run/beamOn 1 will then
> immediately trigger the SegV. (a gdb backtrace shows ~G4Event, followed
> by a segfault in ???)

Do you follow the WLSTrajectory example? There is a MergeTrajectory method that's invoked at:

http://www-geant4.kek.jp/lxr/source/event/src/G4EventManager.cc#L204

but I don't know the logic behind this code.

I suspect doing this:

WCLiteTrajectory* parenttraj = info->GetParentTrajectory() fpTrackingManager->SetTrajectory(parenttraj)

is suspect but I don't know...

I hope an expert will comment.

Peter

 Add Message Add Message
to: "Re: Relation between physical particles and G4Tracks"

 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 ]