-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from tdixon97/main
implement distance to surface and add the surface types to HPGe object
- Loading branch information
Showing
19 changed files
with
901 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
"PPC", | ||
"SemiCoax", | ||
"make_hpge", | ||
"utils", | ||
"V07646A", | ||
"P00664B", | ||
"V02160A", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
from __future__ import annotations | ||
|
||
from collections.abc import Mapping | ||
|
||
|
||
def make_pplus(geometry: Mapping) -> tuple[list, list, list]: | ||
"""Make the pplus contact for BeGe and some ICPC. | ||
Methods to avoid duplicating code. | ||
Parameters | ||
---------- | ||
geometry | ||
dictionary with the geometry information. | ||
Returns | ||
------- | ||
(r,z,surfaces) | ||
Tuple of lists of r,z coordinates and surface names. | ||
""" | ||
r = [] | ||
z = [] | ||
surfaces = [] | ||
|
||
if geometry.pp_contact.depth_in_mm > 0: | ||
r += [ | ||
0, | ||
geometry.pp_contact.radius_in_mm, | ||
geometry.pp_contact.radius_in_mm, | ||
geometry.groove.radius_in_mm.inner, | ||
] | ||
z += [ | ||
geometry.pp_contact.depth_in_mm, | ||
geometry.pp_contact.depth_in_mm, | ||
0, | ||
0, | ||
] | ||
surfaces += ["pplus", "passive", "passive"] | ||
|
||
elif geometry.pp_contact.radius_in_mm < geometry.groove.radius_in_mm.inner: | ||
r += [ | ||
0, | ||
geometry.pp_contact.radius_in_mm, | ||
geometry.groove.radius_in_mm.inner, | ||
] | ||
z += [0, 0, 0] | ||
surfaces += ["pplus", "passive"] | ||
else: | ||
r += [0, geometry.pp_contact.radius_in_mm] | ||
z += [0, 0] | ||
surfaces += ["pplus"] | ||
|
||
r += [ | ||
geometry.groove.radius_in_mm.inner, | ||
geometry.groove.radius_in_mm.outer, | ||
geometry.groove.radius_in_mm.outer, | ||
] | ||
|
||
z += [ | ||
geometry.groove.depth_in_mm, | ||
geometry.groove.depth_in_mm, | ||
0, | ||
] | ||
surfaces += ["passive", "passive", "passive"] | ||
|
||
return (r, z, surfaces) |
Oops, something went wrong.