Warning, file /geant4/examples/advanced/human_phantom/src/G4MIRDUrinaryBladder.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 #include "G4MIRDUrinaryBladder.hh"
0029
0030 #include "globals.hh"
0031 #include "G4SystemOfUnits.hh"
0032 #include "G4SDManager.hh"
0033 #include "G4VisAttributes.hh"
0034 #include "G4Ellipsoid.hh"
0035 #include "G4Material.hh"
0036 #include "G4LogicalVolume.hh"
0037 #include "G4HumanPhantomMaterial.hh"
0038 #include "G4VPhysicalVolume.hh"
0039 #include "G4PVPlacement.hh"
0040 #include "G4SubtractionSolid.hh"
0041 #include "G4HumanPhantomColour.hh"
0042
0043 G4VPhysicalVolume* G4MIRDUrinaryBladder::Construct(const G4String& volumeName, G4VPhysicalVolume* mother,
0044 const G4String& colourName, G4bool wireFrame, G4bool)
0045 {
0046
0047 G4cout<<"Construct "<<volumeName<<" with mother volume "<<mother->GetName()<<G4endl;
0048
0049 auto* material = new G4HumanPhantomMaterial();
0050 auto* soft = material -> GetMaterial("soft_tissue");
0051 delete material;
0052
0053 G4double ax = 4.958*cm;
0054 G4double by= 3.458 *cm;
0055 G4double cz= 3.458 *cm;
0056
0057 auto* bladder = new G4Ellipsoid("bladder_out",ax, by, cz);
0058
0059 ax = 4.706 * cm;
0060 by = 3.206 * cm;
0061 cz = 3.206 * cm;
0062 auto* inner = new G4Ellipsoid("innerBladder", ax, by, cz);
0063
0064 auto* totalBladder = new G4SubtractionSolid("bladder", bladder, inner);
0065
0066 auto* logicUrinaryBladder = new G4LogicalVolume(totalBladder, soft,
0067 "logical" + volumeName,
0068 nullptr, nullptr, nullptr);
0069
0070
0071 G4VPhysicalVolume* physUrinaryBladder = new G4PVPlacement(nullptr,G4ThreeVector(0 *cm, -4.5 *cm,-27. *cm),
0072 "physicalUrinaryBladder",
0073 logicUrinaryBladder,
0074 mother,
0075 false,
0076 0, true);
0077
0078
0079
0080 auto* colourPointer = new G4HumanPhantomColour();
0081 G4Colour colour = colourPointer -> GetColour(colourName);
0082 auto* UrinaryBladderVisAtt = new G4VisAttributes(colour);
0083
0084
0085 UrinaryBladderVisAtt->SetForceSolid(wireFrame);
0086 logicUrinaryBladder->SetVisAttributes(UrinaryBladderVisAtt);
0087
0088 G4cout << "UrinaryBladder created !!!!!!" << G4endl;
0089
0090
0091 G4double UrinaryBladderVol = logicUrinaryBladder->GetSolid()->GetCubicVolume();
0092 G4cout << "Volume of UrinaryBladder = " << UrinaryBladderVol/cm3 << " cm^3" << G4endl;
0093
0094
0095 G4String UrinaryBladderMat = logicUrinaryBladder->GetMaterial()->GetName();
0096 G4cout << "Material of UrinaryBladder = " << UrinaryBladderMat << G4endl;
0097
0098
0099 G4double UrinaryBladderDensity = logicUrinaryBladder->GetMaterial()->GetDensity();
0100 G4cout << "Density of Material = " << UrinaryBladderDensity*cm3/g << " g/cm^3" << G4endl;
0101
0102
0103 G4double UrinaryBladderMass = (UrinaryBladderVol)*UrinaryBladderDensity;
0104 G4cout << "Mass of UrinaryBladder = " << UrinaryBladderMass/gram << " g" << G4endl;
0105
0106
0107 return physUrinaryBladder;
0108 }