Compare commits

..

2 Commits

2 changed files with 53 additions and 1 deletions

View File

@ -59,6 +59,13 @@ Run with custom config file
* secondsipmenabled - Enable the second SiPM
# Changelog
<<<<<<< HEAD
## 2020-04-08
* SiPM position fix
* Changed scintillator mother volume
=======
>>>>>>> 247f4aad085b756a9fdbb30ec68ccec1ad1b97b7
## 2020-02-19
* Scintillator subtracted from it's coating
* Scintillation process fix

View File

@ -165,7 +165,11 @@ G4VPhysicalVolume* SiPMDetectorConstruction::Construct()
{
z_pos_helper = coatingThickness + (scintillator_size.getZ() / 2);
z_pos_helper = z_pos_helper - (container_sizeZ / 2);
<<<<<<< HEAD
//posScint = G4ThreeVector(0, 0, z_pos_helper); //center on X and Y
=======
posScint = G4ThreeVector(0, 0, z_pos_helper); //center on X and Y
>>>>>>> 247f4aad085b756a9fdbb30ec68ccec1ad1b97b7
}
//------------------------------------------------------------------------------------------------------------------
@ -199,9 +203,16 @@ G4VPhysicalVolume* SiPMDetectorConstruction::Construct()
//---World definitions----------------------------------------------------------------------------------------------
G4Box* solidWorld = new G4Box( "World", //its name
<<<<<<< HEAD
world_sizeX,
world_sizeY,
world_sizeZ); //its size
//Prevent overlapping so the world size is doubled
=======
0.5 * world_sizeX,
0.5 * world_sizeY,
0.5 * world_sizeZ); //its size
>>>>>>> 247f4aad085b756a9fdbb30ec68ccec1ad1b97b7
G4LogicalVolume* logicWorld = new G4LogicalVolume( solidWorld, //its solid
world_mat, //its material
@ -249,14 +260,24 @@ G4VPhysicalVolume* SiPMDetectorConstruction::Construct()
0.5 * scintillator_size.getZ()); //its size
G4LogicalVolume* logicScint = new G4LogicalVolume( solidScint, //its solid
<<<<<<< HEAD
scint_mat, //its material
=======
scint_mat, //its material
>>>>>>> 247f4aad085b756a9fdbb30ec68ccec1ad1b97b7
"Scintillator"); //its name
G4VSolid* solidCoating = new G4SubtractionSolid("ScintillatorCoating",
solidScintCoating,
<<<<<<< HEAD
solidScint/*,
0,
G4ThreeVector(0, 0, 0)*/);
=======
solidScint,
0,
G4ThreeVector(0, 0, 0));
>>>>>>> 247f4aad085b756a9fdbb30ec68ccec1ad1b97b7
G4LogicalVolume* logicScintCoating = new G4LogicalVolume( solidCoating, //its solid
scint_coating, //its material
@ -266,7 +287,11 @@ G4VPhysicalVolume* SiPMDetectorConstruction::Construct()
posScint, //at position
logicScint, //its logical volume
"Scintillator", //its name
<<<<<<< HEAD
logicContainer, //its mother volume
=======
logicContainer, //its mother volume
>>>>>>> 247f4aad085b756a9fdbb30ec68ccec1ad1b97b7
false, //no boolean operation
0, //copy lxenumber
checkOverlaps); //overlaps checking
@ -365,7 +390,11 @@ G4VPhysicalVolume* SiPMDetectorConstruction::Construct()
scint_material_mpt -> AddProperty("ABSLENGTH", pp, absl, n);
scint_material_mpt -> AddProperty("SLOWCOMPONENT", pp, slow, n);
scint_material_mpt -> AddProperty("FASTCOMPONENT", pp, fast, n);
<<<<<<< HEAD
scint_material_mpt -> AddConstProperty("SCINTILLATIONYIELD", 1000./MeV); //50 volt
=======
scint_material_mpt -> AddConstProperty("SCINTILLATIONYIELD", 50000./MeV); //50 volt
>>>>>>> 247f4aad085b756a9fdbb30ec68ccec1ad1b97b7
scint_material_mpt -> AddConstProperty("RESOLUTIONSCALE", 1.0);
scint_material_mpt -> AddConstProperty("FASTTIMECONSTANT", 0.01*ns);
scint_material_mpt -> AddConstProperty("SLOWTIMECONSTANT", 1.*ns);
@ -378,7 +407,11 @@ G4VPhysicalVolume* SiPMDetectorConstruction::Construct()
G4LogicalBorderSurface *ScintillatorSurface = new G4LogicalBorderSurface("Scintillator Surface", physScint, physScintCoating, OpScintillatorSurface);
<<<<<<< HEAD
G4double reflectivityCoating[n] = {0.99, 0.99};
=======
G4double reflectivityCoating[n] = {0.9, 0.9};
>>>>>>> 247f4aad085b756a9fdbb30ec68ccec1ad1b97b7
G4double efficiencyCoating[n] = {0, 0};
G4MaterialPropertiesTable *ScintillatorToWolframMaterialPropertyTable = new G4MaterialPropertiesTable();
@ -418,7 +451,7 @@ G4VPhysicalVolume* SiPMDetectorConstruction::Construct()
int x = parameters.GetXDivison();
int y = parameters.GetYDivison();
int helper = 0;
int copyNumber = 0;
G4VPhysicalVolume *physContainer[x][y];
char s1[30];
@ -428,6 +461,17 @@ G4VPhysicalVolume* SiPMDetectorConstruction::Construct()
{
snprintf(s1, 30, "Container_x%d_y%d", i, j);
logicContainer -> SetName(s1);
<<<<<<< HEAD
physContainer[i][j] = new G4PVPlacement( 0,
G4ThreeVector(i * container_sizeX + (container_sizeX / 2) - (world_sizeX / 2), j * container_sizeY + (container_sizeY / 2) - (world_sizeY / 2), container_sizeZ / 2),
logicContainer,
s1, //its name
logicWorld,
false,
copyNumber, //copy number
checkOverlaps);
copyNumber++;
=======
physContainer[x][y] = new G4PVPlacement(0,
G4ThreeVector(i * (container_sizeX / 2), j * (container_sizeY / 2), container_sizeZ / 2),
logicContainer,
@ -437,6 +481,7 @@ G4VPhysicalVolume* SiPMDetectorConstruction::Construct()
helper, //copy number
checkOverlaps);
helper++;
>>>>>>> 247f4aad085b756a9fdbb30ec68ccec1ad1b97b7
}
}
//------------------------------------------------------------------------------------------------------------------