Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // 27 // Previous authors: G. Guerrieri, S. Guatelli 28 // Authors (since 2007): S. Guatelli, Universi 29 // 30 31 #include "G4MIRDSmallIntestine.hh" 32 33 #include "globals.hh" 34 #include "G4SystemOfUnits.hh" 35 #include "G4SDManager.hh" 36 #include "G4VisAttributes.hh" 37 #include "G4EllipticalTube.hh" 38 #include "G4UnionSolid.hh" 39 #include "G4RotationMatrix.hh" 40 #include "G4ThreeVector.hh" 41 #include "G4VPhysicalVolume.hh" 42 #include "G4PVPlacement.hh" 43 #include "G4LogicalVolume.hh" 44 #include "G4Torus.hh" 45 #include "G4Tubs.hh" 46 #include "G4Box.hh" 47 #include "G4IntersectionSolid.hh" 48 #include "G4SubtractionSolid.hh" 49 #include "G4HumanPhantomMaterial.hh" 50 #include "G4HumanPhantomColour.hh" 51 52 G4VPhysicalVolume* G4MIRDSmallIntestine::Const 53 G4VPhysicalVolume* mother, 54 const G4String& colourName, G4b 55 { 56 G4cout<<"Construct "<<volumeName<<" with mot 57 58 auto* material = new G4HumanPhantomMaterial( 59 auto* soft = material -> GetMaterial("soft_t 60 delete material; 61 62 G4double boxX = 11.*cm; 63 G4double boxY = 3.53*cm; 64 G4double boxZ = 5*cm; 65 66 auto* smallIntestineBox = new G4Box("smallIn 67 68 G4double tubsRmin = 0*cm; 69 G4double tubsRmax = 11.*cm; 70 G4double tubsZ = 5*cm; 71 G4double tubsSphi = 0*degree; 72 G4double tubsDphi = 360*degree; 73 74 auto* smallIntestineTubs = new G4Tubs("small 75 76 //G4IntersectionSolid* SmallIntestine = new 77 auto* filledSmallIntestine1 = new G4Intersec 78 nullptr,G4ThreeVector(0 79 80 auto* filledSmallIntestine = new G4Intersect 81 nullptr,G4ThreeVector(0* 82 83 G4double dx = 2.50*cm; // aU 84 G4double dy = 2.50*cm; //bU 85 G4double dz = 4.775*cm; //dzU 86 87 auto* AscendingColonUpperLargeIntestine = ne 88 89 dx = 2.50 * cm;//bt 90 dy = 1.50 *cm;//ct 91 dz = 10.50* cm;//x1t 92 93 auto* TraverseColonUpperLargeIntestine = new 94 95 auto* relative_rm = new G4RotationMatrix(); 96 relative_rm -> rotateX(90. * degree); 97 //relative_rm -> rotateZ(180. * degree); 98 relative_rm -> rotateY(90. * degree); 99 auto* upperLargeIntestine = new G4UnionSolid 100 AscendingColonUpperLargeInt 101 TraverseColonUpperLargeInte 102 relative_rm, 103 G4ThreeVector(-8.0 *cm, 0.0 104 105 dx = 1.88 * cm; //a 106 dy = 2.13 *cm; //b 107 dz = 7.64 *cm; //(z1-z2)/2 108 109 auto* DescendingColonLowerLargeIntestine = n 110 111 auto* upperlowerLargeIntestine = new G4Union 112 upperLargeIntestine, 113 DescendingColonLowerLarge 114 nullptr, 115 G4ThreeVector(-16.72*cm, 116 117 118 auto* SmallIntestine = new G4SubtractionSoli 119 filledSmallIntestine, 120 upperlowerLargeIntestine, 121 nullptr, 122 G4ThreeVector(8.0*cm,-0.3* 123 124 125 auto* logicSmallIntestine = new G4LogicalVol 126 soft, 127 "logical"+volumeName, 128 nullptr, nullptr, nullptr) 129 auto* rm = new G4RotationMatrix(); 130 rm->rotateX(180.*degree); 131 rm->rotateY(180.*degree); 132 G4VPhysicalVolume* physSmallIntestine = new 133 G4ThreeVector(0*cm, -2.66*cm 134 //G4ThreeVector(0*cm, -5.13* 135 //G4ThreeVector(0*cm, -6*cm, 136 "physical"+volumeName, 137 logicSmallIntestine, 138 mother, 139 false, 140 0, true); 141 142 143 // Visualization Attributes 144 //G4VisAttributes* SmallIntestineVisAtt = ne 145 auto* colourPointer = new G4HumanPhantomColo 146 G4Colour colour = colourPointer -> GetColour 147 auto* SmallIntestineVisAtt = new G4VisAttrib 148 SmallIntestineVisAtt->SetForceSolid(wireFram 149 logicSmallIntestine->SetVisAttributes(SmallI 150 151 G4cout << "SmallIntestine created !!!!!!" << 152 153 // Testing SmallIntestine Volume 154 G4double SmallIntestineVol = logicSmallIntes 155 G4cout << "Volume of SmallIntestine = " << S 156 157 // Testing SmallIntestine Material 158 G4String SmallIntestineMat = logicSmallIntes 159 G4cout << "Material of SmallIntestine = " << 160 161 // Testing Density 162 G4double SmallIntestineDensity = logicSmallI 163 G4cout << "Density of Material = " << SmallI 164 165 // Testing Mass 166 G4double SmallIntestineMass = (SmallIntestin 167 G4cout << "Mass of SmallIntestine = " << Sma 168 169 return physSmallIntestine; 170 } 171