Skip to content

Commit 61186df

Browse files
OleariOleari
Oleari
authored and
Oleari
committed
main-PYTHIA-lhef.f main-HERWIG-lhef.f: changes to deal with Z+1jet
LesHouches.f: typos corrected in comments and added printed info in setcolour_rad when entering the error condition gen_radiation.f: Added saving of current random seeds In gen_remnant, if pwhg_pt2().lt.rad_ptsqmin then set kn_csi = 0d0 and do not call set_rad_scales in this case In gen_rad_isr and gen_rad_fsr, if born=0 return a Born-like event bbinit.f: introduced a randomsave and randomrestore around the subroutine gen , when computing the generation efficiency sigcollsoft.f: deleted an Italian sentence lhefwrite.f: save in the <extra-info-previous-event> the current random seeds random.f: created subroutines savecurrentrandom, getcurrentrandom and printcurrentrandom Z_plus_jet/Born_phsp.f: fixed kn_minmass git-svn-id: svn://powhegbox.mib.infn.it/trunk/POWHEG-BOX@33 9e129b38-c2c0-4eec-9301-dc54fda404de
1 parent 6607bd0 commit 61186df

11 files changed

+108
-38
lines changed

LesHouches.f

+6-3
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ subroutine getnewcolor(newcolor)
214214
end
215215

216216
c Given a vertex with 3 partons, the first parton with incoming colour
217-
c colin, the second and third partons with incoming flavours flavour fl2, fl3,
217+
c colin, the second and third partons with incoming flavours fl2, fl3,
218218
c it assigns the incoming colours of the second and third partons
219-
c colout2, colout3. The colour assignment is unambiguous is all cases, but in
219+
c colout2, colout3. The colour assignment is unambiguous in all cases, but in
220220
c the one where both fl2 and fl3 are gluons, where a 50% random choice is made
221221
c over the two possible colour connections.
222222
subroutine setcolour_rad(colin,fl2,fl3,colout2,colout3)
@@ -286,7 +286,10 @@ subroutine setcolour_rad(colin,fl2,fl3,colout2,colout3)
286286
return
287287
998 continue
288288
write(*,*)
289-
#' setcolour_rad: Error: inconsistent colour flavour input'
289+
# ' Error in setcolour_rad: inconsistent colour flavour input'
290+
write(*,*) 'colin[1:2] ',colin(1),' ',colin(2)
291+
write(*,*) 'fl2, fl3 ',fl2,' ',fl3
292+
write(*,*) 'newcolor ',newcolor
290293
call exit(1)
291294
end
292295

Z_plus_jet/Born_phsp.f

+2-3
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,8 @@ subroutine born_phsp(xborn)
105105
c call checkmomzero(nlegborn,kn_pborn)
106106
c call checkmass(2,kn_pborn(0,3))
107107

108-
c CAVEAT!!!
109-
c minimal final state mass (after init_couplings, Zmass is defined
110-
kn_minmass=ph_Zmass
108+
c minimal final state mass
109+
kn_minmass=sqrt(ph_Zmass2low)
111110

112111
end
113112

Z_plus_jet/powheg.input

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
numevts 100000 ! number of events to be generated
22
ih1 1 ! hadron 1 (1 for protons, -1 for antiprotons)
33
ih2 1 ! hadron 2 (1 for protons, -1 for antiprotons)
4+
! 131 cteq4m
5+
! 83 cteq4l
46
ndns1 131 ! pdf set for hadron 1 (mlm numbering)
57
ndns2 131 ! pdf set for hadron 2 (mlm numbering)
68
ebeam1 7000d0 ! energy of beam 1
79
ebeam2 7000d0 ! energy of beam 2
810

911
! To be set only if using LHA pdfs
10-
! lhans1 ! pdf set for hadron 1 (LHA numbering)
11-
! lhans2 ! pdf set for hadron 2 (LHA numbering)
12+
! 19150 cteq4m
13+
! 19170 cteq4l
14+
! 10050 cteq6m
15+
lhans1 10050 ! pdf set for hadron 1 (LHA numbering)
16+
lhans2 10050 ! pdf set for hadron 2 (LHA numbering)
1217
! To be set only if using different pdf sets for the two incoming hadrons
1318
! QCDLambda5 0.25 ! for not equal pdf sets
1419

bbinit.f

+4
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,15 @@ subroutine bbinit
173173
c initialize gen for remnants
174174
call gen(sigremnant,ndiminteg,xgridrm,ymaxrm,xmmmrm,ifoldrm,
175175
# 0,mcalls,icalls,xx)
176+
c save random number seeds
177+
call randomsave
176178
c generate few events from remnants, just to determine the generation efficiency
177179
do j=1,min(powheginput('nubound'),100d0)
178180
call gen(sigremnant,ndiminteg,xgridrm,ymaxrm,xmmmrm,ifoldrm,
179181
# 1,mcalls,icalls,xx)
180182
enddo
183+
c restore random number seeds
184+
call randomrestore
181185
c print statistics
182186
call gen(sigremnant,ndiminteg,xgridrm,ymaxrm,xmmmrm,ifoldrm,
183187
# 3,mcalls,icalls,xx)

gen_radiation.f

+32-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ subroutine pwhgevent
1111
integer mcalls,icalls
1212
real * 8 pwhg_pt2,pt2max_regular
1313
external pwhg_pt2,pt2max_regular
14+
c store current random seeds. To be used to restart at problematic events
15+
call savecurrentrandom
1416
if(random().gt.rad_sigrm/rad_sigtot) then
1517
c generate underlying Born kinematics
1618
call gen_btilde(mcalls,icalls)
@@ -36,13 +38,28 @@ subroutine pwhgevent
3638
c iret=1: rem contribution (leftover from damping factor on R)
3739
c iret=2: reg contribution (real graphs without singular regions)
3840
call gen_remnant(iret)
41+
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
42+
c check if pt2 is greater than
43+
if (pwhg_pt2().lt.rad_ptsqmin) then
44+
write(*,*) '****************************************'
45+
write(*,*) 'WARNING in gen_remnant'
46+
write(*,*) 'pwhg_pt2 < rad_ptsqmin ',
47+
# pwhg_pt2(),' < ',rad_ptsqmin
48+
write(*,*) 'To generate this event, use the following seeds'
49+
call printcurrentrandom
50+
write(*,*) '****************************************'
51+
kn_csi = 0d0
52+
endif
53+
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3954
call add_azimuth
4055
if(iret.eq.1) then
56+
if (kn_csi.ne.0d0) then
4157
c set st_muren2 equal to pt2 for scalup value
42-
rad_pt2max=pwhg_pt2()
43-
call set_rad_scales(rad_pt2max)
58+
rad_pt2max=pwhg_pt2()
59+
call set_rad_scales(rad_pt2max)
60+
endif
4461
call gen_leshouches
45-
c rad_type=2 for remnants
62+
c rad_type=2 for remnants
4663
rad_type=2
4764
else
4865
c Set st_muren2 for scalup value for regular contributions
@@ -411,6 +428,12 @@ subroutine gen_rad_isr(t)
411428
if(born.lt.0) then
412429
born=0
413430
endif
431+
if(born.eq.0) then
432+
c bizarre situation that may arise when the scale gets so low
433+
c that some pdf vanish (typically heavy flavour pdf's)
434+
t=-1
435+
goto 3
436+
endif
414437
kn_y=y
415438
kn_csi=1-x
416439
kn_azi=2*pi*random()
@@ -556,6 +579,12 @@ subroutine gen_rad_fsr(t)
556579
if(born.lt.0) then
557580
born=0
558581
endif
582+
if(born.eq.0) then
583+
c bizarre situation that may arise when the scale gets so low
584+
c that some pdf vanish (typically heavy flavour pdf's)
585+
t=-1
586+
goto 3
587+
endif
559588
kn_y=y
560589
kn_csi=csi
561590
kn_azi=2*pi*random()

lhefwrite.f

+4
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,13 @@ subroutine lhefwritextra(nlf)
7777
include 'include/pwhg_kn.h'
7878
include 'include/pwhg_flg.h'
7979
integer nlf
80+
integer iran,n1ran,n2ran
8081
write(nlf,'(a)') '<extra-info-previous-event>'
8182
write(nlf,*) rad_kinreg,' ! rad_kinreg'
8283
write(nlf,*) rad_type,' ! rad_type'
84+
call getcurrentrandom(iran,n1ran,n2ran)
85+
write(nlf,*) iran,' ',n1ran,' ',n2ran,
86+
# " ! previous event's random seeds "
8387
write(nlf,'(a)') '</extra-info-previous-event>'
8488
end
8589

main-HERWIG-lhef.f

+21-20
Original file line numberDiff line numberDiff line change
@@ -39,40 +39,40 @@ PROGRAM HWIGPR
3939
CALL HWEINI
4040
C---LOOP OVER EVENTS
4141
DO N=1,maxev
42-
C---INITIALISE EVENT
43-
CALL HWUINE
42+
C--- INITIALISE EVENT
43+
CALL HWUINE
4444
C---GENERATE HARD SUBPROCESS
45-
CALL HWEPRO
46-
if(nup.eq.0) goto 111
45+
CALL HWEPRO
46+
if(nup.eq.0) goto 111
4747
C---GENERATE PARTON CASCADES
48-
CALL HWBGEN
48+
CALL HWBGEN
4949
C---DO HEAVY OBJECT DECAYS
50-
CALL HWDHOB
50+
CALL HWDHOB
5151
C---DO CLUSTER FORMATION
52-
CALL HWCFOR
52+
CALL HWCFOR
5353
C---DO CLUSTER DECAYS
54-
CALL HWCDEC
54+
CALL HWCDEC
5555
C---DO UNSTABLE PARTICLE DECAYS
56-
CALL HWDHAD
56+
CALL HWDHAD
5757
C---DO HEAVY FLAVOUR HADRON DECAYS
58-
CALL HWDHVY
58+
CALL HWDHVY
5959
C---ADD SOFT UNDERLYING EVENT IF NEEDED
60-
CALL HWMEVT
60+
CALL HWMEVT
6161
C---FINISH EVENT
62-
CALL HWUFNE
62+
CALL HWUFNE
6363
C---USER'S EVENT ANALYSIS
64-
CALL HWANAL
65-
if (mod(nevhep,20000).eq.0) then
66-
write(*,*) "# of events processed =",nevhep
67-
call hwaend
68-
endif
64+
CALL HWANAL
65+
if (mod(nevhep,20000).eq.0) then
66+
write(*,*) "# of events processed =",nevhep
67+
call hwaend
68+
endif
6969
ENDDO
7070
111 continue
71-
C---TERMINATE ELEMENTARY PROCESS
71+
C--- TERMINATE ELEMENTARY PROCESS
7272
CALL HWEFIN
73-
C---USER'S TERMINAL CALCULATIONS
73+
C--- USER'S TERMINAL CALCULATIONS
7474
CALL HWAEND
75-
75+
7676
c call newunit(iun)
7777
c open(unit=iun,file='HERWIGcounters.dat',status='unknown')
7878
c call printcnt(iun)
@@ -116,6 +116,7 @@ subroutine hwabeg
116116
call init_hist
117117
end
118118

119+
119120
subroutine hwaend
120121
character * 20 pwgprefix
121122
integer lprefix

main-PYTHIA-lhef.f

+5-3
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,13 @@ program main_pythia
9393
call pyhepc(1)
9494
nevhep=temp
9595
C Print out the event record
96-
IF (IEV.le.1) THEN
96+
IF (IEV.le.6) THEN
9797
c list the event
98-
c CALL PYLIST(7) ! print the HEPEUP common block
99-
c CALL PYLIST(5) ! print the HEPEVT common block
98+
c CALL PYLIST(7) ! print the HEPEUP common block
99+
c CALL PYLIST(5) ! print the HEPEVT common block
100+
100101
CALL PYLIST(5) ! print the event
102+
101103
c call PYLIST(1) ! as PYLIST(2) but with less information
102104
ENDIF
103105

pwhg_init.f

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ subroutine pwhginit
1111
external powheginput
1212
integer i1,n1,n2
1313
call init_flsttag
14-
flg_debug=.false.
14+
flg_debug=.true.
1515
if(powheginput("#flg_debug").eq.1) flg_debug=.true.
1616
c Set to true to remember and use identical values of the computed
1717
c amplitudes, for Born, real and virtual contributions

random.f

+26
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,29 @@ subroutine setrandom(i1,n1,n2)
5858
call resetrandom
5959
endif
6060
end
61+
62+
63+
subroutine savecurrentrandom
64+
implicit none
65+
integer ipar(3)
66+
common/crandom/ipar
67+
call rm48ut(ipar(1),ipar(2),ipar(3))
68+
end
69+
70+
71+
subroutine getcurrentrandom(i1,n1,n2)
72+
implicit none
73+
integer i1,n1,n2
74+
integer ipar(3)
75+
common/crandom/ipar
76+
i1 = ipar(1)
77+
n1 = ipar(2)
78+
n2 = ipar(3)
79+
end
80+
81+
subroutine printcurrentrandom
82+
implicit none
83+
integer ipar(3)
84+
common/crandom/ipar
85+
write(*,*) 'Random number seeds: ',ipar(1),ipar(2), ipar(3)
86+
end

sigcollsoft.f

-3
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,6 @@ subroutine softalr(alr,em,y,res)
470470

471471

472472

473-
c Commentare sull'uso delle funzioni qui sotto
474-
475-
476473
subroutine softbtl(r0)
477474
c blegs: integer, number of legs of born
478475
c bflav(nlegs): integer, flavours of the incoming partons, according to PDG conventions,

0 commit comments

Comments
 (0)