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

#include <QDetectorConstruction.hh>

Inheritance diagram for QDetectorConstruction:
Collaboration diagram for QDetectorConstruction:

Public Member Functions

 QDetectorConstruction ()
 
 ~QDetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
 QDetectorConstruction ()
 
 ~QDetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual void ConstructSDandField ()
 
virtual void CloneSD ()
 
virtual void CloneF ()
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
void ConstructParallelSD ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VUserDetectorConstruction
void SetSensitiveDetector (const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
 
void SetSensitiveDetector (G4LogicalVolume *logVol, G4VSensitiveDetector *aSD)
 

Detailed Description

Definition at line 43 of file QDetectorConstruction.hh.

Constructor & Destructor Documentation

QDetectorConstruction::QDetectorConstruction ( )

Definition at line 53 of file QDetectorConstruction.cc.

55 {
56 }
QDetectorConstruction::~QDetectorConstruction ( )

Definition at line 59 of file QDetectorConstruction.cc.

61 {
62 }
QDetectorConstruction::QDetectorConstruction ( )
QDetectorConstruction::~QDetectorConstruction ( )

Member Function Documentation

G4VPhysicalVolume * QDetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 65 of file QDetectorConstruction.cc.

67 {
68  G4Material* mate;
69  G4VisAttributes* va;
70 
71  // ==============================================================
72  // world volume
73  // ==============================================================
74  G4Box* areaSolid= new G4Box("AREA",
75  DXYZ_AREA/2., DXYZ_AREA/2., DXYZ_AREA/2.);
76 
77  G4Material* vacuum= G4Material::GetMaterial("Vacuum");
78  G4LogicalVolume* areaLV= new G4LogicalVolume(areaSolid, vacuum, "AREA_LV");
79  G4PVPlacement* area= new G4PVPlacement(0, G4ThreeVector(), "AREA_PV",
80  areaLV, 0, false, 0);
81  // vis. attributes
82  va= new G4VisAttributes(G4Color(1.,1.,1.));
83  va-> SetForceWireframe(true);
84  areaLV-> SetVisAttributes(va);
85 
86  // ==============================================================
87  // detectors
88  // ==============================================================
89  // voxel
90  const G4double dvoxel= 10.*mm;
91  const G4double dl= 10.*cm;
92 
93  G4Box* svoxel= new G4Box("voxel", dvoxel, dl, dvoxel);
94  mate= G4Material::GetMaterial("Vacuum");
95  G4LogicalVolume* lvoxel= new G4LogicalVolume(svoxel, mate, "voxel");
96  va= new G4VisAttributes(G4Color(0.,0.8,0.8));
97  va-> SetVisibility(false);
98  lvoxel-> SetVisAttributes(va);
99 
100  G4int ix, iz;
101  G4int index=0;
102  for (iz=0; iz<5; iz++) {
103  for (ix=-7; ix<=7; ix++) {
104  G4double x0= (2.*ix)*cm;
105  G4double z0= (-13.+2.*iz)*cm;
106  G4PVPlacement* pvoxel= new
107  G4PVPlacement(0, G4ThreeVector(x0, 0., z0),
108  lvoxel, "voxel", areaLV, false, index);
109  index++;
110  }
111  }
112 
113  // tube
114  //G4Tubs* stube= new G4Tubs("tube", 15./2.*mm, 19./2.*mm, dl,
115  G4Tubs* stube= new G4Tubs("tube", 0.*mm, 19./2.*mm, dl,
116  0., 360.*deg);
117  mate= G4Material::GetMaterial("Al");
118  G4LogicalVolume* ltube= new G4LogicalVolume(stube, mate, "tube");
119  va= new G4VisAttributes(G4Color(0.,0.8,0.8));
120  ltube-> SetVisAttributes(va);
121 
122  G4RotationMatrix* rmtube= new G4RotationMatrix;
123  rmtube-> rotateX(-90.*deg);
124  G4PVPlacement* ptube= new
125  G4PVPlacement(rmtube, G4ThreeVector(),
126  ltube, "tube", lvoxel, false, 0);
127 
128  // cal
129  const G4double dxycal= 25.*mm;
130  const G4double dzcal= 3.*cm;
131 
132  G4Box* scal= new G4Box("cal", dxycal, dxycal, dzcal);
133  mate= G4Material::GetMaterial("CsI");
134  G4LogicalVolume* lcal= new G4LogicalVolume(scal, mate, "cal");
135  va= new G4VisAttributes(G4Color(0.5,0.5,0.));
136  lcal-> SetVisAttributes(va);
137 
138  index= 0;
139  for (ix=-2; ix<=2; ix++) {
140  G4double x0= (5.*ix)*cm;
141  G4PVPlacement* pcal= new
142  G4PVPlacement(0, G4ThreeVector(x0, 0., 2.*cm),
143  lcal, "cal", areaLV, false, index);
144  index++;
145  }
146 
147  return area;
148 }
static constexpr double mm
Definition: G4SIunits.hh:115
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:602
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85
int G4int
Definition: G4Types.hh:78
static constexpr double cm
Definition: G4SIunits.hh:119
G4Colour G4Color
Definition: G4Color.hh:42
double G4double
Definition: G4Types.hh:76
static constexpr double deg
Definition: G4SIunits.hh:152
static const G4double DXYZ_AREA

Here is the call graph for this function:

virtual G4VPhysicalVolume* QDetectorConstruction::Construct ( )
virtual

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