jour4e-FTF_BIC.cc File Reference

#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#include "G4UItcsh.hh"
#include "DetectorConstruction.hh"
#include "FTF_BIC.hh"
#include "PrimaryGeneratorAction.hh"
#include "RunAction.hh"
#include "EventAction.hh"
#include "SteppingAction.hh"
#include "SteppingVerbose.hh"

Include dependency graph for jour4e-FTF_BIC.cc:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 include "PhysicsList.hh"


Function Documentation

int main ( int  argc,
char **  argv 
)

include "PhysicsList.hh"

Definition at line 29 of file jour4e-FTF_BIC.cc.

00029                                {
00030  
00031   //my Verbose output class
00032   G4VSteppingVerbose::SetInstance(new SteppingVerbose);
00033     
00034   //Construct the default run manager
00035   G4RunManager* runManager = new G4RunManager;
00036 
00037   //set mandatory initialization classes
00038   //
00039   DetectorConstruction* detector  = new DetectorConstruction();
00040   runManager->SetUserInitialization(detector);
00041     
00042   ////PhysicsList* physics            = new PhysicsList();
00043   G4VUserPhysicsList* physics = new FTF_BIC;  
00044   runManager->SetUserInitialization(physics);
00045     
00046   PrimaryGeneratorAction* primary = new PrimaryGeneratorAction(detector);
00047   runManager->SetUserAction(primary);
00048   
00049   //set user action classes
00050   //
00051   RunAction* run_action = new RunAction(detector);
00052   runManager->SetUserAction(run_action);
00053    //
00054   EventAction* event_action = new EventAction(run_action);
00055   runManager->SetUserAction(event_action);
00056   //
00057   SteppingAction* step_action = new SteppingAction(detector, run_action,
00058                                                              event_action);
00059   runManager->SetUserAction(step_action);  
00060 
00061   //Initialize Geant4 kernel
00062   //
00063   runManager->Initialize();
00064 
00065   //get the pointer to the User Interface manager 
00066   G4UImanager* UI = G4UImanager::GetUIpointer();  
00067 
00068   if (argc!=1) {        // Batch mode 
00069     G4String command = "/control/execute ";
00070     G4String fileName = argv[1];
00071     UI->ApplyCommand(command+fileName);
00072   }
00073   
00074   else {                // Define UI terminal for interactive mode
00075          
00076 #ifdef G4VIS_USE
00077     G4VisManager* visManager = new G4VisExecutive;
00078     visManager->Initialize();
00079 #endif
00080      
00081     G4UIsession* session = 0;
00082 #ifdef G4UI_USE_TCSH
00083     session = new G4UIterminal(new G4UItcsh);      
00084 #else
00085     session = new G4UIterminal();
00086 #endif
00087     UI->ApplyCommand( "/control/execute vis.mac");                      
00088     session->SessionStart();
00089     delete session;
00090     
00091 #ifdef G4VIS_USE
00092     delete visManager;
00093 #endif    
00094   }
00095 
00096  //job termination
00097  //
00098  delete runManager;
00099  return 0;
00100 }


Generated on Fri Nov 21 10:21:40 2008 for jour4e by  doxygen 1.5.7.1