84{
85 G4int numberOfEvents = 100;
86
87 G4long myseed = 345354;
88
89 auto* runManager = G4RunManagerFactory::CreateRunManager();
90 runManager->SetNumberOfThreads(2);
91
92 G4Random::setTheSeed(myseed);
93
94
96 runManager->SetUserInitialization(detector);
97
98
99
100 G4String parallelName(
"ParallelBiasingWorld");
103 detector->RegisterParallelWorld(pdet);
104
105
106
107
109
111
112
113
114
115 runManager->SetUserInitialization(physlist);
116
117
118
120 runManager->SetUserInitialization(actions);
121
122
123
124
125
126 runManager->Initialize();
127
129 G4cout << " ghost world: " << pdet->GetName() << G4endl;
130
131
132 G4IStore *aIstore = G4IStore::GetInstance(pdet->GetName());
133
134
136
137 aIstore->AddImportanceGeometryCell(1, gWorldVolumeCell);
138
139
140 G4int cell(1);
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);
147
148 aIstore->AddImportanceGeometryCell(imp, gCell.GetPhysicalVolume(), cell);
149 }
150
151
152
153
154
155
157
158 G4double imp = std::pow(2.0,17);
159 aIstore->AddImportanceGeometryCell(imp, gCell.GetPhysicalVolume(), 19);
160
161
162 G4UImanager* UImanager = G4UImanager::GetUIpointer();
163 G4String command1 =
"/control/cout/setCoutFile fileName";
164 UImanager->ApplyCommand(command1);
165
167 + G4UIcommand::ConvertToString(numberOfEvents);;
168 UImanager->ApplyCommand(command2);
169
170
171
172
173
174 delete runManager;
175
176 return 0;
177}
G4GeometryCell GetGeometryCell(G4int i)
G4VPhysicalVolume & GetWorldVolumeAddress() const
void AddParallelWorldName(G4String &pname)