// // ******************************************************************** // * DISCLAIMER * // * * // * The following disclaimer summarizes all the specific disclaimers * // * of contributors to this software. The specific disclaimers,which * // * govern, are listed with their locations in: * // * http://cern.ch/geant4/license * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. * // * * // * This code implementation is the intellectual property of the * // * GEANT4 collaboration. * // * By copying, distributing or modifying the Program (or any work * // * based on the Program) you indicate your acceptance of this * // * statement, and all its terms. * // ******************************************************************** // // // $Id: exampleN01.cc,v 1.2.4.2 2001/06/28 20:18:47 gunter Exp $ // GEANT4 tag $Name: $ // // // -------------------------------------------------------------- // GEANT 4 - exampleN01 // // -------------------------------------------------------------- // Comments // // // -------------------------------------------------------------- #include "G4RunManager.hh" #include "G4UImanager.hh" #include "ExN01DetectorConstruction.hh" #include "ExN01PhysicsList.hh" #include "ExN01PrimaryGeneratorAction.hh" int main() { // Construct the default run manager G4RunManager* runManager = new G4RunManager; // set mandatory initialization classes runManager->SetUserInitialization(new ExN01DetectorConstruction); runManager->SetUserInitialization(new ExN01PhysicsList); // set mandatory user action class runManager->SetUserAction(new ExN01PrimaryGeneratorAction); // Initialize G4 kernel runManager->Initialize(); // get the pointer to the UI manager and set verbosities G4UImanager* UI = G4UImanager::GetUIpointer(); UI->ApplyCommand("/run/verbose 1"); UI->ApplyCommand("/event/verbose 1"); UI->ApplyCommand("/tracking/verbose 1"); // start a run int numberOfEvent = 3; runManager->BeamOn(numberOfEvent); // job termination delete runManager; return 0; }