Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
np
nptool
Commits
534067ff
Commit
534067ff
authored
11 years ago
by
adrien-matta
Browse files
Options
Downloads
Patches
Plain Diff
* Adding Material management to Tiara in NPS
parent
496336a2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NPSimulation/Tiara/Tiara.cc
+55
-16
55 additions, 16 deletions
NPSimulation/Tiara/Tiara.cc
NPSimulation/Tiara/Tiara.hh
+14
-11
14 additions, 11 deletions
NPSimulation/Tiara/Tiara.hh
with
69 additions
and
27 deletions
NPSimulation/Tiara/Tiara.cc
+
55
−
16
View file @
534067ff
...
...
@@ -61,7 +61,7 @@ using namespace CLHEP;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Tiara
::
Tiara
(){
//
InitializeMaterial();
InitializeMaterial
();
m_EventBarrel
=
new
TTiaraBarrelData
();
m_EventHyball
=
new
TTiaraHyballData
();
...
...
@@ -75,7 +75,12 @@ Tiara::Tiara(){
FrameVisAtt
=
new
G4VisAttributes
(
G4Colour
(
0.5
,
0.5
,
0.5
))
;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Tiara
::~
Tiara
(){
delete
m_MaterialSilicon
;
delete
m_MaterialAl
;
delete
m_MaterialVacuum
;
delete
m_MaterialPCB
;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
...
...
@@ -218,7 +223,7 @@ void Tiara::ConstructChamber(G4LogicalVolume* world){
// Visual Attribute
G4VisAttributes
*
ChamberVisAtt
=
new
G4VisAttributes
(
G4Colour
(
0.
6
,
0.
6
,
0.
6
));
=
new
G4VisAttributes
(
G4Colour
(
0.
0
,
0.
4
,
0.
5
));
ChamberVisAtt
->
SetForceWireframe
(
true
);
ChamberVisAtt
->
SetForceAuxEdgeVisible
(
true
);
...
...
@@ -239,16 +244,8 @@ void Tiara::ConstructBarrel(G4LogicalVolume* world){
// the wafer goes into the hole
// the whole things is design so the local reference is the one of the wafer
// Material to be moved in a Material Function //
// Al
G4double
density
=
2.702
*
g
/
cm3
;
G4double
a
=
26.98
*
g
/
mole
;
G4Material
*
Aluminium
=
new
G4Material
(
"Aluminium"
,
13.
,
a
,
density
);
int
DetNbr
=
0
;
// Start by making a full pcb
// We start by the definition of the point forming a PCB cross section
vector
<
G4TwoVector
>
PCBCrossSection
;
double
l1
=
INNERBARREL_PCB_Thickness
*
0.5
/
tan
(
INNERBARREL_PCB_Bevel1_Theta
);
double
l2
=
INNERBARREL_PCB_Thickness
*
0.5
/
tan
(
INNERBARREL_PCB_Bevel2_Theta
);
...
...
@@ -268,11 +265,14 @@ void Tiara::ConstructBarrel(G4LogicalVolume* world){
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
G4Box
*
WaferShape
=
new
G4Box
(
"WaferShape"
,
INNERBARREL_Wafer_Width
/
2.
,
INNERBARREL_PCB_Thickness
/
2.
+
0.1
*
mm
,
INNERBARREL_Wafer_Length
/
2.
);
// The Silicon Wafer itself
G4Box
*
Wafer
=
new
G4Box
(
"Wafer"
,
INNERBARREL_Wafer_Width
/
2.
,
INNERBARREL_Wafer_Thickness
/
2
,
...
...
@@ -284,22 +284,23 @@ void Tiara::ConstructBarrel(G4LogicalVolume* world){
0
,
INNERBARREL_PCB_Offset
-
(
INNERBARREL_PCB_Length
/
2
-
INNERBARREL_Wafer_Length
/
2
));
// Substracting the Wafer Shape from the Stock PCB
G4SubtractionSolid
*
PCB
=
new
G4SubtractionSolid
(
"PCB"
,
PCBFull
,
WaferShape
,
new
G4RotationMatrix
,
WaferShift
);
// Master Volume
// Master Volume
that encompass everything else
G4LogicalVolume
*
logicBarrelDetector
=
new
G4LogicalVolume
(
PCBFull
,
Alumini
um
,
"logicBoxDetector"
,
0
,
0
,
0
);
new
G4LogicalVolume
(
PCBFull
,
m_MaterialVacu
um
,
"logicBoxDetector"
,
0
,
0
,
0
);
logicBarrelDetector
->
SetVisAttributes
(
G4VisAttributes
::
Invisible
);
// Sub Volume PCB
G4LogicalVolume
*
logicPCB
=
new
G4LogicalVolume
(
PCB
,
Aluminium
,
"logicPCB"
,
0
,
0
,
0
);
new
G4LogicalVolume
(
PCB
,
m_MaterialPCB
,
"logicPCB"
,
0
,
0
,
0
);
logicPCB
->
SetVisAttributes
(
PCBVisAtt
);
// Sub Volume Wafer
G4LogicalVolume
*
logicWafer
=
new
G4LogicalVolume
(
Wafer
,
Aluminium
,
"logicWafer"
,
0
,
0
,
0
);
new
G4LogicalVolume
(
Wafer
,
m_MaterialSilicon
,
"logicWafer"
,
0
,
0
,
0
);
logicWafer
->
SetVisAttributes
(
SiliconVisAtt
);
// The Distance from target is given by half the lenght of a detector
...
...
@@ -307,7 +308,9 @@ void Tiara::ConstructBarrel(G4LogicalVolume* world){
G4double
DistanceFromTarget
=
INNERBARREL_PCB_Width
*
(
0.5
+
sin
(
45
*
deg
))
;
for
(
unsigned
int
i
=
0
;
i
<
8
;
i
++
){
// Place the sub volume in the master volume
// 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
,
...
...
@@ -318,18 +321,54 @@ void Tiara::ConstructBarrel(G4LogicalVolume* world){
logicWafer
,
"Barrel_Wafer"
,
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
,
-
WaferShift
.
z
());
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......
void
Tiara
::
InitializeMaterial
(){
G4Element
*
H
=
new
G4Element
(
"Hydrogen"
,
"H"
,
1
,
1.015
*
g
/
mole
);
G4Element
*
C
=
new
G4Element
(
"Carbon"
,
"C"
,
6
,
12.011
*
g
/
mole
);
G4Element
*
N
=
new
G4Element
(
"Nitrogen"
,
"N"
,
7
,
14.01
*
g
/
mole
);
G4Element
*
O
=
new
G4Element
(
"Oxygen"
,
"O"
,
8
,
15.99
*
g
/
mole
);
G4double
a
,
z
,
density
;
// Si
a
=
28.0855
*
g
/
mole
;
density
=
2.321
*
g
/
cm3
;
m_MaterialSilicon
=
new
G4Material
(
"Si"
,
z
=
14.
,
a
,
density
);
// Al
density
=
2.702
*
g
/
cm3
;
a
=
26.98
*
g
/
mole
;
m_MaterialAl
=
new
G4Material
(
"Al"
,
z
=
13.
,
a
,
density
);
// PCB (should be FR-4, I took Epoxy Molded from LISE++)
density
=
1.85
*
g
/
cm3
;
m_MaterialPCB
=
new
G4Material
(
"PCB"
,
density
,
3
);
m_MaterialPCB
->
AddElement
(
H
,
.475
);
m_MaterialPCB
->
AddElement
(
C
,
.45
);
m_MaterialPCB
->
AddElement
(
O
,
.075
);
// Vacuum
density
=
0.000000001
*
mg
/
cm3
;
m_MaterialVacuum
=
new
G4Material
(
"Vacuum"
,
density
,
2
);
m_MaterialVacuum
->
AddElement
(
N
,
.7
);
m_MaterialVacuum
->
AddElement
(
O
,
.3
);
}
...
...
This diff is collapsed.
Click to expand it.
NPSimulation/Tiara/Tiara.hh
+
14
−
11
View file @
534067ff
...
...
@@ -134,7 +134,20 @@ private:
TTiaraBarrelData
*
m_EventBarrel
;
TTiaraHyballData
*
m_EventHyball
;
////////////////////////////////////////////////////
/////////////////// Material ///////////////////////
////////////////////////////////////////////////////
private:
// Initialize material used in detector definition
void
InitializeMaterial
();
// List of material
G4Material
*
m_MaterialSilicon
;
G4Material
*
m_MaterialAl
;
G4Material
*
m_MaterialVacuum
;
G4Material
*
m_MaterialPCB
;
////////////////////////////////////////////////////
///////////////// Scorer Related ///////////////////
////////////////////////////////////////////////////
...
...
@@ -147,17 +160,7 @@ private:
G4MultiFunctionalDetector
*
m_BOXScorer
;
G4MultiFunctionalDetector
*
m_PADScorer
;
G4MultiFunctionalDetector
*
m_QQQScorer
;
private:
// Initialize material used in detector definition
void
InitializeMaterial
();
// List of material
G4Material
*
m_MaterialSilicon
;
G4Material
*
m_MaterialAl
;
G4Material
*
m_MaterialVacuum
;
G4Material
*
m_MaterialPCB
;
////////////////////////////////////////////////////
///////////////Private intern Data//////////////////
////////////////////////////////////////////////////
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment