2
c Example analysis for "p p > w+ [QCD]" process.
3
c Example analysis for "p p > w- [QCD]" process.
4
c Example analysis for "p p > z [QCD]" process.
6
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
7
subroutine analysis_begin(nwgt,weights_info)
8
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
11
character*(*) weights_info(*)
12
integer j,kk,l,nwgt_analysis
13
common/c_analysis/nwgt_analysis
16
real * 8 bin,xmi,xms,pi
17
parameter (pi=3.14159265358979312d0)
21
if (nwgt_analysis*10.gt.nplots/4) then
22
write (*,*) 'error in analysis_begin: '/
23
& /'too many histograms, increase NPLOTS to',
33
call bookup(l+ 1,'V pt '//weights_info(kk)//cc(j)
35
call bookup(l+ 2,'V log pt '//weights_info(kk)//cc(j)
37
call bookup(l+ 3,'V y '//weights_info(kk)//cc(j)
39
call bookup(l+ 4,'V eta '//weights_info(kk)//cc(j)
41
call bookup(l+ 5,'mV '//weights_info(kk)//cc(j)
49
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
50
subroutine analysis_end(xnorm)
51
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
54
double precision xnorm
56
integer kk,l,nwgt_analysis
57
common/c_analysis/nwgt_analysis
59
call open_topdrawer_file
62
call mopera(i,'+',i,i,xnorm,0.d0)
69
call multitop(l+ 1,3,2,'V pt ',' ','LOG')
70
call multitop(l+ 2,3,2,'V log pt ',' ','LOG')
71
call multitop(l+ 3,3,2,'V y ',' ','LOG')
72
call multitop(l+ 4,3,2,'V eta ',' ','LOG')
73
call multitop(l+ 5,3,2,'mV ',' ','LOG')
76
call close_topdrawer_file
81
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
82
subroutine analysis_fill(p,istatus,ipdg,wgts,ibody)
83
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
85
include 'nexternal.inc'
86
integer istatus(nexternal)
87
integer iPDG(nexternal)
88
double precision p(0:4,nexternal)
89
double precision wgts(*)
91
double precision wgt,var
92
integer i,kk,l,nwgt_analysis
93
common/c_analysis/nwgt_analysis
94
double precision www,pv(0:3),xmv,ptv,yv,etav
95
double precision getrapidity,getpseudorap,dot
96
external getrapidity,getpseudorap,dot
97
if (nexternal.ne.4) then
98
write (*,*) 'error #1 in analysis_fill: '/
99
& /'only for process "p p > V [QCD]"'
102
if (.not. (abs(ipdg(1)).le.5 .or. ipdg(1).eq.21)) then
103
write (*,*) 'error #2 in analysis_fill: '/
104
& /'only for process "p p > V [QCD]"'
107
if (.not. (abs(ipdg(2)).le.5 .or. ipdg(2).eq.21)) then
108
write (*,*) 'error #3 in analysis_fill: '/
109
& /'only for process "p p > V [QCD]"'
112
if (.not. (abs(ipdg(4)).le.5 .or. ipdg(4).eq.21)) then
113
write (*,*) 'error #4 in analysis_fill: '/
114
& /'only for process "p p > V [QCD]"'
117
if (abs(ipdg(3)).ne.24.and.ipdg(3).ne.23) then
118
write (*,*) 'error #5 in analysis_fill: '/
119
& /'only for process "p p > V [QCD]"'
126
xmv=sqrt(max(dot(pv,pv),0d0))
127
ptv=sqrt(max(pv(1)**2+pv(2)**2,0d0))
128
yv=getrapidity(pv(0),pv(3))
129
etav=getpseudorap(pv(0),pv(1),pv(2),pv(3))
132
do kk=1,nwgt_analysis
135
if (ibody.ne.3 .and.i.eq.2) cycle
136
call mfill(l+1,ptv,WWW)
137
if(ptv.gt.0) call mfill(l+2,log10(ptv),WWW)
138
call mfill(l+3,yv,WWW)
139
call mfill(l+4,etav,WWW)
140
call mfill(l+5,xmv,WWW)
149
function getrapidity(en,pl)
151
real*8 getrapidity,en,pl,tiny,xplus,xminus,y
152
parameter (tiny=1.d-8)
155
if(xplus.gt.tiny.and.xminus.gt.tiny)then
156
if( (xplus/xminus).gt.tiny.and.(xminus/xplus).gt.tiny)then
157
y=0.5d0*log( xplus/xminus )
169
function getpseudorap(en,ptx,pty,pl)
171
real*8 getpseudorap,en,ptx,pty,pl,tiny,pt,eta,th
172
parameter (tiny=1.d-5)
174
pt=sqrt(ptx**2+pty**2)
175
if(pt.lt.tiny.and.abs(pl).lt.tiny)then
176
eta=sign(1.d0,pl)*1.d8
179
eta=-log(tan(th/2.d0))