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

#include <G4MIRDLeftLung.hh>

Inheritance diagram for G4MIRDLeftLung:
Collaboration diagram for G4MIRDLeftLung:

Public Member Functions

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

Constructor & Destructor Documentation

G4MIRDLeftLung::G4MIRDLeftLung ( )

Definition at line 54 of file G4MIRDLeftLung.cc.

55 {
56 }
G4MIRDLeftLung::~G4MIRDLeftLung ( )

Definition at line 58 of file G4MIRDLeftLung.cc.

59 {
60 
61 }

Member Function Documentation

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

Implements G4VOrgan.

Definition at line 64 of file G4MIRDLeftLung.cc.

66 {
67 
68  G4cout<<"Construct "<<volumeName<<" with mother volume "<<mother->GetName()<<G4endl;
69 
71  G4Material* lung_material = material -> GetMaterial("lung_material");
72  delete material;
73 
74  G4double ax = 5. *cm; //a
75  G4double by = 7.5 *cm; //b
76  G4double cz = 24.*cm; //c
77  G4double zcut1 = 0.0 *cm;
78  G4double zcut2=24. *cm;
79 
80  G4Ellipsoid* oneLung = new G4Ellipsoid("OneLung",ax, by, cz, zcut1,zcut2);
81 
82  ax= 5.*cm;
83  by= 7.5*cm;
84  cz= 24.*cm;
85 
86 
87  G4Ellipsoid* subtrLung = new G4Ellipsoid("subtrLung",ax, by, cz);
88 
89  // y<0
90 
91  G4double dx = 5.5* cm;
92  G4double dy = 8.5 * cm;
93  G4double dz = 24. * cm;
94 
95  G4Box* box = new G4Box("Box", dx, dy, dz);
96 
97 
98  //G4SubtractionSolid* section = new G4SubtractionSolid("BoxSub", subtrLung, box, 0, G4ThreeVector(0.*cm, 8.5* cm, 0.*cm));
99  G4SubtractionSolid* section2 = new G4SubtractionSolid("BoxSub2", subtrLung, box, 0, G4ThreeVector(0.*cm, 8.5* cm, 0.*cm));
100 
101  //G4SubtractionSolid* lung1 = new G4SubtractionSolid("Lung1", oneLung,
102  // section,
103  // 0, G4ThreeVector(6.*cm,0*cm,0.0*cm));
104 
105  G4SubtractionSolid* lung2 = new G4SubtractionSolid("Lung2", oneLung,
106  section2,
107  0, G4ThreeVector(-6.*cm,0*cm,0.0*cm));
108 
109  // G4RotationMatrix* matrix = new G4RotationMatrix();
110  // matrix->rotateX(180. * degree);
111  //matrix ->rotateZ(180.*degree);
112  //matrix -> rotateY(180.* degree);
113 
114  //G4UnionSolid* lungs = new G4UnionSolid("Lungs", lung1, lung2, matrix, G4ThreeVector(17*cm, 0., 0.));
115 
116 
117  G4LogicalVolume* logicLeftLung = new G4LogicalVolume(lung2,lung_material,
118  "logical" + volumeName, 0, 0, 0);
119 
120 
121  G4VPhysicalVolume* physLeftLung = new G4PVPlacement(0,G4ThreeVector(8.50 *cm, 0.0*cm, 8.5*cm),
122  "physicalLeftLung",
123  logicLeftLung,
124  mother,
125  false,
126  0, true);
127 
128 
129  // Visualization Attributes
130  //G4VisAttributes* LeftLungVisAtt = new G4VisAttributes(G4Colour(0.25,0.41,0.88));
131  G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
132  G4Colour colour = colourPointer -> GetColour(colourName);
133  G4VisAttributes* LeftLungVisAtt = new G4VisAttributes(colour);
134  LeftLungVisAtt->SetForceSolid(wireFrame);
135  logicLeftLung->SetVisAttributes(LeftLungVisAtt);
136 
137  G4cout << "LeftLung created !!!!!!" << G4endl;
138 
139  // Testing LeftLung Volume
140  G4double LeftLungVol = logicLeftLung->GetSolid()->GetCubicVolume();
141 
142  G4cout << "Volume of LeftLung = " << (LeftLungVol)/cm3 << " cm^3" << G4endl;
143 
144  // Testing LeftLung Material
145  G4String LeftLungMat = logicLeftLung->GetMaterial()->GetName();
146  G4cout << "Material of LeftLung = " << LeftLungMat << G4endl;
147 
148  // Testing Density
149  G4double LeftLungDensity = logicLeftLung->GetMaterial()->GetDensity();
150  G4cout << "Density of Material = " << LeftLungDensity*cm3/g << " g/cm^3" << G4endl;
151 
152  // Testing Mass
153  G4double LeftLungMass = (LeftLungVol)*LeftLungDensity;
154  G4cout << "Mass of LeftLung = " << LeftLungMass/gram << " g" << G4endl;
155 
156  return physLeftLung;
157 }
G4Material * GetMaterial() const
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Box.hh:64
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: