COSMOS v7.655
COSMOSv7655
(AirShowerMC)
cgetBsin.f
Go to the documentation of this file.
1
! cgetBsin.
2
! get |p x B|/p = B x sin
3
!
4
real*8
function
cgetbsin
(aPtcl, mag)
5
implicit none
6
#include "Zglobalc.h"
7
#include "Zptcl.h"
8
#include "Zcoord.h"
9
#include "Zmagfield.h"
10
11
type
(
ptcl
):: aPtcl
! input. electron or gamma
12
type
(
magfield
):: mag
! magnetic field.
13
14
type
(
coord
):: p, b, pb
! pb is P x B
15
real*8
pbsin, pabs
16
integer
i
17
! for safety
18
do
i = 1, 3
19
p%r(i) = aptcl%fm%p(i)
20
enddo
21
22
b%r(1) = mag%x
23
b%r(2) = mag%y
24
b%r(3) = mag%z
25
26
call
cvecprod
(p, b, pb)
27
! get pbsin
28
pbsin = sqrt( pb%r(1)**2 + pb%r(2)**2 + pb%r(3)**2 )
29
!
30
call
cpxyzp
(aptcl%fm, pabs)
31
32
cgetbsin
= pbsin/pabs
33
end
cpxyzp
subroutine cpxyzp(po, pabs)
Definition:
cpxyzp.f:3
cvecprod
subroutine cvecprod(a, b, c)
Definition:
cvecProd.f:4
cgetbsin
real *8 function cgetbsin(aPtcl, mag)
Definition:
cgetBsin.f:5
ptcl
Definition:
Zptcl.h:75
coord
Definition:
Zcoord.h:43
magfield
Definition:
Zmagfield.h:39
Particle
Event
Elemag
Sync
cgetBsin.f
Generated by
1.8.13