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 #include "G4MIRDUterus.hh"
0031
0032 #include "globals.hh"
0033 #include "G4SystemOfUnits.hh"
0034 #include "G4SDManager.hh"
0035 #include "G4VisAttributes.hh"
0036 #include "G4Ellipsoid.hh"
0037 #include "G4ThreeVector.hh"
0038 #include "G4VPhysicalVolume.hh"
0039 #include "G4RotationMatrix.hh"
0040 #include "G4Material.hh"
0041 #include "G4LogicalVolume.hh"
0042 #include "G4HumanPhantomMaterial.hh"
0043 #include "G4VPhysicalVolume.hh"
0044 #include "G4PVPlacement.hh"
0045 #include "G4HumanPhantomColour.hh"
0046
0047 G4VPhysicalVolume* G4MIRDUterus::Construct(const G4String& volumeName,G4VPhysicalVolume* mother,
0048 const G4String& colourName, G4bool wireFrame, G4bool)
0049 {
0050 G4cout<<"Construct "<<volumeName<<" with mother volume "<<mother->GetName()<<G4endl;
0051
0052 auto* material = new G4HumanPhantomMaterial();
0053 auto* soft = material -> GetMaterial("soft_tissue");
0054 delete material;
0055
0056 G4double ax= 2.5*cm;
0057 G4double by= 1.5*cm;
0058 G4double cz= 5.*cm;
0059
0060 G4double zcut1= -5.* cm;
0061 G4double zcut2= 2.5*cm;
0062
0063 auto* uterus = new G4Ellipsoid("Uterus",
0064 ax, by, cz,
0065 zcut1, zcut2);
0066
0067 auto* logicUterus = new G4LogicalVolume(uterus,
0068 soft,
0069 "logical" + volumeName,
0070 nullptr, nullptr, nullptr);
0071
0072
0073
0074 auto* rm = new G4RotationMatrix();
0075 rm->rotateX(90.*degree);
0076 G4VPhysicalVolume* physUterus = new G4PVPlacement(rm,
0077 G4ThreeVector(0. *cm, 2*cm,-21 *cm),
0078 "physicalUterus",
0079 logicUterus,
0080 mother,
0081 false,
0082 0, true);
0083
0084
0085
0086
0087 auto* colourPointer = new G4HumanPhantomColour();
0088 G4Colour colour = colourPointer -> GetColour(colourName);
0089 auto* UterusVisAtt = new G4VisAttributes(colour);
0090 UterusVisAtt->SetForceSolid(wireFrame);
0091 logicUterus->SetVisAttributes(UterusVisAtt);
0092
0093 G4cout << "Uterus created !!!!!!" << G4endl;
0094
0095
0096 G4double UterusVol = logicUterus->GetSolid()->GetCubicVolume();
0097 G4cout << "Volume of Uterus = " << UterusVol/cm3 << " cm^3" << G4endl;
0098
0099
0100 G4String UterusMat = logicUterus->GetMaterial()->GetName();
0101 G4cout << "Material of Uterus = " << UterusMat << G4endl;
0102
0103
0104 G4double UterusDensity = logicUterus->GetMaterial()->GetDensity();
0105 G4cout << "Density of Material = " << UterusDensity*cm3/g << " g/cm^3" << G4endl;
0106
0107
0108 G4double UterusMass = (UterusVol)*UterusDensity;
0109 G4cout << "Mass of Uterus = " << UterusMass/gram << " g" << G4endl;
0110
0111 return physUterus;
0112 }