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

#include <G4MIRDBrain.hh>

Inheritance diagram for G4MIRDBrain:
Collaboration diagram for G4MIRDBrain:

Public Member Functions

 G4MIRDBrain ()
 
 ~G4MIRDBrain ()
 
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 G4MIRDBrain.hh.

Constructor & Destructor Documentation

G4MIRDBrain::G4MIRDBrain ( )

Definition at line 50 of file G4MIRDBrain.cc.

51 {
52 }
G4MIRDBrain::~G4MIRDBrain ( )

Definition at line 54 of file G4MIRDBrain.cc.

55 {
56 
57 }

Member Function Documentation

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

Implements G4VOrgan.

Definition at line 60 of file G4MIRDBrain.cc.

62 {
63  G4cout << "Construct " << volumeName <<" with mother "<<mother->GetName()<<G4endl;
65  G4Material* soft = material -> GetMaterial("soft_tissue");
66  delete material;
67 
68  G4double ax = 6. * cm;
69  G4double by= 9. * cm;
70  G4double cz = 6.5 * cm;
71 
72  G4Ellipsoid* brain = new G4Ellipsoid("Brain", ax, by, cz);
73 
74 
75  G4LogicalVolume* logicBrain = new G4LogicalVolume(brain, soft,
76  "logical" + volumeName,
77  0, 0, 0);
78 
79  // Define rotation and position here!
80  G4VPhysicalVolume* physBrain = new G4PVPlacement(0,
81  G4ThreeVector(0.*cm, 0.*cm, 8.75 * cm),
82  "physicalBrain",
83  logicBrain,
84  mother,
85  false,
86  0, true);
87 
88  // Visualization Attributes
89  // G4VisAttributes* BrainVisAtt = new G4VisAttributes(G4Colour(0.41,0.41,0.41));
90  G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
91  G4Colour colour = colourPointer -> GetColour(colourName);
92 
93  G4VisAttributes* BrainVisAtt = new G4VisAttributes(colour);
94  BrainVisAtt->SetForceSolid(wireFrame);
95  BrainVisAtt->SetLineWidth(0.7* mm);
96  logicBrain->SetVisAttributes(BrainVisAtt);
97 
98  // Testing Brain Volume
99  G4double BrainVol = logicBrain->GetSolid()->GetCubicVolume();
100  G4cout << "Volume of Brain = " << BrainVol/cm3 << " cm^3" << G4endl;
101 
102  // Testing Brain Material
103  G4String BrainMat = logicBrain->GetMaterial()->GetName();
104  G4cout << "Material of Brain = " << BrainMat << G4endl;
105 
106  // Testing Density
107  G4double BrainDensity = logicBrain->GetMaterial()->GetDensity();
108  G4cout << "Density of Material = " << BrainDensity*cm3/g << " g/cm^3" << G4endl;
109 
110  // Testing Mass
111  G4double BrainMass = (BrainVol)*BrainDensity;
112  G4cout << "Mass of Brain = " << BrainMass/gram << " g" << G4endl;
113 
114 
115  return physBrain;
116 }
static constexpr double mm
Definition: G4SIunits.hh:115
G4Material * GetMaterial() const
CLHEP::Hep3Vector G4ThreeVector
const G4String & GetName() const
Definition: G4Material.hh:178
void SetLineWidth(G4double)
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: