// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * 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 "G4Trap.hh" #include "G4Orb.hh" #include "G4Sphere.hh" #include "G4Trd.hh" #include "G4LogicalVolume.hh" #include "G4PVPlacement.hh" #include "G4SystemOfUnits.hh" #include "G4VisAttributes.hh" #include "G4Colour.hh" #include "G4Material.hh" #include "G4UnionSolid.hh" #include "G4SubtractionSolid.hh" #include "G4ThreeVector.hh" #include "MGGerdaLocalMaterialTable.hh" #include "MGEMIDetectorMessenger.hh" //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... B1DetectorConstruction::B1DetectorConstruction(G4int WorldMat,G4double world_sizeX, G4double world_sizeY, G4double world_sizeZ, G4double leadshield_sizeX, G4double leadshield_sizeY, G4double leadshield_sizeZ, G4double coppershield_sizeX, G4double coppershield_sizeY, G4double coppershield_sizeZ, G4double Nfilledchamber_sizeX, G4double Nfilledchamber_sizeY, G4double Nfilledchamber_sizeZ, G4double Ndetwindow_Rmax, G4double Ndetwindow_sizeZ, G4double dethousing_Rmin, G4double dethousing_Rmax, G4double dethousing_sizeZ, G4double detvacuum_Rmax, G4double detvacuum_sizeZ, G4double dethousingclad_Rmin, G4double dethousingclad_Rmax, G4double dethousingclad_sizeZ, G4double detinnercap_Rmin, G4double detinnercap_Rmax, G4double detinnercap_sizeZ, G4double detinnercapbottom_Rmin, G4double detinnercapbottom_Rmax, G4double detinnercapbottom_sizeZ, G4double detinnercapring_Rmin, G4double detinnercapring_Rmax, G4double detinnercapring_sizeZ, G4double detinnercaptop_Rmax, G4double detinnercaptop_sizeZ, G4double detinnercapplate_Rmax, G4double detinnercapplate_sizeZ, G4double detpecap_Rmin, G4double detpecap_Rmax, G4double detpecap_sizeZ, G4double detpecaptop_Rmin, G4double detpecaptop_Rmax, G4double detpecaptop_sizeZ, G4double detdeadlayer_Rmax, G4double detdeadlayer_sizeZ, G4double crystal_l, G4double d_dead, G4double crystal_Rmax, G4double crystal_sizeZ, G4double hole_d, G4double hole_l, G4double detholeincrystal_Rmax, G4double detholeincrystal_sizeZ, G4double y, G4double detdeadcone_Rmin1, G4double detdeadcone_Rmax1, G4double detdeadcone_Rmin2, G4double detdeadcone_Rmax2, G4double detdeadcone_sizeZ, G4bool smarinelli_geom, G4double Cublock_sizeX, G4double Cublock_sizeY, G4double Cublock_sizeZ, G4double drhole_Rmax, G4double drhole_sizeZ, G4double marinellis1l_Rmin, G4double marinellis1l_Rmax, G4double marinellis1l_sizeZ, G4double marinellis1o_Rmin, G4double marinellis1o_Rmax, G4double marinellis1o_sizeZ, G4double marinellis2o_Rmin1, G4double marinellis2o_Rmax1, G4double marinellis2o_Rmin2, G4double marinellis2o_Rmax2, G4double marinellis2o_sizeZ, G4double marinellis1i_Rmin1, G4double marinellis1i_Rmax1, G4double marinellis1i_Rmin2, G4double marinellis1i_Rmax2, G4double marinellis1i_sizeZ, G4double marinellis2l_Rmax, G4double marinellis2l_sizeZ, G4double marinellis3l_Rmax, G4double marinellis3l_sizeZ, G4double smarinelli_height, G4bool vsmarinelli_geom, G4double marinellivs1l_Rmin, G4double marinellivs1l_Rmax, G4double marinellivs1l_sizeZ, G4double marinellivs1o_Rmin1, G4double marinellivs1o_Rmax1, G4double marinellivs1o_Rmin2, G4double marinellivs1o_Rmax2, G4double marinellivs1o_sizeZ, G4double marinellivs2o_Rmin1, G4double marinellivs2o_Rmax1, G4double marinellivs2o_Rmin2, G4double marinellivs2o_Rmax2, G4double marinellivs2o_sizeZ, G4double marinellivs1i_Rmin1, G4double marinellivs1i_Rmax1, G4double marinellivs1i_Rmin2, G4double marinellivs1i_Rmax2, G4double marinellivs1i_sizeZ, G4double marinellivs2l_Rmax, G4double marinellivs2l_sizeZ, G4double marinellivs3l_Rmax, G4double marinellivs3l_sizeZ, G4double vsmarinelli_height, G4bool box_geom, G4double cudisks_Rmax, G4double cudisks_sizeZ, G4double bagbox_sizeX, G4double bagbox_sizeY, G4double bagbox_sizeZ, G4double samplebox_sizeX, G4double samplebox_sizeY, G4double samplebox_sizeZ, G4double box_thickness, G4bool tube_geom, G4double bagtube_Rmin, G4double bagtube_Rmax, G4double bagtube_sizeZ, G4double bagtube_fimax, G4double sampletube_Rmin, G4double sampletube_Rmax, G4double sampletube_sizeZ, G4double sampletube_fimax, G4bool twobox_geom, G4double detplasticcap_Rmax, G4double detplasticcap_sizeZ, G4double detplasticcap1_Rmax, G4double detplasticcap1_sizeZ, G4double detplasticshell_Rmin, G4double detplasticshell_Rmax, G4double detplasticshell_sizeZ, G4double spheretwobox_rad, G4bool liquid_geom, G4double sampleliquid_Rmin, G4double sampleliquid_Rmax, G4double sampleliquid_sizeZ, G4double sampleliquid_fimax, G4double boxliquid_height, G4bool nocuinsert_geom, G4double truncside_Rmin1, G4double truncside_Rmax1, G4double truncside_Rmin2, G4double truncside_Rmax2, G4double truncside_sizeZ, G4double trunctop_Rmax, G4double trunctop_sizeZ, G4double samplenocuinsert_sizeZ, G4double samplenocuinsert_sizeYBasemin, G4double samplenocuinsert_sizeYBasemax, G4double samplenocuinsert_sizeXSmallYmin, G4double samplenocuinsert_sizeXBigYmin, G4double samplenocuinsert_sizeXSmallYmax, G4double samplenocuinsert_sizeXBigYmax, G4bool marinelli_geom, G4double topbox_sizeX, G4double topbox_sizeY, G4double topbox_sizeZ, G4double side1_sizeX, G4double side1_sizeY, G4double side1_sizeZ, G4double side2_sizeX, G4double side2_sizeY, G4double side2_sizeZ, G4double bottombody_sizeX, G4double bottombody_sizeY, G4double bottombody_sizeZ, G4double bottomhole_Rmax, G4double bottomhole_sizeZ, G4double bottomhole_fimax, G4double innercyl_Rmin, G4double innercyl_Rmax, G4double innercyl_sizeZ, G4double innercyl_fimax, G4double innertop_Rmax, G4double innertop_sizeZ, G4double innertop_fimax, G4double samplemarinellibody_sizeX, G4double samplemarinellibody_sizeY, G4double samplemarinellibody_sizeZ, G4double samplemarinellihole_Rmax, G4double samplemarinellihole_sizeZ, G4double samplemarinellihole_fimax) : G4VUserDetectorConstruction(), fScoringVolume(0), fWorldMat(WorldMat), fWorld_sizeX(world_sizeX), fWorld_sizeY(world_sizeY), fWorld_sizeZ(world_sizeZ), fleadshield_sizeX(leadshield_sizeX), fleadshield_sizeY(leadshield_sizeY), fleadshield_sizeZ(leadshield_sizeZ), fcoppershield_sizeX(coppershield_sizeX), fcoppershield_sizeY(coppershield_sizeY), fcoppershield_sizeZ(coppershield_sizeZ), fNfilledchamber_sizeX(Nfilledchamber_sizeX), fNfilledchamber_sizeY(Nfilledchamber_sizeY), fNfilledchamber_sizeZ(Nfilledchamber_sizeZ), fNdetwindow_Rmax(Ndetwindow_Rmax), fNdetwindow_sizeZ(Ndetwindow_sizeZ), fdethousing_Rmin(dethousing_Rmin), fdethousing_Rmax(dethousing_Rmax), fdethousing_sizeZ(dethousing_sizeZ), fdetvacuum_Rmax(detvacuum_Rmax), fdetvacuum_sizeZ(detvacuum_sizeZ), fdethousingclad_Rmin(dethousingclad_Rmin), fdethousingclad_Rmax(dethousingclad_Rmax), fdethousingclad_sizeZ(dethousingclad_sizeZ), fdetinnercap_Rmin(detinnercap_Rmin), fdetinnercap_Rmax(detinnercap_Rmax), fdetinnercap_sizeZ(detinnercap_sizeZ), fdetinnercapbottom_Rmin(detinnercapbottom_Rmin), fdetinnercapbottom_Rmax(detinnercapbottom_Rmax), fdetinnercapbottom_sizeZ(detinnercapbottom_sizeZ), fdetinnercapring_Rmin(detinnercapring_Rmin), fdetinnercapring_Rmax(detinnercapring_Rmax), fdetinnercapring_sizeZ(detinnercapring_sizeZ), fdetinnercaptop_Rmax(detinnercaptop_Rmax), fdetinnercaptop_sizeZ(detinnercaptop_sizeZ), fdetinnercapplate_Rmax(detinnercapplate_Rmax), fdetinnercapplate_sizeZ(detinnercapplate_sizeZ), fdetpecap_Rmin(detpecap_Rmin), fdetpecap_Rmax(detpecap_Rmax), fdetpecap_sizeZ(detpecap_sizeZ), fdetpecaptop_Rmin(detpecaptop_Rmin), fdetpecaptop_Rmax(detpecaptop_Rmax), fdetpecaptop_sizeZ(detpecaptop_sizeZ), fdetdeadlayer_Rmax(detdeadlayer_Rmax), fdetdeadlayer_sizeZ(detdeadlayer_sizeZ), fcrystal_l(crystal_l), fd_dead(d_dead), fcrystal_Rmax(crystal_Rmax), fcrystal_sizeZ(crystal_sizeZ), fhole_d(hole_d), fhole_l(hole_l), fdetholeincrystal_Rmax(detholeincrystal_Rmax), fdetholeincrystal_sizeZ(detholeincrystal_sizeZ), fy(y), fdetdeadcone_Rmin1(detdeadcone_Rmin1), fdetdeadcone_Rmax1(detdeadcone_Rmax1), fdetdeadcone_Rmin2(detdeadcone_Rmin2), fdetdeadcone_Rmax2(detdeadcone_Rmax2), fdetdeadcone_sizeZ(detdeadcone_sizeZ), fsmarinelli_geom(smarinelli_geom), fCublock_sizeX(Cublock_sizeX), fCublock_sizeY(Cublock_sizeY), fCublock_sizeZ(Cublock_sizeZ), fdrhole_Rmax(drhole_Rmax), fdrhole_sizeZ(drhole_sizeZ), fmarinellis1l_Rmin(marinellis1l_Rmin), fmarinellis1l_Rmax(marinellis1l_Rmax), fmarinellis1l_sizeZ(marinellis1l_sizeZ), fmarinellis1o_Rmin(marinellis1o_Rmin), fmarinellis1o_Rmax(marinellis1o_Rmax), fmarinellis1o_sizeZ(marinellis1o_sizeZ), fmarinellis2o_Rmin1(marinellis2o_Rmin1), fmarinellis2o_Rmax1(marinellis2o_Rmax1), fmarinellis2o_Rmin2(marinellis2o_Rmin2), fmarinellis2o_Rmax2(marinellis2o_Rmax2), fmarinellis2o_sizeZ(marinellis2o_sizeZ), fmarinellis1i_Rmin1(marinellis1i_Rmin1), fmarinellis1i_Rmax1(marinellis1i_Rmax1), fmarinellis1i_Rmin2(marinellis1i_Rmin2), fmarinellis1i_Rmax2(marinellis1i_Rmax2), fmarinellis1i_sizeZ(marinellis1i_sizeZ), fmarinellis2l_Rmax(marinellis2l_Rmax), fmarinellis2l_sizeZ(marinellis2l_sizeZ), fmarinellis3l_Rmax(marinellis3l_Rmax), fmarinellis3l_sizeZ(marinellis3l_sizeZ), fsmarinelli_height(smarinelli_height), fvsmarinelli_geom(vsmarinelli_geom), fmarinellivs1l_Rmin(marinellivs1l_Rmin), fmarinellivs1l_Rmax(marinellivs1l_Rmax), fmarinellivs1l_sizeZ(marinellivs1l_sizeZ), fmarinellivs1o_Rmin1(marinellivs1o_Rmin1), fmarinellivs1o_Rmax1(marinellivs1o_Rmax1), fmarinellivs1o_Rmin2(marinellivs1o_Rmin2), fmarinellivs1o_Rmax2(marinellivs1o_Rmax2), fmarinellivs1o_sizeZ(marinellivs1o_sizeZ), fmarinellivs2o_Rmin1(marinellivs2o_Rmin1), fmarinellivs2o_Rmax1(marinellivs2o_Rmax1), fmarinellivs2o_Rmin2(marinellivs2o_Rmin2), fmarinellivs2o_Rmax2(marinellivs2o_Rmax2), fmarinellivs2o_sizeZ(marinellivs2o_sizeZ), fmarinellivs1i_Rmin1(marinellivs1i_Rmin1), fmarinellivs1i_Rmax1(marinellivs1i_Rmax1), fmarinellivs1i_Rmin2(marinellivs1i_Rmin2), fmarinellivs1i_Rmax2(marinellivs1i_Rmax2), fmarinellivs1i_sizeZ(marinellivs1i_sizeZ), fbox_geom(box_geom), fcudisks_Rmax(cudisks_Rmax), fcudisks_sizeZ(cudisks_sizeZ), fbagbox_sizeX(bagbox_sizeX), fbagbox_sizeY(bagbox_sizeY), fbagbox_sizeZ(bagbox_sizeZ), fsamplebox_sizeX(samplebox_sizeX), fsamplebox_sizeY(samplebox_sizeY), fsamplebox_sizeZ(samplebox_sizeZ), fbox_thickness(box_thickness), ftube_geom(tube_geom), fbagtube_Rmin(bagtube_Rmin), fbagtube_Rmax(bagtube_Rmax), fbagtube_sizeZ(bagtube_sizeZ), fbagtube_fimax(bagtube_fimax), fsampletube_Rmin(sampletube_Rmin), fsampletube_Rmax(sampletube_Rmax), fsampletube_sizeZ(sampletube_sizeZ), fsampletube_fimax(sampletube_fimax), ftwobox_geom(twobox_geom), fdetplasticcap_Rmax(detplasticcap_Rmax), fdetplasticcap_sizeZ(detplasticcap_sizeZ), fdetplasticcap1_Rmax(detplasticcap1_Rmax), fdetplasticcap1_sizeZ(detplasticcap1_sizeZ), fdetplasticshell_Rmin(detplasticshell_Rmin), fdetplasticshell_Rmax(detplasticshell_Rmax), fdetplasticshell_sizeZ(detplasticshell_sizeZ), fspheretwobox_rad(spheretwobox_rad), fliquid_geom(liquid_geom), fsampleliquid_Rmin(sampleliquid_Rmin), fsampleliquid_Rmax(sampleliquid_Rmax), fsampleliquid_sizeZ(sampleliquid_sizeZ), fsampleliquid_fimax(sampleliquid_fimax), fboxliquid_height(boxliquid_height), fnocuinsert_geom(nocuinsert_geom), ftruncside_Rmin1(truncside_Rmin1), ftruncside_Rmax1(truncside_Rmax1), ftruncside_Rmin2(truncside_Rmin2), ftruncside_Rmax2(truncside_Rmax2), ftruncside_sizeZ(truncside_sizeZ), ftrunctop_Rmax(trunctop_Rmax), ftrunctop_sizeZ(trunctop_sizeZ), fsamplenocuinsert_sizeZ(samplenocuinsert_sizeZ), fsamplenocuinsert_sizeYBasemin(samplenocuinsert_sizeYBasemin), fsamplenocuinsert_sizeYBasemax(samplenocuinsert_sizeYBasemax), fsamplenocuinsert_sizeXSmallYmin(samplenocuinsert_sizeXSmallYmin), fsamplenocuinsert_sizeXBigYmin(samplenocuinsert_sizeXBigYmin), fsamplenocuinsert_sizeXSmallYmax(samplenocuinsert_sizeXSmallYmax), fsamplenocuinsert_sizeXBigYmax(samplenocuinsert_sizeXBigYmax), fmarinelli_geom(marinelli_geom), ftopbox_sizeX(topbox_sizeX), ftopbox_sizeY(topbox_sizeY), ftopbox_sizeZ(topbox_sizeZ), fside1_sizeX(side1_sizeX), fside1_sizeY(side1_sizeY), fside1_sizeZ(side1_sizeZ), fside2_sizeX(side2_sizeX), fside2_sizeY(side2_sizeY), fside2_sizeZ(side2_sizeZ), fbottombody_sizeX(bottombody_sizeX), fbottombody_sizeY(bottombody_sizeY), fbottombody_sizeZ(bottombody_sizeZ), fbottomhole_Rmax(bottomhole_Rmax), fbottomhole_sizeZ(bottomhole_sizeZ), fbottomhole_fimax(bottomhole_fimax), finnercyl_Rmin(innercyl_Rmin), finnercyl_Rmax(innercyl_Rmax), finnercyl_sizeZ(innercyl_sizeZ), finnercyl_fimax(innercyl_fimax), finnertop_Rmax(innertop_Rmax), finnertop_sizeZ(innertop_sizeZ), finnertop_fimax(innertop_fimax), fsamplemarinellibody_sizeX(samplemarinellibody_sizeX), fsamplemarinellibody_sizeY(samplemarinellibody_sizeY), fsamplemarinellibody_sizeZ(samplemarinellibody_sizeZ), fsamplemarinellihole_Rmax(samplemarinellihole_Rmax), fsamplemarinellihole_sizeZ(samplemarinellihole_sizeZ), fsamplemarinellihole_fimax(samplemarinellihole_fimax) { theMessenger = new MGEMIDetectorMessenger(this); } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... B1DetectorConstruction::~B1DetectorConstruction() { delete theMessenger; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... G4VPhysicalVolume* B1DetectorConstruction::Construct() { // define constants G4double pi = 3.14159265358979323846; G4double twopi=2.*pi; G4double d_z=0.45*cm; //crystal parameter G4double s_x=0.*cm; //sample box temporaneo controllare valore G4double s_y=0.*cm; //sample box temporaneo controllare valore G4double s_z=0.*cm; //sample box temporaneo controllare valore // Get nist material manager G4NistManager* nist = G4NistManager::Instance(); // Visualization attributes G4VisAttributes * gray= new G4VisAttributes( G4Colour(210/255. ,213/255. ,210/255. )); G4VisAttributes * Alcolour = gray; G4VisAttributes * orange= new G4VisAttributes( G4Colour(241/255. ,224/255. ,0/255. )); G4VisAttributes * Acryliccolour = orange; G4VisAttributes * grass= new G4VisAttributes( G4Colour(0/255. ,239/255. ,0/255. )); G4VisAttributes * Cucolour = grass; G4VisAttributes * violet= new G4VisAttributes( G4Colour(224/255. ,0/255. ,255/255. )); G4VisAttributes * Gecolour = violet; G4VisAttributes * purple= new G4VisAttributes( G4Colour(187/255. ,28/255. ,0/255. )); G4VisAttributes * GeLicolour = purple; G4VisAttributes * blue = new G4VisAttributes( G4Colour(0/255. ,0/255. ,255/255. )); G4VisAttributes * N2Gascolour = blue; G4VisAttributes * yellowgray= new G4VisAttributes( G4Colour(214/255. ,214/255. ,207/255. )); G4VisAttributes * PEcolour = yellowgray; G4VisAttributes * indigo= new G4VisAttributes( G4Colour(0/255. ,0/255. ,190/255. )); G4VisAttributes * PETcolour = indigo; G4VisAttributes * darkviolet = new G4VisAttributes( G4Colour(64/255. ,0/255. ,64/255. )); G4VisAttributes * Pbcolour = darkviolet; G4VisAttributes * redbrown = new G4VisAttributes( G4Colour(123/255. ,45/255. ,65/255. )); G4VisAttributes * PPcolour = redbrown; G4VisAttributes * Sample_Colour = new G4VisAttributes( G4Colour(255/255. ,0/255. ,12/255. )); Sample_Colour -> SetForceSolid(true); G4VisAttributes * skyblue = new G4VisAttributes( G4Colour(175/255. ,164/255. ,255/255. )); G4VisAttributes * Vacuumcolour = skyblue; // ================ // Find materials // ================ MGGerdaLocalMaterialTable::CreateMaterials(); G4Material* Acrylic = G4Material::GetMaterial("Acrylic"); G4Material* air = nist->FindOrBuildMaterial("G4_AIR"); G4Material* Al = nist->FindOrBuildMaterial("G4_Al"); G4Material* Cu = nist->FindOrBuildMaterial("G4_Cu"); G4Material* Ge = nist->FindOrBuildMaterial("G4_Ge"); G4Material* GeLi = G4Material::GetMaterial("Germanium/Lithium"); G4Material* N2Gas = G4Material::GetMaterial("NitrogenGas"); G4Material* Pb = nist->FindOrBuildMaterial("G4_Pb"); G4Material* PE = nist->FindOrBuildMaterial("G4_POLYETHYLENE"); G4Material* PET = G4Material::GetMaterial("PET"); G4Material* Polypropylene = nist->FindOrBuildMaterial("G4_POLYPROPYLENE"); //G4Material* sample_mat = nist->FindOrBuildMaterial("G4_POLYPROPYLENE"); //temporaneo, vedere definizioni materiali G4Material* sample_mat = G4Material::GetMaterial(sample_mat_name); G4Material* vacuum = G4Material::GetMaterial("Vacuum"); // Option to switch on/off checking of volumes overlaps // G4bool checkOverlaps = true; // // ----------------------------------------World // G4Material* world_mat = vacuum; if (fWorldMat==1) world_mat = air; G4Box* solidWorld = new G4Box("World", 0.5*fWorld_sizeX, 0.5*fWorld_sizeY, 0.5*fWorld_sizeZ); G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, world_mat, "World"); G4VPhysicalVolume* physWorld = new G4PVPlacement(0, G4ThreeVector(), logicWorld, "World", 0, false, 0, checkOverlaps); // ----------------------------------------- a lead box // --- this box has been cut in an inner and outer volume, for setting // --- different cuts for secondaries in the volumes G4Box* leadshield_box = new G4Box("leadshield_box", 0.5*fleadshield_sizeX, 0.5*fleadshield_sizeY, 0.5*fleadshield_sizeZ); G4LogicalVolume* leadshield_log = new G4LogicalVolume(leadshield_box, Pb, "leadshield_log", 0, 0, 0); leadshield_log -> SetVisAttributes(Pbcolour); new G4PVPlacement(0, G4ThreeVector(), leadshield_log, "leadshield", logicWorld, false, 0); // ----------------------------------------- a copper shielding G4Box* coppershield_box = new G4Box("coppershield_box", 0.5*fcoppershield_sizeX, 0.5*fcoppershield_sizeY, 0.5*fcoppershield_sizeZ); G4LogicalVolume* coppershield_log = new G4LogicalVolume(coppershield_box, Cu, "coppershield_log", 0, 0, 0); coppershield_log -> SetVisAttributes(Cucolour); new G4PVPlacement(0, G4ThreeVector(), coppershield_log, "coppershield", leadshield_log, false, 0); // ----------------------------------------- the nitrogen filled chamber G4Box* Nfilledchamber_box = new G4Box("Nfilledchamber_box", 0.5*fNfilledchamber_sizeX, 0.5*fNfilledchamber_sizeY, 0.5*fNfilledchamber_sizeZ); G4LogicalVolume* Nfilledchamber_log = new G4LogicalVolume(Nfilledchamber_box, N2Gas, "Nfilledchamber_log", 0, 0, 0); Nfilledchamber_log -> SetVisAttributes(N2Gascolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 11.95), Nfilledchamber_log, "Nfilledchamber",coppershield_log, false, 0); // ------------------------------------------------------------------------------ // --- Cryostat // ------------------------------------------------------------------------------ // --- endcap window (GeMi D 94.0 mm) G4Tubs* detwindow_tubs = new G4Tubs("detwindow_tubs", 0, fNdetwindow_Rmax, 0.5*fNdetwindow_sizeZ, 0, twopi); G4LogicalVolume* detwindow_log = new G4LogicalVolume(detwindow_tubs, Cu, "detwindow_log", 0, 0, 0); detwindow_log -> SetVisAttributes(Cucolour); // G4RotationMatrix* detwindow_rot = new G4RotationMatrix; // detwindow_rot -> rotateX(0.5*M_PI); new G4PVPlacement(0 , G4ThreeVector(0., 0, 2.525*cm), detwindow_log, "detwindow",Nfilledchamber_log, false, 0); // reference point of top of endcap: 2.55 cm // --- detector endcap G4Tubs* dethousing_tubs = new G4Tubs("dethousing_tubs", fdethousing_Rmin, fdethousing_Rmax, 0.5*fdethousing_sizeZ, 0, twopi); G4LogicalVolume* dethousing_log = new G4LogicalVolume(dethousing_tubs, Cu, "dethousing_log", 0, 0, 0); dethousing_log -> SetVisAttributes(Cucolour); new G4PVPlacement(0, G4ThreeVector(0., 0, -4.7*cm), dethousing_log, "dethousing", Nfilledchamber_log, false, 0); // --- the vacuum inside the endcap G4VSolid* detvacuum_tubs = new G4Tubs("detvacuum_tubs", 0., fdetvacuum_Rmax, 0.5*fdetvacuum_sizeZ, 0, twopi); G4LogicalVolume* detvacuum_log = new G4LogicalVolume(detvacuum_tubs, vacuum, "detvacuum_log", 0, 0, 0); detvacuum_log -> SetVisAttributes(Vacuumcolour); new G4PVPlacement(0, G4ThreeVector(0., 0., -4.725*cm), detvacuum_log, "detvacuum", Nfilledchamber_log, false, 0); // --- the mylar (PET) cladding inside endcap, introduce new variable dethousingclad_tubs G4Tubs* dethousingclad_tubs = new G4Tubs("dethousingclad_tubs", fdethousingclad_Rmin, fdethousingclad_Rmax, 0.5*fdethousingclad_sizeZ, 0, twopi); G4LogicalVolume* dethousingclad_log = new G4LogicalVolume(dethousingclad_tubs, PET, "dethousingclad_log", 0, 0, 0); dethousingclad_log -> SetVisAttributes(PETcolour); new G4PVPlacement(0, G4ThreeVector(0., 0., -0.2*cm), dethousingclad_log, "dethousingclad", detvacuum_log, false, 0); // ------------------------------------------------------------->>> // ------------ Detector and holder - changeable position, size // --- the mantle of the copper holder G4Tubs* detinnercap_tubs = new G4Tubs("detinnercap_tubs", fdetinnercap_Rmin, fdetinnercap_Rmax, 0.5*fdetinnercap_sizeZ, 0, twopi); G4LogicalVolume* detinnercap_log = new G4LogicalVolume(detinnercap_tubs, Cu, "detinnercap_log", 0, 0, 0); detinnercap_log -> SetVisAttributes(Cucolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 0.915*cm-d_z), detinnercap_log, "detinnercap", detvacuum_log, false, 0); // --- the bottom of the copper holder G4Tubs* detinnercapbottom_tubs = new G4Tubs("detinnercapbottom_tubs", fdetinnercapbottom_Rmin, fdetinnercapbottom_Rmax, 0.5*fdetinnercapbottom_sizeZ, 0, twopi); G4LogicalVolume* detinnercapbottom_log = new G4LogicalVolume(detinnercapbottom_tubs, Cu, "detinnercapbottom_log", 0, 0, 0); detinnercapbottom_log -> SetVisAttributes(Cucolour); new G4PVPlacement(0, G4ThreeVector(0., 0., -5.555*cm-d_z), detinnercapbottom_log, "detinnercapbottom", detvacuum_log, false, 0); // --- the rings of the copper holder, introduce new variable detinnercapring1_tubs G4Tubs* detinnercapring_tubs = new G4Tubs("detinnercapring_tubs", fdetinnercapring_Rmin, fdetinnercapring_Rmax, 0.5*fdetinnercapring_sizeZ, 0, twopi); G4LogicalVolume* detinnercapring_log = new G4LogicalVolume(detinnercapring_tubs, Cu, "detinnercapring_log", 0, 0, 0); detinnercapring_log -> SetVisAttributes(Cucolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 5.3*cm-d_z), detinnercapring_log, "detinnercapring01", detvacuum_log, false, 0); new G4PVPlacement(0, G4ThreeVector(0., 0., 0.5*cm-d_z), detinnercapring_log, "detinnercapring02", detvacuum_log, false, 1); // --- the mylar (PET) insulation on the crystal, introduce new variable detinnercaptop_tubs G4Tubs* detinnercaptop_tubs = new G4Tubs("detinnercaptop_tubs", 0., fdetinnercaptop_Rmax, fdetinnercaptop_sizeZ, 0, twopi); G4LogicalVolume* detinnercaptop_log = new G4LogicalVolume(detinnercaptop_tubs, PET, "detinnercaptop_log", 0, 0, 0); detinnercaptop_log -> SetVisAttributes(PETcolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 7.22565*cm-d_z), detinnercaptop_log, "detinnercaptop", detvacuum_log, false, 0); // --- Al foil as IR shield, introduce new variable detinnercapplate_tubs G4Tubs* detinnercapplate_tubs = new G4Tubs("detinnercapplate_tubs", 0., fdetinnercapplate_Rmax, 0.5*fdetinnercapplate_sizeZ, 0, twopi); G4LogicalVolume* detinnercapplate_log = new G4LogicalVolume(detinnercapplate_tubs, Al, "detinnercapplate_log", 0, 0, 0); detinnercapplate_log -> SetVisAttributes(Alcolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 7.22755*cm-d_z), detinnercapplate_log, "detinnercapplate", detvacuum_log, false, 0); // --- the PE retainer, introduce new variable detpecap_tubs, side G4Tubs* detpecap_tubs = new G4Tubs("detpecap_tubs", fdetpecap_Rmin, fdetpecap_Rmax, 0.5*fdetpecap_sizeZ, 0, twopi); G4LogicalVolume* detpecap_log = new G4LogicalVolume(detpecap_tubs, PE, "detpecap_log", 0, 0, 0); detpecap_log -> SetVisAttributes(PEcolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 6.7788*cm-d_z), detpecap_log, "detpecap", detvacuum_log, false, 0); // --- the PE retainer, top, introduce new variable detpecaptop_tubs G4Tubs* detpecaptop_tubs = new G4Tubs("detpecaptop_tubs", fdetpecaptop_Rmin, fdetpecaptop_Rmax, fdetpecaptop_sizeZ, 0, twopi); G4LogicalVolume* detpecaptop_log = new G4LogicalVolume(detpecaptop_tubs, PE, "detpecaptop_log", 0, 0, 0); detpecaptop_log -> SetVisAttributes(PEcolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 7.2788*cm-d_z), detpecaptop_log, "detpecaptop", detvacuum_log, false, 0); // --------------------------------------------------------------------- // --- the crystal with dead layer // --------------------------------------------------------------------- G4Tubs* detdeadlayer_tubs = new G4Tubs("detdeadlayer_tubs", 0., fdetdeadlayer_Rmax, 0.5*fdetdeadlayer_sizeZ, 0, twopi); G4LogicalVolume* detdeadlayer_log = new G4LogicalVolume(detdeadlayer_tubs, GeLi, "detdeadlayer_log", 0, 0, 0); detdeadlayer_log -> SetVisAttributes(GeLicolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 7.225*cm-fcrystal_l/2-d_z), detdeadlayer_log, "detdeadlayer", detvacuum_log, false, 0); // --- crystal without dead layer: ----------------------------------- G4Tubs* crystal_tubs = new G4Tubs("crystal_tubs", 0., fcrystal_Rmax, 0.5*fcrystal_sizeZ, 0, twopi); G4LogicalVolume* crystal_log = new G4LogicalVolume(crystal_tubs, Ge, "crystal_log", 0, 0, 0); crystal_log -> SetVisAttributes(Gecolour); new G4PVPlacement(0, G4ThreeVector(0., 0., -fd_dead/2), crystal_log, "crystal", detdeadlayer_log, false, 0); // --- hole in crystal ----------------------------------- G4Tubs* detholeincrystal_tubs = new G4Tubs("detholeincrystal_tubs", 0., fdetholeincrystal_Rmax, fdetholeincrystal_sizeZ, 0, twopi); G4Sphere* detholeincrystal_bullet = new G4Sphere("detholeincrystal_bullet", 0., fdetholeincrystal_Rmax, 0, twopi, 0, twopi/4); G4VSolid* dethole_shape=0; dethole_shape = new G4UnionSolid("dethole_shape", detholeincrystal_tubs, detholeincrystal_bullet, 0, G4ThreeVector (0.,0.,fhole_l/2-fhole_d/4)); G4LogicalVolume* dethole_log = new G4LogicalVolume(dethole_shape, vacuum, "dethole_log", 0, 0, 0); dethole_log -> SetVisAttributes(Vacuumcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -(fcrystal_l/2-fd_dead/2)+fhole_l/2), dethole_log, "dethole", crystal_log, false, 0); // --- a conical ring of dead material (bulleting of crystal) G4Cons* detdeadcone_cons = new G4Cons("detdeadcone_cons", fdetdeadcone_Rmin1, fdetdeadcone_Rmax1, fdetdeadcone_Rmin2, fdetdeadcone_Rmax2, 0.5*fdetdeadcone_sizeZ, 0, twopi); G4LogicalVolume* detdeadcone_log = new G4LogicalVolume(detdeadcone_cons, GeLi, "detdeadcone_log", 0, 0, 0); detdeadcone_log -> SetVisAttributes(GeLicolour); new G4PVPlacement(0, G4ThreeVector(0., 0., fcrystal_l/2-fd_dead-fy/2), detdeadcone_log, "detdeadcone", crystal_log, false, 0); // --------------------------------------------------------------------------------------- // --- The samples // --------------------------------------------------------------------------------------- if (fsmarinelli_geom){ // ----------------------------------------- Cu block in nitrogen filled chamber G4Box* Cublock_box = new G4Box("Cublock_box", 0.5*fCublock_sizeX, 0.5*fCublock_sizeY, 0.5*fCublock_sizeZ); // ----------------------------------------- drilled hole in Cu block in nitrogen filled chamber G4Tubs* drhole_tubs = new G4Tubs("drhole_tubs", 0., fdrhole_Rmax, 0.5*fdrhole_sizeZ, 0, twopi); // ----------------------------------------- combined geometry for Cu shield in nitrogen filled chamber G4VSolid* Cu_shield=0; Cu_shield = new G4SubtractionSolid("Cu_shield", Cublock_box, drhole_tubs, 0, G4ThreeVector (0.,0.,0.)); G4LogicalVolume* Cu_shield_log = new G4LogicalVolume(Cu_shield, Cu, "Cu_shield_log", 0, 0, 0); Cu_shield_log -> SetVisAttributes(Cucolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -8.35*cm), Cu_shield_log, "Cu_shield", Nfilledchamber_log, false, 0); // bottom part with hole G4VSolid* marinellis1l_tubs = new G4Tubs("marinellis1l_tubs", fmarinellis1l_Rmin, fmarinellis1l_Rmax, 0.5*fmarinellis1l_sizeZ, 0, twopi); G4LogicalVolume* marinellis1l_tubs_log = new G4LogicalVolume(marinellis1l_tubs, Polypropylene, "marinellis1l_tubs_log", 0, 0, 0); marinellis1l_tubs_log -> SetVisAttributes(PPcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -4.65*cm), marinellis1l_tubs_log, "marinellis1l_tubs", Nfilledchamber_log, false, 0); // lower part outside G4VSolid* marinellis1o_tubs = new G4Tubs("marinellis1o_tubs", fmarinellis1o_Rmin, fmarinellis1o_Rmax, 0.5*fmarinellis1o_sizeZ, 0, twopi); G4LogicalVolume* marinellis1o_tubs_log = new G4LogicalVolume(marinellis1o_tubs, Polypropylene, "marinellis1o_tubs_log", 0, 0, 0); marinellis1o_tubs_log -> SetVisAttributes(PPcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -0.65*cm), marinellis1o_tubs_log, "marinellis1o_tubs", Nfilledchamber_log, false, 0); // upper part outside G4VSolid* marinellis2o_cons = new G4Cons("marinellis2o_cons", fmarinellis2o_Rmin1, fmarinellis2o_Rmax1, fmarinellis2o_Rmin2, fmarinellis2o_Rmax2, 0.5*fmarinellis2o_sizeZ, 0, twopi); G4LogicalVolume* marinellis2o_cons_log = new G4LogicalVolume(marinellis2o_cons, Polypropylene, "marinellis2o_cons_log", 0, 0, 0); marinellis2o_cons_log -> SetVisAttributes(PPcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, 7.55*cm), marinellis2o_cons_log, "marinellis2o_cons", Nfilledchamber_log, false, 0); // inner cone G4VSolid* marinellis1i_cons = new G4Cons("marinellis1i_cons", fmarinellis1i_Rmin1, fmarinellis1i_Rmax1, fmarinellis1i_Rmin2, fmarinellis1i_Rmax2, 0.5*fmarinellis1i_sizeZ, 0, twopi); G4LogicalVolume* marinellis1i_cons_log = new G4LogicalVolume(marinellis1i_cons, Polypropylene, "marinellis1i_cons_log", 0, 0, 0); marinellis1i_cons_log -> SetVisAttributes(PPcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, 0.525*cm), marinellis1i_cons_log, "marinellis1i_cons", Nfilledchamber_log, false, 0); // lower volume 630.28 cm^3 (straight outside walls with Ri 7.15 cm), middle volume //(conical inside AND outside) 215.49 cm^3, and upper volume (conical outside) 1097.14 cm^3. // top lid of inner cone G4VSolid* marinellis2l_tubs = new G4Tubs("marinellis2l_tubs", 0*cm, fmarinellis2l_Rmax, 0.5*fmarinellis2l_sizeZ, 0, twopi); G4LogicalVolume* marinellis2l_tubs_log = new G4LogicalVolume(marinellis2l_tubs, PE, "marinellis2l_tubs_log", 0, 0, 0); marinellis2l_tubs_log -> SetVisAttributes(PEcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, 5.525*cm), marinellis2l_tubs_log, "marinellis2l_tubs", Nfilledchamber_log, false, 0); // top lid of whole Marinelli G4VSolid* marinellis3l_tubs = new G4Tubs("marinellis3l_tubs", 0*cm, fmarinellis3l_Rmax, 0.5*fmarinellis3l_sizeZ, 0, twopi); G4LogicalVolume* marinellis3l_tubs_log = new G4LogicalVolume(marinellis3l_tubs, PE, "marinellis3l_tubs_log", 0, 0, 0); marinellis3l_tubs_log -> SetVisAttributes(PEcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, 11.9*cm), marinellis3l_tubs_log, "marinellis3l_tubs", Nfilledchamber_log, false, 0); // sample inside GAMA small Marinelli G4VSolid* sample_shape = 0; G4double fillingheight = 0; G4double sampleheight = 0; fillingheight = 16.4*cm-fsmarinelli_height; if ((fillingheight>=0*cm) && (fillingheight<=7.8*cm)) { sample_shape = new G4Cons("sample_shape", 5.05*cm, 7.25*cm, 5.05*cm-(0.15/10.15*fillingheight), 7.25*cm, fillingheight/2., 0, twopi); sampleheight=fillingheight/2.; G4LogicalVolume* sample_log = new G4LogicalVolume(sample_shape, sample_mat, "sample_log", 0, 0, 0); sample_log -> SetVisAttributes(Sample_Colour); new G4PVPlacement(0, G4ThreeVector(0, 0, (-4.55*cm+sampleheight)), sample_log, "sample", Nfilledchamber_log, false, 0); } else if ((fillingheight>7.8*cm) && (fillingheight<=10.15*cm)) { G4VSolid* smarinellisample1_cons = new G4Cons("smarinellisample1_cons", 5.05*cm, 7.25*cm, 5.05*cm-(0.15/10.15*7.8*cm), 7.25*cm, 3.9*cm, 0, twopi); G4VSolid* smarinellisample2_cons = new G4Cons("smarinellisample2_cons", 5.05*cm-(0.15/10.15*7.8*cm), 7.3*cm, 5.05*cm-(0.15/10.15*fillingheight), 7.3*cm+((0.375/8.6)*(fillingheight-7.8*cm)), fillingheight/2.-3.9*cm, 0, twopi); sample_shape = new G4UnionSolid("sample_shape", smarinellisample1_cons, smarinellisample2_cons, 0, G4ThreeVector (0.,0.,fillingheight/2.)); sampleheight=fillingheight/2.; G4LogicalVolume* sample_log = new G4LogicalVolume(sample_shape, sample_mat, "sample_log", 0, 0, 0); sample_log -> SetVisAttributes(Sample_Colour); new G4PVPlacement(0, G4ThreeVector(0, 0, -4.55*cm+3.9*cm), sample_log, "sample", Nfilledchamber_log, false, 0); } else if ((fillingheight>10.15*cm) && (fillingheight<=16.4*cm)) { G4VSolid* smarinellisample1_cons = new G4Cons("smarinellisample1_cons", 5.05*cm, 7.25*cm, 5.05*cm-(0.15/10.15*7.8*cm), 7.25*cm, 3.9*cm, 0, twopi); G4VSolid* smarinellisample2_cons = new G4Cons("smarinellisample2_cons", 5.05*cm-(0.15/10.15*7.8*cm), 7.3*cm, 4.9*cm, 7.3*cm+((0.375/8.6)*2.35*cm), 1.175*cm, 0, twopi); G4VSolid* temp_shape=0; temp_shape = new G4UnionSolid("temp_shape", smarinellisample1_cons, smarinellisample2_cons, 0, G4ThreeVector (0.,0.,3.9*cm+1.175*cm)); G4VSolid* smarinellisample3_cons = new G4Cons("smarinellisample3_cons", 0*cm, 7.3*cm+((0.375/8.6)*2.35*cm), 0*cm, 7.3*cm+((0.375/8.6)*(fillingheight-7.8*cm)), (fillingheight-10.15*cm)/2., 0, twopi); sample_shape = new G4UnionSolid("sample_shape", temp_shape, smarinellisample3_cons, 0, G4ThreeVector (0.,0.,3.9*cm+2.35*cm+(fillingheight-10.15*cm)/2.)); sampleheight=fillingheight/2.; G4LogicalVolume* sample_log = new G4LogicalVolume(sample_shape, sample_mat, "sample_log", 0, 0, 0); sample_log -> SetVisAttributes(Sample_Colour); new G4PVPlacement(0, G4ThreeVector(0, 0, (-4.55*cm-1.175*cm+fillingheight/2.-fsmarinelli_height/2.)), sample_log,"sample", Nfilledchamber_log, false, 0); } } else if (fvsmarinelli_geom){ // ----------------------------------------- Cu block in nitrogen filled chamber G4Box* Cublock_box = new G4Box("Cublock_box", 0.5*fCublock_sizeX, 0.5*fCublock_sizeY, 0.5*fCublock_sizeZ); // ----------------------------------------- drilled hole in Cu block in nitrogen filled chamber G4Tubs* drhole_tubs = new G4Tubs("drhole_tubs", 0., fdrhole_Rmax, 0.5*fdrhole_sizeZ, 0, twopi); // ----------------------------------------- combined geometry for Cu shield in nitrogen filled chamber G4VSolid* Cu_shield=0; Cu_shield = new G4SubtractionSolid("Cu_shield", Cublock_box, drhole_tubs, 0, G4ThreeVector (0.,0.,0.)); G4LogicalVolume* Cu_shield_log = new G4LogicalVolume(Cu_shield, Cu, "Cu_shield_log", 0, 0, 0); Cu_shield_log -> SetVisAttributes(Cucolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -8.35*cm), Cu_shield_log, "Cu_shield", Nfilledchamber_log, false, 0); // bottom part with hole G4VSolid* marinellivs1l_tubs = new G4Tubs("marinellivs1l_tubs", fmarinellivs1l_Rmin, fmarinellivs1l_Rmax, 0.5*fmarinellivs1l_sizeZ, 0, twopi); G4LogicalVolume* marinellivs1l_tubs_log = new G4LogicalVolume(marinellivs1l_tubs, Polypropylene, "marinellivs1l_tubs_log", 0, 0, 0); marinellivs1l_tubs_log -> SetVisAttributes(PEcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -4.75*cm+0.1*cm), marinellivs1l_tubs_log, "marinellivs1l_tubs", Nfilledchamber_log, false, 0); // lower part outside G4VSolid* marinellivs1o_cons = new G4Cons("marinellivs1o_cons", fmarinellivs1o_Rmin1, fmarinellivs1o_Rmax1, fmarinellivs1o_Rmin2, fmarinellivs1o_Rmax2, 0.5*fmarinellivs1o_sizeZ, 0, twopi); G4LogicalVolume* marinellivs1o_cons_log = new G4LogicalVolume(marinellivs1o_cons, Polypropylene, "marinellivs1o_cons_log", 0, 0, 0); marinellivs1o_cons_log -> SetVisAttributes(PEcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -4.75*cm+0.2*cm+4.25*cm), marinellivs1o_cons_log, "marinellivs1o_cons", Nfilledchamber_log, false, 0); // upper part outside G4VSolid* marinellivs2o_cons = new G4Cons("marinellivs2o_cons", fmarinellivs2o_Rmin1, fmarinellivs2o_Rmax1, fmarinellivs2o_Rmin2, fmarinellivs2o_Rmax2, 0.5*fmarinellivs2o_sizeZ, 0, twopi); G4LogicalVolume* marinellivs2o_cons_log = new G4LogicalVolume(marinellivs2o_cons, Polypropylene, "marinellivs2o_cons_log", 0, 0, 0); marinellivs2o_cons_log -> SetVisAttributes(PEcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -4.75*cm+0.2*cm+8.5*cm+2.0*cm), marinellivs2o_cons_log, "marinellivs2o_cons", Nfilledchamber_log, false, 0); // inner cone G4VSolid* marinellivs1i_cons = new G4Cons("marinellivs1i_cons", fmarinellivs1i_Rmin1, fmarinellivs1i_Rmax1, fmarinellivs1i_Rmin2, fmarinellivs1i_Rmax2, 0.5*fmarinellivs1i_sizeZ, 0, twopi); G4LogicalVolume* marinellivs1i_cons_log = new G4LogicalVolume(marinellivs1i_cons, Polypropylene, "marinellivs1i_cons_log", 0, 0, 0); marinellivs1i_cons_log -> SetVisAttributes(PEcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -4.75*cm+0.2*cm+4.39*cm), marinellivs1i_cons_log, "marinellivs1i_cons", Nfilledchamber_log, false, 0); // lower volume 284.94 cm^3 (conical inside AND outside), middle volume //(conical inside AND outside) 13.448 cm^3, and upper volume (conical outside) 519.587 cm^3. // top lid of inner cone G4VSolid* marinellivs2l_tubs = new G4Tubs("marinellivs2l_tubs", 0*cm, fmarinellivs2l_Rmax, 0.5*fmarinellivs2l_sizeZ, 0, twopi); G4LogicalVolume* marinellivs2l_tubs_log = new G4LogicalVolume(marinellivs2l_tubs, PE, "marinellivs2l_tubs_log", 0, 0, 0); marinellivs2l_tubs_log -> SetVisAttributes(PEcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -4.75*cm+0.2*cm+8.78*cm-0.075*cm), marinellivs2l_tubs_log, "marinellivs2l_tubs", Nfilledchamber_log, false, 0); // top lid of whole Marinelli G4VSolid* marinellivs3l_tubs = new G4Tubs("marinellivs3l_tubs", 0*cm, fmarinellivs3l_Rmax, 0.5*fmarinellivs3l_sizeZ, 0, twopi); G4LogicalVolume* marinellivs3l_tubs_log = new G4LogicalVolume(marinellivs3l_tubs, PE, "marinellivs3l_tubs_log", 0, 0, 0); marinellivs3l_tubs_log -> SetVisAttributes(PEcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -4.75*cm+0.2*cm+8.5*cm+4.0*cm+0.075*cm), marinellivs3l_tubs_log, "marinellivs3l_tubs", Nfilledchamber_log, false, 0); G4double fillingheight = 0; G4double sampleheight = 0; G4VSolid* sample_shape = 0; fillingheight = 12.5*cm-fvsmarinelli_height; if ((fillingheight>=0*cm) && (fillingheight<=8.5*cm)) { sample_shape = new G4Cons("sample_shape", 5.45*cm, 6.175*cm, 5.45*cm-(0.1/8.78*fillingheight), 6.175*cm+(0.275/8.5*fillingheight), fillingheight/2., 0, twopi); sampleheight=fillingheight/2.; G4LogicalVolume* sample_log = new G4LogicalVolume(sample_shape, sample_mat, "sample_log", 0, 0, 0); sample_log -> SetVisAttributes(Sample_Colour); new G4PVPlacement(0, G4ThreeVector(0, 0, (-4.75*cm+0.2*cm+sampleheight)), sample_log, "sample", Nfilledchamber_log, false, 0); } else if ((fillingheight>8.5*cm) && (fillingheight<=8.78*cm)) { G4VSolid* vsmarinellisample1_cons = new G4Cons("vsmarinellisample1_cons", 5.45*cm, 6.175*cm, 5.45*cm-(0.1/8.78*8.5*cm), 6.45*cm, 4.25*cm, 0, twopi); G4VSolid* vsmarinellisample2_cons = new G4Cons("vsmarinellisample2_cons", 5.45*cm-(0.1/8.78*8.5*cm), 6.625*cm, 5.45*cm-(0.1/8.78*fillingheight), 6.625*cm+((0.08/4.)*(fillingheight-8.5*cm)), fillingheight/2.-4.25*cm, 0, twopi); sample_shape = new G4UnionSolid("sample_shape", vsmarinellisample2_cons, vsmarinellisample1_cons, 0, G4ThreeVector (0.,0.,-fillingheight/2.)); sampleheight=fillingheight/2.; G4LogicalVolume* sample_log = new G4LogicalVolume(sample_shape, sample_mat, "sample_log", 0, 0, 0); sample_log -> SetVisAttributes(Sample_Colour); new G4PVPlacement(0, G4ThreeVector(0, 0, -4.75*cm+0.2*cm+8.5*cm+(fillingheight/2.-4.25*cm)), sample_log, "sample", Nfilledchamber_log, false, 0); } else if ((fillingheight>8.78*cm) && (fillingheight<=12.5*cm)) { G4VSolid* vsmarinellisample1_cons = new G4Cons("vsmarinellisample1_cons", 5.45*cm, 6.175*cm, 5.45*cm-(0.1/8.78*8.5*cm), 6.45*cm, 4.25*cm, 0, twopi); G4VSolid* vsmarinellisample2_cons = new G4Cons("vsmarinellisample2_cons", 5.45*cm-(0.1/8.78*8.5*cm), 6.625*cm, 5.35*cm, 6.625*cm+((0.08/4.)*0.28*cm), 0.14*cm, 0, twopi); G4VSolid* temp_shape=0; temp_shape = new G4UnionSolid("temp_shape", vsmarinellisample2_cons, vsmarinellisample1_cons, 0, G4ThreeVector (0.,0.,-4.25*cm-0.14*cm)); G4VSolid* vsmarinellisample3_cons = new G4Cons("vsmarinellisample3_cons", 0*cm, 6.625*cm+((0.08/4.)*0.28*cm), 0*cm, 6.625*cm+((0.08/4.)*(fillingheight-8.5*cm)), (fillingheight-8.78*cm)/2., 0, twopi); sample_shape = new G4UnionSolid("sample_shape", temp_shape, vsmarinellisample3_cons, 0, G4ThreeVector (0.,0.,0.14*cm+(fillingheight-8.78*cm)/2.)); sampleheight=fillingheight/2.; G4LogicalVolume* sample_log = new G4LogicalVolume(sample_shape, sample_mat, "sample_log", 0, 0, 0); sample_log -> SetVisAttributes(Sample_Colour); new G4PVPlacement(0, G4ThreeVector(0, 0, -4.75*cm+0.2*cm+8.5*cm+0.14*cm), sample_log, "sample", Nfilledchamber_log, false, 0); } } else if (fbox_geom){ // ----------------------------------------- Cu block in nitrogen filled chamber G4Box* Cublock_box = new G4Box("Cublock_box", 0.5*fCublock_sizeX, 0.5*fCublock_sizeY, 0.5*fCublock_sizeZ); // ----------------------------------------- drilled hole in Cu block in nitrogen filled chamber G4Tubs* drhole_tubs = new G4Tubs("drhole_tubs", 0., fdrhole_Rmax, 0.5*fdrhole_sizeZ, 0, twopi); // ----------------------------------------- combined geometry for Cu shield in nitrogen filled chamber G4VSolid* Cu_shield=0; Cu_shield = new G4SubtractionSolid("Cu_shield", Cublock_box, drhole_tubs, 0, G4ThreeVector (0.,0.,0.)); G4LogicalVolume* Cu_shield_log = new G4LogicalVolume(Cu_shield, Cu, "Cu_shield_log", 0, 0, 0); Cu_shield_log -> SetVisAttributes(Cucolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -8.35*cm), Cu_shield_log, "Cu_shield", Nfilledchamber_log, false, 0); // 1.) kapton resistors, blue, (55 x 32.7 x 4) mm, 11.13 g, 236 pcs, in PE bag, on endcap, Cu on top, Xenon // 2.) CaF2 slab, (9.95 x 10.20 x 2.1) mm average, 0.6774 g average, in PE bag, on endcap, Cu on top, // irradiated at KSTAR 25-OCT-2015 // Cu disks on top of sample G4Tubs* cudisks_tubs = new G4Tubs("cudisks_tubs", 0., fcudisks_Rmax, 0.5*fcudisks_sizeZ, 0, twopi); G4LogicalVolume* cudisks_log = new G4LogicalVolume(cudisks_tubs, Cu, "cudisks_log", 0, 0, 0); cudisks_log -> SetVisAttributes(Pbcolour); new G4PVPlacement(0, G4ThreeVector(0., 0.,2.55*cm+0.5*cm+2.5*cm), cudisks_log, "cudisks",Nfilledchamber_log, false, 0); // PE bag G4Box* bag_shape = new G4Box("bag_box", 0.5*fbagbox_sizeX, 0.5*fbagbox_sizeY, 0.5*fbagbox_sizeZ); G4LogicalVolume* bag_log = new G4LogicalVolume(bag_shape, PE, "bag_log", 0, 0, 0); bag_log -> SetVisAttributes(PEcolour); new G4PVPlacement(0, G4ThreeVector(s_x, s_y, s_z+2.55*cm+0.015*cm/2.), bag_log, "bag_box_01", Nfilledchamber_log, false, 0); new G4PVPlacement(0, G4ThreeVector(s_x, s_y, s_z+2.55*cm+3.*0.015*cm/2.+fbox_thickness), bag_log, "bag_box_02", Nfilledchamber_log, false, 1); // box sample G4VSolid* sample_shape = 0; sample_shape = new G4Box("sample_box", 0.5*fsamplebox_sizeX, 0.5*fsamplebox_sizeY, 0.5*fsamplebox_sizeZ); G4LogicalVolume* sample_log = new G4LogicalVolume(sample_shape, sample_mat, "sample_log", 0, 0, 0); sample_log -> SetVisAttributes(Sample_Colour); new G4PVPlacement(0, G4ThreeVector(s_x, s_y, s_z+2.55*cm+0.015*cm+fbox_thickness/2.), sample_log, "sample", Nfilledchamber_log, false, 0); } else if (ftube_geom) { // ----------------------------------------- Cu block in nitrogen filled chamber G4Box* Cublock_box = new G4Box("Cublock_box", 0.5*fCublock_sizeX, 0.5*fCublock_sizeY, 0.5*fCublock_sizeZ); // ----------------------------------------- drilled hole in Cu block in nitrogen filled chamber G4Tubs* drhole_tubs = new G4Tubs("drhole_tubs", 0., fdrhole_Rmax, 0.5*fdrhole_sizeZ, 0, twopi); // ----------------------------------------- combined geometry for Cu shield in nitrogen filled chamber G4VSolid* Cu_shield=0; Cu_shield = new G4SubtractionSolid("Cu_shield", Cublock_box, drhole_tubs, 0, G4ThreeVector (0.,0.,0.)); G4LogicalVolume* Cu_shield_log = new G4LogicalVolume(Cu_shield, Cu, "Cu_shield_log", 0, 0, 0); Cu_shield_log -> SetVisAttributes(Cucolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -8.35*cm), Cu_shield_log, "Cu_shield", Nfilledchamber_log, false, 0); // 1.) Tb disk, D 3.0 cm, h 0.5 cm, 28.9189 g, exposed at Cadarache, in PE bag, on endcap // 2.) Tb disk, D 3.0 cm, h 0.5 cm, 24.73 g, exposed at Cadarache, cut piece for ICP-MS, in PE bag, on endcap // Cu disks on top of sample G4Tubs* cudisks_tubs = new G4Tubs("cudisks_tubs", 0., fcudisks_Rmax, 0.5*fcudisks_sizeZ, 0, twopi); G4LogicalVolume* cudisks_log = new G4LogicalVolume(cudisks_tubs, Cu, "cudisks_log", 0, 0, 0); cudisks_log -> SetVisAttributes(Pbcolour); new G4PVPlacement(0, G4ThreeVector(0., 0.,2.55*cm+0.6*cm+2.5*cm), cudisks_log, "cudisks",Nfilledchamber_log, false, 0); // PE bag G4VSolid* sampletube_shape = 0; G4Tubs* bagtube_shape = new G4Tubs("bag_box", fbagtube_Rmin, fbagtube_Rmax, 0.5*fbagtube_sizeZ, 0, fbagtube_fimax); G4LogicalVolume* bag_log = new G4LogicalVolume(bagtube_shape, PE, "bag_log", 0, 0, 0); bag_log -> SetVisAttributes(PEcolour); new G4PVPlacement(0, G4ThreeVector(s_x, s_y, s_z+2.55*cm+0.015*cm/2.), bag_log, "bag_box_01", Nfilledchamber_log, false, 0); new G4PVPlacement(0, G4ThreeVector(s_x, s_y, s_z+2.55*cm+3.*0.015*cm/2.+fsampletube_sizeZ), bag_log, "bag_box_02", Nfilledchamber_log, false, 1); sampletube_shape = new G4Tubs("sample_tube", fsampletube_Rmin, fsampletube_Rmax, 0.5*fsampletube_sizeZ, 0, fsampletube_fimax); G4LogicalVolume* sample_log = new G4LogicalVolume(sampletube_shape, sample_mat, "sample_log", 0, 0, 0); sample_log -> SetVisAttributes(Sample_Colour); new G4PVPlacement(0, G4ThreeVector(s_x, s_y, s_z+2.55*cm+0.015*cm+fsampletube_sizeZ/2.), sample_log, "sample", Nfilledchamber_log, false, 0); } else if (ftwobox_geom) { //---for point like sources, two boxes away from detector (strong sources) // --- standard cylindrical box (cover side facing detector) - 0.1cm from detector window G4Tubs* detplasticcap_tubs = new G4Tubs("detplasticcap_tubs", 0.*cm, fdetplasticcap_Rmax, 0.5*fdetplasticcap_sizeZ, 0, twopi); G4LogicalVolume* detplasticcap_log = new G4LogicalVolume(detplasticcap_tubs, Acrylic, "detplasticcap_log", 0, 0, 0); detplasticcap_log -> SetVisAttributes(Acryliccolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 10.95*cm), detplasticcap_log, "detplasticcap", Nfilledchamber_log, false, 0); G4Tubs* detplasticcap1_tubs = new G4Tubs("detplasticcap1_tubs", 0.*cm, fdetplasticcap1_Rmax, 0.5*fdetplasticcap1_sizeZ, 0, twopi); G4LogicalVolume* detplasticcap1_log = new G4LogicalVolume(detplasticcap1_tubs, Acrylic, "detplasticcap1_log", 0, 0, 0); detplasticcap1_log -> SetVisAttributes(Acryliccolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 13.875*cm), detplasticcap1_log, "detplasticcap1", Nfilledchamber_log, false, 0); G4Tubs* detplasticshell_tubs = new G4Tubs("detplasticshell_tubs", fdetplasticshell_Rmin, fdetplasticshell_Rmax, 0.5*fdetplasticshell_sizeZ, 0, twopi); G4LogicalVolume* detplasticshell_log = new G4LogicalVolume(detplasticshell_tubs, Acrylic, "detplasticshell_log", 0, 0, 0); detplasticshell_log -> SetVisAttributes(Acryliccolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 12.4*cm), detplasticshell_log, "detplasticshell", Nfilledchamber_log, false, 0); // --- one more standard box between detector and sample - for strong sources measurement G4VSolid* sampletwobox_shape = 0; new G4PVPlacement(0, G4ThreeVector(0., 0., 14.05*cm), detplasticcap_log, "detplasticcap2", Nfilledchamber_log, false, 0); new G4PVPlacement(0, G4ThreeVector(0., 0., 15.5*cm), detplasticshell_log, "detplasticshell2", Nfilledchamber_log, false, 0); new G4PVPlacement(0, G4ThreeVector(0., 0., 16.975*cm), detplasticcap1_log, "detplasticcap3", Nfilledchamber_log, false, 0); sampletwobox_shape = new G4Sphere("sample_shpere", 0., fspheretwobox_rad, 0.,twopi, 0.,twopi); } else if (fliquid_geom) { // --- standard cylindrical box (cover side facing detector) - 0.1cm from detector //window _____with liquid sample_____ G4Tubs* detplasticcap_tubs = new G4Tubs("detplasticcap_tubs", 0.*cm, fdetplasticcap_Rmax, 0.5*fdetplasticcap_sizeZ, 0, twopi); G4LogicalVolume* detplasticcap_log = new G4LogicalVolume(detplasticcap_tubs, Acrylic, "detplasticcap_log", 0, 0, 0); detplasticcap_log -> SetVisAttributes(Acryliccolour); new G4PVPlacement(0, G4ThreeVector(s_x, s_y, s_z+9.35*cm), detplasticcap_log, "detplasticcap", Nfilledchamber_log, false, 0); G4Tubs* detplasticcap1_tubs = new G4Tubs("detplasticcap1_tubs", 0.*cm, fdetplasticcap1_Rmax, 0.5*fdetplasticcap1_sizeZ, 0, twopi); G4LogicalVolume* detplasticcap1_log = new G4LogicalVolume(detplasticcap1_tubs, Acrylic, "detplasticcap1_log", 0, 0, 0); detplasticcap1_log -> SetVisAttributes(Acryliccolour); new G4PVPlacement(0, G4ThreeVector(s_x, s_y, s_z+12.275*cm), detplasticcap1_log, "detplasticcap1", Nfilledchamber_log, false, 0); G4Tubs* detplasticshell_tubs = new G4Tubs("detplasticshell_tubs", fdetplasticshell_Rmin, fdetplasticshell_Rmax, 0.5*fdetplasticshell_sizeZ, 0,twopi); G4LogicalVolume* detplasticshell_log = new G4LogicalVolume(detplasticshell_tubs, Acrylic, "detplasticshell_log", 0, 0, 0); detplasticshell_log -> SetVisAttributes(Acryliccolour); new G4PVPlacement(0, G4ThreeVector(s_x, s_y, s_z+10.8*cm), detplasticshell_log, "detplasticshell", Nfilledchamber_log, false, 0); // liquid filling the standard box up to level of "boxheight" G4VSolid* sampleliquid_shape = 0; G4VSolid* sampleliquid_body = new G4Tubs("sample_tube", fsampleliquid_Rmin, fsampleliquid_Rmax, 0.5*fsampleliquid_sizeZ, 0, fsampleliquid_fimax); G4VSolid* sampleliquid_hole = new G4Box("sample_hole", fsampleliquid_Rmax+0.1*cm, fsampleliquid_Rmax, 0.5*fsampleliquid_sizeZ+0.1*cm); sampleliquid_shape = new G4SubtractionSolid("sample_shape", sampleliquid_body, sampleliquid_hole, 0, G4ThreeVector(0., 2*fsampleliquid_Rmax-fboxliquid_height,0.)); } else if (fnocuinsert_geom) { // no Cu insert around end cap, polypropylene cylinder around end cap and sample on top // reference point Cu base = 2.55 cm (top of endcap) - 7.33 cm (height of endcap) = -4.78 cm // PP truncated cone // outside part G4VSolid* truncside_cons = new G4Cons("truncside_cons", ftruncside_Rmin1, ftruncside_Rmax1, ftruncside_Rmin2, ftruncside_Rmax2, 0.5*ftruncside_sizeZ, 0, twopi); G4LogicalVolume* truncside_cons_log = new G4LogicalVolume(truncside_cons, Polypropylene, "truncside_cons_log", 0, 0, 0); truncside_cons_log -> SetVisAttributes(PPcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -1.03*cm), truncside_cons_log, "truncside_cons", Nfilledchamber_log, false, 0); // PE top lid of inner cone G4VSolid* trunctop_tubs = new G4Tubs("trunctop_tubs", 0*cm, ftrunctop_Rmax, 0.5*ftrunctop_sizeZ, 0, twopi); G4LogicalVolume* trunctop_tubs_log = new G4LogicalVolume(trunctop_tubs, PE, "trunctop_tubs_log", 0, 0, 0); trunctop_tubs_log -> SetVisAttributes(PEcolour); new G4PVPlacement(0, G4ThreeVector(0, 0, 2.645*cm), trunctop_tubs_log, "trunctop_tubs", Nfilledchamber_log, false, 0); G4VSolid* samplenocuinsert_shape = 0; //samplenocuinsert_shape = new G4Trap("sample_trapezoid", 2.0*cm, 0.*deg, 0.*deg, 4.*cm, 3.5*cm, 5.5*cm, 0.*deg, 2.75*cm, 2.40625*cm, 3.78125*cm, 0.*deg); samplenocuinsert_shape = new G4Trap("sample_trapezoid", 0.5*fsamplenocuinsert_sizeZ, 0.*deg, 0.*deg, 0.5*fsamplenocuinsert_sizeYBasemin, 0.5*fsamplenocuinsert_sizeYBasemax, 0.5*fsamplenocuinsert_sizeXSmallYmin, 0.5*fsamplenocuinsert_sizeXBigYmin, 0.5*fsamplenocuinsert_sizeXSmallYmax, 0.5*fsamplenocuinsert_sizeXBigYmax, 0.*deg, 0.*deg); G4LogicalVolume* sample_log = new G4LogicalVolume(samplenocuinsert_shape, sample_mat, "sample_log", 0, 0, 0); sample_log -> SetVisAttributes(Sample_Colour); new G4PVPlacement(0, G4ThreeVector(1.0*cm, -0.4*cm, s_z+2.72*cm+5.5*cm/2.), sample_log, "sample", Nfilledchamber_log, false, 0); } else if (fmarinelli_geom) { // ----------------------------------------- Cu block in nitrogen filled chamber G4Box* Cublock_box = new G4Box("Cublock_box", 0.5*fCublock_sizeX, 0.5*fCublock_sizeY, 0.5*fCublock_sizeZ); // ----------------------------------------- drilled hole in Cu block in nitrogen filled chamber G4Tubs* drhole_tubs = new G4Tubs("drhole_tubs", 0., fdrhole_Rmax, 0.5*fdrhole_sizeZ, 0, twopi); // ----------------------------------------- combined geometry for Cu shield in nitrogen filled chamber G4VSolid* Cu_shield=0; Cu_shield = new G4SubtractionSolid("Cu_shield", Cublock_box, drhole_tubs, 0, G4ThreeVector (0.,0.,0.)); G4LogicalVolume* Cu_shield_log = new G4LogicalVolume(Cu_shield, Cu, "Cu_shield_log", 0, 0, 0); Cu_shield_log -> SetVisAttributes(Cucolour); new G4PVPlacement(0, G4ThreeVector(0, 0, -8.35*cm), Cu_shield_log, "Cu_shield", Nfilledchamber_log, false, 0); // "marinelli" box (box with a hole) G4Box* top_box = new G4Box("top_box", 0.5*ftopbox_sizeX, 0.5*ftopbox_sizeY, 0.5*ftopbox_sizeZ); G4LogicalVolume* top_box_log = new G4LogicalVolume(top_box, Acrylic, "top_box_log", 0, 0, 0); top_box_log -> SetVisAttributes(Acryliccolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 8.5*cm), top_box_log, "top_box", Nfilledchamber_log, false, 0); G4Box* side1_box = new G4Box("side1_box", 0.5*fside1_sizeX, 0.5*fside1_sizeY, 0.5*fside1_sizeZ); G4LogicalVolume* side1_box_log = new G4LogicalVolume(side1_box, Acrylic, "side1_box_log", 0, 0, 0); side1_box_log -> SetVisAttributes(Acryliccolour); new G4PVPlacement(0, G4ThreeVector(0., 7.15*cm, 2.*cm), side1_box_log, "side1_box_01",Nfilledchamber_log, false, 0); new G4PVPlacement(0, G4ThreeVector(0., -7.15*cm, 2.*cm), side1_box_log, "side1_box_02",Nfilledchamber_log, false, 1); G4Box* side2_box = new G4Box("side2_box", 0.5*fside2_sizeX, 0.5*fside2_sizeY, 0.5*fside2_sizeZ); G4LogicalVolume* side2_box_log = new G4LogicalVolume(side2_box, Acrylic, "side2_box_log", 0, 0, 0); side2_box_log -> SetVisAttributes(Acryliccolour); new G4PVPlacement(0, G4ThreeVector(7.15*cm, 0., 2.*cm), side2_box_log, "side2_box_01",Nfilledchamber_log, false, 0); new G4PVPlacement(0, G4ThreeVector(-7.15*cm, 0., 2.*cm), side2_box_log, "side2_box_02",Nfilledchamber_log, false, 1); G4VSolid* bottom_shape=0; G4VSolid* samplemarinelli_shape=0; G4VSolid* bottom_body = new G4Box("box_box", 0.5*fbottombody_sizeX, 0.5*fbottombody_sizeY, 0.5*fbottombody_sizeZ); G4VSolid* bottom_hole = new G4Tubs("box_tube", 0., fbottomhole_Rmax, 0.5*fbottomhole_sizeZ, 0, fbottomhole_fimax); bottom_shape = new G4SubtractionSolid("bottom_shape", bottom_body, bottom_hole, 0, G4ThreeVector(0., 0., 0.)); G4LogicalVolume* bottom_shape_log = new G4LogicalVolume(bottom_shape, Acrylic, "bottom_shape_log", 0, 0, 0); bottom_shape_log -> SetVisAttributes(Acryliccolour); new G4PVPlacement(0, G4ThreeVector(0., 0., -4.5*cm), bottom_shape_log, "bottom_shape",Nfilledchamber_log, false, 0); G4Tubs* inner_cyl = new G4Tubs("inner_cyl", finnercyl_Rmin, finnercyl_Rmax, 0.5*finnercyl_sizeZ, 0, finnercyl_fimax); G4LogicalVolume* inner_cyl_log = new G4LogicalVolume(inner_cyl, Acrylic, "inner_cyl_log", 0, 0, 0); inner_cyl_log -> SetVisAttributes(Acryliccolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 0.), inner_cyl_log, "inner_cyl",Nfilledchamber_log, false, 0); G4Tubs* inner_top = new G4Tubs("inner_top", 0., finnertop_Rmax, 0.5*finnertop_sizeZ, 0, finnertop_fimax); G4LogicalVolume* inner_top_log = new G4LogicalVolume(inner_top, Acrylic, "inner_top_log", 0, 0, 0); inner_top_log -> SetVisAttributes(Acryliccolour); new G4PVPlacement(0, G4ThreeVector(0., 0., 4.35*cm), inner_top_log, "inner_top",Nfilledchamber_log, false, 0); // "marinelli" shape (box with a hole) G4VSolid* samplemarinelli_body = new G4Box("sample_box", 0.5*fsamplemarinellibody_sizeX, 0.5*fsamplemarinellibody_sizeY, 0.5*fsamplemarinellibody_sizeZ); G4VSolid* samplemarinelli_hole = new G4Tubs("sample_tube", 0., fsamplemarinellihole_Rmax, fsamplemarinellihole_sizeZ, 0, fsamplemarinellihole_fimax); samplemarinelli_shape = new G4SubtractionSolid("sample_shape", samplemarinelli_body, samplemarinelli_hole, 0, G4ThreeVector(0., 0., -1.9*cm)); G4LogicalVolume* samplemarinelli_log = new G4LogicalVolume(samplemarinelli_shape, sample_mat, "sample_log", 0, 0, 0); samplemarinelli_log -> SetVisAttributes(Sample_Colour); new G4PVPlacement(0, G4ThreeVector(0., 0., 2.*cm), samplemarinelli_log, "sample", Nfilledchamber_log, false, 0); } // //always return the physical World // return physWorld; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......