-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit_processes.f
949 lines (840 loc) · 30.5 KB
/
init_processes.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
c initialization routine for pp->W+W-jj via VBF
c
subroutine init_processes
implicit none
include 'nlegborn.h'
include 'pwhg_flst.h'
include 'pwhg_kn.h'
include 'pwhg_pdf.h'
include 'LesHouches.h'
include 'pwhg_flg.h'
include 'pwhg_par.h'
include 'ww_widths.h'
include 'higgs_graphs.h'
include 'cvecbos.h'
integer i1,i2,i3,i4,i5,i6,i7,i8,i9,k,ii(nlegreal)
equivalence (i1,ii(1)),(i2,ii(2)),(i3,ii(3)),
# (i4,ii(4)),(i5,ii(5)),(i6,ii(6)),(i7,ii(7)),
# (i8,ii(8)),(i9,ii(9))
logical debug
c parameter (debug=.false.)
parameter (debug=.true.)
integer j
integer charge3(-6:6)
data charge3 /-2,1,-2,1,-2,1,0,-1,2,-1,2,-1,2/
integer fam(-6:6)
data fam /-3,-3,-2,-2,-1,-1,0,1,1,2,2,3,3/
logical condition
real * 8 powheginput
external powheginput
integer flst_born_tmp(nlegborn,maxprocborn)
integer flst_real_tmp(nlegreal,maxprocreal)
logical flavequiv
external flavequiv
integer jj,ij,i
integer max_flav
logical tag,newtag
logical emit_Wp_upper,emit_Wm_upper,emit_Wp_lower,emit_Wm_lower
integer flst_nreal_WW, flst_nborn_WW
logical CKM_diag
logical nc_include,cc_include
integer channel_type
integer ftype(1:9)
integer icc
c
c******************************************************
c Choose the process to be implemented
c******************************************************
c ID of vector bosons produced
c fixed to W+W-:
idvecbos1=+24
idvecbos2=-24
c decay products of the two vector bosons
vdecaymodeWp=powheginput('vdecaymodeWp')
vdecaymodeWm=powheginput('vdecaymodeWm')
c symmetry factors depending on decays:
wsymfact=1d0
C default is zerowidth = .false.
if (powheginput("#zerowidth").eq.1) then
zerowidth = .true.
write(*,*) 'Zero-width approximation for Ws'
else
zerowidth = .false.
write(*,*) 'Generating off-shell W-bosons'
endif
c
C default is higgs_only = .false.
if (powheginput("#higgsonly").eq.1) then
higgs_only = .true.
write(*,*) 'H->WW graphs only'
else
higgs_only = .false.
write(*,*) 'retain all graphs for VBF W+W- production'
endif
if (((vdecaymodeWp).ne.-11).and.((vdecaymodeWp).ne.-13)
. .and.((vdecaymodeWp).ne.-15)
. .and.((vdecaymodeWp).ne.-1) ! down quark
. .and.((vdecaymodeWp).ne.-3) ! strange quark
. .and.((vdecaymodeWp).ne.-7) ! all hadrons
. ) then
stop 'W+ decay mode should be put in terms of the charged
. leptons: -11, -13, -15 only, '//
. 'or hadrons : -1, -3; -7 for either -1 or -3'
endif
if (((vdecaymodeWm).ne.11).and.((vdecaymodeWm).ne.13)
. .and.((vdecaymodeWm).ne.15)
. .and.((vdecaymodeWm).ne.1) ! down quark
. .and.((vdecaymodeWm).ne.3) ! strange quark
. .and.((vdecaymodeWm).ne.7) ! all hadrons
. ) then
stop 'W- decay mode should be put in terms of the charged
. leptons: +11, +13, +15 only, '//
. 'or hadrons : +1, +3; +7 for either +1 or +3'
endif
c identify decay mode (default is fully lept.):
decmode_lep = .true.
decmode_slp = .false.
decmode_slm = .false.
if (abs(vdecaymodeWp).lt.11) then ! Wp decays hadronically
if (abs(vdecaymodeWm).lt.11) then
stop 'fully hadronic decays are not allowed'
else
decmode_slp = .true.
decmode_lep = .false.
endif
else ! Wp decays lept.
if (abs(vdecaymodeWm).lt.11) then
decmode_slm = .true.
decmode_lep = .false.
endif
endif
c change the LHUPI id of the process according to vector boson id
c and decay
c 10000+idup of first decay product of W1 + decay product of W2
lprup(1)=10000-100*vdecaymodeWp+vdecaymodeWm
c we pretend that quarks are not quarks, otherwise POWHEG
c makes them radiate
if(abs(vdecaymodeWm).le.7)
. vdecaymodeWm = sign(1,vdecaymodeWm)*(abs(vdecaymodeWm) + 100)
if(abs(vdecaymodeWp).le.7)
. vdecaymodeWp = sign(1,vdecaymodeWp)*(abs(vdecaymodeWp) + 100)
write(*,*)
write(*,*) ' POWHEG: W+ W- + 2j production and decay '
if (vdecaymodeWp.eq.-11) write(*,*) ' to e+ ve '
if (vdecaymodeWp.eq.-13) write(*,*) ' to mu+ vmu'
if (vdecaymodeWp.eq.-15) write(*,*) ' to tau+ vtau'
if (vdecaymodeWp.eq.-101) write(*,*) ' to u dbar'
if (vdecaymodeWp.eq.-103) write(*,*) ' to c sbar'
if (vdecaymodeWp.eq.-107) write(*,*) ' to u dbar or c sbar'
write(*,*)' and'
if (vdecaymodeWm.eq.+11) write(*,*) ' e- ve~ '
if (vdecaymodeWm.eq.+13) write(*,*) ' mu- vmu~'
if (vdecaymodeWm.eq.+15) write(*,*) ' tau- vtau~'
if (vdecaymodeWm.eq.101) write(*,*) ' to ubar d'
if (vdecaymodeWm.eq.103) write(*,*) ' to cbar s'
if (vdecaymodeWm.eq.107) write(*,*) ' to ubar d or cbar s'
write(*,*)
c ! set number of active flavors for incoming partons:
max_flav = 4 ! no b in initial state
write(*,*)
write(*,*) ' number of active flavors set to ',max_flav
c flavor channels to be considered:
c
c NC:
c ucuc-type(channel_type=1)
c usus-type(channel_type=2)
c dcdc-type(channel_type=3)
c dsds-type(channel_type=4)
c
c all NC type contributions: (channel_type=7)
c
c CC:
c usdc-type(channel_type=5)
c dcus-type(channel_type=6)
c
c all CC type contributions: (channel_type=8)
channel_type = 0 ! change for debugging purposes only
c
c channel_type=powheginput('channel_type')
if (channel_type.eq.0) then
cc_include = .true.
nc_include = .true.
write(*,*)
write(*,*) ' all flavor channels are summed'
elseif (channel_type.eq.7) then
cc_include = .false.
nc_include = .true.
write(*,*)
write(*,*) ' all neutral current channels are summed'
write(*,*) ' (no charged current channels)'
elseif (channel_type.eq.8) then
cc_include = .true.
nc_include = .false.
write(*,*)
write(*,*) ' all charged current channels are summed'
write(*,*) ' (no neutral current channels)'
elseif (channel_type.ge.1.and.channel_type.le.4) then
nc_include = .true.
cc_include = .false.
write(*,*)
write(*,*) ' one neutral-current channel considered only'
write(*,*) ' channel_type = ',channel_type
elseif (channel_type.ge.5.and.channel_type.le.6) then
cc_include = .true.
nc_include = .false.
write(*,*)
write(*,*) ' one charged-current channel considered only'
write(*,*) ' channel_type = ',channel_type
else
write(*,*) ' '
write(*,*) 'ERROR: no valid entry for channel_type;'
write(*,*) 'check your settings in powheg.input'
stop
endif
c*********************************************************
c
tag = .true.
newtag = .true.
if (.not.tag) then
do i=1,nlegborn
do j=1,maxprocborn
flst_borntags(i,j)=0
enddo
enddo
do i=1,nlegreal
do j=1,maxprocreal
flst_realtags(i,j)=0
enddo
enddo
endif
if (.not.tag) then
write(*,*) 'jet tagging '//
# 'must be switched on'
stop
endif
c index of the first light coloured particle in the final state
c (all subsequent particles are coloured)
flst_lightpart=7
flst_nborn=0
flst_nreal=0
i4=vdecaymodeWp
c this is a convoluted way of doing things, but it ends up pairing
c lepton-antineutrino, and antilepton-neutrino
i3=-sign(1,i4)*(abs(i4)+1)
i6=vdecaymodeWm
i5=-sign(1,i6)*(abs(i6)+1)
c Born graphs
flst_nborn=0
condition=.false.
CKM_diag = .true.
flst_nborn_WW = 0
flst_nreal_WW = 0
ftype(1:9) = 0
c WW fusion contributions (charged current):
if (cc_include) then
emit_Wp_upper = .true.
emit_Wm_upper = .true.
emit_Wp_lower = .true.
emit_Wm_lower = .true.
do i1=-max_flav,max_flav
do i2=-max_flav,max_flav
do i7=-max_flav,max_flav
do i8=-max_flav,max_flav
c no gluons:
condition = ((i1*i2*i7*i8).ne.0)
if (.not.condition) goto 800
if (channel_type.eq.0.or.channel_type.eq.8) then
condition=.true.
else
c use value of i1/i7 to select appropriate flavor channel
ftype(1) = 2-mod(abs(i1),2)
ftype(7) = 2-mod(abs(i7),2)
icc = -3*i1/abs(i1)+4
k = 7-ftype(icc)
if (k.eq.channel_type) then
condition=.true.
else
condition = .false.
endif !k
endif !channel_type
if (CKM_diag) then
emit_Wp_upper = (i7.eq.i1-1)
emit_Wm_upper = (i7.eq.i1+1)
emit_Wp_lower = (i8.eq.i2-1)
emit_Wm_lower = (i8.eq.i2+1)
else
stop 'Only diagonal CKM implemented'
endif
condition = condition.and. (
c W+ emission from upper leg
# (((charge3(i1)-(charge3(i7)+3)
# .eq.0).and.(emit_Wp_upper)) .and.
c W- emission from lower leg
# ((charge3(i2)-(charge3(i8)-3)
# .eq.0).and.(emit_Wm_lower)))
# .or.
c W- emission from upper leg
# (((charge3(i1)-(charge3(i7)-3)
# .eq.0).and.(emit_Wm_upper)) .and.
c W+ emission from lower leg
# ((charge3(i2)-(charge3(i8)+3)
# .eq.0).and.(emit_Wp_lower))))
c
if(condition) then
flst_nborn=flst_nborn+1
if(flst_nborn.gt.maxprocborn) goto 999
do k=1,nlegborn
flst_born(k,flst_nborn)=ii(k)
enddo
if (tag) then
flst_borntags(1,flst_nborn)=1
flst_borntags(2,flst_nborn)=2
flst_borntags(3,flst_nborn)=0
flst_borntags(4,flst_nborn)=0
flst_borntags(5,flst_nborn)=0
flst_borntags(6,flst_nborn)=0
flst_borntags(7,flst_nborn)=7
flst_borntags(8,flst_nborn)=8
if (newtag) then
flst_borntags(1,flst_nborn)=1
flst_borntags(2,flst_nborn)=2
flst_borntags(3,flst_nborn)=0
flst_borntags(4,flst_nborn)=0
flst_borntags(5,flst_nborn)=0
flst_borntags(6,flst_nborn)=0
flst_borntags(7,flst_nborn)=1
flst_borntags(8,flst_nborn)=2
endif !newtag
endif !tag
endif
800 continue
enddo !i8
enddo !i7
enddo !i2
enddo !i1
if (debug) then
write(*,*) ' born CC processes',flst_nborn
do j=1,flst_nborn
write(*,*) (flst_born(k,j),k=1,nlegborn)
enddo
endif
flst_nborn_WW = flst_nborn
endif !cc_include
if (nc_include) then
c ZZ fusion contributions (neutral current):
do i1=-max_flav,max_flav
do i2=-max_flav,max_flav
i7 = i1
i8 = i2
c no gluons:
condition = ((i1*i2*i7*i8).ne.0)
if (.not.condition) goto 900
if (channel_type.eq.0.or.channel_type.eq.7) then
condition=.true.
else
c use value of i1/i7 to select appropriate flavor channel
ftype(1) = 2-mod(abs(i1),2)
ftype(2) = 2-mod(abs(i2),2)
k = -2*ftype(1)-ftype(2)+7
if (k.eq.channel_type) then
condition=.true.
else
condition = .false.
endif !k
endif !channel_type
c
if(condition) then
flst_nborn=flst_nborn+1
if(flst_nborn.gt.maxprocborn) goto 999
do k=1,nlegborn
flst_born(k,flst_nborn)=ii(k)
enddo
if (tag) then
flst_borntags(1,flst_nborn)=1
flst_borntags(2,flst_nborn)=2
flst_borntags(3,flst_nborn)=0
flst_borntags(4,flst_nborn)=0
flst_borntags(5,flst_nborn)=0
flst_borntags(6,flst_nborn)=0
flst_borntags(7,flst_nborn)=7
flst_borntags(8,flst_nborn)=8
if (newtag) then
flst_borntags(1,flst_nborn)=1
flst_borntags(2,flst_nborn)=2
flst_borntags(3,flst_nborn)=0
flst_borntags(4,flst_nborn)=0
flst_borntags(5,flst_nborn)=0
flst_borntags(6,flst_nborn)=0
flst_borntags(7,flst_nborn)=1
flst_borntags(8,flst_nborn)=2
endif !newtag
endif !tag
endif
900 continue
enddo !i2
enddo !i1
if (debug) then
write(*,*) ' born NC processes',flst_nborn-flst_nborn_WW
do j=flst_nborn_WW+1,flst_nborn
write(*,*) (flst_born(k,j),k=1,nlegborn)
enddo
endif
endif !nc_include
cccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
c Real graphs
c
cccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
flst_nreal=0
condition=.false.
if (cc_include) then
c WW fusion contributions (charged current):
c
C the qq->qqg case:
do i1=-max_flav,max_flav
do i2=-max_flav,max_flav
do i7=-max_flav,max_flav
do i8=-max_flav,max_flav
do i9=0,0
c no extra gluons:
condition = ((i1*i2*i7*i8).ne.0)
if (.not.condition) goto 801
if (channel_type.eq.0.or.channel_type.eq.8) then
condition=.true.
else
c use value of i1/i7 to select appropriate flavor channel
ftype(1) = 2-mod(abs(i1),2)
ftype(7) = 2-mod(abs(i7),2)
icc = -3*i1/abs(i1)+4
k = 7-ftype(icc)
if (k.eq.channel_type) then
condition=.true.
else
condition = .false.
endif !k
endif !channel_type
c
if (CKM_diag) then
emit_Wp_upper = (i7.eq.i1-1)
emit_Wm_upper = (i7.eq.i1+1)
emit_Wp_lower = (i8.eq.i2-1)
emit_Wm_lower = (i8.eq.i2+1)
else
stop 'Only diagonal CKM implemented'
endif
condition = condition.and.(
c W+ emission from upper leg
# (((charge3(i1)-(charge3(i7)+3)
# .eq.0).and.(emit_Wp_upper)) .and.
c W- emission from lower leg
# ((charge3(i2)-(charge3(i8)-3)
# .eq.0).and.(emit_Wm_lower)))
# .or.
c W- emission from upper leg
# (((charge3(i1)-(charge3(i7)-3)
# .eq.0).and.(emit_Wm_upper)) .and.
c W+ emission from lower leg
# ((charge3(i2)-(charge3(i8)+3)
# .eq.0).and.(emit_Wp_lower))))
c
if(condition) then
flst_nreal=flst_nreal+1
if(flst_nreal.gt.maxprocreal) goto 998
do k=1,nlegreal
flst_real(k,flst_nreal)=ii(k)
enddo
if (tag) then
flst_realtags(1,flst_nreal)=1
flst_realtags(2,flst_nreal)=2
flst_realtags(3,flst_nreal)=0
flst_realtags(4,flst_nreal)=0
flst_realtags(5,flst_nreal)=0
flst_realtags(6,flst_nreal)=0
flst_realtags(7,flst_nreal)=7
flst_realtags(8,flst_nreal)=8
flst_realtags(9,flst_nreal)=0
if (newtag) then
flst_realtags(1,flst_nreal)=1
flst_realtags(2,flst_nreal)=2
flst_realtags(3,flst_nreal)=0
flst_realtags(4,flst_nreal)=0
flst_realtags(5,flst_nreal)=0
flst_realtags(6,flst_nreal)=0
flst_realtags(7,flst_nreal)=1 !7
flst_realtags(8,flst_nreal)=2 !8
flst_realtags(9,flst_nreal)=0
endif !newtag
endif !tag
endif
801 continue
enddo !i9
enddo !i8
enddo !i7
enddo !i2
enddo !i1
ccccc
c
C the gq->qqq case:
do i1=0,0
do i2=-max_flav,max_flav
do i7=-max_flav,max_flav
do i8=-max_flav,max_flav
do i9=-max_flav,-1
c no extra gluons:
condition = ((i9*i2*i7*i8).ne.0)
if (.not.condition) goto 802
c
if (channel_type.eq.0.or.channel_type.eq.8) then
condition=.true.
else
c use value of i2/i8 to select appropriate flavor channel
ftype(2) = 2-mod(abs(i2),2)
ftype(8) = 2-mod(abs(i8),2)
icc = 3*(i2/abs(i2))+5
k = 7-ftype(icc)
if (k.eq.channel_type) then
condition=.true.
else
condition = .false.
endif !k
endif !channel_type
if (CKM_diag) then
emit_Wp_upper = (i7.eq.(-i9-1))
emit_Wm_upper = (i7.eq.(-i9+1))
emit_Wp_lower = (i8.eq.i2-1)
emit_Wm_lower = (i8.eq.i2+1)
else
stop 'Only diagonal CKM implemented'
endif
condition = condition.and.(
c W+ emission from upper leg
# ((((-charge3(i9)-(charge3(i7)+3)
# .eq.0).and.(emit_Wp_upper)) .and.
c W- emission from lower leg
# ((charge3(i2)-(charge3(i8)-3)
# .eq.0).and.(emit_Wm_lower))))
# .or.
c W- emission from upper leg
# (((-charge3(i9)-(charge3(i7)-3)
# .eq.0).and.(emit_Wm_upper)) .and.
c W+ emission from lower leg
# ((charge3(i2)-(charge3(i8)+3)
# .eq.0).and.(emit_Wp_lower)))
# )
c no extra gluons:
c condition = condition.and.(
c . (i9*i2*i7*i8).ne.0)
c
if(condition) then
flst_nreal=flst_nreal+1
if(flst_nreal.gt.maxprocreal) goto 998
do k=1,nlegreal
flst_real(k,flst_nreal)=ii(k)
enddo
if (tag) then
flst_realtags(1,flst_nreal)=0
flst_realtags(2,flst_nreal)=2
flst_realtags(3,flst_nreal)=0
flst_realtags(4,flst_nreal)=0
flst_realtags(5,flst_nreal)=0
flst_realtags(6,flst_nreal)=0
flst_realtags(7,flst_nreal)=7
flst_realtags(8,flst_nreal)=8
flst_realtags(9,flst_nreal)=1
if (newtag) then
flst_realtags(1,flst_nreal)=0
flst_realtags(2,flst_nreal)=2
flst_realtags(3,flst_nreal)=0
flst_realtags(4,flst_nreal)=0
flst_realtags(5,flst_nreal)=0
flst_realtags(6,flst_nreal)=0
flst_realtags(7,flst_nreal)=1
flst_realtags(8,flst_nreal)=2
flst_realtags(9,flst_nreal)=1
endif !newtag
endif !tag
endif !condition
802 continue
enddo !i9
enddo !i8
enddo !i7
enddo !i2
enddo !i1
C the qg->qqq case:
do i1=-max_flav,max_flav
do i2=0,0
do i7=-max_flav,max_flav
do i8=-max_flav,max_flav
do i9=-max_flav,-1
c no extra gluons:
condition = ((i1*i9*i7*i8).ne.0)
if (.not.condition) goto 803
c
if (channel_type.eq.0.or.channel_type.eq.8) then
condition=.true.
else
c use value of i1/i7 to select appropriate flavor channel
ftype(1) = 2-mod(abs(i1),2)
ftype(7) = 2-mod(abs(i7),2)
icc = -3*i1/abs(i1)+4
k = 7-ftype(icc)
if (k.eq.channel_type) then
condition=.true.
else
condition = .false.
endif !k
endif !channel_type
if (CKM_diag) then
emit_Wp_upper = (i7.eq.i1-1)
emit_Wm_upper = (i7.eq.i1+1)
emit_Wp_lower = (i8.eq.-i9-1)
emit_Wm_lower = (i8.eq.-i9+1)
else
stop 'Only diagonal CKM implemented'
endif
condition = condition.and.(
c W+ emission from upper leg
# (((charge3(i1)-(charge3(i7)+3)
# .eq.0).and.(emit_Wp_upper)) .and.
c W- emission from lower leg
# ((-charge3(i9)-(charge3(i8)-3)
# .eq.0).and.(emit_Wm_lower)))
# .or.
c W- emission from upper leg
# (((charge3(i1)-(charge3(i7)-3)
# .eq.0).and.(emit_Wm_upper)) .and.
c W+ emission from lower leg
# ((-charge3(i9)-(charge3(i8)+3)
# .eq.0).and.(emit_Wp_lower))))
c no extra gluons:
c condition = condition.and.(
c . (i1*i9*i7*i8).ne.0)
if(condition) then
flst_nreal=flst_nreal+1
if(flst_nreal.gt.maxprocreal) goto 998
do k=1,nlegreal
flst_real(k,flst_nreal)=ii(k)
enddo
if (tag) then
flst_realtags(1,flst_nreal)=1
flst_realtags(2,flst_nreal)=0
flst_realtags(3,flst_nreal)=0
flst_realtags(4,flst_nreal)=0
flst_realtags(5,flst_nreal)=0
flst_realtags(6,flst_nreal)=0
flst_realtags(7,flst_nreal)=7
flst_realtags(8,flst_nreal)=8
flst_realtags(9,flst_nreal)=2
if (newtag) then
flst_realtags(1,flst_nreal)=1
flst_realtags(2,flst_nreal)=0
flst_realtags(3,flst_nreal)=0
flst_realtags(4,flst_nreal)=0
flst_realtags(5,flst_nreal)=0
flst_realtags(6,flst_nreal)=0
flst_realtags(7,flst_nreal)=1 !7
flst_realtags(8,flst_nreal)=2 !8
flst_realtags(9,flst_nreal)=2
endif !newtag
endif !tag
endif
803 continue
enddo !i9
enddo !i8
enddo !i7
enddo !i2
enddo !i1
if (debug) then
write(*,*) ' real CC processes',flst_nreal
do j=1,flst_nreal
write(*,*) (flst_real(k,j),k=1,nlegreal)
enddo
endif
flst_nreal_WW = flst_nreal
endif !cc_include
if(nc_include) then
c ZZ fusion contributions (neutral current):
c
c the qq->qqg graphs:
c
do i1=-max_flav,max_flav
do i2=-max_flav,max_flav
i7 = i1
i8 = i2
i9 = 0
c no extra gluons:
condition = ((i1*i2*i7*i8).ne.0)
if (.not.condition) goto 901
if (channel_type.eq.0.or.channel_type.eq.7) then
condition=.true.
else
c use value of i1/i7 to select appropriate flavor channel
ftype(1) = 2-mod(abs(i1),2)
ftype(2) = 2-mod(abs(i2),2)
k = -2*ftype(1)-ftype(2)+7
if (k.eq.channel_type) then
condition=.true.
else
condition = .false.
endif !k
endif !channel_type
if (condition) then
flst_nreal=flst_nreal+1
if(flst_nreal.gt.maxprocreal) goto 998
do k=1,nlegreal
flst_real(k,flst_nreal)=ii(k)
enddo
if (tag) then
flst_realtags(1,flst_nreal)=1
flst_realtags(2,flst_nreal)=2
flst_realtags(3,flst_nreal)=0
flst_realtags(4,flst_nreal)=0
flst_realtags(5,flst_nreal)=0
flst_realtags(6,flst_nreal)=0
flst_realtags(7,flst_nreal)=7
flst_realtags(8,flst_nreal)=8
flst_realtags(9,flst_nreal)=0
if (newtag) then
flst_realtags(1,flst_nreal)=1
flst_realtags(2,flst_nreal)=2
flst_realtags(3,flst_nreal)=0
flst_realtags(4,flst_nreal)=0
flst_realtags(5,flst_nreal)=0
flst_realtags(6,flst_nreal)=0
flst_realtags(7,flst_nreal)=1 !7
flst_realtags(8,flst_nreal)=2 !8
flst_realtags(9,flst_nreal)=0
endif !newtag
endif !tag
endif !condition
901 continue
enddo !i2
enddo !i1
c
ccccccccccccc
c
C the gq->qqq case:
c
do i2=-max_flav,max_flav
do i9=-max_flav,-1
i1 = 0
i7 =-i9
i8 = i2
c no extra gluons:
condition = ((i9*i2*i7*i8).ne.0)
if (.not.condition) goto 902
if (channel_type.eq.0.or.channel_type.eq.7) then
condition=.true.
else
c use value of i2/i9 to select appropriate flavor channel
ftype(1) = 2-mod(abs(i9),2)
ftype(2) = 2-mod(abs(i2),2)
k = -2*ftype(1)-ftype(2)+7
if (k.eq.channel_type) then
condition=.true.
else
condition = .false.
endif !k
endif !channel_type
if (condition) then
flst_nreal=flst_nreal+1
if(flst_nreal.gt.maxprocreal) goto 998
do k=1,nlegreal
flst_real(k,flst_nreal)=ii(k)
enddo
if (tag) then
flst_realtags(1,flst_nreal)=0
flst_realtags(2,flst_nreal)=2
flst_realtags(3,flst_nreal)=0
flst_realtags(4,flst_nreal)=0
flst_realtags(5,flst_nreal)=0
flst_realtags(6,flst_nreal)=0
flst_realtags(7,flst_nreal)=7
flst_realtags(8,flst_nreal)=8
flst_realtags(9,flst_nreal)=1
if (newtag) then
flst_realtags(1,flst_nreal)=0
flst_realtags(2,flst_nreal)=2
flst_realtags(3,flst_nreal)=0
flst_realtags(4,flst_nreal)=0
flst_realtags(5,flst_nreal)=0
flst_realtags(6,flst_nreal)=0
flst_realtags(7,flst_nreal)=1
flst_realtags(8,flst_nreal)=2
flst_realtags(9,flst_nreal)=1
endif !newtag
endif !tag
endif !condition
902 continue
enddo !i9
enddo !i2
ccccc
c
C the qg->qqq case:
c
do i1=-max_flav,max_flav
do i9=-max_flav,-1
i2 = 0
i8 =-i9
i7 = i1
c no extra gluons:
condition = ((i1*i9*i7*i8).ne.0)
if (.not.condition) goto 903
if (channel_type.eq.0.or.channel_type.eq.7) then
condition=.true.
else
c use value of i1/i7 to select appropriate flavor channel
ftype(1) = 2-mod(abs(i1),2)
ftype(2) = 2-mod(abs(i9),2)
k = -2*ftype(1)-ftype(2)+7
if (k.eq.channel_type) then
condition=.true.
else
condition = .false.
endif !k
endif !channel_type
if (condition) then
flst_nreal=flst_nreal+1
if(flst_nreal.gt.maxprocreal) goto 998
do k=1,nlegreal
flst_real(k,flst_nreal)=ii(k)
enddo
if (tag) then
flst_realtags(1,flst_nreal)=1
flst_realtags(2,flst_nreal)=0
flst_realtags(3,flst_nreal)=0
flst_realtags(4,flst_nreal)=0
flst_realtags(5,flst_nreal)=0
flst_realtags(6,flst_nreal)=0
flst_realtags(7,flst_nreal)=7
flst_realtags(8,flst_nreal)=8
flst_realtags(9,flst_nreal)=2
if (newtag) then
flst_realtags(1,flst_nreal)=1
flst_realtags(2,flst_nreal)=0
flst_realtags(3,flst_nreal)=0
flst_realtags(4,flst_nreal)=0
flst_realtags(5,flst_nreal)=0
flst_realtags(6,flst_nreal)=0
flst_realtags(7,flst_nreal)=1 !7
flst_realtags(8,flst_nreal)=2 !8
flst_realtags(9,flst_nreal)=2
endif !newtag
endif !tag
endif !condition
903 continue
enddo !i9
enddo !i2
if (debug) then
write(*,*) ' real NC processes',flst_nreal-flst_nreal_WW
do j=flst_nreal_WW+1,flst_nreal
write(*,*) (flst_real(k,j),k=1,nlegreal)
enddo
endif
endif !nc_included
return
998 write(*,*) 'init_processes: increase maxprocreal'
stop
999 write(*,*) 'init_processes: increase maxprocborn'
end