Message: Re: Set number of events Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Set number of events 

Forum: Run Management
Re: Question Set number of events
Date: 19 Aug, 2014
From: michel maire <michel maire>

On Wed, 13 Aug 2014 20:02:03 GMT, Frank wrote:
> Hello,
> 
> I shoot hundreds of gammas on a scintillator. Some of the gammas
> interact with the scintillator (~25%) and some don't (~75%).
> 
> Is there a way to stop a simulation when 100 photoelectric events (all
> other effects are inactivated) have occurred?
> 
> In interactive mode, when I use /run/beamOn 400, I get ~100 &#65533; 20
> photoelectric events, but I would like to shoot the right amount of
> beamOn to get precisely 100 photoelectric events each time I run a
> simulation without hoping to be lucky in getting 100 photoelectric
> events.
> 

 You can count  'good' events and stop the run when the number is reached :
 if (iGood == 100) G4RunManager::GetRunManager()->AbortRun();

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

1 Ok: Re: Set number of events   (Frank - 19 Aug, 2014)
 Add Message Add Message
to: "Re: Set number of 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 ]