added BGOs, needs to be sensitive now
This commit is contained in:
parent
4263dd7e21
commit
2cb29b1cf2
Binary file not shown.
Binary file not shown.
|
@ -9,6 +9,7 @@
|
||||||
#include "G4Box.hh"
|
#include "G4Box.hh"
|
||||||
#include "G4Tubs.hh"
|
#include "G4Tubs.hh"
|
||||||
#include "G4Sphere.hh"
|
#include "G4Sphere.hh"
|
||||||
|
#include "G4Trd.hh"
|
||||||
#include "G4IntersectionSolid.hh"
|
#include "G4IntersectionSolid.hh"
|
||||||
#include "G4SubtractionSolid.hh"
|
#include "G4SubtractionSolid.hh"
|
||||||
|
|
||||||
|
@ -120,10 +121,20 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes()
|
||||||
|
|
||||||
//Clover casing
|
//Clover casing
|
||||||
G4double caseXYInner = 2*(cutXY + 1.0) * mm;
|
G4double caseXYInner = 2*(cutXY + 1.0) * mm;
|
||||||
G4double caseZInner = crystalLength/2 + 4 * mm + crystalLength + 15*mm;
|
G4double caseZInner = crystalLength/2 + crystalLength + 10*mm;
|
||||||
G4double caseXYWallThickness = 3.0 * mm;
|
G4double caseXYWallThickness = 3.0 * mm;
|
||||||
G4double caseZWallThickness = 3.0 * mm;
|
G4double caseZWallThickness = 3.0 * mm;
|
||||||
|
|
||||||
|
|
||||||
|
//BGO Detector
|
||||||
|
|
||||||
|
G4double bgoXYInner = 10*mm + 2*(cutXY + 1.0) * mm;
|
||||||
|
G4double bgoZInner = crystalLength/2 + 4 * mm + crystalLength + 15*mm;
|
||||||
|
G4double bgoXYWallThickness = 103.5 * mm; //from schematic
|
||||||
|
G4double bgoanglecut = 53 * mm;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Get materials
|
// Get materials
|
||||||
auto backgroundMaterial = G4Material::GetMaterial("G4_AIR");
|
auto backgroundMaterial = G4Material::GetMaterial("G4_AIR");
|
||||||
//auto backgroundMaterial = G4Material::GetMaterial("Galactic");
|
//auto backgroundMaterial = G4Material::GetMaterial("Galactic");
|
||||||
|
@ -154,10 +165,6 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes()
|
||||||
G4RotationMatrix * rotX = new G4RotationMatrix(); rotX->rotateX(90*degree);
|
G4RotationMatrix * rotX = new G4RotationMatrix(); rotX->rotateX(90*degree);
|
||||||
G4RotationMatrix * rotY = new G4RotationMatrix(); rotY->rotateY(90*degree);
|
G4RotationMatrix * rotY = new G4RotationMatrix(); rotY->rotateY(90*degree);
|
||||||
|
|
||||||
//G4SubtractionSolid * pipe1 = new G4SubtractionSolid("Pipe1", pipe, pipe0, rotY, G4ThreeVector());
|
|
||||||
|
|
||||||
// G4LogicalVolume * pipe1LV = new G4LogicalVolume( pipe1, G4Material::GetMaterial("G4_Fe"), "Pipe");
|
|
||||||
// G4LogicalVolume * pipe2LV = new G4LogicalVolume( pipe, G4Material::GetMaterial("G4_Fe"), "Pipe2");
|
|
||||||
G4LogicalVolume * chamberLV = new G4LogicalVolume(chamber, G4Material::GetMaterial("G4_Fe"),"targetchamber");
|
G4LogicalVolume * chamberLV = new G4LogicalVolume(chamber, G4Material::GetMaterial("G4_Fe"),"targetchamber");
|
||||||
|
|
||||||
new G4PVPlacement( 0, // no rotation
|
new G4PVPlacement( 0, // no rotation
|
||||||
|
@ -168,19 +175,8 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes()
|
||||||
false, // no boolean operation
|
false, // no boolean operation
|
||||||
0, // copy number
|
0, // copy number
|
||||||
fCheckOverlaps); // checking overlaps
|
fCheckOverlaps); // checking overlaps
|
||||||
/*
|
|
||||||
new G4PVPlacement( rotY, // no rotation
|
chamberLV->SetVisAttributes(new G4VisAttributes(G4Colour(1.0,1.0,1.0)));
|
||||||
G4ThreeVector(0, 0, pipeZPos), // at (0,0,0)
|
|
||||||
pipe2LV, // its logical volume
|
|
||||||
"Pipe2", // its name
|
|
||||||
worldLV, // its mother volume
|
|
||||||
false, // no boolean operation
|
|
||||||
0, // copy number
|
|
||||||
fCheckOverlaps); // checking overlaps
|
|
||||||
*/
|
|
||||||
// pipe1LV->SetVisAttributes(new G4VisAttributes(G4Colour(1.0,1.0,1.0)));
|
|
||||||
// pipe2LV->SetVisAttributes(new G4VisAttributes(G4Colour(1.0,1.0,1.0)));
|
|
||||||
chamberLV->SetVisAttributes(new G4VisAttributes(G4Colour(1.0,1.0,1.0)));
|
|
||||||
|
|
||||||
|
|
||||||
// Crystals
|
// Crystals
|
||||||
|
@ -197,6 +193,16 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes()
|
||||||
G4Box* case2 = new G4Box("case2", (caseXYInner + caseXYWallThickness)/2. , (caseXYInner + caseXYWallThickness)/2., caseZInner + caseZWallThickness*2.);
|
G4Box* case2 = new G4Box("case2", (caseXYInner + caseXYWallThickness)/2. , (caseXYInner + caseXYWallThickness)/2., caseZInner + caseZWallThickness*2.);
|
||||||
G4SubtractionSolid * casing = new G4SubtractionSolid("casing", case2, case1);
|
G4SubtractionSolid * casing = new G4SubtractionSolid("casing", case2, case1);
|
||||||
|
|
||||||
|
G4Box* bgo1 = new G4Box("bgo1", bgoXYInner/2., bgoXYInner/2., bgoZInner +10*mm);
|
||||||
|
|
||||||
|
G4Trd* bgo2 = new G4Trd("bgo2", (bgoXYInner+ bgoXYWallThickness)/2. - bgoanglecut ,(bgoXYInner+ bgoXYWallThickness)/2.
|
||||||
|
, (bgoXYInner + bgoXYWallThickness)/2. - bgoanglecut, (bgoXYInner + bgoXYWallThickness)/2., bgoZInner);
|
||||||
|
//G4Box* bgo2 = new G4Box("bgo2", (bgoXYInner+ bgoXYWallThickness)/2., (bgoXYInner + bgoXYWallThickness)/2., bgoZInner + bgoZWallThickness*2.);
|
||||||
|
|
||||||
|
G4SubtractionSolid * bgo = new G4SubtractionSolid("bgo", bgo2, bgo1);
|
||||||
|
|
||||||
|
// creating the subtraction solid that will form the actual bgo sheild.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
double dTheta,dPsi,zmod;
|
double dTheta,dPsi,zmod;
|
||||||
|
@ -216,7 +222,7 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes()
|
||||||
|
|
||||||
|
|
||||||
auto caseLV = new G4LogicalVolume * [fNumOfCrystal/4];
|
auto caseLV = new G4LogicalVolume * [fNumOfCrystal/4];
|
||||||
// auto caseLV = new G4LogicalVolume(casing, G4Material::GetMaterial("G4_Al"), "Case")[i/4+1];
|
auto bgoLV = new G4LogicalVolume * [fNumOfCrystal/4];
|
||||||
|
|
||||||
fLogicCrystal[i]->SetVisAttributes(crystalVisAtt);
|
fLogicCrystal[i]->SetVisAttributes(crystalVisAtt);
|
||||||
|
|
||||||
|
@ -237,10 +243,13 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes()
|
||||||
// if(iClover != DetNum){return 0;}
|
// if(iClover != DetNum){return 0;}
|
||||||
|
|
||||||
|
|
||||||
G4ThreeVector case_pos = G4ThreeVector(0,0,100*mm+crystalZPos + zmod); //The crystalZpos is the radius of the detectors.
|
G4ThreeVector case_pos = G4ThreeVector(0,0,60*mm+crystalZPos + zmod); //The crystalZpos is the radius of the detector,
|
||||||
|
//bgo uses the same position vector and rotation matrix as the case
|
||||||
|
G4ThreeVector bgo_pos = G4ThreeVector(0,0,60*mm+crystalZPos + zmod);
|
||||||
|
|
||||||
//Set rotation matrix settings for clovers.
|
//Set rotation matrix settings for clovers.
|
||||||
|
|
||||||
|
G4RotationMatrix * bgomat = new G4RotationMatrix();
|
||||||
G4RotationMatrix * rotmat = new G4RotationMatrix();
|
G4RotationMatrix * rotmat = new G4RotationMatrix();
|
||||||
G4RotationMatrix * crystalmat= new G4RotationMatrix();
|
G4RotationMatrix * crystalmat= new G4RotationMatrix();
|
||||||
|
|
||||||
|
@ -249,26 +258,30 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes()
|
||||||
|
|
||||||
for(int j = 0; j <= iClover;j++){
|
for(int j = 0; j <= iClover;j++){
|
||||||
if(j == iClover){
|
if(j == iClover){
|
||||||
// rotmat->rotateY(yangc *degree);
|
|
||||||
|
// rotation matrix must undo the operations you perform with the position vector.
|
||||||
|
|
||||||
|
bgomat->rotateZ(-dPsi*degree);
|
||||||
|
bgomat->rotateX(-dTheta*degree);
|
||||||
|
|
||||||
rotmat->rotateZ(-dPsi*degree);
|
rotmat->rotateZ(-dPsi*degree);
|
||||||
rotmat->rotateX(-dTheta*degree);
|
rotmat->rotateX(-dTheta*degree);
|
||||||
|
|
||||||
// crystalmat->rotateY(yang*degree);
|
|
||||||
crystalmat->rotateZ(-dPsi*degree);
|
crystalmat->rotateZ(-dPsi*degree);
|
||||||
crystalmat->rotateX(-dTheta*degree);
|
crystalmat->rotateX(-dTheta*degree);
|
||||||
|
|
||||||
//rotate position vector based on iClover.
|
//rotate position vector based on iClover.
|
||||||
|
|
||||||
// pos.rotateY(dPhi*degree);
|
|
||||||
pos.rotateX(dTheta*degree);
|
pos.rotateX(dTheta*degree);
|
||||||
pos.rotateZ(dPsi *degree);
|
pos.rotateZ(dPsi *degree);
|
||||||
|
|
||||||
//set rotation for the detector case vector;
|
//set rotation for the detector case vector;
|
||||||
|
|
||||||
// case_pos.rotateY(dPhi*degree);
|
|
||||||
case_pos.rotateX(dTheta *degree);
|
case_pos.rotateX(dTheta *degree);
|
||||||
case_pos.rotateZ(dPsi*degree);
|
case_pos.rotateZ(dPsi*degree);
|
||||||
|
|
||||||
|
bgo_pos.rotateX(dTheta *degree);
|
||||||
|
bgo_pos.rotateZ(dPsi*degree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
new G4PVPlacement( crystalmat, // orientation matrix
|
new G4PVPlacement( crystalmat, // orientation matrix
|
||||||
|
@ -283,7 +296,9 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes()
|
||||||
|
|
||||||
if( jCrystal == 0 ) {
|
if( jCrystal == 0 ) {
|
||||||
caseLV[iClover] = new G4LogicalVolume(casing, G4Material::GetMaterial("G4_Al"), "Case");
|
caseLV[iClover] = new G4LogicalVolume(casing, G4Material::GetMaterial("G4_Al"), "Case");
|
||||||
new G4PVPlacement( rotmat , // case orientation
|
bgoLV[iClover] = new G4LogicalVolume(bgo , G4Material::GetMaterial("G4_Al"), "BGO ");
|
||||||
|
|
||||||
|
new G4PVPlacement( rotmat , // case orientation
|
||||||
case_pos, // case location
|
case_pos, // case location
|
||||||
caseLV[i/4], // its logical volume
|
caseLV[i/4], // its logical volume
|
||||||
"Casing", // its name
|
"Casing", // its name
|
||||||
|
@ -292,7 +307,16 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes()
|
||||||
iClover, // copy number
|
iClover, // copy number
|
||||||
fCheckOverlaps); // checking overlaps
|
fCheckOverlaps); // checking overlaps
|
||||||
|
|
||||||
|
new G4PVPlacement( bgomat , // bgo orientation
|
||||||
|
bgo_pos, // bgo location
|
||||||
|
bgoLV[i/4], // its logical volume
|
||||||
|
"Bgo", // its name
|
||||||
|
worldLV, // its mother volume
|
||||||
|
false, // no boolean operation
|
||||||
|
iClover, // copy number
|
||||||
|
fCheckOverlaps); // checking overlaps
|
||||||
caseLV[iClover]->SetVisAttributes(new G4VisAttributes(G4Colour(1.0,1.0,0.0)));
|
caseLV[iClover]->SetVisAttributes(new G4VisAttributes(G4Colour(1.0,1.0,0.0)));
|
||||||
|
bgoLV[iClover]->SetVisAttributes(new G4VisAttributes(G4Colour(0.,1.0,0.0)));
|
||||||
}
|
}
|
||||||
//Set a i+1%4 for each
|
//Set a i+1%4 for each
|
||||||
//
|
//
|
||||||
|
|
|
@ -9,33 +9,33 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
//location data array for each clover needs to be set here;
|
const int Crystal_Num = 64; // has to be divisible by 4.
|
||||||
// clover number , theta, phi, relative z-distance to the Radius
|
|
||||||
//
|
|
||||||
|
|
||||||
const double Clover_Location[16][4] = {{0,131.75,326.96,0.},
|
const double Radius = 200.; //Z POSITION -- radius away from target, in milimeters.
|
||||||
{1,150.,243.57,0.},
|
//location data array for each clover needs to be set here;
|
||||||
{2,90.0,257.14,0.},
|
// clover number , theta, phi, relative z-distance to the Radius
|
||||||
{3,90.0,205.71,0.},
|
//
|
||||||
{4,48.25,326.68,0.},
|
|
||||||
{5,48.25,252.64,0.},
|
const double Clover_Location[Crystal_Num/4][4] = {{0,131.75,326.96,0.},
|
||||||
{6,131.75,33.31,0.},
|
{1,150.,243.57,0.},
|
||||||
{7,150.,116.42,0.},
|
{2,90.0,257.14,0.},
|
||||||
{8,90.,102.85,0.},
|
{3,90.0,205.71,0.},
|
||||||
{9,90.,154.28,0.},
|
{4,48.25,326.68,0.},
|
||||||
{10,48.25,33.31,0.},
|
{5,48.25,252.64,0.},
|
||||||
{11,90.,308.57,0.},
|
{6,131.75,33.31,0.},
|
||||||
{12,90.,51.42,0.},
|
{7,150.,116.42,0.},
|
||||||
{13,48.25,180.,0.},
|
{8,90.,102.85,0.},
|
||||||
{14,129.,180.,0.},
|
{9,90.,154.28,0.},
|
||||||
{15,48.25,107.35,0.}};//,
|
{10,48.25,33.31,0.},
|
||||||
|
{11,90.,308.57,0.},
|
||||||
|
{12,90.,51.42,0.},
|
||||||
|
{13,48.25,180.,0.},
|
||||||
|
{14,129.,180.,0.},
|
||||||
|
{15,48.25,107.35,0.}};//,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const int Crystal_Num = 64; // has to be divisible by 4.
|
|
||||||
|
|
||||||
const double Radius = 200.; //Z POSITION -- radius away from target, in milimeters.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user