Warning, file /geant4/examples/advanced/human_phantom/src/G4MIRDLeftOvary.cc was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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 "G4MIRDLeftOvary.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 "G4UnionSolid.hh"
0046 #include "G4HumanPhantomColour.hh"
0047
0048 G4VPhysicalVolume* G4MIRDLeftOvary::Construct(const G4String& volumeName,G4VPhysicalVolume* mother,
0049 const G4String& colourName, G4bool wireFrame, G4bool)
0050 {
0051 G4cout<<"Construct "<<volumeName<<" with mother volume "<<mother->GetName()<<G4endl;
0052
0053 auto* material = new G4HumanPhantomMaterial();
0054 auto* soft = material -> GetMaterial("soft_tissue");
0055 delete material;
0056
0057 G4double ax= 1. *cm;
0058 G4double by= 0.5*cm;
0059 G4double cz= 2.*cm;
0060
0061 auto* OneOvary = new G4Ellipsoid("OneOvary",
0062 ax, by, cz);
0063
0064
0065 auto* logicLeftOvary = new G4LogicalVolume(OneOvary,
0066 soft,
0067 "logical" + volumeName,
0068 nullptr, nullptr, nullptr);
0069
0070
0071 G4VPhysicalVolume* physLeftOvary = new G4PVPlacement(nullptr,
0072 G4ThreeVector(-6. *cm,0.5*cm, -20*cm),
0073 "physicalLeftOvary",
0074 logicLeftOvary,
0075 mother,
0076 false,
0077 0, true);
0078
0079
0080
0081 auto* colourPointer = new G4HumanPhantomColour();
0082 G4Colour colour = colourPointer -> GetColour(colourName);
0083 delete colourPointer;
0084
0085 auto* LeftOvaryVisAtt = new G4VisAttributes(colour);
0086 LeftOvaryVisAtt->SetForceSolid(wireFrame);
0087 logicLeftOvary->SetVisAttributes(LeftOvaryVisAtt);
0088
0089 G4cout << "LeftOvary created !!!!!!" << G4endl;
0090
0091
0092 G4double LeftOvaryVol = logicLeftOvary->GetSolid()->GetCubicVolume();
0093 G4cout << "Volume of LeftOvary = " << LeftOvaryVol/cm3 << " cm^3" << G4endl;
0094
0095
0096 G4String LeftOvaryMat = logicLeftOvary->GetMaterial()->GetName();
0097 G4cout << "Material of LeftOvary = " << LeftOvaryMat << G4endl;
0098
0099
0100 G4double LeftOvaryDensity = logicLeftOvary->GetMaterial()->GetDensity();
0101 G4cout << "Density of Material = " << LeftOvaryDensity*cm3/g << " g/cm^3" << G4endl;
0102
0103
0104 G4double LeftOvaryMass = (LeftOvaryVol)*LeftOvaryDensity;
0105 G4cout << "Mass of LeftOvary = " << LeftOvaryMass/gram << " g" << G4endl;
0106
0107 return physLeftOvary;
0108 }