Objet2

class zgoubidoo.commands.objet.Objet2(label1: str = '', label2: str = '', *params, **kwargs)[source]

Bases: zgoubidoo.commands.objet.Objet

Objet with all initial coordinates entered explicitely.

This object type can be used to simulate a bunch with an explicit list of coordinates. That’s the method Zgoubidoo uses when tracking bunches.

Examples

>>> zi = Input()
>>> objet = Objet2()
>>> objet.add()
>>> zi += objet
>>> zi
>>> objet.clear()
>>> objet

Command attributes

LABEL1=''

Primary label for the Zgoubi command (default: auto-generated hash).

Type

str

LABEL2=''

Secondary label for the Zgoubi command.

Type

str

BORO='1.0 centimeter * kilogauss'

Reference magnetic rigidity.

Type

Quantity

KOBJ='2'
Type

int

K2='0'
Type

int

IDMAX='1'
Type

int

Default initializer for all Commands.

Attributes Summary

IEX

Returns:

IMAX

Returns:

KEYWORD

PARAMETERS

Parameters of the command, with their default value, their description and optinally an index used by other commands (e.g.

PARTICULES

The particles list.

P_

T_

Y_

Z_

Methods Summary

add(p)

param p

add_references([n])

Add a reference particle to the Objet.

clear()

Reset the object’s content, remove all particles.

post_init([reference_y, reference_t, …])

Post initialization routine.

Attributes Documentation

IEX

Returns:

IMAX

Returns:

KEYWORD: str = 'OBJET'
PARAMETERS: dict = {'BORO': (<Quantity(1.0, 'centimeter * kilogauss')>, 'Reference magnetic rigidity.'), 'IDMAX': (1, ''), 'K2': (0, ''), 'KOBJ': (2, ''), 'LABEL1': ('', 'Primary label for the Zgoubi command (default: auto-generated hash).'), 'LABEL2': ('', 'Secondary label for the Zgoubi command.')}

Parameters of the command, with their default value, their description and optinally an index used by other commands (e.g. fit).

PARTICULES

The particles list.

P_ = 33
T_ = 31
Y_ = 30
Z_ = 32

Methods Documentation

add(p)[source]
Parameters

p

Returns:

add_references(n: int = 1)[source]

Add a reference particle to the Objet.

Parameters

n – the number of reference particles to add

Returns

the object itself.

clear()[source]

Reset the object’s content, remove all particles.

post_init(reference_y: float = 0.0, reference_t: float = 0.0, reference_z: float = 0.0, reference_p: float = 0.0, reference_x: float = 0.0, reference_d: float = 1.0, **kwargs)[source]

Post initialization routine.