Message: Re: Where to place a loop? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Where to place a loop? 

Forum: Run Management
Re: Question Where to place a loop? (Sergei Yakimenko)
Date: 12 Dec, 2006
From: Anton <Anton>

Hello Sergei,

> When I placed a loop in the body of
> PrimaryGeneratorAction::GeneratePrimaries(?){?} the geant performed
> it as one event. But I need for one event per each step.
you should define number of events (runs in terminology of geant4) in
your main program:

int main()
  // construct the default run manager
  G4RunManager* runManager = new G4RunManager;

  // ...

  // start a run
  int numberOfEvents = 3;

  // job termination
  delete runManager;
  return 0;

or in macro file:

/run/beamOn [numberOfEvents]

Best regards,

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

 Add Message Add Message
to: "Re: Where to place a loop?"

 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 ]