#include #include #define THICKNESS 0.001 // define the thickness of air and aluminum in each forward calorimeter #include "FCALDetectorConstruction.hh" #include "G4Element.hh" #include "G4ElementTable.hh" #include "G4Material.hh" #include "G4MaterialTable.hh" #include "G4NistManager.hh" #include "G4Box.hh" #include "G4Tubs.hh" #include "G4LogicalVolume.hh" #include "G4ThreeVector.hh" #include "G4RotationMatrix.hh" #include "G4Transform3D.hh" #include "G4PVPlacement.hh" #include "G4LogicalBorderSurface.hh" #include "G4OpBoundaryProcess.hh" #include "G4ios.hh" G4double offsetx = 0.; G4double offsety = 0.; FCALDetectorConstruction::FCALDetectorConstruction(G4int row, G4int column, G4int LGs, G4double zLG, G4double hPlexi, G4int Agap) : n_Rows(row), n_Columns(column), LGshift(LGs), zGlass(zLG), zLightGuide(hPlexi), Airgap(Agap) { n_Cells = n_Rows * n_Columns; // the number of the cells to be made front_Space = 11.5*cm; //--- 1. LeadGlass: You must be carefule because all the length means half of the actual length. x_LeadGlass = 2.*cm; y_LeadGlass = 2.*cm; z_LeadGlass = zGlass*cm; // -------- 2. Air Gap and Foil x_AirGap = x_LeadGlass + 1.*THICKNESS*cm; y_AirGap = y_LeadGlass + 1.*THICKNESS*cm; z_AirGap = z_LeadGlass; x_FoilThick = x_AirGap + 1.*THICKNESS*cm; y_FoilThick = y_AirGap + 1.*THICKNESS*cm; z_FoilThick = z_AirGap; offsetx = -1.*((double)column)*x_FoilThick+x_FoilThick; offsety = -1.*((double)row)*y_FoilThick+y_FoilThick; // -------- 3. PlexiGlass, PMT r_Min = 0.*cm; r_Max = 1.5*cm; // r_Max = 2.54*cm; // for 1 inch tube XP2262 angle_Min = 0.*deg, angle_Max = 360.*deg; r_cathode = 1.2*cm; //r_cathode = 2.3*cm;//for 1 inch tube XP2262 r_AirMax = r_Max + 1.*THICKNESS*cm; r_FoilMax = r_Max + 2.*THICKNESS*cm; //h_Cookie = 0.075*cm; // silicon cookie thickness/2 h_Cookie = 0.05*cm; // silicon cookie thickness/2 h_PMTGlass = 0.1*cm; // PMT glass thickness/2 h_Cathode = 0.01*cm; // PMT cathode thickness/2 h_PlexiGlass = zLightGuide*cm; // plexi glass thickness/2 h_Total = h_Cookie + h_PlexiGlass + h_PMTGlass + h_Cathode; // -------- 4. World x_World = 200*cm; y_World = 200*cm; z_World = 400*cm; } FCALDetectorConstruction::~FCALDetectorConstruction() {;} G4VPhysicalVolume* FCALDetectorConstruction::Construct() { // ---------------------------------------------------------------------- // -------- 1. Elements and Materials // ---------------------------------------------------------------------- G4double a, z, density; // a: mass of a mole, z: mean number of protons G4int n_Elements; // n_Elements: the number of kinds of the elements G4NistManager* nist_Manager = G4NistManager::Instance(); // -------- 1.1. Interface Cookie Material G4Element* O = new G4Element("Oxygen", "O", z=8, a=16.00*g/mole); G4Element* Si = new G4Element("Silicon", "Si", z=14, a=28.09*g/mole); G4Material* cookieMat = new G4Material("InterfaceCookie", density=1.03*g/cm3, n_Elements=2); cookieMat->AddElement(O, 2); cookieMat->AddElement(Si, 1); // -------- 1.2. Materials for various parts of the detector G4Material* air = nist_Manager->FindOrBuildMaterial("G4_AIR"); // Air G4Material* Al = nist_Manager->FindOrBuildMaterial("G4_Al"); // Aluminum // G4Material* leadGlass = nist_Manager->FindOrBuildMaterial("G4_GLASS_LEAD");// Leadglass G4Material* plexiGlass = nist_Manager->FindOrBuildMaterial("G4_PLEXIGLASS"); // Plexiglass //G4Material* pmtGlass = nist_Manager->FindOrBuildMaterial("G4_SILICON_DIOXIDE");// PMTWindow // for pmtGlass see lower G4Material* Oxigen = nist_Manager->FindOrBuildMaterial("G4_O"); G4Material* Silicon = nist_Manager->FindOrBuildMaterial("G4_Si"); G4Material* Potassium = nist_Manager->FindOrBuildMaterial("G4_K"); G4Material* Sodium = nist_Manager->FindOrBuildMaterial("G4_Na"); G4Material* lead = nist_Manager->FindOrBuildMaterial("G4_Pb"); G4Material* Boron = nist_Manager->FindOrBuildMaterial("G4_B"); G4Material* Aluminum = nist_Manager->FindOrBuildMaterial("G4_Al"); // lead glass F8-00 G4Material* leadGlass = new G4Material("LeadGlassF800",density=2.61*g/cm3,n_Elements=5); leadGlass->AddMaterial(Oxigen, 0.1667); //Oxigen leadGlass->AddMaterial(Silicon, 0.0877); //Silicon leadGlass->AddMaterial(Sodium, 0.0060); //Sodium leadGlass->AddMaterial(Potassium, 0.0593); //Potassium leadGlass->AddMaterial(lead, 0.6803); //Lead //Fraction by weight for Borosicilcat PMT window glass //source http://en.wikipedia.org/wiki/Borosilicate_glass //Element Atomicnumber Fraction //---------------------------------------- //B 5 0.040064 //O 8 0.539562 //Na 11 0.028191 //Al 13 0.011644 //Si 14 0.377220 //K 19 0.003321 G4Material* pmtGlass = new G4Material("Borosicilate",density=2.23*g/cm3,n_Elements=6); pmtGlass->AddMaterial(Oxigen, 0.539562); pmtGlass->AddMaterial(Boron, 0.040064); pmtGlass->AddMaterial(Sodium, 0.028191); pmtGlass->AddMaterial(Aluminum, 0.011644); pmtGlass->AddMaterial(Silicon, 0.377220); pmtGlass->AddMaterial(Potassium, 0.003321); // ---------------------------------------------------------------------- // -------- 2. Generate and Add Material Property Tables // ---------------------------------------------------------------------- const G4int num = 4; const G4int numLGr = 23; const G4int numLGt = 27; G4double eRange_Photon[num] = {0.5*eV,1.24*eV, 2.27*eV, 3.76*eV}; // the energy range of optical photons for which optical properties are described // G4double absLength_LeadGlass[num] = {160.*cm,160.*cm, 160.*cm, 0.1*cm}; // Absorption length of Lead-Glass absLength = absorption length G4double absLength_PlexiGlass[num] = {200.*cm,200.*cm, 200.*cm, 0.1*cm}; // Absorption length of plexiglass G4double absLength_PMTGlass[num] = {200.*cm,200.*cm, 200.*cm, 0.1*cm}; // Absorption length of PMT glass G4double absLength_Cookie[num] = {200.*cm,200.*cm, 200.*cm, 0.1*cm}; // Absorption length of silicon cookie G4double index_Air[num] = {1.,1., 1., 1.}; // Index of refraction of air //photon energy range and index of refraction for F8 lead glass G4double eRange_LGr[numLGr]= {0.5*eV, 0.5331*eV, 0.5512*eV, 0.6293*eV, 0.6838*eV, 0.8105*eV, 0.8887*eV, 1.0985*eV, 1.2228*eV, 1.4550*eV, 1.6139*eV, 1.7548*eV, 1.8892*eV, 1.9256*eV, 2.1039*eV, 2.1101*eV, 2.2704*eV, 2.5504*eV, 2.5830*eV, 2.8447*eV, 3.0639*eV, 3.3968*eV, 3.76*eV}; G4double index_LG_F8[numLGr]= {1.588, 1.5894, 1.5905, 1.5941, 1.5961, 1.5996, 1.6013, 1.6051, 1.6073, 1.6113, 1.6143, 1.6169, 1.6198, 1.6206, 1.6248, 1.6249, 1.6291, 1.6373, 1.6384, 1.6476, 1.6566, 1.6728, 1.6728}; //photon energy range and transparency of F8 lead glass G4double eRange_LGt[numLGt]= {0.5*eV, 1.127*eV, 1.180*eV, 1.239*eV, 1.377*eV, 1.549*eV, 1.653*eV, 1.771*eV, 1.823*eV, 1.878*eV, 1.937*eV, 1.999*eV, 2.066*eV, 2.137*eV, 2.214*eV, 2.296*eV, 2.384*eV, 2.479*eV, 2.583*eV, 2.695*eV, 2.817*eV, 2.952*eV, 3.099*eV, 3.262*eV, 3.444*eV, 3.646*eV, 3.76*eV}; G4double transp_LG_F8[numLGt]={0.999, 0.994, 0.995, 0.995, 0.995, 0.996, 0.996, 0.995, 0.995, 0.994, 0.993, 0.992, 0.991, 0.992, 0.992, 0.993, 0.994, 0.993, 0.992, 0.99, 0.988, 0.985, 0.98, 0.933, 0.846, 0.001, 0.001}; //absorption length of lead glass F8 using the transparency G4double absLength_LG_F8[numLGt]; for (int i=0;iAddProperty("RINDEX", eRange_Photon, index_Air, num); air->SetMaterialPropertiesTable(air_MPT); // -------- 2.2. Table - LeadGlass G4MaterialPropertiesTable* leadGlass_MPT = new G4MaterialPropertiesTable(); //leadGlass_MPT->AddProperty("RINDEX", eRange_Photon, index_LeadGlass, num); //leadGlass_MPT->AddProperty("ABSLENGTH", eRange_Photon, absLength_LeadGlass, num); leadGlass_MPT->AddProperty("RINDEX", eRange_LGr, index_LG_F8, numLGr); leadGlass_MPT->AddProperty("ABSLENGTH", eRange_LGt, absLength_LG_F8, numLGt); leadGlass->SetMaterialPropertiesTable(leadGlass_MPT); // -------- 2.3. Table - interface cookie G4MaterialPropertiesTable* cookie_MPT = new G4MaterialPropertiesTable(); cookie_MPT->AddProperty("RINDEX", eRange_Photon, index_Cookie, num); cookie_MPT->AddProperty("ABSLENGTH", eRange_Photon, absLength_Cookie, num); cookieMat->SetMaterialPropertiesTable(cookie_MPT); // -------- 2.4. Table - plexiglass G4MaterialPropertiesTable* plexiGlass_MPT = new G4MaterialPropertiesTable(); plexiGlass_MPT->AddProperty("RINDEX", eRange_Photon, index_PlexiGlass, num); plexiGlass_MPT->AddProperty("ABSLENGTH", eRange_Photon, absLength_PlexiGlass, num); plexiGlass->SetMaterialPropertiesTable(plexiGlass_MPT); // -------- 2.5. Table - PMTglass G4MaterialPropertiesTable* pmtGlass_MPT = new G4MaterialPropertiesTable(); pmtGlass_MPT->AddProperty("RINDEX", eRange_Photon, index_PMTGlass, num); pmtGlass_MPT->AddProperty("ABSLENGTH", eRange_Photon, absLength_PMTGlass, num); pmtGlass->SetMaterialPropertiesTable(pmtGlass_MPT); // -------- 2.6. Table - PMTcathode G4MaterialPropertiesTable* cathode_MPT = new G4MaterialPropertiesTable(); cathode_MPT->AddProperty("EFFICIENCY", eRange_Photon, eff_Cathode, num); cathode_MPT->AddProperty("REFLECTIVITY", eRange_Photon, ref_Cathode, num); Al->SetMaterialPropertiesTable(cathode_MPT); // ---------------------------------------------------------------------- // -------- 3. Volumes // ---------------------------------------------------------------------- // -------- 3.1. World Volume // ---------------------------------------------------------------------- // Definiton for the world volume G4Box* world_box = new G4Box("World", x_World, y_World, z_World); // Definiton of the logical volume of the world volume filled with the air G4LogicalVolume* world_log = new G4LogicalVolume(world_box, air, "World"); // Placement of the world volume G4VPhysicalVolume* world_phys = new G4PVPlacement(0, G4ThreeVector(), world_log, "World", 0, false, 0); // ---------------------------------------------------------------------- // -------- 3.2. LeadGlass // ---------------------------------------------------------------------- G4Box* foilBox_box = new G4Box("FoilBox", x_FoilThick, y_FoilThick, z_FoilThick); G4LogicalVolume* foilBox_log = new G4LogicalVolume(foilBox_box, Al, "FoilBox"); G4VPhysicalVolume* foilBox_phys = NULL; G4double xshift = 0; G4double colshift = 0; if (LGshift) xshift = x_FoilThick; // build the lead glass wall for (G4int i=0; i0) { foilTub_log = new G4LogicalVolume(foilTub_tubs, Al, "FoilTub"); } else { foilTub_log = new G4LogicalVolume(foilTub_tubs, air, "FoilTub"); } G4VPhysicalVolume* foilTub_phys = NULL; // build the light guides for (G4int i=0; i0){ plexiGlass_tubs = new G4Tubs("PlexiGlass", r_Min, r_Max, h_PlexiGlass, angle_Min, angle_Max); plexiGlass_log = new G4LogicalVolume(plexiGlass_tubs, plexiGlass, "PlexiGlass"); plexiGlass_phys = new G4PVPlacement(0, G4ThreeVector(0, 0, -h_Total+2.*h_Cookie+h_PlexiGlass), plexiGlass_log, "PlexiGlass", airTub_log, false, 0); } // pmtglass G4Tubs* pmtGlass_tubs = new G4Tubs("PMTGlass", r_Min, r_Max, h_PMTGlass, angle_Min, angle_Max); G4LogicalVolume* pmtGlass_log = new G4LogicalVolume(pmtGlass_tubs, pmtGlass, "PMTGlass"); G4VPhysicalVolume* pmtGlass_phys = NULL; pmtGlass_phys = new G4PVPlacement(0, G4ThreeVector(0, 0, -h_Total+2.*h_Cookie+2.*h_PlexiGlass+h_PMTGlass), pmtGlass_log, "PMTGlass", airTub_log, false, 0); // pmt cathode G4Tubs* pmtCathode_tubs = new G4Tubs("PMTCathode", r_Min, r_cathode, h_Cathode, angle_Min, angle_Max); //G4LogicalVolume* pmtCathode_log = new G4LogicalVolume(pmtCathode_tubs, Al, "PMTCathode"); G4LogicalVolume* pmtCathode_log = new G4LogicalVolume(pmtCathode_tubs, Aluminum, "PMTCathode"); G4VPhysicalVolume* pmtCathode_phys = NULL; pmtCathode_phys = new G4PVPlacement(0, G4ThreeVector(0, 0, -h_Total+2.*h_Cookie+2.*h_PlexiGlass+2.*h_PMTGlass+h_Cathode), pmtCathode_log, "PMTCathode", airTub_log, false, 0); // ---------------------------------------------------------------------- // -------- 4. Surfaces // ---------------------------------------------------------------------- // -------- 4.1. Generate and Add Surface Property Tables // ---------------------------------------------------------------------- G4double ref_PlexiGlass[num] = {0.95,0.95, 0.95, 0.95}; // the reflectivity of plexiglass G4double eff_PlexiGlass[num] = {0.05,0.05, 0.05, 0.05}; // plexi_glass_reflectivity + plexi_glass_efficiency = 1 G4double ref_LeadGlass[num] = {0.85,0.85, 0.85, 0.85}; G4double eff_LeadGlass[num] = {0.15,0.15, 0.15, 0.15}; G4double specular_Lobe[num] = {0.045,0.045, 0.045, 0.045}; G4double specular_Spike[num] = {0.950,.950, 0.950, 0.950}; G4double back_Scatter[num] = {0.005,0.005, 0.005, 0.005}; // surface properties from Chris Cude simulation //G4double specular_Lobe[num] = {0.18,0.18, 0.18, 0.18}; //G4double specular_Spike[num] = {0.7954,.7954, 0.7954, 0.7954}; //G4double back_Scatter[num] = {0.0246,0.0246, 0.0246, 0.0246}; // specular_lobe + specular_spike + back_scatter + defuse_lobe = 1 // ---------------------------------------------------------------------- // -------- 4.2. Surfaces // ---------------------------------------------------------------------- // -------- 4.2.1. Surface of the leadglass in contact with air G4OpticalSurface* leadGlassAir_Surf = new G4OpticalSurface("LeadGlassAirSurface"); leadGlassAir_Surf->SetType(dielectric_dielectric); leadGlassAir_Surf->SetFinish(ground); leadGlassAir_Surf->SetModel(unified); //leadGlassAir_Surf->SetSigmaAlpha(0.12); leadGlassAir_Surf->SetSigmaAlpha(0.03); G4LogicalBorderSurface* leadGlassAir_Surf_log = NULL; leadGlassAir_Surf_log = new G4LogicalBorderSurface("LeadGlassAirSurface", leadGlass_phys, airGap_phys, leadGlassAir_Surf); // -------- 4.2.2 Surface of the plexiglass in contact with air G4OpticalSurface* plexiGlassAir_Surf = new G4OpticalSurface("PlexiGlassAirSurface"); plexiGlassAir_Surf->SetType(dielectric_dielectric); plexiGlassAir_Surf->SetFinish(polished); plexiGlassAir_Surf->SetModel(unified); G4LogicalBorderSurface* plexiGlassAir_Surf_log = NULL; if (h_PlexiGlass>0){ plexiGlassAir_Surf_log = new G4LogicalBorderSurface("PlexiGlassAirSurface", plexiGlass_phys, airTub_phys, plexiGlassAir_Surf); } // -------- 4.2.3 Surface of air in contact with the Aluminum foil(LeadGlass) G4OpticalSurface* leadGlass_AirFoil_Surf = new G4OpticalSurface("LeadGlassAirFoilSurface"); leadGlass_AirFoil_Surf->SetType(dielectric_metal); leadGlass_AirFoil_Surf->SetFinish(polished); leadGlass_AirFoil_Surf->SetModel(unified); G4LogicalBorderSurface* leadGlass_AirFoil_Surf_log = NULL; leadGlass_AirFoil_Surf_log = new G4LogicalBorderSurface("LeadGlassAirFoilSurface", airGap_phys, foilBox_phys, leadGlass_AirFoil_Surf); // -------- 4.2.4 Surface of air in contact with the Aluminum foil(PlexiGlass) G4OpticalSurface* plexiGlass_AirFoil_Surf = NULL; if (h_PlexiGlass>0) { plexiGlass_AirFoil_Surf = new G4OpticalSurface("PlexiGlassAirFoilSurface"); plexiGlass_AirFoil_Surf->SetType(dielectric_metal); plexiGlass_AirFoil_Surf->SetFinish(polished); plexiGlass_AirFoil_Surf->SetModel(unified); } G4LogicalBorderSurface* plexiGlass_AirFoil_Surf_log = NULL; if (h_PlexiGlass>0){ plexiGlass_AirFoil_Surf_log = new G4LogicalBorderSurface("PlexiGlassAirFoilSurface", airTub_phys, foilTub_phys, plexiGlass_AirFoil_Surf); } // ---------------------------------------------------------------------- // -------- 4.3. Property Tables // ---------------------------------------------------------------------- // -------- 4.3.1. PlexiGlass(Air-Foil) G4MaterialPropertiesTable* plexiGlass_AirFoil_MPT = new G4MaterialPropertiesTable(); plexiGlass_AirFoil_MPT->AddProperty("REFLECTIVITY", eRange_Photon, ref_PlexiGlass, num); plexiGlass_AirFoil_MPT->AddProperty("EFFICIENCY", eRange_Photon, eff_PlexiGlass, num); // -------- 4.1.2. LeadGlass(Air-Foil) G4MaterialPropertiesTable* leadGlass_AirFoil_MPT = new G4MaterialPropertiesTable(); leadGlass_AirFoil_MPT->AddProperty("REFLECTIVITY", eRange_Photon, ref_LeadGlass, num); leadGlass_AirFoil_MPT->AddProperty("EFFICIENCY", eRange_Photon, eff_LeadGlass, num); // -------- 4.1.3. PlexiGlass(PlexiGlass-Air) G4MaterialPropertiesTable* plexiGlass_Air_MPT = new G4MaterialPropertiesTable(); // -------- 4.1.4. LeadGlass(LeadGlass_Air) G4MaterialPropertiesTable* leadGlass_Air_MPT = new G4MaterialPropertiesTable(); leadGlass_Air_MPT->AddProperty("SPECULARLOBECONSTANT", eRange_Photon, specular_Lobe, num); leadGlass_Air_MPT->AddProperty("SPECULARSPIKECONSTANT", eRange_Photon, specular_Spike, num); leadGlass_Air_MPT->AddProperty("BACKSCATTERCONSTANT", eRange_Photon, back_Scatter, num); leadGlassAir_Surf->SetMaterialPropertiesTable(leadGlass_Air_MPT); leadGlass_AirFoil_Surf->SetMaterialPropertiesTable(leadGlass_AirFoil_MPT); if (h_PlexiGlass>0){ plexiGlassAir_Surf->SetMaterialPropertiesTable(plexiGlass_Air_MPT); plexiGlass_AirFoil_Surf->SetMaterialPropertiesTable(plexiGlass_AirFoil_MPT); } return world_phys; // return the physical volume of the world volume }