Loading...
Searching...
No Matches
Public Member Functions | List of all members
H02DetectorConstruction Class Reference

#include <Doxymodules_eventgenerator.h>

Inheritance diagram for H02DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 H02DetectorConstruction ()
 
 ~H02DetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 

Detailed Description

Definition at line 70 of file Doxymodules_eventgenerator.h.

Constructor & Destructor Documentation

◆ H02DetectorConstruction()

H02DetectorConstruction::H02DetectorConstruction ( )

◆ ~H02DetectorConstruction()

H02DetectorConstruction::~H02DetectorConstruction ( )

Definition at line 80 of file H02DetectorConstruction.cc.

81{
82}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * H02DetectorConstruction::Construct ( )
virtual

Definition at line 85 of file H02DetectorConstruction.cc.

86{
87 // ==============================================================
88 // Materials
89 // ==============================================================
90
91 G4NistManager* nistManager = G4NistManager::Instance();
92 G4Material* air = nistManager->FindOrBuildMaterial("G4_AIR");
93 G4Material* lead = nistManager->FindOrBuildMaterial("G4_Pb");
94
95 // Argon gas
96 G4double a, z, density;
97 a= 39.95*g/mole;
98 density= 1.782e-03*g/cm3;
99 G4Material* ar= new G4Material("ArgonGas", z=18., a, density);
100
101
102 // ==============================================================
103 // Experimental Hall (world)
104 // ==============================================================
105 G4Tubs* expHallSolid=
106 new G4Tubs("EXP_HALL", 0., R_EXPHALL, DZ_EXPHALL, 0., 360.*deg);
107
108 G4LogicalVolume* expHallLV=
109 new G4LogicalVolume(expHallSolid, air, "EXP_HALL_LV");
110
111 // visualization attributes
112 G4VisAttributes* expHallVisAtt=
113 new G4VisAttributes(false, G4Colour(1., 1., 1.));
114 //expHallVisAtt-> SetForceWireframe(TRUE);
115 expHallLV-> SetVisAttributes(expHallVisAtt);
116
117 G4PVPlacement* expHall= new G4PVPlacement(0, G4ThreeVector(), "EXP_HALL_PV",
118 expHallLV, 0, FALSE, 0);
119 // ... MV, MANY, copy#
120
121 // ==============================================================
122 // each detector component
123 // ==============================================================
124 // calorimeter system
125 G4Tubs* barrelCalSolid=
126 new G4Tubs("BARREL_CAL", RIN_BARREL_CAL, ROUT_BARREL_CAL,
127 DZ_BARREL_CAL, 0., 360.*deg);
128
129 G4Tubs* endcapCalSolid=
130 new G4Tubs("ENDCAP_CAL", RIN_ENDCAP_CAL, ROUT_ENDCAP_CAL,
131 DZ_ENDCAP_CAL, 0., 360.*deg);
132
133 G4LogicalVolume* barrelCalLV=
134 new G4LogicalVolume(barrelCalSolid, lead, "BARREL_CAL_LV");
135
136 G4LogicalVolume* endcapCalLV=
137 new G4LogicalVolume(endcapCalSolid, lead, "ENDCAP_CAL_LV");
138
139 G4VisAttributes* calVisAtt=
140 new G4VisAttributes(true, G4Colour(0., 1., 1.));
141 barrelCalLV-> SetVisAttributes(calVisAtt);
142 endcapCalLV-> SetVisAttributes(calVisAtt);
143
144 // G4PVPlacement* barrelCal=
145 new G4PVPlacement(0, G4ThreeVector(), "BARREL_CAL_PV",
146 barrelCalLV, expHall, FALSE, 0);
147
148 G4ThreeVector posCal(0.,0.,6.*m);
149 // G4PVPlacement* endcapCal1=
150 new G4PVPlacement(0, posCal, "ENDCAP_CAL_PV",
151 endcapCalLV, expHall, FALSE, 0);
152
153 //G4PVPlacement* endcapCal2=
154 new G4PVPlacement(0, -posCal, "ENDCAP_CAL_PV",
155 endcapCalLV, expHall, FALSE, 1);
156
157 // muon system
158 G4Box* barrelMuonSolid= new G4Box("BARREL_MUON", DX_BARREL_MUON,
160 G4Tubs* endcapMuonSolid=
161 new G4Tubs("ENDCAP_MUON", RIN_ENDCAP_MUON, ROUT_ENDCAP_MUON,
162 DZ_ENDCAP_MUON, 0., 360.*deg);
163
164 G4LogicalVolume* barrelMuonLV=
165 new G4LogicalVolume(barrelMuonSolid, ar, "BARREL_MUON_LV");
166
167 G4LogicalVolume* endcapMuonLV=
168 new G4LogicalVolume(endcapMuonSolid, ar, "ENDCAP_MUON_LV");
169
170 G4VisAttributes* muonVisAtt=
171 new G4VisAttributes(true, G4Colour(1., 1., 0.5));
172 //muonVisAtt-> SetForceWireframe(TRUE);
173 barrelMuonLV-> SetVisAttributes(muonVisAtt);
174 endcapMuonLV-> SetVisAttributes(muonVisAtt);
175
176 const G4double dangle= 45.*deg;
177 G4ThreeVector posM(RIN_BARREL_MUON+DY_BARREL_MUON/2., 0., 0.);
178 G4RotationMatrix* rotM= new G4RotationMatrix;
179 rotM->rotateZ(90.*deg);
180
181 for (G4int k=0; k<8; k++) {
182 G4Transform3D transformM(*rotM, posM);
183 new G4PVPlacement(transformM, "BARREL_MUON_PV",
184 barrelMuonLV, expHall, FALSE, k);
185 rotM->rotateZ(dangle);
186 posM.rotateZ(dangle);
187 }
188
189 G4ThreeVector posMuon(0.,0.,8.*m);
190 // G4PVPlacement* endcapMuon1=
191 new G4PVPlacement(0, posMuon, "ENDCAP_MUON_PV",
192 endcapMuonLV, expHall, FALSE, 0);
193
194 // G4PVPlacement* endcapMuon2=
195 new G4PVPlacement(0, -posMuon, "ENDCAP_MUON_PV",
196 endcapMuonLV, expHall, FALSE, 1);
197
198
199 // sensitive Detectors
200 G4SDManager* SDman= G4SDManager::GetSDMpointer();
201
202 G4String muonSDname= "/mydet/muon";
203 H02MuonSD* muonSD= new H02MuonSD(muonSDname);
204 SDman-> AddNewDetector(muonSD);
205 barrelMuonLV-> SetSensitiveDetector(muonSD);
206 endcapMuonLV-> SetSensitiveDetector(muonSD);
207
208 // magnetic field
209 H02Field* myfield = new H02Field;
210 G4FieldManager* fieldMgr=
211 G4TransportationManager::GetTransportationManager()-> GetFieldManager();
212 fieldMgr-> SetDetectorField(myfield);
213 fieldMgr-> CreateChordFinder(myfield);
214
215 return expHall;
216}
std::vector< ExP01TrackerHit * > a
static const G4double RIN_BARREL_MUON
static const G4double ROUT_BARREL_CAL
static const G4double DZ_ENDCAP_CAL
static const G4double RIN_ENDCAP_MUON
static const G4double DY_BARREL_MUON
static const G4double R_EXPHALL
static const G4double DZ_EXPHALL
static const G4double ROUT_ENDCAP_MUON
static const G4double RIN_BARREL_CAL
static const G4double DZ_BARREL_CAL
static const G4double ROUT_ENDCAP_CAL
static const G4double DX_BARREL_MUON
static const G4double DZ_BARREL_MUON
static const G4double DZ_ENDCAP_MUON
static const G4double RIN_ENDCAP_CAL

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

Applications | User Support | Publications | Collaboration