File indexing completed on 2025-02-23 09:20:12
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 #include "G4MIRDThyroid.hh"
0033
0034 #include "globals.hh"
0035 #include "G4SystemOfUnits.hh"
0036 #include "G4SDManager.hh"
0037 #include "G4VisAttributes.hh"
0038 #include "G4HumanPhantomMaterial.hh"
0039 #include "G4RotationMatrix.hh"
0040 #include "G4ThreeVector.hh"
0041 #include "G4VPhysicalVolume.hh"
0042 #include "G4PVPlacement.hh"
0043 #include "G4Tubs.hh"
0044 #include "G4Box.hh"
0045 #include "G4VSolid.hh"
0046 #include "G4SubtractionSolid.hh"
0047 #include "G4HumanPhantomColour.hh"
0048
0049 G4VPhysicalVolume* G4MIRDThyroid::Construct(const G4String& volumeName,G4VPhysicalVolume* mother,
0050 const G4String& colourName, G4bool wireFrame, G4bool)
0051 {
0052
0053 G4cout << "Construct " << volumeName <<" with mother "<<mother->GetName()<<G4endl;
0054
0055 auto* material = new G4HumanPhantomMaterial();
0056 auto* soft = material -> GetMaterial("soft_tissue");
0057 delete material;
0058
0059 G4double z= 4.20*cm;
0060 G4double rmin= 0. * cm;
0061 G4double rmax= 1.85 *cm;
0062 G4double startphi = 0. * degree;
0063 G4double deltaphi= 180. * degree;
0064
0065 auto* LobOfThyroidOut = new G4Tubs("LobOfThyroidOut",
0066 rmin, rmax,z/2.,
0067 startphi, deltaphi);
0068
0069 z= 4.50*cm;
0070 rmax= 0.83 * cm;
0071 deltaphi= 360. * degree;
0072 auto* LobOfThyroidIn = new G4Tubs("LobOfThyroidIn",
0073 rmin, rmax,z/2.,
0074 startphi, deltaphi);
0075
0076 G4double xx = 3.72*cm;
0077 G4double yy= 3.72*cm;
0078 G4double zz= 20.00*cm;
0079 auto* SubtrThyroid = new G4Box("SubtrThyroid",
0080 xx/2., yy/2., zz/2.);
0081
0082
0083 auto* FirstThyroid = new G4SubtractionSolid("FirstThyroid",
0084 LobOfThyroidOut,
0085 LobOfThyroidIn);
0086
0087 auto* relative_matrix = new G4RotationMatrix();
0088 relative_matrix -> rotateX(-50.* degree);
0089
0090 auto* SecondThyroid = new G4SubtractionSolid("SecondThyroid",
0091 FirstThyroid,
0092 SubtrThyroid,
0093 relative_matrix,
0094 G4ThreeVector(0.0 *cm,0.0 *cm, 4.20*cm));
0095
0096 auto* relative_matrix_2 = new G4RotationMatrix();
0097 relative_matrix_2 -> rotateX(50.* degree);
0098
0099 auto* thyroid = new G4SubtractionSolid("SecondThyroid",
0100 SecondThyroid,
0101 SubtrThyroid,
0102 relative_matrix_2,
0103 G4ThreeVector(0.0 *cm,0.0 *cm, -5.40*cm));
0104
0105 auto* logicThyroid = new G4LogicalVolume(thyroid, soft,
0106 "ThyroidVolume",
0107 nullptr, nullptr, nullptr);
0108
0109 auto* rm = new G4RotationMatrix();
0110 rm->rotateZ(180.*degree);
0111 G4VPhysicalVolume* physThyroid = new G4PVPlacement(rm,
0112
0113 G4ThreeVector(0.0*cm,-3.91*cm, -5.65*cm),
0114 "physicalThyroid",
0115 logicThyroid,
0116 mother,
0117 false,
0118 0,true);
0119
0120
0121
0122 auto* colourPointer = new G4HumanPhantomColour();
0123 G4Colour colour = colourPointer -> GetColour(colourName);
0124 auto* ThyroidVisAtt = new G4VisAttributes(colour);
0125 ThyroidVisAtt->SetForceSolid(wireFrame);
0126 logicThyroid->SetVisAttributes(ThyroidVisAtt);
0127
0128 G4cout << "Thyroid created !!!!!!" << G4endl;
0129
0130
0131 G4double ThyroidVol = logicThyroid->GetSolid()->GetCubicVolume();
0132 G4cout << "Volume of Thyroid = " << ThyroidVol/cm3 << " cm^3" << G4endl;
0133
0134
0135 G4String ThyroidMat = logicThyroid->GetMaterial()->GetName();
0136 G4cout << "Material of Thyroid = " << ThyroidMat << G4endl;
0137
0138
0139 G4double ThyroidDensity = logicThyroid->GetMaterial()->GetDensity();
0140 G4cout << "Density of Material = " << ThyroidDensity*cm3/g << " g/cm^3" << G4endl;
0141
0142
0143 G4double ThyroidMass = (ThyroidVol)*ThyroidDensity;
0144 G4cout << "Mass of Thyroid = " << ThyroidMass/gram << " g" << G4endl;
0145
0146
0147 return physThyroid;
0148 }