Message: Re: Retaking Events Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Retaking Events 

Forum: Event and Track Management
Re: Question Retaking Events (Lori Rebenitsch)
Date: 31 Jan, 2012
From: Gumplinger Peter <Gumplinger Peter>

> Is it possible in the EndOfEventAction() method to throw out the event
> (using AbortCurrentEvent() ) and retake it without incrementing the
> event ID?

This is not easy and I woudn't recommend it. Instead, why don't you just increment a private event counter (in EndOfEventAction) for all events you don't want to throw out and stop the run when that counter has reached your desired limit? (of course, you need to code the machinery to initialize this counter and set your desired limit). Also, you need to set your BeamOn to a very much larger number. You may find an example of this approach among the official G4 examples. Maybe search LXR-browser with RunTermination.

The problem is that:

the for-loop index becomes the eventID. There is a public method where you can change the eventID of the event object: SetEventID but that does not affect the for-loop termination above.

 Add Message Add Message
to: "Re: Retaking Events"

 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 ]