Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ip6
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
EIC
detectors
ip6
Commits
3ee63011
Commit
3ee63011
authored
3 years ago
by
Whitney Armstrong
Browse files
Options
Downloads
Patches
Plain Diff
modified: ip6/beampipe.xml
modified: src/IP6BeamPipe.cpp
parent
cc470c0d
Branches
acts_beampipe
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ip6/beampipe.xml
+1
-0
1 addition, 0 deletions
ip6/beampipe.xml
src/IP6BeamPipe.cpp
+32
-3
32 additions, 3 deletions
src/IP6BeamPipe.cpp
with
33 additions
and
3 deletions
ip6/beampipe.xml
+
1
−
0
View file @
3ee63011
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
<detectors>
<detectors>
<detector
id=
"BeamPipe_ID"
name=
"BeamPipe"
type=
"IP6BeamPipe"
vis=
"BeamPipeVis"
>
<detector
id=
"BeamPipe_ID"
name=
"BeamPipe"
type=
"IP6BeamPipe"
vis=
"BeamPipeVis"
>
<!--<beampipe/>-->
<IP_pipe
OD=
"BeampipeOD"
wall_thickness=
"4*mm"
crossing_angle=
"CrossingAngle"
/>
<IP_pipe
OD=
"BeampipeOD"
wall_thickness=
"4*mm"
crossing_angle=
"CrossingAngle"
/>
<downstream_pipe
straight_length=
"685.0 * mm"
length=
"4500.0 * mm"
/>
<downstream_pipe
straight_length=
"685.0 * mm"
length=
"4500.0 * mm"
/>
<upstream_pipe
straight_length=
"1300.0 * mm"
length=
"4500.0 * mm"
/>
<upstream_pipe
straight_length=
"1300.0 * mm"
length=
"4500.0 * mm"
/>
...
...
This diff is collapsed.
Click to expand it.
src/IP6BeamPipe.cpp
+
32
−
3
View file @
3ee63011
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
#include
"TMath.h"
#include
"TMath.h"
#include
<XML/Helper.h>
#include
<XML/Helper.h>
#include
"Acts/Plugins/DD4hep/ActsExtension.hpp"
#include
"Acts/Definitions/Units.hpp"
using
namespace
std
;
using
namespace
std
;
using
namespace
dd4hep
;
using
namespace
dd4hep
;
...
@@ -39,8 +41,25 @@ static Ref_t create_detector(Detector& det, xml_h e, SensitiveDetector sens) {
...
@@ -39,8 +41,25 @@ static Ref_t create_detector(Detector& det, xml_h e, SensitiveDetector sens) {
Material
m_Cu
=
det
.
material
(
"Copper"
);
Material
m_Cu
=
det
.
material
(
"Copper"
);
Material
m_Al
=
det
.
material
(
"Aluminum"
);
Material
m_Al
=
det
.
material
(
"Aluminum"
);
Material
m_Be
=
det
.
material
(
"Beryllium"
);
Material
m_Be
=
det
.
material
(
"Beryllium"
);
Material
m_Vacuum
=
det
.
material
(
"Vacuum"
);
string
vis_name
=
x_det
.
visStr
();
string
vis_name
=
x_det
.
visStr
();
Acts
::
ActsExtension
*
beampipeExtension
=
new
Acts
::
ActsExtension
();
bool
isBeamPipe
=
x_det
.
hasChild
(
_U
(
beampipe
));
beampipeExtension
->
addType
(
"passive cylinder"
,
"layer"
);
if
(
isBeamPipe
)
{
beampipeExtension
->
addType
(
"beampipe"
,
"layer"
);
}
//tubeVolume.setVisAttributes(oddd, x_det.visStr());
//// Place it in the mother
//Volume motherVolume = oddd.pickMotherVolume(cylinderElement);
//PlacedVolume placedTube = motherVolume.placeVolume(tubeVolume);
//placedTube.addPhysVolID(detName, cylinderElement.id());
//sdet.setPlacement(placedTube);
int
n
=
0
;
int
n
=
0
;
xml
::
Component
IP_pipe_c
=
x_det
.
child
(
_Unicode
(
IP_pipe
));
xml
::
Component
IP_pipe_c
=
x_det
.
child
(
_Unicode
(
IP_pipe
));
...
@@ -79,6 +98,12 @@ static Ref_t create_detector(Detector& det, xml_h e, SensitiveDetector sens) {
...
@@ -79,6 +98,12 @@ static Ref_t create_detector(Detector& det, xml_h e, SensitiveDetector sens) {
// -----------------------------
// -----------------------------
// IP beampipe
// IP beampipe
Tube
IP_tube
(
IP_beampipe_ID
/
2.0
,
IP_beampipe_OD
/
2.0
,
downstream_straight_length
/
2.0
+
upstream_straight_length
/
2.0
);
Tube
IP_vacuum
(
0.0
,
IP_beampipe_ID
/
2.0
,
downstream_straight_length
/
2.0
+
upstream_straight_length
/
2.0
);
Volume
v_IP_tube
(
"v_IP_tube"
,
IP_tube
,
m_Be
);
Volume
v_IP_vacuum
(
"v_IP_vacuum"
,
IP_vacuum
,
m_Vacuum
);
Tube
downstream_IP_tube
(
IP_beampipe_ID
/
2.0
,
IP_beampipe_OD
/
2.0
,
downstream_straight_length
/
2.0
);
Tube
downstream_IP_tube
(
IP_beampipe_ID
/
2.0
,
IP_beampipe_OD
/
2.0
,
downstream_straight_length
/
2.0
);
Tube
downstream_IP_vacuum
(
0.0
,
IP_beampipe_ID
/
2.0
,
downstream_straight_length
/
2.0
);
Tube
downstream_IP_vacuum
(
0.0
,
IP_beampipe_ID
/
2.0
,
downstream_straight_length
/
2.0
);
Tube
upstream_IP_tube
(
IP_beampipe_ID
/
2.0
,
IP_beampipe_OD
/
2.0
,
upstream_straight_length
/
2.0
);
Tube
upstream_IP_tube
(
IP_beampipe_ID
/
2.0
,
IP_beampipe_OD
/
2.0
,
upstream_straight_length
/
2.0
);
...
@@ -91,11 +116,15 @@ static Ref_t create_detector(Detector& det, xml_h e, SensitiveDetector sens) {
...
@@ -91,11 +116,15 @@ static Ref_t create_detector(Detector& det, xml_h e, SensitiveDetector sens) {
//v_downstream_IP_tube.setVisAttributes(det,"RedVis");
//v_downstream_IP_tube.setVisAttributes(det,"RedVis");
sdet
.
setAttributes
(
det
,
v_upstream_IP_tube
,
x_det
.
regionStr
(),
x_det
.
limitsStr
(),
vis_name
);
sdet
.
setAttributes
(
det
,
v_upstream_IP_tube
,
x_det
.
regionStr
(),
x_det
.
limitsStr
(),
vis_name
);
sdet
.
setAttributes
(
det
,
v_downstream_IP_tube
,
x_det
.
regionStr
(),
x_det
.
limitsStr
(),
vis_name
);
sdet
.
setAttributes
(
det
,
v_downstream_IP_tube
,
x_det
.
regionStr
(),
x_det
.
limitsStr
(),
vis_name
);
sdet
.
setAttributes
(
det
,
v_IP_tube
,
x_det
.
regionStr
(),
x_det
.
limitsStr
(),
vis_name
);
auto
pv_upstream_IP_tube
=
assembly
.
placeVolume
(
v_upstream_IP_tube
,
Position
(
0
,
0
,
-
upstream_straight_length
/
2.0
));
//auto pv_upstream_IP_tube = assembly.placeVolume( v_upstream_IP_tube, Position(0, 0, -upstream_straight_length / 2.0));
//auto pv_downstream_IP_tube = assembly.placeVolume( v_downstream_IP_tube, Position(0, 0, downstream_straight_length / 2.0));
auto
pv_IP_tube
=
assembly
.
placeVolume
(
v_IP_tube
,
Position
(
0
,
0
,
-
upstream_straight_length
/
2.0
+
downstream_straight_length
/
2.0
));
auto
pv_downstream_IP_tube
=
assembly
.
placeVolume
(
DetElement
beampipe_element
(
sdet
,
"beampipe_de"
,
1
);
v_downstream_IP_tube
,
Position
(
0
,
0
,
downstream_straight_length
/
2.0
));
beampipe_element
.
addExtension
<
Acts
::
ActsExtension
>
(
beampipeExtension
);
beampipe_element
.
setPlacement
(
pv_IP_tube
);
// -----------------------------
// -----------------------------
// upstream
// upstream
...
...
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