File indexing completed on 2025-02-23 09:20:11
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 #include "G4MIRDLeftLegBone.hh"
0030
0031 #include "globals.hh"
0032 #include "G4SystemOfUnits.hh"
0033 #include "G4SDManager.hh"
0034 #include "G4VisAttributes.hh"
0035 #include "G4HumanPhantomMaterial.hh"
0036 #include "G4EllipticalTube.hh"
0037 #include "G4RotationMatrix.hh"
0038 #include "G4ThreeVector.hh"
0039 #include "G4VPhysicalVolume.hh"
0040 #include "G4PVPlacement.hh"
0041 #include "G4Cons.hh"
0042 #include "G4UnionSolid.hh"
0043 #include "G4HumanPhantomColour.hh"
0044
0045 G4VPhysicalVolume* G4MIRDLeftLegBone::Construct(const G4String& volumeName,G4VPhysicalVolume* mother,
0046 const G4String& colourName, G4bool wireFrame,G4bool)
0047 {
0048
0049 auto* material = new G4HumanPhantomMaterial();
0050
0051 G4cout<<"Construct "<<volumeName<<" with mother volume "<<mother->GetName()<<G4endl;
0052
0053 auto* skeleton = material -> GetMaterial("skeleton");
0054
0055 delete material;
0056
0057 G4double dz = 79.8 * cm;
0058 G4double rmin1 = 0.0 * cm;
0059 G4double rmin2 = 0.0 * cm;
0060 G4double rmax1 = 1. * cm;
0061 G4double rmax2 = 3.5 * cm;
0062 G4double startphi = 0. * degree;
0063 G4double deltaphi = 360. * degree;
0064
0065 auto* leg_bone = new G4Cons("OneLeftLegBone",
0066 rmin1, rmax1,
0067 rmin2, rmax2, dz/2.,
0068 startphi, deltaphi);
0069
0070 auto* logicLeftLegBone = new G4LogicalVolume(leg_bone, skeleton,"logical" + volumeName,
0071 nullptr, nullptr, nullptr);
0072
0073
0074
0075 G4VPhysicalVolume* physLeftLegBone = new G4PVPlacement(nullptr,
0076 G4ThreeVector(0.0 * cm, 0.0, 0.1*cm),
0077 "physicalLeftLegBone",
0078 logicLeftLegBone,
0079 mother,
0080 false,
0081 0, true);
0082
0083
0084
0085
0086 auto* colourPointer = new G4HumanPhantomColour();
0087 G4Colour colour = colourPointer -> GetColour(colourName);
0088 auto* LeftLegBoneVisAtt = new G4VisAttributes(colour);
0089
0090 LeftLegBoneVisAtt->SetForceSolid(wireFrame);
0091 logicLeftLegBone->SetVisAttributes(LeftLegBoneVisAtt);
0092
0093 G4cout << "LeftLegBone created !!!!!!" << G4endl;
0094
0095
0096 G4double LeftLegBoneVol = logicLeftLegBone->GetSolid()->GetCubicVolume();
0097 G4cout << "Volume of LeftLegBone = " << LeftLegBoneVol/cm3 << " cm^3" << G4endl;
0098
0099
0100 G4String LeftLegBoneMat = logicLeftLegBone->GetMaterial()->GetName();
0101 G4cout << "Material of LeftLegBone = " << LeftLegBoneMat << G4endl;
0102
0103
0104 G4double LeftLegBoneDensity = logicLeftLegBone->GetMaterial()->GetDensity();
0105 G4cout << "Density of Material = " << LeftLegBoneDensity*cm3/g << " g/cm^3" << G4endl;
0106
0107
0108 G4double LeftLegBoneMass = (LeftLegBoneVol)*LeftLegBoneDensity;
0109 G4cout << "Mass of LeftLegBone = " << LeftLegBoneMass/gram << " g" << G4endl;
0110
0111
0112 return physLeftLegBone;
0113 }