COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cgetBsin.f File Reference

Go to the source code of this file.

Functions/Subroutines

real *8 function cgetbsin (aPtcl, mag)
 

Function/Subroutine Documentation

◆ cgetbsin()

real*8 function cgetbsin ( type(ptcl aPtcl,
type(magfield mag 
)

Definition at line 5 of file cgetBsin.f.

References cpxyzp(), and cvecprod().

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
nodes i
subroutine cpxyzp(po, pabs)
Definition: cpxyzp.f:3
subroutine cvecprod(a, b, c)
Definition: cvecProd.f:4
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
real *8 function cgetbsin(aPtcl, mag)
Definition: cgetBsin.f:5
real(4), save b
Definition: cNRLAtmos.f:21
Definition: Zptcl.h:75
Definition: Zcoord.h:43
Here is the call graph for this function: