Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4MIRDMaleGenitalia Class Reference

#include <G4MIRDMaleGenitalia.hh>

Inheritance diagram for G4MIRDMaleGenitalia:
Collaboration diagram for G4MIRDMaleGenitalia:

Public Member Functions

 G4MIRDMaleGenitalia ()
 
 ~G4MIRDMaleGenitalia ()
 
G4VPhysicalVolumeConstruct (const G4String &, G4VPhysicalVolume *, const G4String &, G4bool, G4bool)
 
- Public Member Functions inherited from G4VOrgan
 G4VOrgan ()
 
virtual ~G4VOrgan ()
 

Detailed Description

Definition at line 42 of file G4MIRDMaleGenitalia.hh.

Constructor & Destructor Documentation

G4MIRDMaleGenitalia::G4MIRDMaleGenitalia ( )

Definition at line 55 of file G4MIRDMaleGenitalia.cc.

56 {
57 }
G4MIRDMaleGenitalia::~G4MIRDMaleGenitalia ( )

Definition at line 59 of file G4MIRDMaleGenitalia.cc.

60 {
61 
62 }

Member Function Documentation

G4VPhysicalVolume * G4MIRDMaleGenitalia::Construct ( const G4String volumeName,
G4VPhysicalVolume mother,
const G4String colourName,
G4bool  wireFrame,
G4bool   
)
virtual

Implements G4VOrgan.

Definition at line 65 of file G4MIRDMaleGenitalia.cc.

67 {
68  G4cout<<"Construct "<<volumeName<<" with mother volume "<<mother->GetName()<<G4endl;
69 
71  G4Material* soft = material -> GetMaterial("soft_tissue");
72  delete material;
73 
74 
75  G4double pDz=2.4*cm;
76  G4double pTheta=0*degree;
77  G4double pPhi=0*degree;
78  G4double pDy1=4.76*cm;
79  G4double pDx1=9.52*cm;
80  G4double pDx2=9.52*cm;
81  G4double pAlp1=0*degree;
82  G4double pDy2=5*cm;
83  G4double pDx3=10*cm;
84  G4double pDx4=10*cm;
85  G4double pAlp2=0*degree;
86 
87  G4Trap* genitaliaTrap= new G4Trap("GenitaliaTrap",
88  pDz,pTheta,pPhi,pDy1,
89  pDx1,pDx2,pAlp1,pDy2,
90  pDx3,pDx4,pAlp2);
91 
92 
93  G4double rmin1 = 0.* cm;
94  G4double rmin2 = 0.* cm;
95  G4double dz= 5 * cm;
96  G4double rmax1= 9.51 * cm;
97  G4double rmax2= 10.01 * cm;
98  G4double startphi= 0.* degree;
99  G4double deltaphi= 360. * degree;
100 
101  G4Cons* genitaliaLegL = new G4Cons("GenitaliaLegL",
102  rmin1, rmax1,
103  rmin2, rmax2, dz/2.,
104  startphi, deltaphi);
105 
106  G4Cons* genitaliaLegR = new G4Cons("GenitaliaLegR",
107  rmin1, rmax1,
108  rmin2, rmax2, dz/2.,
109  startphi, deltaphi);
110 
111  G4UnionSolid* genitaliaLegs = new G4UnionSolid("GenitaliaLegs",genitaliaLegL,genitaliaLegR,
112  0,
113  G4ThreeVector(20.* cm, 0.*cm,0* cm) );
114 
115 
116 
117  G4SubtractionSolid* MaleGenitalia = new G4SubtractionSolid("MaleGenitalia",genitaliaTrap,genitaliaLegs,
118  0,//
119  G4ThreeVector(-10.* cm, -5.*cm,0* cm) );
120 
121 
122  G4LogicalVolume* logicMaleGenitalia = new G4LogicalVolume(MaleGenitalia,
123  soft,
124  "logical" + volumeName,
125  0, 0, 0);
126 
127  // Define rotation and position here!
128  G4VPhysicalVolume* physMaleGenitalia = new G4PVPlacement(0,
129  G4ThreeVector(0*cm,5.*cm, -2.4*cm),
130  "physicalMaleGenitalia",
131  logicMaleGenitalia,
132  mother,
133  false,
134  0, true);
135 
136  // Visualization Attributes
137  //G4VisAttributes* MaleGenitaliaVisAtt = new G4VisAttributes(G4Colour(0.85,0.44,0.84));
138  G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
139  G4Colour colour = colourPointer -> GetColour(colourName);
140  delete colourPointer;
141 
142  G4VisAttributes* MaleGenitaliaVisAtt = new G4VisAttributes(colour);
143  MaleGenitaliaVisAtt->SetForceSolid(wireFrame);
144  logicMaleGenitalia->SetVisAttributes(MaleGenitaliaVisAtt);
145 
146  G4cout << "MaleGenitalia created !!!!!!" << G4endl;
147 
148  // Testing MaleGenitalia Volume
149  G4double MaleGenitaliaVol = logicMaleGenitalia->GetSolid()->GetCubicVolume();
150  G4cout << "Volume of MaleGenitalia = " << MaleGenitaliaVol/cm3 << " cm^3" << G4endl;
151 
152  // Testing MaleGenitalia Material
153  G4String MaleGenitaliaMat = logicMaleGenitalia->GetMaterial()->GetName();
154  G4cout << "Material of MaleGenitalia = " << MaleGenitaliaMat << G4endl;
155 
156  // Testing Density
157  G4double MaleGenitaliaDensity = logicMaleGenitalia->GetMaterial()->GetDensity();
158  G4cout << "Density of Material = " << MaleGenitaliaDensity*cm3/g << " g/cm^3" << G4endl;
159 
160  // Testing Mass
161  G4double MaleGenitaliaMass = (MaleGenitaliaVol)*MaleGenitaliaDensity;
162  G4cout << "Mass of MaleGenitalia = " << MaleGenitaliaMass/gram << " g" << G4endl;
163 
164  return physMaleGenitalia;
165 }
G4Material * GetMaterial() const
CLHEP::Hep3Vector G4ThreeVector
const G4String & GetName() const
Definition: G4Material.hh:178
virtual G4double GetCubicVolume()
Definition: G4VSolid.cc:189
G4double GetDensity() const
Definition: G4Material.hh:180
G4VSolid * GetSolid() const
void SetForceSolid(G4bool=true)
static constexpr double gram
Definition: G4SIunits.hh:178
string material
Definition: eplot.py:19
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
static constexpr double degree
Definition: G4SIunits.hh:144
static constexpr double cm
Definition: G4SIunits.hh:119
Definition: G4Cons.hh:83
static constexpr double cm3
Definition: G4SIunits.hh:121
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
void SetVisAttributes(const G4VisAttributes *pVA)

Here is the call graph for this function:


The documentation for this class was generated from the following files: