Geant4  10.00.p01
DicomDetectorConstruction.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: DicomDetectorConstruction.cc 74809 2013-10-22 09:49:26Z gcosmo $
27 //
30 //
31 
32 #include "globals.hh"
33 
34 #include "G4Box.hh"
35 #include "G4LogicalVolume.hh"
36 #include "G4VPhysicalVolume.hh"
37 #include "G4PVPlacement.hh"
38 #include "G4Material.hh"
39 #include "G4Element.hh"
40 #include "G4UIcommand.hh"
41 #include "G4PhysicalConstants.hh"
42 #include "G4SystemOfUnits.hh"
43 
46 
47 #include "DicomRunAction.hh"
48 #include "DicomRun.hh"
49 
50 #include "G4VisAttributes.hh"
51 
52 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
55  fAir(0),
56 
57  fWorld_solid(0),
58  fWorld_logic(0),
59  fWorld_phys(0),
60 
61  fContainer_solid(0),
62  fContainer_logic(0),
63  fContainer_phys(0),
64 
65  fNoFiles(0),
66  fMateIDs(0),
67 
68  fZSliceHeaderMerged(0),
69 
70  fNVoxelX(0),
71  fNVoxelY(0),
72  fNVoxelZ(0),
73  fVoxelHalfDimX(0),
74  fVoxelHalfDimY(0),
75  fVoxelHalfDimZ(0),
76 
77  fConstructed(false)
78 {
79 
80 }
81 
82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84 {
85 }
86 
87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
89 {
90  if(!fConstructed || fWorld_phys == 0) {
91  fConstructed = true;
93 
94  //----- Build world
95  G4double worldXDimension = 1.*m;
96  G4double worldYDimension = 1.*m;
97  G4double worldZDimension = 1.*m;
98 
99  fWorld_solid = new G4Box( "WorldSolid",
100  worldXDimension,
101  worldYDimension,
102  worldZDimension );
103 
105  fAir,
106  "WorldLogical",
107  0, 0, 0 );
108 
109  fWorld_phys = new G4PVPlacement( 0,
110  G4ThreeVector(0,0,0),
111  "World",
112  fWorld_logic,
113  0,
114  false,
115  0 );
116 
117  ReadPhantomData();
118 
121  }
122  return fWorld_phys;
123 }
124 
125 
126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
128 {
129  // Creating elements :
130  G4double z, a, density;
132 
133  G4Element* elC = new G4Element( name = "Carbon",
134  symbol = "C",
135  z = 6.0, a = 12.011 * g/mole );
136  G4Element* elH = new G4Element( name = "Hydrogen",
137  symbol = "H",
138  z = 1.0, a = 1.008 * g/mole );
139  G4Element* elN = new G4Element( name = "Nitrogen",
140  symbol = "N",
141  z = 7.0, a = 14.007 * g/mole );
142  G4Element* elO = new G4Element( name = "Oxygen",
143  symbol = "O",
144  z = 8.0, a = 16.00 * g/mole );
145  G4Element* elNa = new G4Element( name = "Sodium",
146  symbol = "Na",
147  z= 11.0, a = 22.98977* g/mole );
148  G4Element* elS = new G4Element( name = "Sulfur",
149  symbol = "S",
150  z = 16.0,a = 32.065* g/mole );
151  G4Element* elCl = new G4Element( name = "Chlorine",
152  symbol = "P",
153  z = 17.0, a = 35.453* g/mole );
154  G4Element* elK = new G4Element( name = "Potassium",
155  symbol = "P",
156  z = 19.0, a = 30.0983* g/mole );
157  G4Element* elP = new G4Element( name = "Phosphorus",
158  symbol = "P",
159  z = 30.0, a = 30.973976* g/mole );
160  G4Element* elFe = new G4Element( name = "Iron",
161  symbol = "Fe",
162  z = 26, a = 56.845* g/mole );
163  G4Element* elMg = new G4Element( name = "Magnesium",
164  symbol = "Mg",
165  z = 12.0, a = 24.3050* g/mole );
166  G4Element* elCa = new G4Element( name="Calcium",
167  symbol = "Ca",
168  z = 20.0, a = 40.078* g/mole );
169 
170  // Creating Materials :
171  G4int numberofElements;
172 
173  // Air
174  fAir = new G4Material( "Air",
175  1.290*mg/cm3,
176  numberofElements = 2 );
177  fAir->AddElement(elN, 0.7);
178  fAir->AddElement(elO, 0.3);
179 
180  // Lung Inhale
181  G4Material* lunginhale = new G4Material( "LungInhale",
182  density = 0.217*g/cm3,
183  numberofElements = 9);
184  lunginhale->AddElement(elH,0.103);
185  lunginhale->AddElement(elC,0.105);
186  lunginhale->AddElement(elN,0.031);
187  lunginhale->AddElement(elO,0.749);
188  lunginhale->AddElement(elNa,0.002);
189  lunginhale->AddElement(elP,0.002);
190  lunginhale->AddElement(elS,0.003);
191  lunginhale->AddElement(elCl,0.002);
192  lunginhale->AddElement(elK,0.003);
193 
194  // Lung exhale
195  G4Material* lungexhale = new G4Material( "LungExhale",
196  density = 0.508*g/cm3,
197  numberofElements = 9 );
198  lungexhale->AddElement(elH,0.103);
199  lungexhale->AddElement(elC,0.105);
200  lungexhale->AddElement(elN,0.031);
201  lungexhale->AddElement(elO,0.749);
202  lungexhale->AddElement(elNa,0.002);
203  lungexhale->AddElement(elP,0.002);
204  lungexhale->AddElement(elS,0.003);
205  lungexhale->AddElement(elCl,0.002);
206  lungexhale->AddElement(elK,0.003);
207 
208  // Adipose tissue
209  G4Material* adiposeTissue = new G4Material( "AdiposeTissue",
210  density = 0.967*g/cm3,
211  numberofElements = 7);
212  adiposeTissue->AddElement(elH,0.114);
213  adiposeTissue->AddElement(elC,0.598);
214  adiposeTissue->AddElement(elN,0.007);
215  adiposeTissue->AddElement(elO,0.278);
216  adiposeTissue->AddElement(elNa,0.001);
217  adiposeTissue->AddElement(elS,0.001);
218  adiposeTissue->AddElement(elCl,0.001);
219 
220  // Breast
221  G4Material* breast = new G4Material( "Breast",
222  density = 0.990*g/cm3,
223  numberofElements = 8 );
224  breast->AddElement(elH,0.109);
225  breast->AddElement(elC,0.506);
226  breast->AddElement(elN,0.023);
227  breast->AddElement(elO,0.358);
228  breast->AddElement(elNa,0.001);
229  breast->AddElement(elP,0.001);
230  breast->AddElement(elS,0.001);
231  breast->AddElement(elCl,0.001);
232 
233  // Water
234  G4Material* water = new G4Material( "Water",
235  density = 1.0*g/cm3,
236  numberofElements = 2 );
237  water->AddElement(elH,0.112);
238  water->AddElement(elO,0.888);
239 
240  // Muscle
241  G4Material* muscle = new G4Material( "Muscle",
242  density = 1.061*g/cm3,
243  numberofElements = 9 );
244  muscle->AddElement(elH,0.102);
245  muscle->AddElement(elC,0.143);
246  muscle->AddElement(elN,0.034);
247  muscle->AddElement(elO,0.710);
248  muscle->AddElement(elNa,0.001);
249  muscle->AddElement(elP,0.002);
250  muscle->AddElement(elS,0.003);
251  muscle->AddElement(elCl,0.001);
252  muscle->AddElement(elK,0.004);
253 
254  // Liver
255  G4Material* liver = new G4Material( "Liver",
256  density = 1.071*g/cm3,
257  numberofElements = 9);
258  liver->AddElement(elH,0.102);
259  liver->AddElement(elC,0.139);
260  liver->AddElement(elN,0.030);
261  liver->AddElement(elO,0.716);
262  liver->AddElement(elNa,0.002);
263  liver->AddElement(elP,0.003);
264  liver->AddElement(elS,0.003);
265  liver->AddElement(elCl,0.002);
266  liver->AddElement(elK,0.003);
267 
268  // Trabecular Bone
269  G4Material* trabecularBone = new G4Material( "TrabecularBone",
270  density = 1.159*g/cm3,
271  numberofElements = 12 );
272  trabecularBone->AddElement(elH,0.085);
273  trabecularBone->AddElement(elC,0.404);
274  trabecularBone->AddElement(elN,0.058);
275  trabecularBone->AddElement(elO,0.367);
276  trabecularBone->AddElement(elNa,0.001);
277  trabecularBone->AddElement(elMg,0.001);
278  trabecularBone->AddElement(elP,0.034);
279  trabecularBone->AddElement(elS,0.002);
280  trabecularBone->AddElement(elCl,0.002);
281  trabecularBone->AddElement(elK,0.001);
282  trabecularBone->AddElement(elCa,0.044);
283  trabecularBone->AddElement(elFe,0.001);
284 
285  // Dense Bone
286  G4Material* denseBone = new G4Material( "DenseBone",
287  density = 1.575*g/cm3,
288  numberofElements = 11 );
289  denseBone->AddElement(elH,0.056);
290  denseBone->AddElement(elC,0.235);
291  denseBone->AddElement(elN,0.050);
292  denseBone->AddElement(elO,0.434);
293  denseBone->AddElement(elNa,0.001);
294  denseBone->AddElement(elMg,0.001);
295  denseBone->AddElement(elP,0.072);
296  denseBone->AddElement(elS,0.003);
297  denseBone->AddElement(elCl,0.001);
298  denseBone->AddElement(elK,0.001);
299  denseBone->AddElement(elCa,0.146);
300 
301  //----- Put the materials in a vector
302  fOriginalMaterials.push_back(fAir); // rho = 0.00129
303  fOriginalMaterials.push_back(lunginhale); // rho = 0.217
304  fOriginalMaterials.push_back(lungexhale); // rho = 0.508
305  fOriginalMaterials.push_back(adiposeTissue); // rho = 0.967
306  fOriginalMaterials.push_back(breast ); // rho = 0.990
307  fOriginalMaterials.push_back(water); // rho = 1.018
308  fOriginalMaterials.push_back(muscle); // rho = 1.061
309  fOriginalMaterials.push_back(liver); // rho = 1.071
310  fOriginalMaterials.push_back(trabecularBone); // rho = 1.159
311  fOriginalMaterials.push_back(denseBone); // rho = 1.575
312 
313 }
314 
315 
316 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
318 {
319 
320  G4String dataFile = "Data.dat";
321  std::ifstream finDF(dataFile.c_str());
322  G4String fname;
323  if(finDF.good() != 1 ) {
324  G4String descript = "Problem reading data file: "+dataFile;
325  G4Exception(" DicomDetectorConstruction::ReadPhantomData",
326  "",
328  descript);
329  }
330 
331  G4int compression;
332  finDF >> compression; // not used here
333 
334  finDF >> fNoFiles;
335  for(G4int i = 0; i < fNoFiles; i++ ) {
336  finDF >> fname;
337  //--- Read one data file
338  fname += ".g4dcm";
339  ReadPhantomDataFile(fname);
340  }
341 
342  //----- Merge data headers
344 
345  finDF.close();
346 
347 }
348 
349 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
351 {
352 #ifdef G4VERBOSE
353  G4cout << " DicomDetectorConstruction::ReadPhantomDataFile opening file " << fname << G4endl;
354 #endif
355  std::ifstream fin(fname.c_str(), std::ios_base::in);
356  if( !fin.is_open() ) {
357  G4Exception("DicomDetectorConstruction::ReadPhantomDataFile",
358  "",
360  G4String("File not found " + fname ).c_str());
361  }
362  //----- Define density differences (maximum density difference to create a new material)
363  char* part = getenv( "DICOM_CHANGE_MATERIAL_DENSITY" );
364  G4double densityDiff = -1.;
365  if( part ) densityDiff = G4UIcommand::ConvertToDouble(part);
366  if( densityDiff != -1. ) {
367  for( unsigned int ii = 0; ii < fOriginalMaterials.size(); ii++ ){
368  fDensityDiffs[ii] = densityDiff; //currently all materials with same difference
369  }
370  }else {
371  if( fMaterials.size() == 0 ) { // do it only for first slice
372  for( unsigned int ii = 0; ii < fOriginalMaterials.size(); ii++ ){
373  fMaterials.push_back( fOriginalMaterials[ii] );
374  }
375  }
376  }
377 
378  //----- Read data header
379  DicomPhantomZSliceHeader* sliceHeader = new DicomPhantomZSliceHeader( fin );
380  fZSliceHeaders.push_back( sliceHeader );
381 
382  //----- Read material indices
383  G4int nVoxels = sliceHeader->GetNoVoxels();
384 
385  //--- If first slice, initiliaze fMateIDs
386  if( fZSliceHeaders.size() == 1 ) {
387  //fMateIDs = new unsigned int[fNoFiles*nVoxels];
388  fMateIDs = new size_t[fNoFiles*nVoxels];
389 
390  }
391 
392  unsigned int mateID;
393  // number of voxels from previously read slices
394  G4int voxelCopyNo = (fZSliceHeaders.size()-1)*nVoxels;
395  for( G4int ii = 0; ii < nVoxels; ii++, voxelCopyNo++ ){
396  fin >> mateID;
397  fMateIDs[voxelCopyNo] = mateID;
398  }
399 
400  //----- Read material densities and build new materials if two voxels have same
401  // material but its density is in a different density interval (size of
402  // density intervals defined by densityDiff)
404  // number of voxels from previously read slices
405  voxelCopyNo = (fZSliceHeaders.size()-1)*nVoxels;
406  for( G4int ii = 0; ii < nVoxels; ii++, voxelCopyNo++ ){
407  fin >> density;
408 
409  //-- Get material from list of original materials
410  mateID = fMateIDs[voxelCopyNo];
411  G4Material* mateOrig = fOriginalMaterials[mateID];
412 
413  //-- Get density bin: middle point of the bin in which the current density is included
414  G4String newMateName = mateOrig->GetName();
415  float densityBin = 0.;
416  if( densityDiff != -1.) {
417  densityBin = fDensityDiffs[mateID] * (G4int(density/fDensityDiffs[mateID])+0.5);
418  //-- Build the new material name
419  newMateName += G4UIcommand::ConvertToString(densityBin);
420  }
421 
422  //-- Look if a material with this name is already created
423  // (because a previous voxel was already in this density bin)
424  unsigned int im;
425  for( im = 0; im < fMaterials.size(); im++ ){
426  if( fMaterials[im]->GetName() == newMateName ) {
427  break;
428  }
429  }
430  //-- If material is already created use index of this material
431  if( im != fMaterials.size() ) {
432  fMateIDs[voxelCopyNo] = im;
433  //-- else, create the material
434  } else {
435  if( densityDiff != -1.) {
436  fMaterials.push_back( BuildMaterialWithChangingDensity( mateOrig,
437  densityBin, newMateName ) );
438  fMateIDs[voxelCopyNo] = fMaterials.size()-1;
439  } else {
440  G4cerr << " im " << im << " < " << fMaterials.size() << " name "
441  << newMateName << G4endl;
442  G4Exception("DicomDetectorConstruction::ReadPhantomDataFile",
443  "",
445  "Wrong index in material"); //it should never reach here
446  }
447  }
448  }
449 
450 }
451 
452 
453 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
455 {
456  //----- Images must have the same dimension ...
458  for( unsigned int ii = 1; ii < fZSliceHeaders.size(); ii++ ) {
460  };
461 
462 }
463 
464 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
466  float density, G4String newMateName )
467 {
468  //----- Copy original material, but with new density
469  G4int nelem = origMate->GetNumberOfElements();
470  G4Material* mate = new G4Material( newMateName, density*g/cm3, nelem,
471  kStateUndefined, STP_Temperature );
472 
473  for( G4int ii = 0; ii < nelem; ii++ ){
474  G4double frac = origMate->GetFractionVector()[ii];
475  G4Element* elem = const_cast<G4Element*>(origMate->GetElement(ii));
476  mate->AddElement( elem, frac );
477  }
478 
479  return mate;
480 }
481 
482 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
484 {
485  //---- Extract number of voxels and voxel dimensions
489 
493 #ifdef G4VERBOSE
494  G4cout << " fNVoxelX " << fNVoxelX << " fVoxelHalfDimX " << fVoxelHalfDimX <<G4endl;
495  G4cout << " fNVoxelY " << fNVoxelY << " fVoxelHalfDimY " << fVoxelHalfDimY <<G4endl;
496  G4cout << " fNVoxelZ " << fNVoxelZ << " fVoxelHalfDimZ " << fVoxelHalfDimZ <<G4endl;
497  G4cout << " totalPixels " << fNVoxelX*fNVoxelY*fNVoxelZ << G4endl;
498 #endif
499 
500  //----- Define the volume that contains all the voxels
501  fContainer_solid = new G4Box("phantomContainer",fNVoxelX*fVoxelHalfDimX,
506  //the material is not important, it will be fully filled by the voxels
507  fMaterials[0],
508  "phantomContainer",
509  0, 0, 0 );
510  //--- Place it on the world
514  G4ThreeVector posCentreVoxels(fOffsetX,fOffsetY,fOffsetZ);
515 #ifdef G4VERBOSE
516  G4cout << " placing voxel container volume at " << posCentreVoxels << G4endl;
517 #endif
519  new G4PVPlacement(0, // rotation
520  posCentreVoxels,
521  fContainer_logic, // The logic volume
522  "phantomContainer", // Name
523  fWorld_logic, // Mother
524  false, // No op. bool.
525  1); // Copy number
526 
527  //fContainer_logic->SetVisAttributes(new G4VisAttributes(G4Colour(1.,0.,0.)));
528 }
529 
530 
531 #include "G4SDManager.hh"
533 #include "G4PSDoseDeposit.hh"
534 #include "G4PSDoseDeposit3D.hh"
535 
536 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
538 {
539 
540  G4cout << "\n\n\n\n\t SET SCORER : " << voxel_logic->GetName() << " \n\n\n" << G4endl;
541 
542 
543  scorers.insert(voxel_logic);
544 
545  /*
546  G4SDManager* SDman = G4SDManager::GetSDMpointer();
547  //
548  // Sensitive Detector Name
549  G4String concreteSDname = "phantomSD";
550 
551  //------------------------
552  // MultiFunctionalDetector
553  //------------------------
554  //
555  // Define MultiFunctionalDetector with name.
556  G4MultiFunctionalDetector* MFDet = new G4MultiFunctionalDetector(concreteSDname);
557  SDman->AddNewDetector( MFDet ); // Register SD to SDManager
558 
559  voxel_logic->SetSensitiveDetector(MFDet);
560 
561  G4PSDoseDeposit* scorer = new G4PSDoseDeposit("DoseDeposit");
562  MFDet->RegisterPrimitive(scorer);*/
563 
564 }
565 
566 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
567 
569 {
570 
571  G4cout << "\n\n\n\n\t CONSTRUCT SD AND FIELD \n\n\n" << G4endl;
572 
573  //G4SDManager* SDman = G4SDManager::GetSDMpointer();
574 
575  //SDman->SetVerboseLevel(1);
576 
577  //
578  // Sensitive Detector Name
579  G4String concreteSDname = "phantomSD";
580  std::vector<G4String> scorer_names;
581  scorer_names.push_back(concreteSDname);
582  //------------------------
583  // MultiFunctionalDetector
584  //------------------------
585  //
586  // Define MultiFunctionalDetector with name.
587  // declare MFDet as a MultiFunctionalDetector scorer
588  G4MultiFunctionalDetector* MFDet = new G4MultiFunctionalDetector(concreteSDname);
589  //SDman->AddNewDetector( MFDet ); // Register SD to SDManager
590  //G4VPrimitiveScorer* dosedep = new G4PSDoseDeposit("DoseDeposit");
591  G4VPrimitiveScorer* dosedep = new G4PSDoseDeposit3D("DoseDeposit", fNVoxelX, fNVoxelY,
592  fNVoxelZ);
593  MFDet->RegisterPrimitive(dosedep);
594 
595  for(std::set<G4LogicalVolume*>::iterator ite = scorers.begin(); ite != scorers.end(); ++ite) {
596  SetSensitiveDetector(*ite, MFDet);
597  }
598 
599  /*if(DicomRunAction::Instance()->GetDicomRun()) {
600  DicomRunAction::Instance()->GetDicomRun()->ConstructMFD(scorer_names);
601  }*/
602 
603 
604 }
605 
606 
G4bool RegisterPrimitive(G4VPrimitiveScorer *)
void SetScorer(G4LogicalVolume *voxel_logic)
Definition of the DicomDetectorConstruction class.
G4String symbol
Definition: TRTMaterials.hh:40
G4String GetName() const
CLHEP::Hep3Vector G4ThreeVector
G4double z
Definition: TRTMaterials.hh:39
Definition: G4Box.hh:63
Definition of the DicomRunAction class.
G4String name
Definition: TRTMaterials.hh:40
const G4String & GetName() const
Definition: G4Material.hh:176
std::vector< DicomPhantomZSliceHeader * > fZSliceHeaders
std::set< G4LogicalVolume * > scorers
G4Element * elC
Definition: TRTMaterials.hh:48
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:357
virtual G4VPhysicalVolume * Construct()
G4double a
Definition: TRTMaterials.hh:39
static const double mg
Definition: G4SIunits.hh:163
const G4Element * GetElement(G4int iel) const
Definition: G4Material.hh:200
int G4int
Definition: G4Types.hh:78
Definition of the DicomRun class.
DicomPhantomZSliceHeader * fZSliceHeaderMerged
G4Element * elN
Definition: TRTMaterials.hh:44
G4Element * elH
Definition: TRTMaterials.hh:50
G4double density
Definition: TRTMaterials.hh:39
G4Material * BuildMaterialWithChangingDensity(const G4Material *origMate, float density, G4String newMateName)
G4GLOB_DLL std::ostream G4cout
G4Element * elO
Definition: TRTMaterials.hh:46
DicomPhantomZSliceHeader class.
static G4double ConvertToDouble(const char *st)
Definition: G4UIcommand.cc:429
static const double cm3
Definition: G4SIunits.hh:108
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static const double g
Definition: G4SIunits.hh:162
static const double mole
Definition: G4SIunits.hh:265
#define G4endl
Definition: G4ios.hh:61
static const double m
Definition: G4SIunits.hh:110
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:345
size_t GetNumberOfElements() const
Definition: G4Material.hh:184
Definition of the DicomPhantomZSliceHeader class.
double G4double
Definition: G4Types.hh:76
std::vector< G4Material * > fMaterials
std::vector< G4Material * > fOriginalMaterials
void ReadPhantomDataFile(const G4String &fname)
const G4double * GetFractionVector() const
Definition: G4Material.hh:192
virtual void ConstructPhantom()=0
G4GLOB_DLL std::ostream G4cerr
std::map< G4int, G4double > fDensityDiffs