LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 42 of file QDetectorConstruction.hh.

Constructor & Destructor Documentation

QDetectorConstruction::QDetectorConstruction ( )

Definition at line 52 of file QDetectorConstruction.cc.

54 {
55 }
QDetectorConstruction::~QDetectorConstruction ( )

Definition at line 58 of file QDetectorConstruction.cc.

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

Member Function Documentation

G4VPhysicalVolume * QDetectorConstruction::Construct ( )
virtual

Definition at line 64 of file QDetectorConstruction.cc.

References DXYZ_AREA.

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

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