LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
QDetectorConstruction Class Reference

#include "QDetectorConstruction.hh"

Inheritance diagram for QDetectorConstruction:

Public Member Functions

 QDetectorConstruction ()
 
 ~QDetectorConstruction ()
 
virtual G4VPhysicalVolume * Construct ()
 
 QDetectorConstruction ()
 
 ~QDetectorConstruction ()
 
virtual G4VPhysicalVolume * Construct ()
 

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 ( )
virtual

Definition at line 65 of file QDetectorConstruction.cc.

References DXYZ_AREA.

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 const G4double DXYZ_AREA
virtual G4VPhysicalVolume* QDetectorConstruction::Construct ( )
virtual

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