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

#include <G4MIRDUpperSpine.hh>

Inheritance diagram for G4MIRDUpperSpine:
Collaboration diagram for G4MIRDUpperSpine:

Public Member Functions

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

Constructor & Destructor Documentation

G4MIRDUpperSpine::G4MIRDUpperSpine ( )

Definition at line 51 of file G4MIRDUpperSpine.cc.

52 {
53 }
G4MIRDUpperSpine::~G4MIRDUpperSpine ( )

Definition at line 55 of file G4MIRDUpperSpine.cc.

56 {
57 
58 }

Member Function Documentation

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

Implements G4VOrgan.

Definition at line 61 of file G4MIRDUpperSpine.cc.

65 {
67 
68  G4cout<<"Construct "<<volumeName<<" with mother volume "<<mother->GetName()<<G4endl;
69 
70 
71  G4Material* skeleton = material -> GetMaterial("skeleton");
72 
73  delete material;
74 
75  G4double dx = 2. *cm;
76  G4double dy = 2.5 *cm;
77  G4double dz = 4.25*cm;
78 
79  G4EllipticalTube* upperSpine = new G4EllipticalTube("UpperSpine",dx, dy, dz);
80 
81  G4double xx = 20. * cm;
82  G4double yy = 10. * cm;
83  G4double zz = 5. * cm;
84 
85  G4Box* subtraction = new G4Box("box", xx/2., yy/2., zz/2.);
86 
87  G4RotationMatrix* matrix = new G4RotationMatrix();
88  matrix -> rotateX(-25.* deg);
89 
90  G4SubtractionSolid* upper_spine = new G4SubtractionSolid("upperspine",upperSpine, subtraction,
91  matrix, G4ThreeVector(0., -2.5 * cm, 5.5* cm));
92 
93  G4LogicalVolume* logicUpperSpine = new G4LogicalVolume(upper_spine, skeleton,
94  "logical" + volumeName,
95  0, 0, 0);
96  // Define rotation and position here!
97  G4VPhysicalVolume* physUpperSpine = new G4PVPlacement(0,
98  G4ThreeVector(0.0, 5.5 *cm, -3.5 *cm),
99  "physicalUpperSpine",
100  logicUpperSpine,
101  mother,
102  false,
103  0, true);
104 
105  // Visualization Attributes
106  //G4VisAttributes* UpperSpineVisAtt = new G4VisAttributes(G4Colour(0.46,0.53,0.6));
107  G4HumanPhantomColour* colourPointer = new G4HumanPhantomColour();
108  G4Colour colour = colourPointer -> GetColour(colourName);
109  G4VisAttributes* UpperSpineVisAtt = new G4VisAttributes(colour);
110 
111  UpperSpineVisAtt->SetForceSolid(wireFrame);
112  logicUpperSpine->SetVisAttributes(UpperSpineVisAtt);
113 
114  G4cout << "UpperSpine created !!!!!!" << G4endl;
115 
116  // Testing UpperSpine Volume
117  G4double UpperSpineVol = logicUpperSpine->GetSolid()->GetCubicVolume();
118  G4cout << "Volume of UpperSpine = " << UpperSpineVol/cm3 << " cm^3" << G4endl;
119 
120  // Testing UpperSpine Material
121  G4String UpperSpineMat = logicUpperSpine->GetMaterial()->GetName();
122  G4cout << "Material of UpperSpine = " << UpperSpineMat << G4endl;
123 
124  // Testing Density
125  G4double UpperSpineDensity = logicUpperSpine->GetMaterial()->GetDensity();
126  G4cout << "Density of Material = " << UpperSpineDensity*cm3/g << " g/cm^3" << G4endl;
127 
128  // Testing Mass
129  G4double UpperSpineMass = (UpperSpineVol)*UpperSpineDensity;
130  G4cout << "Mass of UpperSpine = " << UpperSpineMass/gram << " g" << G4endl;
131 
132 
133  return physUpperSpine;
134 }
G4Material * GetMaterial() const
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
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
static constexpr double deg
Definition: G4SIunits.hh:152
void SetVisAttributes(const G4VisAttributes *pVA)

Here is the call graph for this function:


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