ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VoxelLeftBreast.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file 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 // Previous authors: G. Guerrieri, S. Guatelli, and M. G. Pia, INFN Genova, Italy
27 // Authors (since 2007): S. Guatelli, University of Wollongong, Australia
28 //
29 #include "G4VoxelLeftBreast.hh"
30 
31 #include "globals.hh"
32 #include "G4SystemOfUnits.hh"
33 #include "G4SDManager.hh"
34 #include "G4VisAttributes.hh"
35 #include "G4Tubs.hh"
36 #include "G4ThreeVector.hh"
37 #include "G4VPhysicalVolume.hh"
38 #include "G4RotationMatrix.hh"
39 #include "G4Material.hh"
40 #include "G4LogicalVolume.hh"
42 #include "G4VPhysicalVolume.hh"
43 #include "G4PVPlacement.hh"
44 #include "G4PVReplica.hh"
45 #include "G4HumanPhantomColour.hh"
46 
48 {
49 }
50 
52 {
53 }
54 
56  G4VPhysicalVolume* mother,
57  const G4String& colourName,
58  G4bool wireFrame,G4bool)
59 
60 {
62  G4Material* adipose = material -> GetMaterial("adipose");
63  G4Material* adipose_glandular = material -> GetMaterial("adipose_glandular");
64  delete material;
65 
66  G4double rmin = 0.* cm;
67  G4double rmax = 6. * cm;
68  G4double zz = 6. * cm;
69  G4double startPhi = 0.* degree;
70  G4double spanningPhi = 180. * degree;
71 
72  G4Tubs* breast = new G4Tubs("out_breast", rmin, rmax,
73  zz/2., startPhi, spanningPhi);
74 
75  G4LogicalVolume* breast_log = new G4LogicalVolume(breast,
76  adipose,
77  "logicalOut"+ volumeName,
78  0, 0, 0);
79  rmax = 5.5 *cm;
80  zz = 5. *cm;
81  G4Tubs* innerBreast = new G4Tubs("inner_breast",
82  rmin, rmax,
83  zz/2., startPhi, spanningPhi);
84 
85  G4LogicalVolume* innerBreast_log = new G4LogicalVolume(innerBreast,
86  adipose_glandular,
87  "logical"+ volumeName,
88  0, 0, 0);
89 
90  G4RotationMatrix* matrix = new G4RotationMatrix();
91  // matrix -> rotateX(-90.* degree);
92  // matrix -> rotateY(180.* degree);
93  matrix -> rotateZ(18. * degree);
94 
95 
96  G4VPhysicalVolume* physBreast = new G4PVPlacement(matrix,G4ThreeVector(10.*cm, 8.7* cm, 52. *cm),
97  "physicalVoxelLeftBreast",
98  breast_log,
99  mother,
100  false,
101  0, true);
102 
103  G4VPhysicalVolume* physInnerBreast = new G4PVPlacement(0,G4ThreeVector(),
104  "LeftBreast",
105  innerBreast_log,
106  physBreast,
107  false,
108  0, true);
109 
110 
111 
112  G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
113  G4Colour colour = colourPointer -> GetColour(colourName);
114  delete colourPointer;
115 
116  G4VisAttributes* BreastVisAtt = new G4VisAttributes(colour);
117  BreastVisAtt -> SetForceSolid(wireFrame);
118  breast_log -> SetVisAttributes(BreastVisAtt);
119 
120  G4VisAttributes* innerBreastVisAtt = new G4VisAttributes(colour);
121  innerBreastVisAtt -> SetForceSolid(false);
122  innerBreast_log -> SetVisAttributes(innerBreastVisAtt);
123 
124 
125  G4cout << "Voxel Left Breast created !!!!!! This model has to be refined" << G4endl;
126  return physInnerBreast;
127 }