-
Notifications
You must be signed in to change notification settings - Fork 11
/
sec_emission_model_perfect_absorber.py
118 lines (97 loc) · 3.61 KB
/
sec_emission_model_perfect_absorber.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#-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---------------------------------------------------------
import os
import numpy as np
import scipy.io as sio
from numpy.random import rand
from .sec_emission_model_ECLOUD import SEY_model_ECLOUD
class SEY_model_perfect_absorber(object):
event_types = {
0: 'absorb',
}
def __init__(self):
"""
Perfect absorber
"""
pass
def SEY_model_evol(self, Dt):
pass
def impacts_on_surface(self, mass, nel_impact, x_impact, y_impact, z_impact,
vx_impact, vy_impact, vz_impact, Norm_x, Norm_y, i_found,
v_impact_n, E_impact_eV, costheta_impact, nel_mp_th, flag_seg):
nel_replace = nel_impact * 0.
x_replace = x_impact.copy()
y_replace = y_impact.copy()
z_replace = z_impact.copy()
vx_replace = vx_impact.copy()
vy_replace = vy_impact.copy()
vz_replace = vz_impact.copy()
if i_found is not None:
i_seg_replace = i_found.copy()
else:
i_seg_replace = i_found
nel_new_MPs = np.array([])
x_new_MPs = np.array([])
y_new_MPs = np.array([])
z_new_MPs = np.array([])
vx_new_MPs = np.array([])
vy_new_MPs = np.array([])
vz_new_MPs = np.array([])
i_seg_new_MPs = np.array([])
nel_emit_tot_events = nel_impact * 0.
event_type = np.zeros_like(nel_impact)
# extended_event_type keeps track of the event type for new MPs, it is
# needed for the extraction of emission-energy distributions.
event_info = {'extended_event_type': event_type}
return nel_emit_tot_events, event_type, event_info,\
nel_replace, x_replace, y_replace, z_replace, vx_replace, vy_replace, vz_replace, i_seg_replace,\
nel_new_MPs, x_new_MPs, y_new_MPs, z_new_MPs, vx_new_MPs, vy_new_MPs, vz_new_MPs, i_seg_new_MPs