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

Go to the source code of this file.

Functions/Subroutines

subroutine ctauneudcy (pj, a, np)
 

Function/Subroutine Documentation

◆ ctauneudcy()

subroutine ctauneudcy ( type(ptcl pj,
type(ptcl), dimension(*)  a,
integer  np 
)

Definition at line 13 of file ctauNeuDcy.f.

References c2bdcy(), cibstpol(), cmkptc(), cnbdcy(), false, kelec, kmuon, kneue, kneumu, kneutau, kpion, and rndc().

Referenced by cintetau().

13  implicit none
14 
15 #include "Zptcl.h"
16 #include "Zmass.h"
17 #include "Zcode.h"
18 
19  integer np ! output. no. of produced particles
20  type(ptcl)::pj ! input. tau
21  type(ptcl):: a(*) ! output. produced ptcls
22 
23  integer,intent(out):: brinfo ! see last part
24 !
25  integer,parameter:: nbr=6
26  real(8),save:: br(nbr)=(/17.4,17.8,11.0,25.5, 9.5,18.8/)
27 ! use next to check each branch
28 ! real(8),save:: br(nbr)=(/0., 0., 0., 0., 0., 100./)
29  real(8),save:: cbr(nbr)
30 
31 
32  real(8)::u, w
33 ! polarization is negleced.
34  integer i, charge, subcode, icon
35 
36  logical,save:: first=.true.
37  integer,parameter:: jw=0
38  integer,save:: branch
39 
40  real*8 pab
41  if( first ) then
42  ! make integrated BR.
43  cbr(1) = br(1)
44  ! cbr(2:nbr)= cbr(1:nbr-1)+ br(2:nbr)
45  do i = 2, nbr
46  cbr(i)= cbr(i-1)+ br(i)
47  enddo
48  ! normalize
49  cbr(:) = cbr(:)/100.
50  cbr(nbr) = 1.0
51  first = .false.
52  endif
53 
54 
55 ! make neutau
56  subcode = -pj%charge
57  call cmkptc(kneutau, subcode, 0, a(1))
58 
59  charge = pj%charge
60  call rndc(u)
61  if( u < cbr(1) ) then
62  ! tau->mu + neumu + neutau; 17.4 %
63  subcode = pj%charge
64  call cmkptc(kneumu, subcode, 0, a(2))
65  call cmkptc(kmuon, 0, charge, a(3))
66  np = 3
67  branch = 1
68  elseif( u < cbr(2) ) then
69  ! e + neue + neutau; 17.8 35.2
70  subcode = -pj%charge
71  call cmkptc(kneue, subcode, 0, a(2))
72  call cmkptc(kelec, 0, charge, a(3))
73  np = 3
74  branch = 2
75  elseif( u < cbr(3) ) then
76 ! pic + neutau 11 %
77  call cmkptc(kpion, 0, charge, a(2))
78  np = 2
79  branch=3
80  elseif( u < cbr(4) ) then
81 ! pi0+pic + neutau 25.5 71.7!
82  call cmkptc(kpion, 0, charge, a(2))
83  call cmkptc(kpion, 0, 0, a(3))
84  np = 3
85  branch = 4
86  elseif( u < cbr(5) ) then
87 ! 2pi0 + pic + neutau 9.5 81.2
88  call cmkptc(kpion, 0, charge, a(2))
89  call cmkptc(kpion, 0, 0, a(3))
90  call cmkptc(kpion, 0, 0, a(4))
91  np = 4
92  branch = 5
93  else
94 ! assume heavy 1 ptcl with mass 4 pi ; two body
95 ! decay, take only neutau; ==> modified
96 ! a(2)%mass = 4.0*maspic
97 
98  call cmkptc(kpion, 0, charge, a(2))
99  call cmkptc(kpion, 0, 0, a(3))
100  call rndc(u)
101  if( u < 0.5) then
102 ! 3pi0 + pic + neutau
103  call cmkptc(kpion, 0, 0, a(4))
104  call cmkptc(kpion, 0, 0, a(5))
105  else
106 ! pi0 + pic + pi+ + pi- + neutau
107  call cmkptc(kpion, 0, 1, a(4))
108  call cmkptc(kpion, 0, -1, a(5))
109  endif
110  np = 5
111  branch = 6
112  endif
113 
114  if (np >= 3 ) then
115  call cnbdcy(np, pj%mass, a, jw, w, icon)
116  if( icon /= 0 ) then
117  write(0,*) ' icon =',icon, ' from cnbdcy'
118  stop
119  endif
120  ! boost to lab.
121  do i = 1, np
122  call cibstpol(i, pj, a(i), a(i) )
123  enddo
124  else
125  ! np = 2
126  call c2bdcy(pj, a(1), a(2))
127 ! alredy boosted;
128  np = 2
129  endif
130  return
131 !
132  entry ctauneudcybr(brinfo)
133  brinfo = branch
logical, save first
Definition: cNRLAtmos.f:8
nodes i
max ptcl codes in the kelec
Definition: Zcode.h:2
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
max ptcl codes in the kneue
Definition: Zcode.h:2
max ptcl codes in the kneutau
Definition: Zcode.h:2
subroutine cnbdcy(n, ecm, p, jw, w, icon)
Definition: cnbdcy.f:48
subroutine rndc(u)
Definition: rnd.f:91
subroutine cibstpol(init, p1, p2, po)
Definition: cibst1.f:75
max ptcl codes in the kneumu
Definition: Zcode.h:2
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p charge
Definition: ZavoidUnionMap.h:1
subroutine c2bdcy(p, p1, p2)
Definition: c2bdcy.f:44
real(4), save a
Definition: cNRLAtmos.f:20
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 ! knockon is considered Obsolete *PhotoProd false
Definition: cblkElemag.h:7
subroutine cmkptc(code, subcode, charge, p)
Definition: cmkptc.f:15
Definition: Zptcl.h:75
max ptcl codes in the kpion
Definition: Zcode.h:2
max ptcl codes in the kmuon
Definition: Zcode.h:2
*Zfirst p fm *Zfirst p Zfirst p Zfirst p subcode
Definition: ZavoidUnionMap.h:1
Here is the call graph for this function:
Here is the caller graph for this function: