-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathgeom_impact_rect_fast_impact.py
71 lines (64 loc) · 2.28 KB
/
geom_impact_rect_fast_impact.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#-Begin-preamble-------------------------------------------------------
#
# CERN
#
# European Organization for Nuclear Research
#
#
# This file is part of the code:
#
# PyECLOUD Version 8.7.1
#
#
# Main author: Giovanni IADAROLA
# BE-ABP Group
# CERN
# CH-1211 GENEVA 23
# SWITZERLAND
# giovanni.iadarola@cern.ch
#
# Contributors: Eleonora Belli
# Philipp Dijkstal
# Lorenzo Giacomel
# Lotta Mether
# Annalisa Romano
# Giovanni Rumolo
# Eric Wulff
#
#
# Copyright CERN, Geneva 2011 - Copyright and any other
# appropriate legal protection of this computer program and
# associated documentation reserved in all countries of the
# world.
#
# Organizations collaborating with CERN may receive this program
# and documentation freely and without charge.
#
# CERN undertakes no obligation for the maintenance of this
# program, nor responsibility for its correctness, and accepts
# no liability whatsoever resulting from its use.
#
# Program and documentation are provided solely for the use of
# the organization to which they are distributed.
#
# This program may not be copied or otherwise distributed
# without permission. This message must be retained on this and
# any other authorized copies.
#
# The material cannot be sold. CERN should be given credit in
# all references.
#
#-End-preamble---------------------------------------------------------
from . import geom_impact_poly_fast_impact as gipfi
import numpy as np
na = np.array
def rect_cham_geom_object(x_aper, y_aper, flag_non_unif_sey, **kwargs):
chamber = gipfi.polyg_cham_geom_object(
{
'Vx': na([x_aper, -x_aper, -x_aper, x_aper]),
'Vy': na([y_aper, y_aper, -y_aper, -y_aper]),
'x_sem_ellip_insc': 0.99 * x_aper,
'y_sem_ellip_insc': 0.99 * y_aper
}, flag_non_unif_sey, **kwargs)
chamber.chamb_type = 'rect'
return chamber