Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
np
nptool
Commits
d2b42eb3
Commit
d2b42eb3
authored
Dec 15, 2020
by
Daniel Cox
Browse files
Updating spede to newest version of nptool
parent
1be458f3
Pipeline
#95801
failed with stages
in 4 minutes and 1 second
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
19 deletions
+74
-19
NPSimulation/Detectors/Spede/CMakeLists.txt
NPSimulation/Detectors/Spede/CMakeLists.txt
+1
-3
NPSimulation/Detectors/Spede/Spede.cc
NPSimulation/Detectors/Spede/Spede.cc
+57
-4
NPSimulation/Detectors/Spede/Spede.hh
NPSimulation/Detectors/Spede/Spede.hh
+4
-0
Projects/sage/Sage.detector
Projects/sage/Sage.detector
+12
-12
No files found.
NPSimulation/Detectors/Spede/CMakeLists.txt
View file @
d2b42eb3
#find_package(cadmesh)
#include_directories(${CADMESH_INCLUDE_DIRS})
add_library
(
NPSSpede SHARED Spede.cc SpedeHVField.cc
)
target_link_libraries
(
NPSSpede NPSCore
${
ROOT_LIBRARIES
}
${
Geant4_LIBRARIES
}
${
NPLib_LIBRARIES
}
cadmesh
-lNPSpede
)
target_link_libraries
(
NPSSpede NPSCore
${
ROOT_LIBRARIES
}
${
Geant4_LIBRARIES
}
${
NPLib_LIBRARIES
}
-lNPSpede
)
NPSimulation/Detectors/Spede/Spede.cc
View file @
d2b42eb3
...
...
@@ -85,11 +85,13 @@ namespace Spede_NS{
// Energy and time Resolution
const
double
EnergyThreshold
=
10.
*
keV
;
const
double
ResoTime
=
0.001
*
ns
;
//const double ResoEnergy = 2.7*keV ;//Sigma not actual resolution// 2.7*2.2 ~6keV
const
double
ResoEnergy
=
10
*
keV
;
//Sigma not actual resolution// 2.7*2.2 ~6keV
//const double ResoEnergy = 2.7*keV ;//Sigma not actual resolution// 2.7*2.2 ~6keV
//const double ResoEnergy = 25*keV ;//Sigma not actual resolution// 2.7*2.2 ~6keV
//const double Radius = 50*mm ;
//const double Width = 100*mm ;
const
double
Thickness
=
1
*
mm
;
const
vector
<
double
>
deadWidth
=
{
0.8
*
um
,
0.6
*
um
,
3.5
*
um
,
1.5
*
um
};
//const string Material = "BC400";
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
...
...
@@ -100,6 +102,10 @@ Spede::Spede(){
m_Event
=
new
TSpedeData
()
;
m_SpedeScorer
=
0
;
m_SiliconDetector
=
0
;
m_SiliconDeadLayer1
=
0
;
m_SiliconDeadLayer2
=
0
;
m_SiliconDeadLayer3
=
0
;
m_SiliconDeadLayer4
=
0
;
// RGB Color + Transparency
m_VisSilicon
=
new
G4VisAttributes
(
G4Colour
(
0
,
0.5
,
0
));
...
...
@@ -142,6 +148,28 @@ G4LogicalVolume* Spede::BuildSiliconDetector()
m_SiliconDetector
->
SetVisAttributes
(
m_VisSilicon
);
m_SiliconDetector
->
SetSensitiveDetector
(
m_SpedeScorer
);
G4Material
*
DeadLayerMaterial1
=
MaterialManager
::
getInstance
()
->
GetMaterialFromLibrary
(
"SiO2"
);
G4Material
*
DeadLayerMaterial2
=
MaterialManager
::
getInstance
()
->
GetMaterialFromLibrary
(
"Al"
);
G4Tubs
*
deadLayer1
=
new
G4Tubs
(
"SpedeSiliconDeadLayer1"
,
15.
/
2.
*
mm
,
47.6
/
2.
*
mm
,
Spede_NS
::
deadWidth
[
0
]
*
0.5
,
0
,
360
*
deg
);
m_SiliconDeadLayer1
=
new
G4LogicalVolume
(
deadLayer1
,
DeadLayerMaterial1
,
"logic_Spede_silicon_dead_layer1"
,
0
,
0
,
0
);
//standard
//m_SiliconDeadLayer1 = new G4LogicalVolume(deadLayer1, DeadLayerMaterial2, "logic_Spede_silicon_dead_layer1",0,0,0);
m_SiliconDeadLayer1
->
SetVisAttributes
(
G4VisAttributes
(
G4Colour
(
0.5
,
0
,
0
)));
G4Tubs
*
deadLayer2
=
new
G4Tubs
(
"SpedeSiliconDeadLayer2"
,
15.
/
2.
*
mm
,
47.6
/
2.
*
mm
,
Spede_NS
::
deadWidth
[
1
]
*
0.5
,
0
,
360
*
deg
);
m_SiliconDeadLayer2
=
new
G4LogicalVolume
(
deadLayer2
,
DeadLayerMaterial2
,
"logic_Spede_silicon_dead_layer2"
,
0
,
0
,
0
);
//standard
//m_SiliconDeadLayer2 = new G4LogicalVolume(deadLayer2, DeadLayerMaterial1, "logic_Spede_silicon_dead_layer2",0,0,0);
m_SiliconDeadLayer2
->
SetVisAttributes
(
G4VisAttributes
(
G4Colour
(
0.5
,
0.5
,
0
)));
G4Tubs
*
deadLayer3
=
new
G4Tubs
(
"SpedeSiliconDeadLayer3"
,
15.
/
2.
*
mm
,
47.6
/
2.
*
mm
,
Spede_NS
::
deadWidth
[
2
]
*
0.5
,
0
,
360
*
deg
);
m_SiliconDeadLayer3
=
new
G4LogicalVolume
(
deadLayer3
,
DeadLayerMaterial1
,
"logic_Spede_silicon_dead_layer3"
,
0
,
0
,
0
);
//standard
//m_SiliconDeadLayer3 = new G4LogicalVolume(deadLayer3, DeadLayerMaterial2, "logic_Spede_silicon_dead_layer3",0,0,0);
m_SiliconDeadLayer3
->
SetVisAttributes
(
G4VisAttributes
(
G4Colour
(
0.5
,
0
,
0
)));
G4Tubs
*
deadLayer4
=
new
G4Tubs
(
"SpedeSiliconDeadLayer4"
,
15.
/
2.
*
mm
,
47.6
/
2.
*
mm
,
Spede_NS
::
deadWidth
[
3
]
*
0.5
,
0
,
360
*
deg
);
m_SiliconDeadLayer4
=
new
G4LogicalVolume
(
deadLayer4
,
DeadLayerMaterial2
,
"logic_Spede_silicon_dead_layer4"
,
0
,
0
,
0
);
m_SiliconDeadLayer4
->
SetVisAttributes
(
G4VisAttributes
(
G4Colour
(
0.5
,
0.5
,
0
)));
}
return
m_SiliconDetector
;
}
...
...
@@ -289,9 +317,10 @@ void Spede::BuildPCB(G4double si_thickness,
//Read in file
filename
=
"/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/spede_pcb.stl"
;
filename
=
"/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/spede_pcb
_ascii
.stl"
;
//filename = "/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/Untitled.stl";
cout
<<
filename
<<
endl
;
//Create the mesh
//mesh = new CADMesh((char*) filename.c_str());
auto
mesh
=
CADMesh
::
TessellatedMesh
::
FromSTL
((
char
*
)
filename
.
c_str
());
...
...
@@ -318,6 +347,7 @@ void Spede::BuildPCB(G4double si_thickness,
filename
=
"/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/spede_preamps.stl"
;
//filename = "/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/Untitled.stl";
cout
<<
filename
<<
endl
;
//Create the mesh
//mesh = new CADMesh((char*) filename.c_str());
mesh
=
CADMesh
::
TessellatedMesh
::
FromSTL
((
char
*
)
filename
.
c_str
());
...
...
@@ -344,6 +374,7 @@ void Spede::BuildPCB(G4double si_thickness,
//Read in file
filename
=
"/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/spede_cb.stl"
;
//filename = "/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/Untitled.stl";
cout
<<
filename
<<
endl
;
//Create the mesh
//mesh = new CADMesh((char*) filename.c_str());
...
...
@@ -370,6 +401,7 @@ void Spede::BuildPCB(G4double si_thickness,
//Read in file
filename
=
"/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/spede_connectors_al.stl"
;
//filename = "/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/Untitled.stl";
cout
<<
filename
<<
endl
;
//Create the mesh
//mesh = new CADMesh((char*) filename.c_str());
...
...
@@ -395,6 +427,7 @@ void Spede::BuildPCB(G4double si_thickness,
//Read in file
filename
=
"/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/spede_connectors_plastic.stl"
;
//filename = "/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/Untitled.stl";
cout
<<
filename
<<
endl
;
//Create the mesh
//mesh = new CADMesh((char*) filename.c_str());
...
...
@@ -420,6 +453,7 @@ void Spede::BuildPCB(G4double si_thickness,
//Read in file
filename
=
"/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/spede_brass.stl"
;
cout
<<
filename
<<
endl
;
...
...
@@ -469,6 +503,7 @@ void Spede::BuildPCB(G4double si_thickness,
*/
//Read in file
filename
=
"/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/spede_pb.stl"
;
cout
<<
filename
<<
endl
;
//Create the mesh
//mesh = new CADMesh((char*) filename.c_str());
...
...
@@ -494,6 +529,7 @@ void Spede::BuildPCB(G4double si_thickness,
//Read in file
filename
=
"/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/spede_w.stl"
;
cout
<<
filename
<<
endl
;
//Create the mesh
//mesh = new CADMesh((char*) filename.c_str());
...
...
@@ -588,6 +624,7 @@ void Spede::BuildChamber(G4LogicalVolume *world)
//filename = "/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/spede_al.stl";
filename
=
"/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/spede_chamber_only.stl"
;
//filename = "/Users/dacox/work/nptool/NPSimulation/Detectors/Spede/spede_chamber_only_very_coarse_mesh.stl";
cout
<<
filename
<<
endl
;
//Create the mesh
//mesh = new CADMesh((char*) filename.c_str());
...
...
@@ -738,12 +775,28 @@ void Spede::ConstructDetector(G4LogicalVolume* world){
double
si_thickness
=
Spede_NS
::
Thickness
;
double
pcb_thickness
=
0.3
;
BuildPCB
(
si_thickness
,
pcb_thickness
,
Rot
,
Det_pos
,
world
);
BuildChamber
(
world
);
//TODO temporarily disabling stuff until input files are fixed
//BuildPCB(si_thickness, pcb_thickness, Rot, Det_pos, world);
//BuildChamber(world);
new
G4PVPlacement
(
G4Transform3D
(
G4RotationMatrix
(
0.
,
0.
,
0.
),
Det_pos
),
BuildSiliconDetector
(),
"Spede"
,
world
,
false
,
i
+
1
);
//Det_pos-=Det_pos.unit()*si_thickness*0.5;
G4ThreeVector
Det_Dead_Layer_pos1
=
Det_pos
-
Det_pos
.
unit
()
*
(
si_thickness
*
0.5
+
Spede_NS
::
deadWidth
[
0
]
*
0.5
);
G4ThreeVector
Det_Dead_Layer_pos2
=
Det_Dead_Layer_pos1
-
Det_pos
.
unit
()
*
(
Spede_NS
::
deadWidth
[
0
]
*
0.5
+
Spede_NS
::
deadWidth
[
1
]
*
0.5
);
G4ThreeVector
Det_Dead_Layer_pos3
=
Det_Dead_Layer_pos2
-
Det_pos
.
unit
()
*
(
Spede_NS
::
deadWidth
[
1
]
*
0.5
+
Spede_NS
::
deadWidth
[
2
]
*
0.5
);
G4ThreeVector
Det_Dead_Layer_pos4
=
Det_Dead_Layer_pos3
-
Det_pos
.
unit
()
*
(
Spede_NS
::
deadWidth
[
2
]
*
0.5
+
Spede_NS
::
deadWidth
[
3
]
*
0.5
);
new
G4PVPlacement
(
G4Transform3D
(
G4RotationMatrix
(
0.
,
0.
,
0.
),
Det_Dead_Layer_pos1
),
m_SiliconDeadLayer1
,
"Spede_Dead_Layer1"
,
world
,
false
,
i
+
1
);
new
G4PVPlacement
(
G4Transform3D
(
G4RotationMatrix
(
0.
,
0.
,
0.
),
Det_Dead_Layer_pos2
),
m_SiliconDeadLayer2
,
"Spede_Dead_Layer2"
,
world
,
false
,
i
+
1
);
new
G4PVPlacement
(
G4Transform3D
(
G4RotationMatrix
(
0.
,
0.
,
0.
),
Det_Dead_Layer_pos3
),
m_SiliconDeadLayer3
,
"Spede_Dead_Layer3"
,
world
,
false
,
i
+
1
);
//new G4PVPlacement(G4Transform3D(G4RotationMatrix(0.,0.,0.),Det_Dead_Layer_pos4),
// m_SiliconDeadLayer4,"Spede_Dead_Layer4", world, false, i+1);
}
else
if
(
m_Shape
[
i
]
==
"Foil"
)
{
...
...
NPSimulation/Detectors/Spede/Spede.hh
View file @
d2b42eb3
...
...
@@ -74,6 +74,10 @@ class Spede : public NPS::VDetector{
private:
G4LogicalVolume
*
m_SiliconDetector
;
G4LogicalVolume
*
m_SiliconDeadLayer1
;
G4LogicalVolume
*
m_SiliconDeadLayer2
;
G4LogicalVolume
*
m_SiliconDeadLayer3
;
G4LogicalVolume
*
m_SiliconDeadLayer4
;
G4LogicalVolume
*
m_Foil
;
G4LogicalVolume
*
m_Foil_Al
;
G4LogicalVolume
*
m_Ladder
;
...
...
Projects/sage/Sage.detector
View file @
d2b42eb3
...
...
@@ -95,84 +95,84 @@ Jurogam
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Jurogam
R= 214 mm
Theta=
-
104.5 deg
Theta= 104.5 deg
Phi= 0 deg
Shape= Clover
BGO= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Jurogam
R= 214 mm
Theta=
-
104.5 deg
Theta= 104.5 deg
Phi= 30 deg
Shape= Clover
BGO= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Jurogam
R= 214 mm
Theta=
-
104.5 deg
Theta= 104.5 deg
Phi= 60 deg
Shape= Clover
BGO= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Jurogam
R= 214 mm
Theta=
-
104.5 deg
Theta= 104.5 deg
Phi= 90 deg
Shape= Clover
BGO= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Jurogam
R= 214 mm
Theta=
-
104.5 deg
Theta= 104.5 deg
Phi= 120 deg
Shape= Clover
BGO= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Jurogam
R= 214 mm
Theta=
-
104.5 deg
Theta= 104.5 deg
Phi= 150 deg
Shape= Clover
BGO= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Jurogam
R= 214 mm
Theta=
-
104.5 deg
Theta= 104.5 deg
Phi= 180 deg
Shape= Clover
BGO= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Jurogam
R= 214 mm
Theta=
-
104.5 deg
Theta= 104.5 deg
Phi= 210 deg
Shape= Clover
BGO= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Jurogam
R= 214 mm
Theta=
-
104.5 deg
Theta= 104.5 deg
Phi= 240 deg
Shape= Clover
BGO= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Jurogam
R= 214 mm
Theta=
-
104.5 deg
Theta= 104.5 deg
Phi= 270 deg
Shape= Clover
BGO= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Jurogam
R= 214 mm
Theta=
-
104.5 deg
Theta= 104.5 deg
Phi= 300 deg
Shape= Clover
BGO= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Jurogam
R= 214 mm
Theta=
-
104.5 deg
Theta= 104.5 deg
Phi= 330 deg
Shape= Clover
BGO= 1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment