80 G4cout <<
" constructing parallel world " << G4endl;
87 G4cout <<
" B02ImportanceDetectorConstruction:: ghostWorldName = "
97 G4double innerRadiusShield = 0*cm;
98 G4double outerRadiusShield = 100*cm;
99 G4double heightShield = 5*cm;
100 G4double startAngleShield = 0*deg;
101 G4double spanningAngleShield = 360*deg;
108 spanningAngleShield);
119 G4double startz = -85*cm;
121 for (i=1; i<=18; i++) {
125 G4double pos_x = 0*cm;
126 G4double pos_y = 0*cm;
127 G4double pos_z = startz + (i-1) * (2*heightShield);
130 G4ThreeVector(pos_x, pos_y, pos_z),
145 innerRadiusShield = 0*cm;
147 outerRadiusShield = 100*cm;
150 startAngleShield = 0*deg;
151 spanningAngleShield = 360*deg;
158 spanningAngleShield);
167 G4double pos_x = 0*cm;
168 G4double pos_y = 0*cm;
170 G4double pos_z = 95*cm;
173 G4ThreeVector(pos_x, pos_y, pos_z),
272 G4String concreteSDname =
"ConcreteSD";
281 SDman->AddNewDetector( MFDet );
287 MFDet->SetFilter(neutronFilter);
289 for (std::vector<G4LogicalVolume *>::iterator it =
293 SetSensitiveDetector((*it)->GetName(), MFDet);
298 MFDet->RegisterPrimitive(scorer0);
301 scorer1->Weighted(
true);
302 MFDet->RegisterPrimitive(scorer1);
305 MFDet->RegisterPrimitive(scorer2);
309 MFDet->RegisterPrimitive(scorer3);
312 MFDet->RegisterPrimitive(scorer4);
315 scorer5->Weighted(
true);
316 MFDet->RegisterPrimitive(scorer5);
319 scorer6->Weighted(
true);
320 scorer6->MultiplyKineticEnergy(
true);
321 MFDet->RegisterPrimitive(scorer6);
324 scorer7->Weighted(
true);
325 scorer7->DivideByVelocity(
true);
326 MFDet->RegisterPrimitive(scorer7);
329 scorer8->Weighted(
true);
330 scorer8->MultiplyKineticEnergy(
true);
331 scorer8->DivideByVelocity(
true);
332 MFDet->RegisterPrimitive(scorer8);
339 G4cout <<
" B02ImportanceDetectorConstruction:: Creating Importance Store "
343 G4Exception(
"B02ImportanceDetectorConstruction::CreateImportanceStore"
344 ,
"exampleB02_0001",RunMustBeAborted
345 ,
"no physical volumes created yet!");
352 G4IStore *istore = G4IStore::GetInstance(GetName());
358 istore->AddImportanceGeometryCell(1, gWorldVolumeCell);
362 for (cell=1; cell<=18; cell++) {
364 G4cout <<
" adding cell: " << cell
365 <<
" replica: " << gCell.GetReplicaNumber()
366 <<
" name: " << gCell.GetPhysicalVolume().GetName() << G4endl;
367 imp = std::pow(2.0,cell-1);
369 G4cout <<
"Going to assign importance: " << imp <<
", to volume: "
370 << gCell.GetPhysicalVolume().GetName() << G4endl;
372 istore->AddImportanceGeometryCell(imp, gCell.GetPhysicalVolume(), cell);
382 imp = std::pow(2.0,17);
383 istore->AddImportanceGeometryCell(imp, gCell.GetPhysicalVolume(), 19);
394 G4cout <<
" B02ImportanceDetectorConstruction:: Creating Importance Store "
398 G4Exception(
"B02ImportanceDetectorConstruction::CreateWeightWindowStore"
399 ,
"exampleB02_0002",RunMustBeAborted
400 ,
"no physical volumes created yet!");
411 std::set<G4double, std::less<G4double> > enBounds;
412 enBounds.insert(1 * GeV);
413 wwstore->SetGeneralUpperEnergyBounds(enBounds);
416 G4double lowerWeight =1;
417 std::vector<G4double> lowerWeights;
419 lowerWeights.push_back(1);
421 wwstore->AddLowerWeights(gWorldCell, lowerWeights);
424 for (cell=1; cell<=18; cell++) {
426 G4cout <<
" adding cell: " << cell
427 <<
" replica: " << gCell.GetReplicaNumber()
428 <<
" name: " << gCell.GetPhysicalVolume().GetName() << G4endl;
430 lowerWeight = 1./std::pow(2., n++);
431 G4cout <<
"Going to assign lower weight: " << lowerWeight
433 << gCell.GetPhysicalVolume().GetName() << G4endl;
434 lowerWeights.clear();
435 lowerWeights.push_back(lowerWeight);
436 wwstore->AddLowerWeights(gCell, lowerWeights);
446 wwstore->AddLowerWeights(gCell, lowerWeights);