pybes3.helix
Helix operations
HelixObject
Source code in src/pybes3/helix.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | |
radius
property
Circular radius of the helix (in cm).
momentum
property
Momentum of the helix as a 3D vector. Note that the momentum is relative to the pivot, so once the pivot is changed, the momentum will also change accordingly.
charge
property
Returns the charge of the helix.
change_pivot(*args)
Change the pivot point of the helix.
The transformation refers to Helix class in BOSS.
Source code in src/pybes3/helix.py
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | |
helix_obj(*args, **kwargs)
helix_obj(
dr: float,
phi0: float,
kappa: float,
dz: float,
tanl: float,
*,
error: np.ndarray | None = None,
pivot: TypeObjPosition = (0, 0, 0),
) -> HelixObject
helix_obj(
*,
params: tuple[float, float, float, float, float],
error: np.ndarray | None = None,
pivot: TypeObjPosition = (0, 0, 0),
) -> HelixObject
helix_obj(
*,
momentum: TypeObjMomentum,
position: TypeObjPosition,
charge: Literal[-1, 1],
error: np.ndarray | None = None,
pivot: TypeObjPosition = (0, 0, 0),
) -> HelixObject
Source code in src/pybes3/helix.py
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 | |
helix_awk(*args, **kwargs)
helix_awk(
helix: ak.Array,
error: ak.Array | None = None,
pivot: TypeAwkPosition = (0, 0, 0),
) -> HelixAwkwardArray
helix_awk(
*,
dr: ak.Array,
phi0: ak.Array,
kappa: ak.Array,
dz: ak.Array,
tanl: ak.Array,
error: ak.Array | None = None,
pivot: TypeAwkPosition = (0, 0, 0),
) -> HelixAwkwardArray
helix_awk(
*,
momentum: ak.Array,
position: ak.Array,
charge: Literal[-1, 1] | ak.Array,
error: ak.Array | None = None,
pivot: TypeAwkPosition = (0, 0, 0),
) -> HelixAwkwardArray
Source code in src/pybes3/helix.py
936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 | |
dr_phi0_to_x(dr, phi0)
Convert helix parameters to x location.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dr
|
float
|
helix[0] parameter, dr. |
required |
phi0
|
float
|
helix[1] parameter, phi0. |
required |
Returns:
| Type | Description |
|---|---|
FloatLike
|
x location of the helix. |
Source code in src/pybes3/helix.py
473 474 475 476 477 478 479 480 481 482 483 484 485 | |
dr_phi0_to_y(dr, phi0)
Convert helix parameters to y location.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dr
|
FloatLike
|
helix[0] parameter, dr. |
required |
phi0
|
FloatLike
|
helix[1] parameter, phi0. |
required |
Returns:
| Type | Description |
|---|---|
FloatLike
|
y location of the helix. |
Source code in src/pybes3/helix.py
488 489 490 491 492 493 494 495 496 497 498 499 500 | |
phi0_to_phi(phi0)
Convert helix parameter phi0 to momentum phi.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phi0
|
FloatLike
|
helix[1] parameter, phi0. |
required |
Returns:
| Type | Description |
|---|---|
FloatLike
|
phi of the momentum vector. |
Source code in src/pybes3/helix.py
503 504 505 506 507 508 509 510 511 512 513 514 | |
kappa_to_pt(kappa)
Convert helix parameter to pt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kappa
|
FloatLike
|
helix[2] parameter, kappa. |
required |
Returns:
| Type | Description |
|---|---|
FloatLike
|
pt of the helix. |
Source code in src/pybes3/helix.py
517 518 519 520 521 522 523 524 525 526 527 528 | |
kappa_to_charge(kappa)
Convert helix parameter to charge.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kappa
|
FloatLike
|
helix[2] parameter, kappa. |
required |
Returns:
| Type | Description |
|---|---|
IntLike
|
charge of the helix. |
Source code in src/pybes3/helix.py
531 532 533 534 535 536 537 538 539 540 541 542 | |
kappa_to_radius(kappa)
Convert helix parameter kappa to circular radius.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kappa
|
FloatLike
|
helix[2] parameter, kappa. |
required |
Returns:
| Type | Description |
|---|---|
FloatLike
|
circular radius of the helix in cm. |
Source code in src/pybes3/helix.py
545 546 547 548 549 550 551 552 553 554 555 556 | |
HelixAwkwardRecord
Bases: Record
Source code in src/pybes3/helix.py
719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 | |
momentum
property
Returns the momentum of the helix as a 3D vector.
Returns:
| Type | Description |
|---|---|
MomentumObject3D
|
vector.MomentumObject3D: The momentum vector of the helix. |
position
property
Returns the position of the helix at a given azimuthal angle.
Returns:
| Type | Description |
|---|---|
VectorObject3D
|
vector.VectorObject3D: The position vector of the helix. |
charge
property
Returns the charge of the helix.
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The charge of the helix. |
radius
property
Returns the radius of the helix.
Returns:
| Type | Description |
|---|---|
float
|
The radius of the helix in mm. |
isclose(value, *, rtol=1e-05, atol=1e-08, equal_nan=False)
Check if two helix records are close to each other.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
HelixAwkwardRecord
|
The helix record to compare with. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the records are close, False otherwise. |
Source code in src/pybes3/helix.py
770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 | |
HelixAwkwardArray
Bases: Array
Source code in src/pybes3/helix.py
801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 | |
momentum
property
Returns the momentum of the helix as an awkward array of 3D vectors.
Returns:
| Type | Description |
|---|---|
MomentumAwkward3D
|
vector.MomentumNumpy3D: The momentum vectors of the helix. |
position
property
Returns the position of the helix at a given azimuthal angle as an awkward array of 3D vectors.
Returns:
| Type | Description |
|---|---|
VectorAwkward3D
|
vector.VectorNumpy3D: The position vectors of the helix. |
charge
property
Returns the charge of the helix as an awkward array.
Returns:
| Type | Description |
|---|---|
Array
|
ak.Array: The charge of the helix. |
radius
property
Returns the radius of the helix as an awkward array.
Returns:
| Type | Description |
|---|---|
Array
|
ak.Array: The radius of the helix in mm. |
change_pivot(*args)
Changes the pivot point of the helix.
Source code in src/pybes3/helix.py
844 845 846 847 848 849 850 851 852 | |
isclose(other, *, rtol=1e-05, atol=1e-08, equal_nan=False)
Check if two helix records are close to each other.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
HelixAwkwardRecord
|
The helix record to compare with. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
ak.Array: A boolean array indicating if the records are close. |
Source code in src/pybes3/helix.py
854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 | |