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

Go to the source code of this file.

Functions/Subroutines

subroutine cpi0decay (pj, a, np)
 

Function/Subroutine Documentation

◆ cpi0decay()

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

Definition at line 9 of file cpi0Decay.f.

References antip, c2bdc0(), cibst1(), cmkptc(), cnbdcy(), kdirectg, kelec, kphoton, regptcl, and rndc().

Referenced by cintepion(), and cmydecay().

9  implicit none
10 !---- include '../../Zptcl.h'
11 #include "Zptcl.h"
12 !---- include '../../Zcode.h'
13 #include "Zcode.h"
14 
15  integer np ! output. no. of ptcles produced
16  type(ptcl):: pj ! input. pi 0
17  type(ptcl):: a(*) ! output. to contain produced ptcls
18 
19 
20  real*8 u, w
21  integer icon, i
22 
23  call rndc(u)
24  if(u .lt. .98798) then
25  call cmkptc(kphoton, kdirectg, 0, a(1))
26  a(2) = a(1)
27 ! pi0--> 2 gamma (special routine for massless case)
28  call c2bdc0(pj, a(1), a(2))
29  np=2
30  else
31 ! pi0-->g+ e + e~
32 ! because the 3 body decay prob. is small, rapid k3bdcy needs
33 ! not be used.
34 ! 3 body pure phase space
35  call cmkptc(kphoton, kdirectg, 0, a(1))
36  call cmkptc(kelec, regptcl, -1, a(2))
37  call cmkptc(kelec, antip, 1, a(3))
38  call cnbdcy(3, pj%mass, a, 0, w, icon)
39  np=3
40 ! boost
41  do i = 1, np
42  call cibst1(i, pj, a(i), a(i))
43  enddo
44  endif
nodes i
const int kphoton
Definition: Zcode.h:6
subroutine c2bdc0(p, p1, p2)
Definition: c2bdcy.f:201
subroutine cibst1(init, p1, p2, po)
Definition: cibst1.f:29
max ptcl codes in the kelec
Definition: Zcode.h:2
max ptcl codes in the kseethru ! subcode integer kdirectg
Definition: Zcode.h:2
subroutine cnbdcy(n, ecm, p, jw, w, icon)
Definition: cnbdcy.f:48
subroutine rndc(u)
Definition: rnd.f:91
max ptcl codes in the kseethru ! subcode integer regptcl
Definition: Zcode.h:2
real(4), save a
Definition: cNRLAtmos.f:20
subroutine cmkptc(code, subcode, charge, p)
Definition: cmkptc.f:15
Definition: Zptcl.h:75
max ptcl codes in the kseethru ! subcode integer antip
Definition: Zcode.h:2
Here is the call graph for this function:
Here is the caller graph for this function: