| Message: Transmission of Optical Photons | Not Logged In (login) |
|
Hello everyone,
I'm having trouble getting my optical photons to pass from one volume to another, it seems as though they are always absorbed or reflected at volume boundaries, never transmitted. I've attempted to follow the examples given in ExN06 and LXe but I still don't have it working, if anyone could give me some advice, that'd be great. The scintillation crystal is wraped radially by some Aluminum Housing but each end is open to the air so I would think I should get some transmission of the light from the crystal through the air at these locations. ======================================================= My code from DetectorConstruction.cc ======================================================= #include "DetectorConstruction.hh" #include "DetectorSD.hh"
#include "G4VUserPhysicsList.hh" #include "G4UserLimits.hh" #include "G4SDManager.hh" #include "G4Material.hh" #include "G4MaterialTable.hh" #include "G4Box.hh" #include "G4Tubs.hh" #include "G4LogicalVolume.hh" #include "G4LogicalBorderSurface.hh" #include "G4LogicalSkinSurface.hh" #include "G4ThreeVector.hh" #include "G4PVPlacement.hh" #include "globals.hh" #include "G4OpBoundaryProcess.hh" #include "G4Colour.hh" #include "G4VisAttributes.hh" #include "G4ios.hh"
DetectorConstruction::DetectorConstruction()
: experimentalHall_log(0), tracker_log(0), Wrap_log(0),
AL_log(0), AL_phys(0), experimentalHall_phys(0),
tracker_phys(0), worldVisAtt(0), cylinderVisAtt(0),
HousingVisAtt(0), DetectorVisAtt(0), solidDetector(0),
logicDetector(0), physiDetector(0)
{;}
DetectorConstruction::~DetectorConstruction() { } G4VPhysicalVolume* DetectorConstruction::Construct() {
//------------------------------------------------------ materials // NaI Material Properties Table Stuff
const G4int nEntries = 38;
G4double PhotonEnergy[nEntries] =
{ 3.2627*eV, 3.1791*eV, 3.0996*eV, 3.024*eV, 2.952*eV,
2.8833*eV, 2.8178*eV, 2.7552*eV, 2.6953*eV, 2.6379*eV,
2.583*eV, 2.5303*eV, 2.48*eV, 2.431*eV, 2.3843*eV,
2.3393*eV, 2.296*eV, 2.254*eV, 2.214*eV, 2.1751*eV,
2.1376*eV, 2.1014*eV, 2.0664*eV, 2.0325*eV, 1.9997*eV,
1.9678*eV, 1.9372*eV, 1.9074*eV, 1.8785*eV, 1.8505*eV,
1.8233*eV, 1.7969*eV, 1.7712*eV, 1.7462*eV, 1.722*eV,
1.6984*eV, 1.6754*eV, 1.6531*eV};
G4double RefractiveIndex1[nEntries] =
{ 1.84208, 1.83556, 1.82965, 1.82427, 1.81936,
1.81486, 1.81072, 1.80691, 1.80339, 1.80013,
1.79711, 1.7943, 1.79168, 1.78923, 1.78695,
1.78481, 1.7828, 1.78091, 1.77914, 1.77747,
1.77589, 1.7744, 1.773, 1.77166, 1.7704,
1.7692, 1.76807, 1.76699, 1.76596, 1.76498,
1.76405, 1.76316, 1.76231, 1.7615, 1.76072,
1.75998, 1.75927, 1.75859};
G4double Absorption1[nEntries] =
{ 5.0*m, 5.0*m, 5.0*m, 5.0*m, 5.0*m,
5.0*m, 5.0*m, 5.0*m, 5.0*m, 5.0*m,
5.0*m, 5.0*m, 5.0*m, 5.0*m, 5.0*m,
5.0*m, 5.0*m, 5.0*m, 5.0*m, 5.0*m,
5.0*m, 5.0*m, 5.0*m, 5.0*m, 5.0*m,
5.0*m, 5.0*m, 5.0*m, 5.0*m, 5.0*m,
5.0*m, 5.0*m, 5.0*m, 5.0*m, 5.0*m,
5.0*m, 5.0*m, 5.0*m};
G4double ScintilFast[nEntries] =
{ 0.081731856, 0.100158264, 0.108523626, 0.113045444, 0.11304544,
0.104001809, 0.08907981, 0.077436129, 0.058783631, 0.045218178,
0.03572236, 0.027130907, 0.019443816, 0.013000226, 0.009156681,
0.004521818, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0};
G4double scattering[nEntries] =
{0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5};
G4MaterialPropertiesTable* myMPT1 = new G4MaterialPropertiesTable();
myMPT1->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex1,nEntries);
myMPT1->AddProperty("ABSLENGTH", PhotonEnergy, Absorption1, nEntries);
myMPT1->AddProperty("FASTCOMPONENT",PhotonEnergy, ScintilFast, nEntries);
myMPT1->AddProperty("RAYLEIGH", PhotonEnergy, scattering, nEntries);
myMPT1->AddConstProperty("SCINTILLATIONYIELD",200./MeV);// Normally 3800/MeV
myMPT1->AddConstProperty("RESOLUTIONSCALE",1.0);
myMPT1->AddConstProperty("FASTTIMECONSTANT", 1.*ns);
// Air Material Properties Table Stuff
G4double RefractiveIndex2[nEntries] =
{ 1.00028393, 1.00028332, 1.00028276, 1.00028225, 1.00028177, 1.00028133, 1.00028091,
1.00028053, 1.00028018, 1.00027985, 1.00027954, 1.00027925, 1.00027897, 1.00027872,
1.00027848, 1.00027825, 1.00027804, 1.00027784, 1.00027765, 1.00027747, 1.0002773,
1.00027714, 1.00027698, 1.00027684, 1.0002767, 1.00027657, 1.00027644, 1.00027632,
1.00027621, 1.0002761, 1.000276, 1.0002759, 1.0002758, 1.00027571, 1.00027563,
1.00027554, 1.00027546, 1.00027539};
G4double Absorption2[nEntries] =
{ 10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m,
10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m,
10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m,
10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m,
10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m,
10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m,
10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m, 10000.0*m,
10000.0*m, 10000.0*m, 10000.0*m};
G4MaterialPropertiesTable* myMPT2 = new G4MaterialPropertiesTable();
myMPT2->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex2, nEntries);
myMPT2->AddProperty("ABSLENGTH", PhotonEnergy, Absorption2, nEntries);
// Aluminum Material Properties Table Stuff
G4double RealRefractive[nEntries] =
{ 0.444, 0.467, 0.49, 0.5156, 0.5412, 0.5668, 0.5924,
0.618, 0.6482, 0.6784, 0.7086, 0.7388, 0.769, 0.8068,
0.8446, 0.8824, 0.9202, 0.958, 1.0064, 1.0548, 1.1032,
1.1516, 1.2, 1.263, 1.326, 1.389, 1.452, 1.515,
1.578, 1.641, 1.704, 1.767, 1.83, 1.927, 2.024,
2.121, 2.218, 2.315};
G4double ImaginaryRefractive[nEntries] =
{-4.612, -4.736, -4.86, -4.982, -5.104, -5.226, -5.348,
-5.47, -5.592, -5.714, -5.836, -5.958, -6.08, -6.202,
-6.324, -6.446, -6.568, -6.69, -6.804, -6.918, -7.032,
-7.146, -7.26, -7.365, -7.47, -7.575, -7.68, -7.785,
-7.89, -7.995, -8.1, -8.205, -8.31, -8.324, -8.338,
-8.352, -8.366, -8.38};
G4MaterialPropertiesTable* myMPT3 = new G4MaterialPropertiesTable();
myMPT3->AddProperty("REALRINDEX", PhotonEnergy, RealRefractive, nEntries);
myMPT3->AddProperty("IMAGINARYRINDEX", PhotonEnergy, ImaginaryRefractive, nEntries);
// Plastic Material Properties Table Stuff
G4double RefractiveIndex4[nEntries] =
{ 1.6117, 1.6117, 1.6117, 1.6117, 1.6117, 1.6117, 1.6117,
1.60717, 1.60465, 1.60246, 1.60051, 1.59872, 1.59703, 1.59544,
1.5939, 1.591, 1.58962, 1.5883, 1.58702, 1.5858, 1.58462,
1.5835, 1.58244, 1.58142, 1.58046, 1.57955, 1.57869, 1.57788,
1.57711, 1.57639, 1.57572, 1.57508, 1.57449, 1.57393, 1.5734,
1.57291, 1.57245}; ////////
G4MaterialPropertiesTable* myMPT4 = new G4MaterialPropertiesTable();
myMPT4->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex4, nEntries);
G4double z;
G4double a;
G4double density;
//Air
G4Element* N = new G4Element("Nitrogen", "N", z=7., a= 14.01*g/mole);
G4Element* O = new G4Element("Oxygen" , "O", z=8., a= 16.00*g/mole);
G4Material* Air = new G4Material("Air", density= 0.00129*g/cm3, 2); //Density should be 0.00129*g/cm3 for air
Air->AddElement(N,0.7);
Air->AddElement(O,0.3);
//Air->SetMaterialPropertiesTable(myMPT2);
//Glass 74% Silica SiO2, 14% Sodium Oxide Na2O 12% Calcium Oxide CaO
G4Element* Si =
new G4Element("Tin", "Si", z= 14., a= 28.0855*g/mole);
G4Element* Na =
new G4Element("Sodium", "Na", z= 11., a= 22.989769*g/mole);
G4Element* Ca=
new G4Element("Calcium", "Ca", z= 20., a= 40.078*g/mole);
G4Material* Glass = new G4Material("Glass", density= 2.53*g/cm3, 4);
Glass->AddElement(Na,0.09);
Glass->AddElement(Si,0.25);
Glass->AddElement(O,0.6);
Glass->AddElement(Ca,0.06);
//NaI(Tl) Detector Material
G4Element* I =
new G4Element("Iodine", "I", z= 53., a= 126.9*g/mole);
G4Element* Tl=
new G4Element("Thallium", "Tl", z= 81., a=204.3833*g/mole);
G4Material* NaI = new G4Material("NaI", density= 3.7*g/cm3, 3); // Density should be 3.7*g/cm3
NaI->AddElement(Na,0.495);
NaI->AddElement(I,0.495);
NaI->AddElement(Tl,0.01);
NaI->SetMaterialPropertiesTable(myMPT1);
// Plastic (PC) for the Shim and Wrap Material
G4Element* Cl=
new G4Element("Chlorine", "Cl", z= 17., a=35.453*g/mole);
G4Element* C=
new G4Element("Carbon", "C", z= 6., a=12.011*g/mole);
G4Element* H=
new G4Element("Hydrogen", "H", z= 1., a=1.00794*g/mole);
G4Material* Plastic = new G4Material("Plastic", 1.39*g/cm3,3);
Plastic->AddElement(Cl,0.167);
Plastic->AddElement(C, 0.333);
Plastic->AddElement(H, 0.5);
Plastic->SetMaterialPropertiesTable(myMPT4);
G4Material* Ar =
new G4Material("ArgonGas", z= 18., a= 39.95*g/mole, density= 1.782*mg/cm3); /
G4Material* Al =
new G4Material("Aluminum", z= 13., a= 26.98*g/mole, density= 2.7*g/cm3);
Al->SetMaterialPropertiesTable(myMPT3);
G4Material* Pb =
new G4Material("Lead", z= 82., a= 207.19*g/mole, density= 11.35*g/cm3);
//------------------------------------------------------ volumes
//------------------------------ experimental hall (world volume) //------------------------------ beam line along x axis
G4double expHall_x = 3.1*m; // was 3
G4double expHall_y = 3.1*m; // was 1
G4double expHall_z = 3.1*m; // was 1
G4Box* experimentalHall_box
= new G4Box("expHall_box",expHall_x,expHall_y,expHall_z);
experimentalHall_log = new G4LogicalVolume(experimentalHall_box,
Air,"expHall_log",0,0,0); //material = Air
G4double maxStep = 0.05*cm; experimentalHall_log->SetUserLimits(new G4UserLimits(maxStep));
experimentalHall_phys = new G4PVPlacement(0,G4ThreeVector(),
experimentalHall_log,"expHall",0,false,0);
//------------------------------ a tracker tube
G4double innerRadiusOfTheTube = 0.*cm;
G4double outerRadiusOfTheTube = 2.54*cm;
G4double hightOfTheTube = 2.54*cm;
G4double startAngleOfTheTube = 0.*deg;
G4double spanningAngleOfTheTube = 360.*deg;
G4Tubs* tracker_tube = new G4Tubs("tracker_tube",innerRadiusOfTheTube,
outerRadiusOfTheTube,hightOfTheTube,
startAngleOfTheTube,spanningAngleOfTheTube);
tracker_log = new G4LogicalVolume(tracker_tube,NaI,"tracker_log",0,0,0); //material = NaI G4double trackerPos_x = 0.*m; G4double trackerPos_y = 0.*m; G4double trackerPos_z = 0.*m;
tracker_phys = new G4PVPlacement(0,
G4ThreeVector(trackerPos_x,trackerPos_y,trackerPos_z),
tracker_log,"tracker",experimentalHall_log,false,0);
//------------------------------- Shim and Wrap
G4double innerRadiusOfTheWrap = 2.54*cm;
G4double outerRadiusOfTheWrap = 2.76352*cm;
G4double hightofTheWrap = 2.54*cm; // was 5.08, dividing by half because I think this is like an extent.
G4double startAngleOfTheWrap = 0.*deg;
G4double spanningAngleOfTheWrap = 360.*deg;
G4Tubs* Wrap_tube = new G4Tubs("Wrap_tube", innerRadiusOfTheWrap,
outerRadiusOfTheWrap, hightofTheWrap,
startAngleOfTheWrap,spanningAngleOfTheWrap);
Wrap_log = new G4LogicalVolume(Wrap_tube,Plastic,"Wrap_log",0,0,0);
G4double WrapPos_x = 0.*m;
G4double WrapPos_y = 0.*m;
G4double WrapPos_z = 0.*m;
Wrap_phys = new G4PVPlacement(0, G4ThreeVector(WrapPos_x,WrapPos_y,WrapPos_z), Wrap_log,"Wrap",experimentalHall_log,false,0);
//----------------------------------Aluminum Housing
G4double innerRadiusofAL = 2.76352*cm;
G4double outerRadiusofAL = 2.81432*cm;
G4double hightofAL = 2.54*cm;
G4double startAngleofAL = 0.*deg;
G4double spanningAngleOfAL = 360.*deg;
G4Tubs* AL_tube = new G4Tubs("AL_tube", innerRadiusofAL,
outerRadiusofAL, hightofAL,
startAngleofAL, spanningAngleOfAL);
AL_log = new G4LogicalVolume(AL_tube,Al,"AL_log",0,0,0); //material = Al
G4double ALPos_x = 0.*m;
G4double ALPos_y = 0.*m;
G4double ALPos_z = 0.*m;
AL_phys = new G4PVPlacement(0,G4ThreeVector(ALPos_x,ALPos_y,ALPos_z), AL_log,"AL",experimentalHall_log,false,0);
//--------------------------------------Glass G4double innerRadiusofGlass = 0.*cm; G4double outerRadiusofGlass = 2.54*cm; G4double hightofGlass = 0.3175*cm; G4double startAngleofGlass = 0.*deg; G4double spanningAngleofGlass = 360.*deg;
solidDetector = new G4Tubs("Detector", innerRadiusofGlass, outerRadiusofGlass, hightofGlass,
startAngleofGlass, spanningAngleofGlass);
logicDetector = new G4LogicalVolume(solidDetector,Glass,"logicDetector",0,0,0); //material = Glass
G4double GlassPos_x = 0.*m;
G4double GlassPos_y = 0.*m;
G4double GlassPos_z = -.029845*m; // was -3.6195
physiDetector = new G4PVPlacement(0,G4ThreeVector(GlassPos_x,GlassPos_y,GlassPos_z), logicDetector,"Detector",experimentalHall_log,false,0); G4SDManager* SDman = G4SDManager::GetSDMpointer(); G4String DetectorSDname = "ExN01/DetectorSD"; ExN01DetectorSD* aDetectorSD = new ExN01DetectorSD( DetectorSDname ); SDman->AddNewDetector( aDetectorSD ); logicDetector->SetSensitiveDetector( aDetectorSD );
//-------------------------Surfaces-----------------------------
//SodiumIodide Crystal
//
G4OpticalSurface* OpCrystalSurface = new G4OpticalSurface("CrystalSurface");
OpCrystalSurface->SetType(dielectric_dielectric);
OpCrystalSurface->SetFinish(ground);
OpCrystalSurface->SetModel(unified);
G4LogicalBorderSurface* CrystalSurface =
new G4LogicalBorderSurface("CrystalSurface",
tracker_phys,experimentalHall_phys,OpCrystalSurface);
//Air
//
G4OpticalSurface* OpAirSurface = new G4OpticalSurface("AirSurface");
OpAirSurface->SetType(dielectric_dielectric);
OpAirSurface->SetFinish(polished);
OpAirSurface->SetModel(glisur);
G4LogicalSkinSurface* AirSurface=
new G4LogicalSkinSurface("AirSurface", experimentalHall_log, OpAirSurface);
const G4int num = 2;
G4double Ephoton[num] = {2.038*eV, 4.144*eV};
//OpticalCrystalSurface
G4double RefractiveIndex[num] = {1.35, 1.40};
G4double SpecularLobe[num] = {0.3, 0.3};
G4double SpecularSpike[num] = {0.2, 0.2};
G4double Backscatter[num] = {0.2, 0.2};
G4MaterialPropertiesTable* myST1 = new G4MaterialPropertiesTable();
myST1->AddProperty("RINDEX", Ephoton, RefractiveIndex, num);
myST1->AddProperty("SPECULARLOBECONSTANT", Ephoton, SpecularLobe, num);
myST1->AddProperty("SPECULARSPIKECONSTANT", Ephoton, SpecularSpike, num);
myST1->AddProperty("BACKSCATTERCONSTANT", Ephoton, Backscatter, num);
OpCrystalSurface->SetMaterialPropertiesTable(myST1);
//OpticalAirSurface
G4double Reflectivity[num] = {0.3, 0.5};
G4double Efficiency[num] = {0.8, 1.0};
G4MaterialPropertiesTable *myST2 = new G4MaterialPropertiesTable();
myST2->AddProperty("REFLECTIVITY", Ephoton, Reflectivity, num);
myST2->AddProperty("EFFICIENCY", Ephoton, Efficiency, num);
OpAirSurface->SetMaterialPropertiesTable(myST2);
//------------------------------------------------------------------ worldVisAtt = new G4VisAttributes(G4Colour(1.0,1.0,1.0)); worldVisAtt->SetVisibility(false); experimentalHall_log->SetVisAttributes(worldVisAtt); cylinderVisAtt = new G4VisAttributes(G4Colour(0.0,1.0,0.0)); tracker_log->SetVisAttributes(cylinderVisAtt); WrapVisAtt = new G4VisAttributes(G4Colour(0.0,0.0,1.0)); Wrap_log->SetVisAttributes(WrapVisAtt); HousingVisAtt = new G4VisAttributes(G4Colour(0.5,0.5,0.0)); AL_log->SetVisAttributes(HousingVisAtt); DetectorVisAtt = new G4VisAttributes(G4Colour(0.0,0.5,0.5)); logicDetector->SetVisAttributes(DetectorVisAtt);
return experimentalHall_phys; }
|
| Inline Depth: | Outline Depth: | Add message: |
|
to: |