ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VoxelRightBreast.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4VoxelRightBreast.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 "G4VoxelRightBreast.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 
47 
49 {
50 }
51 
53 {
54 }
55 
56 
58  G4VPhysicalVolume* mother,
59  const G4String& colourName,
60  G4bool wireFrame,G4bool)
61 
62 {
63  G4cout<<"Construct "<<volumeName<<" with mother volume "<<mother->GetName()<<G4endl;
65  G4Material* adipose = material -> GetMaterial("adipose");
66  G4Material* adipose_glandular = material -> GetMaterial("adipose_glandular");
67  delete material;
68 
69  G4double rmin = 0.* cm;
70  G4double rmax = 6. * cm;
71  G4double zz = 6. * cm;
72  G4double startPhi = 0.* degree;
73  G4double spanningPhi = 180. * degree;
74 
75  G4Tubs* breast = new G4Tubs("out_breast", rmin, rmax,
76  zz/2., startPhi, spanningPhi);
77 
78  G4LogicalVolume* breast_log = new G4LogicalVolume(breast,
79  adipose,
80  "logicalOut"+ volumeName,
81  0, 0, 0);
82  rmax = 5.5 *cm;
83  zz = 5. *cm;
84  G4Tubs* innerBreast = new G4Tubs("inner_breast",
85  rmin, rmax,
86  zz/2., startPhi, spanningPhi);
87 
88  G4LogicalVolume* innerBreast_log = new G4LogicalVolume(innerBreast,
89  adipose_glandular,
90  "logical"+ volumeName,
91  0, 0, 0);
92 
93  G4RotationMatrix* matrix = new G4RotationMatrix();
94  matrix -> rotateX(0.* degree);
95  matrix -> rotateY(0.* degree);
96  matrix -> rotateZ(-18. *degree);
97 
98 
99  G4VPhysicalVolume* physBreast = new G4PVPlacement(matrix,G4ThreeVector(-10.*cm, 8.7 *cm, 52.* cm),
100  "physicalVoxelRightBreast",
101  breast_log,
102  mother,
103  false,
104  0, true);
105 
106  G4VPhysicalVolume* physInnerBreast = new G4PVPlacement(0,G4ThreeVector(),
107  "RightBreast",
108  innerBreast_log,
109  physBreast,
110  false,
111  0, true);
112 
113  G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
114  G4Colour colour = colourPointer -> GetColour(colourName);
115  delete colourPointer;
116 
117  G4VisAttributes* BreastVisAtt = new G4VisAttributes(colour);
118  BreastVisAtt -> SetForceSolid(wireFrame);
119  breast_log -> SetVisAttributes(BreastVisAtt);
120 
121  G4VisAttributes* innerBreastVisAtt = new G4VisAttributes(colour);
122  innerBreastVisAtt -> SetForceSolid(false);
123  innerBreast_log -> SetVisAttributes(innerBreastVisAtt);
124 
125 
126  G4cout << "Voxel Right Breast created !!!!!! This model must be refined!" << G4endl;
127 
128 
129  return physInnerBreast;
130 }