Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4VoxelLeftBreast.cc
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // Authors: S. Guatelli , M. G. Pia, INFN Genova and F. Ambroglini INFN Perugia, Italy
27 //
28 // Based on code developed by the undergraduate student G. Guerrieri
29 // Note: this is a preliminary beta-version of the code; an improved
30 // version will be distributed in the next Geant4 public release, compliant
31 // with the design in a forthcoming publication, and subject to a
32 // design and code review.
33 //
34 #include "G4VoxelLeftBreast.hh"
35 
36 #include "globals.hh"
37 #include "G4SystemOfUnits.hh"
38 #include "G4SDManager.hh"
39 #include "G4VisAttributes.hh"
40 #include "G4Tubs.hh"
41 #include "G4ThreeVector.hh"
42 #include "G4VPhysicalVolume.hh"
43 #include "G4RotationMatrix.hh"
44 #include "G4Material.hh"
45 #include "G4LogicalVolume.hh"
47 #include "G4VPhysicalVolume.hh"
48 #include "G4PVPlacement.hh"
49 #include "G4PVReplica.hh"
50 #include "G4HumanPhantomColour.hh"
51 
53 {
54 }
55 
57 {
58 }
59 
61  G4VPhysicalVolume* mother,
62  const G4String& colourName,
63  G4bool wireFrame,G4bool)
64 
65 {
67  G4Material* adipose = material -> GetMaterial("adipose");
68  G4Material* adipose_glandular = material -> GetMaterial("adipose_glandular");
69  delete material;
70 
71  G4double rmin = 0.* cm;
72  G4double rmax = 6. * cm;
73  G4double zz = 6. * cm;
74  G4double startPhi = 0.* degree;
75  G4double spanningPhi = 180. * degree;
76 
77  G4Tubs* breast = new G4Tubs("out_breast", rmin, rmax,
78  zz/2., startPhi, spanningPhi);
79 
80  G4LogicalVolume* breast_log = new G4LogicalVolume(breast,
81  adipose,
82  "logicalOut"+ volumeName,
83  0, 0, 0);
84  rmax = 5.5 *cm;
85  zz = 5. *cm;
86  G4Tubs* innerBreast = new G4Tubs("inner_breast",
87  rmin, rmax,
88  zz/2., startPhi, spanningPhi);
89 
90  G4LogicalVolume* innerBreast_log = new G4LogicalVolume(innerBreast,
91  adipose_glandular,
92  "logical"+ volumeName,
93  0, 0, 0);
94 
95  G4RotationMatrix* matrix = new G4RotationMatrix();
96  // matrix -> rotateX(-90.* degree);
97  // matrix -> rotateY(180.* degree);
98  matrix -> rotateZ(18. * degree);
99 
100 
101  G4VPhysicalVolume* physBreast = new G4PVPlacement(matrix,G4ThreeVector(10.*cm, 8.7* cm, 52. *cm),
102  "physicalVoxelLeftBreast",
103  breast_log,
104  mother,
105  false,
106  0, true);
107 
108  G4VPhysicalVolume* physInnerBreast = new G4PVPlacement(0,G4ThreeVector(),
109  "LeftBreast",
110  innerBreast_log,
111  physBreast,
112  false,
113  0, true);
114 
115 
116 
117  G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
118  G4Colour colour = colourPointer -> GetColour(colourName);
119  delete colourPointer;
120 
121  G4VisAttributes* BreastVisAtt = new G4VisAttributes(colour);
122  BreastVisAtt -> SetForceSolid(wireFrame);
123  breast_log -> SetVisAttributes(BreastVisAtt);
124 
125  G4VisAttributes* innerBreastVisAtt = new G4VisAttributes(colour);
126  innerBreastVisAtt -> SetForceSolid(false);
127  innerBreast_log -> SetVisAttributes(innerBreastVisAtt);
128 
129 
130  G4cout << "Voxel Left Breast created !!!!!! This model has to be refined" << G4endl;
131  return physInnerBreast;
132 }
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Tubs.hh:85
CLHEP::HepRotation G4RotationMatrix
#define G4endl
Definition: G4ios.hh:61
Double_t zz
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
static constexpr double degree
Definition: G4SIunits.hh:144
G4GLOB_DLL std::ostream G4cout
static constexpr double cm
Definition: G4SIunits.hh:119
G4VPhysicalVolume * Construct(const G4String &, G4VPhysicalVolume *, const G4String &, G4bool, G4bool)