51 fNucleusMaterial1 = nucleus1;
52 fCytoplasmMaterial1 = cytoplasm1;
53 fNucleusMaterial2 = nucleus2;
54 fCytoplasmMaterial2 = cytoplasm2;
55 fNucleusMaterial3 = nucleus3;
56 fCytoplasmMaterial3 = cytoplasm3;
59 G4int shiftX, shiftY, shiftZ;
61 G4double denCyto1, denCyto2, denCyto3, denNucl1, denNucl2, denNucl3;
79 fMap = fopen(
"phantom.dat",
"r");
85 ncols = fscanf(fMap,
"%i %i %i",&fPhantomTotalPixels,&fNucleusTotalPixels,&fCytoplasmTotalPixels);
87 fMaterial =
new G4double[fPhantomTotalPixels];
88 fMass =
new G4double[fPhantomTotalPixels];
89 fTissueType =
new G4int[fPhantomTotalPixels];
94 ncols = fscanf(fMap,
"%lf %lf %lf",&fDimCellBoxX,&fDimCellBoxY,&fDimCellBoxZ);
101 if (nlines == 2) ncols = fscanf(fMap,
"%i %i %i",&shiftX,&shiftY,&shiftZ);
103 if (nlines == 3) ncols = fscanf(fMap,
"%lf %lf %lf",&denCyto1, &denCyto2, &denCyto3);
105 if (nlines == 4) ncols = fscanf(fMap,
"%lf %lf %lf",&denNucl1, &denNucl2, &denNucl3);
107 if (nlines > 4) ncols = fscanf(fMap,
"%lf %lf %lf %lf %lf %lf",&x,&y,&z,&mat,&den,&tmp);
109 if (ncols < 0)
break;
116 fMapCell[nlines-5]=
v;
117 fMaterial[nlines-5]=mat;
122 if( fMaterial[nlines-5] == 2 )
124 if( fMass[nlines-5] == 1 )
126 fTissueType[nlines-5]=2;
128 if( fMass[nlines-5] == 2 )
130 fTissueType[nlines-5]=2;
132 if( fMass[nlines-5] == 3 )
134 fTissueType[nlines-5]=2;
138 else if( fMaterial[nlines-5] == 1 )
140 if( fMass[nlines-5] == 1 )
142 fTissueType[nlines-5]=1;
144 if( fMass[nlines-5] == 2 )
146 fTissueType[nlines-5]=2;
148 if( fMass[nlines-5] == 3 )
150 fTissueType[nlines-5]=1;
157 if (std::abs(mat-2)<1.e-30)
159 if (std::abs(den-1)<1.e-30) density = denNucl1*(
g/
cm3);
160 if (std::abs(den-2)<1.e-30) density = denNucl2*(
g/
cm3);
161 if (std::abs(den-3)<1.e-30) density = denNucl3*(
g/
cm3);
162 fNucleusMass = fNucleusMass + density * fDimCellBoxX * fDimCellBoxY * fDimCellBoxZ ;
165 if (std::abs(mat-1)<1.e-30)
167 if (std::abs(den-1)<1e-30) density = denCyto1*(
g/
cm3);
168 if (std::abs(den-2)<1e-30) density = denCyto2*(
g/
cm3);
169 if (std::abs(den-3)<1e-30) density = denCyto3*(
g/
cm3);
170 fCytoplasmMass = fCytoplasmMass + density * fDimCellBoxX * fDimCellBoxY * fDimCellBoxZ ;
void SetColour(const G4Colour &)
void SetForceSolid(G4bool=true)
static constexpr double cm3
static constexpr double micrometer