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

Go to the source code of this file.

Functions/Subroutines

subroutine c2bdcy (p, p1, p2)
 
subroutine c2bdcp (p, p1, cst, p2)
 
subroutine c2bdc0 (p, p1, p2)
 

Function/Subroutine Documentation

◆ c2bdc0()

subroutine c2bdc0 ( type(ptcl p,
type(ptcl p1,
type(ptcl p2 
)

Definition at line 201 of file c2bdcy.f.

References cibst1(), d0, kcossn(), and rndc().

Referenced by cpi0decay().

201 ! special case for masseless 2 ptcl decay
202 ! such as pi0-->2g.
203 ! ************************************************
204  implicit none
205 !---- include '../Zptcl.h'
206 #include "Zptcl.h"
207  type(ptcl):: p, p1, p2
208  real*8 e1, e2, q1, cst, cs, sn, snt
209 !
210 
211  q1=p%mass/2
212  e1=q1
213  e2=e1
214  call rndc(cst)
215  cst=cst*2-1.d0
216  call kcossn(cs, sn)
217  snt=sqrt(1.d0-cst**2)
218  p1%fm%p(1) = q1*snt*cs
219  p1%fm%p(2) = q1*snt*sn
220  p1%fm%p(4) = e1
221  p1%fm%p(3) = q1*cst
222 !
223  p2%fm%p(1) = -p1%fm%p(1)
224  p2%fm%p(2) = -p1%fm%p(2)
225  p2%fm%p(4) = e2
226  p2%fm%p(3) = -p1%fm%p(3)
227  call cibst1(1, p, p1, p1)
228  call cibst1(2, p, p2, p2)
subroutine cibst1(init, p1, p2, po)
Definition: cibst1.f:29
subroutine rndc(u)
Definition: rnd.f:91
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine kcossn(cs, sn)
Definition: kcossn.f:13
Definition: Zptcl.h:75
Here is the call graph for this function:
Here is the caller graph for this function:

◆ c2bdcp()

subroutine c2bdcp ( type(ptcl p,
type(ptcl p1,
real*8  cst,
type(ptcl p2 
)

Definition at line 124 of file c2bdcy.f.

References cibst1(), d0, and kcossn().

Referenced by cg1pi0(), and cg1pic().

124 ! 2body decay when the one particle decay angle is
125 ! fixed.
126 ! ************************************************
127 ! p: /ptcl/ input. a particle which decays. 4momentum
128 ! must be given in a certain system K.
129 ! The mass should be given too.
130 ! p1: /ptcl/.input/outut. first particle. mass must be given.
131 ! as input.
132 ! as output, 4 momentum is given at K. Others unchaed
133 ! cst: real*8. input. cos(of angle to the z axis)
134 ! of 1st ptcl at the rest system of p
135 ! p2: /ptcl/ input/output. 2nd particle. same as 1st ptcl.
136 !
137  implicit none
138 !---- include '../Zptcl.h'
139 #include "Zptcl.h"
140  type(ptcl):: p, p1, p2
141  real*8 cst
142 !
143  real*8 am, am1, am2, q1, e1, e2, cs, sn, snt
144 !
145  am1 = p1%mass
146  am2 = p2%mass
147  am = p%mass
148  q1=max( (am**2- (am1+am2)**2)*(am**2-(am1-am2)**2), 0.d0)
149  q1=sqrt( q1 )/am/2
150  e1=sqrt(q1**2+am1**2)
151  if(am1 .eq. am2) then
152  e2=e1
153  else
154  e2=sqrt(q1**2+am2**2)
155  endif
156  call kcossn(cs, sn)
157  snt=sqrt(1.d0-cst**2)
158  p1%fm%p(1) = q1*snt*cs
159  p1%fm%p(2) = q1*snt*sn
160  p1%fm%p(3) = q1*cst
161  p1%fm%p(4) = e1
162 !
163  p2%fm%p(1) = -p1%fm%p(1)
164  p2%fm%p(2) = -p1%fm%p(2)
165  p2%fm%p(3) = -p1%fm%p(3)
166  p2%fm%p(4) = e2
167 ! boost p1 into K
168  call cibst1(1, p, p1, p1)
169 
170 ! boost p2 into K
171  call cibst1(2, p, p2, p2)
subroutine cibst1(init, p1, p2, po)
Definition: cibst1.f:29
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine kcossn(cs, sn)
Definition: kcossn.f:13
Definition: Zptcl.h:75
Here is the call graph for this function:
Here is the caller graph for this function:

◆ c2bdcy()

subroutine c2bdcy ( type(ptcl p,
type(ptcl p1,
type(ptcl p2 
)

Definition at line 44 of file c2bdcy.f.

References cibst1(), d0, kcossn(), and rndc().

Referenced by cbomegadcy(), cddbdc(), cddecay1(), cdeltadecay(), cdsdecay(), cetadecay(), cetapdecay(), cgzaidecay(), ck2pidecay(), ckmudecay(), ckpieneudecay(), clambdadcy(), cmuneudcy(), cnnbdc(), comgdc(), cphidc(), cpimudecay(), crhodc(), csigma0dcy(), csigmamdcy(), csigmapdcy(), and ctauneudcy().

44 ! ********************************************************
45 ! two body decay by pure phase space.
46 ! Note that in case polarization exists,
47 ! this should not be used.
48 ! p: /ptcl/ Input. particle which decays.
49 ! 4 momentum and mass must be given
50 ! in a certain system K.
51 ! p1: /ptcl/ Input/Output. Decay product 1.
52 ! Mass must be given in input.
53 ! As output, 4 mementum is given in the
54 ! system K. Other attributes are unchanged.
55 ! p2: /ptcl/ the same as above for 2nd ptcl.
56 ! **** note: for massless ptcl decay, use c2bdc0, which
57 ! is faster.
58 !
59  implicit none
60 !---- include '../Zptcl.h'
61 #include "Zptcl.h"
62  type(ptcl):: p, p1, p2
63  real*8 am, am1, am2, q1, e1, e2, cst, cs, sn, snt
64 !
65  am = p%mass
66  am1 = p1%mass
67  am2 = p2%mass
68  q1=max( (am**2- (am1+am2)**2)*(am**2-(am1-am2)**2), 0.d0)
69  q1=sqrt( q1 )/am/2
70  e1=sqrt(q1**2+am1**2)
71  if(am1 .eq. am2) then
72  e2=e1
73  else
74  e2=sqrt(q1**2+am2**2)
75  endif
76  call rndc(cst)
77  cst=cst*2-1.d0
78  call kcossn(cs, sn)
79  snt=sqrt(1.d0 - cst**2)
80  p1%fm%p(1) = q1*snt*cs
81  p1%fm%p(2) = q1*snt*sn
82  p1%fm%p(4) = e1
83  p1%fm%p(3) = q1*cst
84  p2%fm%p(1) = -p1%fm%p(1)
85  p2%fm%p(2) = -p1%fm%p(2)
86  p2%fm%p(4) = e2
87  p2%fm%p(3) = -p1%fm%p(3)
88 ! boost p1 into K
89  call cibst1(1, p, p1, p1)
90 
91 ! boost p2 into K
92  call cibst1(2, p, p2, p2)
subroutine cibst1(init, p1, p2, po)
Definition: cibst1.f:29
subroutine rndc(u)
Definition: rnd.f:91
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine kcossn(cs, sn)
Definition: kcossn.f:13
Definition: Zptcl.h:75
Here is the call graph for this function:
Here is the caller graph for this function: