// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * 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. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // /// \file B1DetectorConstruction.cc /// \brief Implementation of the B1DetectorConstruction class #include "B1DetectorConstruction.hh" #include "G4RunManager.hh" #include "G4NistManager.hh" #include "G4Box.hh" #include "G4Tubs.hh" #include "G4Cons.hh" #include "G4Orb.hh" #include "G4Sphere.hh" #include "G4Trd.hh" #include "G4LogicalVolume.hh" #include "G4PVPlacement.hh" #include "G4SystemOfUnits.hh" //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... B1DetectorConstruction::B1DetectorConstruction() : G4VUserDetectorConstruction(), fScoringVolume(0) { } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... B1DetectorConstruction::~B1DetectorConstruction() { } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... G4VPhysicalVolume* B1DetectorConstruction::Construct() { // Get nist material manager G4NistManager* nist = G4NistManager::Instance(); G4double env_sizeXY = 20*cm, env_sizeZ = 30*cm; // Option to switch on/off checking of volumes overlaps // G4bool checkOverlaps = true; // // World // //caracteristicas do cilĂ­ndro G4double raio_i = 0; G4double raio_e = 80.*m; G4double h = 100.*m; G4double theta_0 = 0.*deg; G4double theta_f = 360.*deg; G4Material* world_mat = nist->FindOrBuildMaterial("G4_AIR"); G4Tubs* cilindro = new G4Tubs("world", raio_i, raio_e, h, theta_0, theta_f); G4LogicalVolume* logicWorld = new G4LogicalVolume(cilindro, //its solid world_mat, //its material "World"); //its name G4VPhysicalVolume* physWorld = new G4PVPlacement(0, //no rotation G4ThreeVector(), //at (0,0,0) logicWorld, //its logical volume "World", //its name 0, //its mother volume false, //no boolean operation 0, //copy number checkOverlaps); //overlaps checking // //always return the physical World // fScoringVolume = logicWorld; return physWorld; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......