// // ******************************************************************** // * DISCLAIMER * // * * // * The following disclaimer summarizes all the specific disclaimers * // * of contributors to this software. The specific disclaimers,which * // * govern, are listed with their locations in: * // * http://cern.ch/geant4/license * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. * // * * // * This code implementation is the intellectual property of the * // * GEANT4 collaboration. * // * By copying, distributing or modifying the Program (or any work * // * based on the Program) you indicate your acceptance of this * // * statement, and all its terms. * // ******************************************************************** // // // $Id: EXPO_Detector.icc,v 1.4 2001/07/11 09:56:42 gunter Exp $ // GEANT4 tag $Name: geant4-05-01 $ // // See also G4/run/example/MyDetectorConstruction.cc. #include #ifdef DEBUG #include #endif #include #include #include #include #include #include #include #include class EXPO_DetectorConstruction : public G4VUserDetectorConstruction { public: EXPO_DetectorConstruction() { } ~EXPO_DetectorConstruction() { } G4VPhysicalVolume* Construct() { G4String name,symbol; G4double iz,a; G4double z,density; G4int nel; #ifdef DEBUG printf ("debug : EXPO_DetectorConstruction.Construct : begin.\n"); #endif // Elements G4Element* elN = new G4Element (name="Nitrogen" , symbol="N", iz=7., a=14.01*g/mole); G4Element* elO = new G4Element (name="Oxygen" , symbol="O", iz=8., a=16.00*g/mole); #ifdef DEBUG printf ("debug : EXPO_DetectorConstruction.Construct : end Elements.\n"); #endif // Materials G4Material* Air = new G4Material("Air" , density = 1.29e-03*g/cm3, nel=2); Air->AddElement (elN, .7); Air->AddElement (elO, .3); #ifdef DEBUG printf ("debug : EXPO_DetectorConstruction.Construct : end Air.\n"); #endif G4Material* Al = new G4Material("Aluminium", z=13., a = 26.98 *g/mole, density = 2.7 *g/cm3); G4Material* Fe = new G4Material("Iron" , z=26., a = 55.85 *g/mole, density = 7.87 *g/cm3); G4Material* Pb = new G4Material("Lead" , z=82., a = 207.19*g/mole, density = 11.35*g/cm3); #ifdef DEBUG printf ("debug : EXPO_DetectorConstruction.Construct : end Materials.\n"); #endif // Geometry G4Box* myWorldBox = new G4Box ("WorldBox" ,10000*cm,10000*cm,10000*cm); G4Box* myCalorBox = new G4Box ("CalorBox" ,1500*cm ,1500*cm ,1000*cm); G4Tubs* myChambTube = new G4Tubs ("ChambTube" ,50*cm,150*cm,200*cm,0.*deg,360.*deg); #ifdef DEBUG printf ("debug : EXPO_DetectorConstruction.Construct : end Geometry.\n"); #endif // Logical volumes G4LogicalVolume* myWorldLog = new G4LogicalVolume (myWorldBox ,Air,"WorldLog" ,0,0,0); G4LogicalVolume* myCalorLog = new G4LogicalVolume (myCalorBox ,Air,"CalorLog" ,0,0,0); G4LogicalVolume* myChambLog = new G4LogicalVolume (myChambTube ,Pb ,"ChambLog" ,0,0,0); #ifdef DEBUG printf ("debug : EXPO_DetectorConstruction.Construct : end Logical volumes.\n"); #endif // Physical volumes G4PVPlacement* myWorldPhys = new G4PVPlacement (0,G4ThreeVector() ,"WorldPhys",myWorldLog,0 ,false,0); G4PVPlacement* myCalorPhys = new G4PVPlacement (0,G4ThreeVector() ,"CalorPhys",myCalorLog,myWorldPhys,false,0); G4PVPlacement* myChambPhys = new G4PVPlacement (0,G4ThreeVector(0*cm,0*cm,0*cm),"ChambPhys",myChambLog,myCalorPhys,false,1); #ifdef DEBUG printf ("debug : EXPO_DetectorConstruction.Construct : end.\n"); #endif return myWorldPhys; } };