Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
athena
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Fernando Torales Acosta
athena
Commits
4b5aa240
Commit
4b5aa240
authored
4 years ago
by
Jihee Kim
Browse files
Options
Downloads
Patches
Plain Diff
Added compact detector description and constructor files
parent
dc8c015d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cb_Solenoid.xml
+69
-0
69 additions, 0 deletions
cb_Solenoid.xml
materials.xml
+0
-1
0 additions, 1 deletion
materials.xml
src/cb_Solenoid.cpp
+37
-0
37 additions, 0 deletions
src/cb_Solenoid.cpp
with
106 additions
and
1 deletion
cb_Solenoid.xml
0 → 100644
+
69
−
0
View file @
4b5aa240
<lccdd
xmlns:compact=
"http://www.lcsim.org/schemas/compact/1.0"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xs:noNamespaceSchemaLocation=
"http://www.lcsim.org/schemas/compact/1.0/compact.xsd"
>
<!-- Some information about detector -->
<info
name=
"Central Barrel Solenoid"
title=
"Central Barrel Solenoid"
author=
"Jihee Kim"
url=
"https://eicweb.phy.anl.gov/EIC/detectors/reference_detector.git"
status=
"development"
version=
"v1 2021-03-15"
>
<comment>
Central Barrel Solenoid
</comment>
</info>
<!-- Use DD4hep elements and materials definitions -->
<includes>
<gdmlFile
ref=
"elements.xml"
/>
<gdmlFile
ref=
"materials.xml"
/>
</includes>
<!-- Define the dimensions of the world volume -->
<define>
<constant
name=
"world_side"
value=
"50*m"
/>
<constant
name=
"world_x"
value=
"world_side"
/>
<constant
name=
"world_y"
value=
"world_side"
/>
<constant
name=
"world_z"
value=
"world_side"
/>
<constant
name=
"tracker_region_zmax"
value=
"6 * m"
/>
<constant
name=
"tracker_region_rmax"
value=
"6 * m"
/>
<constant
name=
"cb_Solenoid_ID"
value=
"1"
/>
<constant
name=
"cb_Solenoid_rmin"
value=
"0.0 * cm"
/>
<constant
name=
"cb_Solenoid_rmax"
value=
"137.0 * cm"
/>
<constant
name=
"cb_Solenoid_z"
value=
"400.0 * cm"
/>
<constant
name=
"cb_Solenoid_shift"
value=
"0.0 * cm"
/>
</define>
<limits>
</limits>
<regions>
</regions>
<!-- Common Generic visualization attributes -->
<comment>
Common Generic visualization attributes
</comment>
<display>
<vis
name=
"cb_SolenoidVis"
alpha=
"0.4"
r=
"0.1"
g=
"0.0"
b=
"0.1"
showDaughters=
"true"
visible=
"true"
/>
</display>
<!-- Define detector -->
<detectors>
<comment>
Central Barrel Solenoid Magnet
</comment>
<!-- TODO: Add material -->
<detector
id=
"cb_Solenoid_ID"
name=
"cb_Solenoid"
type=
"cb_Solenoid"
insideTrackingVolume=
"false"
vis=
"cb_SolenoidVis"
>
<material
name=
"Steel235"
/>
<dimensions
rmin=
"cb_Solenoid_rmin"
rmax=
"cb_Solenoid_rmax"
z=
"cb_Solenoid_z"
delta=
"cb_Solenoid_shift"
/>
</detector>
</detectors>
<plugins>
</plugins>
<!-- TODO: Define field -->
<fields>
<field
type=
"solenoid"
name=
"GlobalSolenoid"
inner_field=
"1.5 * tesla"
outer_field=
"0.5*tesla"
zmin=
"100.0 * cm"
zmax=
"100.0 * cm"
inner_radius=
"100.0 * cm"
outer_radius=
"100.0 * cm"
/>
</fields>
</lccdd>
This diff is collapsed.
Click to expand it.
materials.xml
+
0
−
1
View file @
4b5aa240
...
...
@@ -2,7 +2,6 @@
<materials>
<!--
Air by weight from
http://www.engineeringtoolbox.com/air-composition-24_212.html
-->
<material
name=
"Air"
>
...
...
This diff is collapsed.
Click to expand it.
src/cb_Solenoid.cpp
0 → 100644
+
37
−
0
View file @
4b5aa240
#include
<XML/Helper.h>
///////////////////////////
// Central Barrel Solenoid
///////////////////////////
using
namespace
dd4hep
;
static
Ref_t
createDetector
(
Detector
&
desc
,
xml_h
handle
,
SensitiveDetector
sens
)
{
xml
::
DetElement
detElem
=
handle
;
std
::
string
detName
=
detElem
.
nameStr
();
int
detID
=
detElem
.
id
();
xml
::
Component
dims
=
detElem
.
dimensions
();
double
SizeZ
=
dims
.
z
();
// Size in Z direction
double
ROut
=
dims
.
rmax
();
// Outer diameter
double
RIn
=
dims
.
rmin
();
// Inner diameter
double
ShiftZ
=
dims
.
delta
();
// TODO: Material
//Material mat = desc.material("Steel235");
Material
mat
=
desc
.
material
(
detElem
.
materialStr
());
Tube
cb_Solenoid_GVol_Solid
(
RIn
,
ROut
,
SizeZ
/
2.
,
0.
,
360
*
deg
);
Volume
detVol
(
"cb_Solenoid_GVol_Logic"
,
cb_Solenoid_GVol_Solid
,
mat
);
detVol
.
setVisAttributes
(
desc
.
visAttributes
(
detElem
.
visStr
()));
DetElement
det
(
detName
,
detID
);
Volume
motherVol
=
desc
.
pickMotherVolume
(
det
);
Transform3D
tr
(
RotationZYX
(
0.
,
0.
,
0.
),
Position
(
0.
,
0.
,
ShiftZ
));
PlacedVolume
detPV
=
motherVol
.
placeVolume
(
detVol
,
tr
);
det
.
setPlacement
(
detPV
);
return
det
;
}
// clang-format off
DECLARE_DETELEMENT
(
cb_Solenoid
,
createDetector
)
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