// $Id: g4Config.C,v 1.2 2006/03/30 11:47:27 dbertini Exp $ // // Configuration macro for Geant4 VirtualMC for Example01 void Config() { // RunConfiguration for Geant4 TG4RunConfiguration* runConfiguration // = new TG4RunConfiguration("geomRoot"); = new TG4RunConfiguration("geomVMCtoRoot"); // Switch on optical physics (not activated by default) TG4PhysicsListOptions options; options.SetOpticalPhysics(true); runConfiguration->SetPhysicsListOptions(options); // CbmRunConfiguration* runConfiguration // = new CbmRunConfiguration(); cout << "Geant4 has been created. 1 " << endl; // TGeant4 // TGeant4 *geant4= new TGeant4("TGeant4", "The Geant4 Monte Carlo", runConfiguration); TGeant4* geant4 = new TGeant4("TGeant4", "The Geant4 Monte Carlo", runConfiguration); // create the Specific stack CbmStack *stack = new CbmStack(1000); geant4->SetStack(stack); cout << "Geant4 has been created." << endl; // Customise Geant4 setting // (verbose level, global range cut, ..) TString configm(gSystem->Getenv("VMCWORKDIR")); configm = configm + "/gconfig/g4config.in"; cout << " -I g4Config() using g4conf macro: " << configm << endl; geant4->ProcessGeantMacro(configm.Data()); }