COSMOS v7.655  COSMOSv7655
(AirShowerMC)
xyz2det.f
Go to the documentation of this file.
1 ! convert a given (x,y,z) in the Exyz system into
2 ! the detector system.
3 !
4 ! input. latitude, longitude, height(depth) from param.
5 ! (name 'param' is fixed)
6 ! (x,y,z) is from stdin.
7 ! output. (X,Y,Z) in det system on stdout.
8 !
9 
10 #include "BlockData/cblkGene.h"
11  implicit none
12 
13 #include "Zglobalc.h"
14 #include "Ztrack.h"
15 #include "Ztrackp.h"
16 #include "Ztrackv.h"
17 #include "Zobs.h"
18 #include "Zobsv.h"
19 
20 
21 
22 
23  type(coord):: a, b, det, detyaxis
24 
25 
26  open(10, file="param")
27 
28  call creadparam(10)
29  call cbeginrun
30  det = obssites(noofsites)%pos%xyz
31 
32  call cvecprod(detzaxis, detxaxis, detyaxis)
33  write(*,*) ' transformation matrix '
34  write(*,'(4g17.9)') detxaxis%x, detyaxis%x, detzaxis%x, 0
35  write(*,'(4g17.9)') detxaxis%y, detyaxis%y, detzaxis%y, 0
36  write(*,'(4g17.9)') detxaxis%z, detyaxis%z, detzaxis%z, 0
37  write(*,'(4g17.9)') det%x, det%y, det%z, 1
38 
39  do while(.true.)
40  write(*,*) 'enter x,y,z in Exyz sys'
41  read(*,*) a%x, a%y, a%z
42  call cxyz2det(det, a, b)
43  write(*,*) ' input=', a%x, a%y, a%z
44  write(*,*) ' output=', b%x, b%y, b%z
45  enddo
46  end
47  subroutine chooktrace
48  end
49  subroutine chookceren
50  end
51  subroutine chookcerens
52  end
53  subroutine chookcerene
54  end
55  subroutine chookbgrun
56  end
57 !
58  temp%r(1) = dir1%r(1) * xax%r(1) + dir1%r(2) *xax%r(2) +
59  * dir1%r(3) *xax%r(3)
60  temp%r(2) = dir1%r(1) * yvec%r(1)+ dir1%r(2) *yvec%r(2) +
61  * dir1%r(3) *yvec%r(3)
62  temp%r(3) = dir1%r(1) * zax%r(1) + dir1%r(2) *zax%r(2) +
63  * dir1%r(3) *zax%r(3)
64  dir2 = temp
65 
66 
67 
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon true
Definition: cblkElemag.h:7
subroutine cvecprod(a, b, c)
Definition: cvecProd.f:4
subroutine chookceren
Definition: det2Exyz.f:63
subroutine creadparam(io)
Definition: creadParam.f:5
subroutine chooktrace
Definition: chook.f:275
subroutine chookcerene
Definition: det2Exyz.f:67
nodes a
subroutine chookcerens(no, primary, angle)
Definition: ctemplCeren.f:19
dE dx *! Nuc Int sampling table b
Definition: cblkMuInt.h:130
Definition: Zcoord.h:43
subroutine cbeginrun
Definition: cbeginRun.f:7
subroutine cxyz2det(det, a, b)
Definition: cxyz2det.f:7
subroutine chookbgrun
Definition: chook.f:15