85 G4int numberOfEvents = 100;
87 G4long myseed = 345354;
89 auto* runManager = G4RunManagerFactory::CreateRunManager();
90 runManager->SetNumberOfThreads(2);
92 G4Random::setTheSeed(myseed);
96 runManager->SetUserInitialization(detector);
100 G4String parallelName(
"ParallelBiasingWorld");
103 detector->RegisterParallelWorld(pdet);
115 runManager->SetUserInitialization(physlist);
120 runManager->SetUserInitialization(actions);
126 runManager->Initialize();
129 G4cout <<
" ghost world: " << pdet->GetName() << G4endl;
132 G4IStore *aIstore = G4IStore::GetInstance(pdet->GetName());
137 aIstore->AddImportanceGeometryCell(1, gWorldVolumeCell);
141 for (cell=1; cell<=18; cell++) {
143 G4cout <<
" adding cell: " << cell
144 <<
" replica: " << gCell.GetReplicaNumber()
145 <<
" name: " << gCell.GetPhysicalVolume().GetName() << G4endl;
146 G4double imp = std::pow(2.0,cell-1);
148 aIstore->AddImportanceGeometryCell(imp, gCell.GetPhysicalVolume(), cell);
158 G4double imp = std::pow(2.0,17);
159 aIstore->AddImportanceGeometryCell(imp, gCell.GetPhysicalVolume(), 19);
162 G4UImanager* UImanager = G4UImanager::GetUIpointer();
163 G4String command1 =
"/control/cout/setCoutFile fileName";
164 UImanager->ApplyCommand(command1);
167 + G4UIcommand::ConvertToString(numberOfEvents);;
168 UImanager->ApplyCommand(command2);