87 lines
3.4 KiB
C++
87 lines
3.4 KiB
C++
//
|
|
// ********************************************************************
|
|
// * 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. *
|
|
// ********************************************************************
|
|
//
|
|
//##### MOMO Main program #####
|
|
//# ----------------------------------------------------------
|
|
//# Automatic creation of the main program for Momo environment.
|
|
// 2002 February, updated for geant4.4.0
|
|
// --------------------------------------------------------------
|
|
// MomoTest.cc generated by Geant4 Momo
|
|
// at Thu Mar 14 21:53:59 JST 2002
|
|
|
|
|
|
// 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.
|
|
//
|
|
//
|
|
#include "G4RunManager.hh"
|
|
#include "G4UImanager.hh"
|
|
// Your choice of User Interface driver
|
|
#include "G4UIGAG.hh"
|
|
// Detector geometry generated by Momo's GGE
|
|
#include "MomoN02MyDetector.hh"
|
|
// Physics List generated by Momo's GPE
|
|
#include "MomoN02PhysicsList.hh"
|
|
// Momo's default PrimaryGeneratorAction
|
|
#include "MomoPrimaryGeneratorAction.hh"
|
|
#include "MomoRunAction.hh"
|
|
#include "MomoEventAction.hh"
|
|
#ifdef G4VIS_USE
|
|
#include "MomoVisManager.hh"
|
|
#endif
|
|
int main()
|
|
{
|
|
// Construct the default run manager
|
|
G4RunManager* runManager = new G4RunManager;
|
|
// set mandatory initialization classes
|
|
runManager->SetUserInitialization(new MomoN02MyDetector);
|
|
runManager->SetUserInitialization(new MomoN02PhysicsList);
|
|
#ifdef G4VIS_USE
|
|
// visualization manager
|
|
G4VisManager* visManager = new MomoVisManager;
|
|
visManager->Initialize();
|
|
#endif
|
|
// set mandatory user action class
|
|
runManager->SetUserAction(new MomoPrimaryGeneratorAction);
|
|
// set user action classes to visualise trajectories
|
|
runManager->SetUserAction(new MomoRunAction);
|
|
runManager->SetUserAction(new MomoEventAction);
|
|
// Initialize G4 kernel
|
|
runManager->Initialize();
|
|
// get the pointer to the User Interface manager
|
|
G4UImanager* UI = G4UImanager::GetUIpointer();
|
|
G4UIsession * session = new G4UIGAG;
|
|
session->SessionStart();
|
|
delete session;
|
|
// job termination
|
|
#ifdef G4VIS_USE
|
|
delete visManager;
|
|
#endif
|
|
delete runManager;
|
|
return 0;
|
|
}
|
|
|