-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathanalysis.f
More file actions
67 lines (56 loc) · 1.85 KB
/
Copy pathanalysis.f
File metadata and controls
67 lines (56 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine analysis_begin(nwgt,weights_info)
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
implicit none
integer nwgt
character*(*) weights_info(*)
call HwU_inithist(nwgt,weights_info)
call HwU_book(1,'t rap ', 4,0.0d0,1.6d0)
call HwU_book(2,'t rap ', 1,1.6d0,2.5d0)
return
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine analysis_end(dummy)
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
implicit none
double precision dummy
call HwU_write_file
return
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine analysis_fill(p,istatus,ipdg,wgts,ibody)
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
implicit none
include 'nexternal.inc'
integer istatus(nexternal)
integer iPDG(nexternal)
integer ibody
integer i
double precision p(0:4,nexternal)
double precision wgts(*)
double precision yt, getrapidity
external getrapidity
yt = abs(getrapidity(p(0,3), p(3,3)))
call HwU_fill(1,yt,wgts)
call HwU_fill(2,yt,wgts)
999 return
end
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
function getrapidity(en,pl)
implicit none
real*8 getrapidity,en,pl,tiny,xplus,xminus,y
parameter (tiny=1.d-8)
xplus=en+pl
xminus=en-pl
if(xplus.gt.tiny.and.xminus.gt.tiny)then
if( (xplus/xminus).gt.tiny.and.(xminus/xplus).gt.tiny)then
y=0.5d0*log( xplus/xminus )
else
y=sign(1.d0,pl)*1.d8
endif
else
y=sign(1.d0,pl)*1.d8
endif
getrapidity=y
return
end