-
Notifications
You must be signed in to change notification settings - Fork 1
/
cer_effcorr.f
52 lines (36 loc) · 1.67 KB
/
cer_effcorr.f
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
subroutine cer_effcorr(hsdelta,cer_eff)
c program cer_effcorr
c real function cer_effcorr(hsdelta)
implicit none
integer*4 bin
real*8 eff(32),cer_eff,hsdelta
ccc Calculate the bin # for the event ccc
c data eff/0.87,0.93,0.94,0.94,0.96,0.96,0.96,0.96,0.96,0.97,
c & 0.96,0.96,0.96,0.93,0.86,0.86,0.78,0.95,0.98,1.00,
c & 1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/ !72375
c data eff/0.980,0.982,0.991,0.996,0.996,0.996,0.998,0.998,0.998,
c & 0.998,0.998,0.997,0.998,0.996,0.993,0.978,0.944,0.933,0.975,
c & 0.996,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,
c & 1.00,1.00/ !72835
data eff/0.942,0.963,0.973,0.976,0.978,0.985,0.984,0.987,0.988,
& 0.989,0.988,0.986,0.973,0.944,0.864,0.767,0.774,0.883,0.978,
& 0.998,0.997,0.995,0.997,0.999,0.997,0.993,0.999,0.996,0.992,
& 0.994,0.994,0.993/ !72790
c data eff/0.940,0.966,0.969,0.982,0.979,0.980,0.986,0.983,0.991,
c & 0.989,0.988,0.976,0.961,0.919,0.836,0.837,0.816,0.868,0.958,
c & 0.991,0.999,0.999,0.996,0.996,0.994,0.997,0.997,0.993,0.994,
c & 0.991,0.993,0.997/ !72782
bin = 2*int(hsdelta + 8.)+1
if(abs(hsdelta).LE.8.) then
c if(hsdelta.ge.0) then
c bin = 2*int(hsdelta + 8.)+1
c else
c bin = 2*int(hsdelta + 8.)+2
c endif
cer_eff = eff(bin)
else
cer_eff = 1.0
endif
c write(6,*) hsdelta, bin, cer_eff
return
end