Skip to content
Snippets Groups Projects
Commit 9a9a5203 authored by adrien-matta's avatar adrien-matta
Browse files

* Add Outer Barrel to Tiara Simulation

parent d660a445
No related branches found
No related tags found
No related merge requests found
...@@ -306,13 +306,145 @@ void Tiara::ConstructInnerBarrel(G4LogicalVolume* world){ ...@@ -306,13 +306,145 @@ void Tiara::ConstructInnerBarrel(G4LogicalVolume* world){
} }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Tiara::ConstructOuterBarrel(G4LogicalVolume* world){ void Tiara::ConstructOuterBarrel(G4LogicalVolume* world){
// TO BE DONE // // Tiara Outer Barrel
// The outer Barrel is identical to the inner barrel but wider in terms of
// geometry. It feature four non resistive strip on the front face
// Start by making a full pcb
// We start by the definition of the point forming a PCB cross section
vector<G4TwoVector> PCBCrossSection;
double l1 = OUTERBARREL_PCB_Thickness*0.5/tan(OUTERBARREL_PCB_Bevel1_Theta);
double l2 = OUTERBARREL_PCB_Thickness*0.5/tan(OUTERBARREL_PCB_Bevel2_Theta);
PCBCrossSection.push_back(G4TwoVector(OUTERBARREL_PCB_Width/2.-l2,-OUTERBARREL_PCB_Thickness*0.5));
PCBCrossSection.push_back(G4TwoVector(OUTERBARREL_PCB_Width/2.,0));
PCBCrossSection.push_back(G4TwoVector(OUTERBARREL_PCB_Width/2.-l1,OUTERBARREL_PCB_Thickness*0.5));
// Put the needed geometry parameter definition here instead of the namespace PCBCrossSection.push_back(G4TwoVector(-OUTERBARREL_PCB_Width/2.+l1,OUTERBARREL_PCB_Thickness*0.5));
// to facilitate the merge PCBCrossSection.push_back(G4TwoVector(-OUTERBARREL_PCB_Width/2.,0));
// Respect Naming convention :example : OUTERBARREL_PCB_Length / OUTERBARREL_ActiveWafer_Length PCBCrossSection.push_back(G4TwoVector(-OUTERBARREL_PCB_Width/2.+l2,-OUTERBARREL_PCB_Thickness*0.5));
}
G4ExtrudedSolid* PCBFull =
new G4ExtrudedSolid("PCBFull",
PCBCrossSection,
OUTERBARREL_PCB_Length/2.,
G4TwoVector(0,0),1,
G4TwoVector(0,0),1);
// A box having Wafer dimension but thicker than the PCB
// Will be used to remove material from the PCB to have space for the wafer
// Calculate the hole shift within the PCB
G4ThreeVector HoleShift = G4ThreeVector(
0,
0,
OUTERBARREL_PCB_Offset-(OUTERBARREL_PCB_Length/2-OUTERBARREL_PCB_HoleLength/2));
G4Box* HoleShape = new G4Box("HoleShape",
OUTERBARREL_ActiveWafer_Width/2.,
OUTERBARREL_PCB_Thickness/2.+0.1*mm,
OUTERBARREL_PCB_HoleLength/2.);
G4Box* WaferShape = new G4Box("WaferShape",
OUTERBARREL_InertWafer_Width/2.,
OUTERBARREL_PCB_Thickness/2.,
OUTERBARREL_InertWafer_Length/2.);
// The Silicon Wafer itself
G4Box* InertWaferFull = new G4Box("InertWaferFull",
OUTERBARREL_InertWafer_Width/2.,
OUTERBARREL_ActiveWafer_Thickness/2.,
OUTERBARREL_InertWafer_Length/2.);
G4Box* ActiveWafer = new G4Box("ActiveWafer",
OUTERBARREL_ActiveWafer_Width/2.,
OUTERBARREL_ActiveWafer_Thickness/2.,
OUTERBARREL_ActiveWafer_Length/2.);
G4Box* ActiveWaferShape = new G4Box("ActiveWaferShape",
OUTERBARREL_ActiveWafer_Width/2.,
OUTERBARREL_PCB_Thickness/2.,
OUTERBARREL_ActiveWafer_Length/2.);
// Substracting the hole Shape from the Stock PCB
G4SubtractionSolid* PCB_1 = new G4SubtractionSolid("PCB_1", PCBFull, HoleShape,
new G4RotationMatrix,HoleShift);
// Substracting the wafer space from the Stock PCB
G4SubtractionSolid* PCB = new G4SubtractionSolid("PCB", PCB_1, WaferShape,
new G4RotationMatrix,
G4ThreeVector(0,OUTERBARREL_PCB_Thickness/2.-OUTERBARREL_PCB_WaferDepth,0));
// Substract active part from inert part of the Wafer
G4SubtractionSolid* InertWafer = new G4SubtractionSolid("InertWafer", InertWaferFull, ActiveWaferShape,
new G4RotationMatrix,
G4ThreeVector(0,0,0));
// Master Volume that encompass everything else
G4LogicalVolume* logicBarrelDetector =
new G4LogicalVolume(PCBFull,m_MaterialVacuum,"logicBoxDetector", 0, 0, 0);
logicBarrelDetector->SetVisAttributes(G4VisAttributes::Invisible);
// Sub Volume PCB
G4LogicalVolume* logicPCB =
new G4LogicalVolume(PCB,m_MaterialPCB,"logicPCB", 0, 0, 0);
logicPCB->SetVisAttributes(PCBVisAtt);
// Sub Volume Wafer
G4LogicalVolume* logicInertWafer =
new G4LogicalVolume(InertWafer,m_MaterialSilicon,"logicInertWafer", 0, 0, 0);
logicInertWafer->SetVisAttributes(GuardRingVisAtt);
G4LogicalVolume* logicActiveWafer =
new G4LogicalVolume(ActiveWafer,m_MaterialSilicon,"logicActiveWafer", 0, 0, 0);
logicActiveWafer->SetVisAttributes(SiliconVisAtt);
// The Distance from target is given by half the lenght of a detector
// plus the length of a detector inclined by 45 deg.
G4double DistanceFromTarget = OUTERBARREL_PCB_Width*(0.5+sin(45*deg)) ;
for( unsigned int i = 0; i < 8; i ++){
// Place the sub volumes in the master volume
// Last argument is the detector number, used in the scorer to get the
// revelant information
new G4PVPlacement(new G4RotationMatrix(0,0,0),
G4ThreeVector(0,0,0),
logicPCB,"Tiara_Barrel_PCB",logicBarrelDetector,
false,i+1);
G4ThreeVector WaferPosition(0,0.5*(OUTERBARREL_PCB_Thickness-OUTERBARREL_PCB_WaferDepth+OUTERBARREL_ActiveWafer_Thickness),0);
new G4PVPlacement(new G4RotationMatrix(0,0,0),
WaferPosition,
logicActiveWafer,"Barrel_Wafer",
logicBarrelDetector,false,i+1);
new G4PVPlacement(new G4RotationMatrix(0,0,0),
WaferPosition,
logicInertWafer,"Barrel_Wafer_GuardRing",
logicBarrelDetector,false,i+1);
// The following build the barrel, with detector one at the top
// and going clowise looking upstrea
// Detector are rotate by 45deg with each other
G4RotationMatrix* DetectorRotation =
new G4RotationMatrix(0*deg,0*deg,i*45*deg);
// There center is also rotated by 45deg
G4ThreeVector DetectorPosition(0,DistanceFromTarget,0);
DetectorPosition.rotate(i*45*deg,G4ThreeVector(0,0,-1));
// Place the Master volume with its two daugther volume at the final place
new G4PVPlacement(G4Transform3D(*DetectorRotation,DetectorPosition),
logicBarrelDetector,"Tiara_Barrel_Detector",
world,false,i+1);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Tiara::ConstructHyball(G4LogicalVolume* world){ void Tiara::ConstructHyball(G4LogicalVolume* world){
......
...@@ -79,14 +79,34 @@ namespace TIARA ...@@ -79,14 +79,34 @@ namespace TIARA
const G4double INNERBARREL_PCB_Bevel2_Theta = 67.5*deg; const G4double INNERBARREL_PCB_Bevel2_Theta = 67.5*deg;
// offset between the edge of the PCB and the Edge of the hole // offset between the edge of the PCB and the Edge of the hole
const G4double INNERBARREL_PCB_Offset = 15*mm; const G4double INNERBARREL_PCB_Offset = 15*mm;
// Different from Marc code, to be checked const G4double INNERBARREL_ActiveWafer_Length = 94.80*mm;
const G4double INNERBARREL_ActiveWafer_Length = 94.00*mm;
const G4double INNERBARREL_ActiveWafer_Width = 24.0*mm; const G4double INNERBARREL_ActiveWafer_Width = 24.0*mm;
const G4double INNERBARREL_ActiveWafer_Thickness =400*um; const G4double INNERBARREL_ActiveWafer_Thickness =400*um;
const G4double INNERBARREL_InertWafer_Length = 97.00*mm; const G4double INNERBARREL_InertWafer_Length = 97.00*mm;
const G4double INNERBARREL_InertWafer_Width = 24.80*mm; const G4double INNERBARREL_InertWafer_Width = 24.80*mm;
// Outer Barrel //
const G4double OUTERBARREL_PCB_Length = 98.00*mm;
const G4double OUTERBARREL_PCB_Width = 33.16*mm;
const G4double OUTERBARREL_PCB_Thickness = 1.60*mm;
const G4double OUTERBARREL_PCB_HoleLength = 82*mm;
const G4double OUTERBARREL_PCB_WaferDepth = 1.1*mm;
const G4double OUTERBARREL_PCB_Bevel1_Theta = 50*deg ;
const G4double OUTERBARREL_PCB_Bevel2_Theta = 67.5*deg;
// offset between the edge of the PCB and the Edge of the hole
const G4double OUTERBARREL_PCB_Offset = 15*mm;
// Different from Marc code, to be checked
const G4double OUTERBARREL_ActiveWafer_Length = 94.80*mm;
const G4double OUTERBARREL_ActiveWafer_Width = 29.4*mm;
const G4double OUTERBARREL_ActiveWafer_Thickness =700*um;
const G4double OUTERBARREL_InertWafer_Length = 97.00*mm;
const G4double OUTERBARREL_InertWafer_Width = 30.2*mm;
} }
using namespace TIARA; using namespace TIARA;
class Tiara : public VDetector class Tiara : public VDetector
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment