[1316] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | |
---|
| 27 | #include "ExampleDetectorConstruction.hh" |
---|
| 28 | |
---|
| 29 | ExampleDetectorConstruction::ExampleDetectorConstruction() |
---|
| 30 | { |
---|
| 31 | expHall_x = 1111600.*cm; |
---|
| 32 | expHall_y = 1111600.*cm; |
---|
| 33 | expHall_z = 1111600.*cm; |
---|
| 34 | |
---|
| 35 | calBox_x = 50.*cm; |
---|
| 36 | calBox_y = 50.*cm; |
---|
| 37 | calBox_z = 50.*cm; |
---|
| 38 | rotAngle = 30.*deg; |
---|
| 39 | calPos = 200.*cm; |
---|
| 40 | |
---|
| 41 | trackerRadius = 50.*cm; |
---|
| 42 | trackerHight = 100.*cm; |
---|
| 43 | trackerPos = -200.*cm; |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | ExampleDetectorConstruction::~ExampleDetectorConstruction() |
---|
| 47 | {;} |
---|
| 48 | |
---|
| 49 | G4VPhysicalVolume* ExampleDetectorConstruction::Construct() |
---|
| 50 | { |
---|
| 51 | |
---|
| 52 | //------------------------------------------------------ materials |
---|
| 53 | |
---|
| 54 | G4double a, iz, z, density; |
---|
| 55 | G4String name, symbol; |
---|
| 56 | G4int nel; |
---|
| 57 | |
---|
| 58 | a = 14.01*g/mole; |
---|
| 59 | G4Element* elN = new G4Element(name="Nitrogen", symbol="N", iz=7., a); |
---|
| 60 | a = 16.00*g/mole; |
---|
| 61 | G4Element* elO = new G4Element(name="Oxygen", symbol="O", iz=8., a); |
---|
| 62 | |
---|
| 63 | density = 1.29e-03*g/cm3; |
---|
| 64 | G4Material* Air = new G4Material(name="Air", density, nel=2); |
---|
| 65 | Air->AddElement(elN, .7); |
---|
| 66 | Air->AddElement(elO, .3); |
---|
| 67 | |
---|
| 68 | a = 207.19*g/mole; |
---|
| 69 | density = 11.35*g/cm3; |
---|
| 70 | G4Material* Lead = new G4Material(name="Lead", z=82., a, density); |
---|
| 71 | |
---|
| 72 | a = 39.95*g/mole; |
---|
| 73 | density = 1.782e-03*g/cm3; |
---|
| 74 | G4Material* Ar = new G4Material(name="ArgonGas", z=18., a, density); |
---|
| 75 | |
---|
| 76 | //------------------------------------------------------ volumes |
---|
| 77 | |
---|
| 78 | //------------------------------ experimental hall |
---|
| 79 | |
---|
| 80 | G4Box * experimentalHall_box |
---|
| 81 | = new G4Box("expHall_b",expHall_x,expHall_y,expHall_z); |
---|
| 82 | |
---|
| 83 | G4LogicalVolume * experimentalHall_log |
---|
| 84 | = new G4LogicalVolume(experimentalHall_box,Air,"expHall_L",0,0,0); |
---|
| 85 | |
---|
| 86 | G4VPhysicalVolume * experimentalHall_phys |
---|
| 87 | = new G4PVPlacement(0,G4ThreeVector(),"expHall_P", |
---|
| 88 | experimentalHall_log,0,false,0); |
---|
| 89 | |
---|
| 90 | G4ThreeVector coords(0.0,0.0,0.0); |
---|
| 91 | |
---|
| 92 | G4Box *vol1_solid = new G4Box("v1_sol",10.*m,10.*m,10.*m); |
---|
| 93 | |
---|
| 94 | G4LogicalVolume *vol1_log = new G4LogicalVolume(vol1_solid,Lead,"v1_log",0,0,0); |
---|
| 95 | |
---|
| 96 | G4VPhysicalVolume *vol1_phys = new G4PVPlacement(0,coords,"v1_sol",vol1_log, |
---|
| 97 | experimentalHall_phys,false,0); |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | G4Box *vol2_solid = new G4Box("v2_sol",10.*mm,10.*mm,10.*mm); |
---|
| 101 | |
---|
| 102 | G4LogicalVolume *vol2_log = new G4LogicalVolume(vol2_solid,Lead,"v2_log",0,0,0); |
---|
| 103 | |
---|
| 104 | G4VPhysicalVolume *vol2_phys = new G4PVPlacement(0,coords,"v2_sol",vol2_log, |
---|
| 105 | vol1_phys,false,0); |
---|
| 106 | |
---|
| 107 | |
---|
| 108 | return experimentalHall_phys; |
---|
| 109 | } |
---|
| 110 | |
---|
| 111 | |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | |
---|
| 121 | |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | |
---|
| 125 | |
---|