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

#include <G4MIRDStomach.hh>

Inheritance diagram for G4MIRDStomach:
Collaboration diagram for G4MIRDStomach:

Public Member Functions

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

Detailed Description

Definition at line 43 of file G4MIRDStomach.hh.

Constructor & Destructor Documentation

G4MIRDStomach::G4MIRDStomach ( )

Definition at line 51 of file G4MIRDStomach.cc.

52 {
53 }
G4MIRDStomach::~G4MIRDStomach ( )

Definition at line 55 of file G4MIRDStomach.cc.

56 {
57 }

Member Function Documentation

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

Implements G4VOrgan.

Definition at line 60 of file G4MIRDStomach.cc.

62 {
63 
64  G4cout<<"Construct "<<volumeName<<" with mother volume "<<mother->GetName()<<G4endl;
65 
66 
68  G4Material* soft = material -> GetMaterial("soft_tissue");
69  delete material;
70 
71  G4double ax = 4. * cm;
72  G4double by= 3. * cm;
73  G4double cz = 8. * cm;
74  //G4double zcut1 = -8. * cm;
75  //G4double zcut2 = 8* cm;
76 
77  G4Ellipsoid* stomach_out = new G4Ellipsoid("stomach_out",
78  ax, by, cz);
79  // zcut1, zcut2);
80  /*
81  ax = 3.387 * cm;
82  by = 2.387 * cm;
83  cz = 7.387 * cm;
84  zcut1 = - 7.387 *cm;
85  zcut2 = 7.387 *cm;
86 
87  G4Ellipsoid* cavity = new G4Ellipsoid ("cavity", ax, by, cz, zcut1, zcut2);
88 
89  G4SubtractionSolid* stomach = new G4SubtractionSolid("stomach",stomach_out, cavity);
90  */
91  G4LogicalVolume* logicStomach = new G4LogicalVolume(stomach_out, soft,
92  "logical" + volumeName, 0, 0, 0);
93 
94  // Define rotation and position here!
95  G4VPhysicalVolume* physStomach = new G4PVPlacement(0,G4ThreeVector(8. *cm,-4. * cm, 0),
96  "physicalStomach",
97  logicStomach,
98  mother,
99  false,
100  0, true);
101 
102 
103  // Visualization Attributes
104  G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
105  G4Colour colour = colourPointer -> GetColour(colourName);
106 
107  G4VisAttributes* StomachVisAtt = new G4VisAttributes(colour);
108  StomachVisAtt->SetForceSolid(wireFrame);
109  logicStomach->SetVisAttributes(StomachVisAtt);
110 
111  G4cout << "Stomach created !!!!!!" << G4endl;
112 
113  // Testing Stomach Volume
114  G4double StomachVol = logicStomach->GetSolid()->GetCubicVolume();
115  G4cout << "Volume of Stomach = " << StomachVol/cm3 << " cm^3" << G4endl;
116 
117  // Testing Stomach Material
118  G4String StomachMat = logicStomach->GetMaterial()->GetName();
119  G4cout << "Material of Stomach = " << StomachMat << G4endl;
120 
121  // Testing Density
122  G4double StomachDensity = logicStomach->GetMaterial()->GetDensity();
123  G4cout << "Density of Material = " << StomachDensity*cm3/g << " g/cm^3" << G4endl;
124 
125  // Testing Mass
126  G4double StomachMass = (StomachVol)*StomachDensity;
127  G4cout << "Mass of Stomach = " << StomachMass/gram << " g" << G4endl;
128 
129  return physStomach;
130 }
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 cm
Definition: G4SIunits.hh:119
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: