- Timestamp:
- Jan 8, 2010, 3:02:48 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/advanced/xray_fluorescence/src/XrayFluoDetectorConstruction.cc
r807 r1230 59 59 60 60 61 #include "G4Region.hh"62 #include "G4RegionStore.hh"61 //#include "G4Region.hh" 62 //#include "G4RegionStore.hh" 63 63 64 64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 66 66 67 67 XrayFluoDetectorConstruction::XrayFluoDetectorConstruction() 68 : detectorType(0),sampleGranularity(false), phaseSpaceFlag(false),68 : aNavigator(0), detectorType(0),sampleGranularity(false), phaseSpaceFlag(false), 69 69 DeviceSizeX(0), DeviceSizeY(0),DeviceThickness(0), 70 70 solidWorld(0),logicWorld(0),physiWorld(0), … … 83 83 { 84 84 materials = XrayFluoNistMaterials::GetInstance(); 85 86 aNavigator = new G4Navigator(); 85 87 86 88 DefineDefaultMaterials(); … … 89 91 NbOfPixelColumns = 1; // should be 1 90 92 NbOfPixels = NbOfPixelRows*NbOfPixelColumns; 91 PixelSizeXY = std::sqrt(40.) * mm;// should be std::sqrt(40) * mm93 PixelSizeXY = 7 * cm;// should be std::sqrt(40) * mm 92 94 PixelThickness = 3.5 * mm; //should be 3.5 mm 93 95 … … 95 97 G4cout << "PixelSizeXY(cm): "<< PixelSizeXY/cm << G4endl; 96 98 97 ContactSizeXY = std::sqrt(40.) * mm; //std::sqrt(40) * mm; //should be the same as PixelSizeXY99 ContactSizeXY = PixelSizeXY; //std::sqrt(40) * mm; //should be the same as PixelSizeXY 98 100 SampleThickness = 4 * mm; 99 101 SampleSizeXY = 3. * cm; … … 132 134 ComputeApparateParameters(); 133 135 134 G4String regName = "SampleRegion";135 sampleRegion = new G4Region(regName);136 // G4String regName = "SampleRegion"; 137 //sampleRegion = new G4Region(regName); 136 138 137 139 if (!phaseSpaceFlag) SetDetectorType(defaultDetectorType); … … 205 207 //define materials of the apparate 206 208 207 sampleMaterial = materials->GetMaterial(" Mars1");209 sampleMaterial = materials->GetMaterial("Dolorite"); 208 210 Dia1Material = materials->GetMaterial("G4_Pb"); 209 211 Dia3Material = materials->GetMaterial("Galactic"); 210 pixelMaterial = materials->GetMaterial("G4_Si"); 211 OhmicPosMaterial = materials->GetMaterial("G4_Cu"); 212 pixelMaterial = materials->GetMaterial("SiLi"); 213 //pixelMaterial = materials->GetMaterial(detectorType->GetDetectorMaterial()); 214 OhmicPosMaterial = materials->GetMaterial("Cu"); 212 215 OhmicNegMaterial = materials->GetMaterial("G4_Pb"); 213 216 defaultMaterial = materials->GetMaterial("Galactic"); … … 246 249 //ComputeApparateParameters(); 247 250 248 //world 251 //world and associated navigator 249 252 250 253 solidWorld = new G4Box("World", //its name … … 261 264 false, //no boolean operation 262 265 0); //copy number 266 267 aNavigator->SetWorldVolume(physiWorld); 268 263 269 264 270 //HPGeDetector … … 378 384 PixelCopyNb += PixelCopyNb; 379 385 G4cout << "PixelCopyNb: " << PixelCopyNb << G4endl; 380 386 } 381 387 382 388 } … … 611 617 // cut per region 612 618 613 logicSample->SetRegion(sampleRegion);614 sampleRegion->AddRootLogicalVolume(logicSample);619 //logicSample->SetRegion(sampleRegion); 620 //sampleRegion->AddRootLogicalVolume(logicSample); 615 621 616 622 … … 758 764 759 765 760 G4cout << "Material Change in Progress " << newMaterial << G4endl;766 G4cout << "Material Change in Progress " << newMaterial << G4endl; 761 767 sampleMaterial = materials->GetMaterial(newMaterial); 762 768 logicSample->SetMaterial(sampleMaterial);
Note: See TracChangeset
for help on using the changeset viewer.