-
Notifications
You must be signed in to change notification settings - Fork 1
/
lqgenep.f_HadDecEIC
2827 lines (2694 loc) · 84.8 KB
/
lqgenep.f_HadDecEIC
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
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
*-----------------
* File: lqgenep.f
*-----------------
*
subroutine LQGENEP(Nevt,flag)
C------------------------------------------
C...Main program for leptoquark generation
C...in electron-proton scattering
C------------------------------------------
C...All real arithmetic in double precision.
IMPLICIT DOUBLE PRECISION(A-H, O-Z)
Integer flag, itau,id,ii,ij
C...LQGENEP run setup parameters
double precision BEAMPAR,LQGPAR3,
> ptnt,phnt,ptt,pht,pth,phh,
> ptx,pty,ptz,phx,phy,phz,
> ptid, phid,ppid,pxid,pyid,pzid
integer LQGPAR1,LQGPAR2
COMMON/LQGDATA/BEAMPAR(3),LQGPAR1(10),LQGPAR2(10),LQGPAR3(20)
C...LQGENEP event informations
double precision LQGKPAR,LQGDDX
integer LQGPID
COMMON/LQGEVT/LQGKPAR(3),LQGDDX(3),LQGPID(3)
C...Pythia declarations.
C...Three Pythia functions return integers, so need declaring.
INTEGER PYK,PYCHGE,PYCOMP
C...Parameter statement to help give large particle numbers
C...(left- and righthanded SUSY, excited fermions).
PARAMETER (KSUSY1=1000000,KSUSY2=2000000,KEXCIT=4000000)
C...EXTERNAL statement links PYDATA on most machines.
EXTERNAL PYDATA
*
C...Pythia Commonblocks.
C...The event record.
COMMON/PYJETS/N,NPAD,K(4000,5),P(4000,5),V(4000,5)
C...Parameters.
COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
C...Particle properties + some flavour parameters.
COMMON/PYDAT2/KCHG(500,4),PMAS(500,4),PARF(2000),VCKM(4,4)
C...Decay information.
COMMON/PYDAT3/MDCY(500,3),MDME(4000,2),BRAT(4000),KFDP(4000,5)
C...Selection of hard scattering subprocesses.
COMMON/PYSUBS/MSEL,MSELPD,MSUB(500),KFIN(2,-40:40),CKIN(200)
C...Parameters.
COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
C...Process information.
COMMON/PYINT1/MINT(400),VINT(400)
COMMON/PYINT2/ISET(500),KFPR(500,2),COEF(500,20),ICOL(40,4,2)
C...Supersymmetry parameters.
COMMON/PYMSSM/IMSS(0:99),RMSS(0:99)
SAVE /PYJETS/,/PYDAT1/,/PYDAT2/,/PYDAT3/,/PYSUBS/,/PYPARS/,
>/PYINT2/,/PYMSSM/
C...Local Array.
DIMENSION NCHN(12),QVEC(4)
DATA NCHN/12*0/
C...Internal used common
C# LQGpar1.inc #
integer echar
double precision ebeam,pbeam
common /LQGbeam/ebeam,pbeam,echar
C# LQGpdfC.inc #
character*20 parm(20)
double precision pdfsf(20)
common /LQGpdfC/ pdfsf
C# LQGKinC.inc #
double precision xmax,xmin,ymax,ymin,zmax,zmin,Q2min
common /LQGKinC/ xmax,xmin,ymax,ymin,zmax,zmin,Q2min
C# LQGproc.inc #
double precision Mlq,G1,G2
Integer LQtype,l_o,q_i,q_j
common /LQGproc/ Mlq,G1,G2,LQtype,l_o,q_i,q_j
C# LQGKinV.inc #
double precision S,Srad,x,y,z,Q2
common /LQGKinV/ S,Srad,x,y,z,Q2
C# LQGout.inc #
double precision DXSEC(3),pvalence
integer q_o,q_s,genproc,genprtyp,sch,uch,gproc(8)
common /LQGout/ DXSEC,pvalence,q_o,q_s,genproc,genprtyp,
>sch,uch,gproc
C...processes
integer ibea
Character*9 chbea(2)
Character*12 chprod(2,3)
data chbea /'e+ qi -> ','e- qi -> '/
data chprod /' -> e+ qj',' -> e- qj',
> ' -> mu+ qj',' -> mu- qj',
> ' -> tau+ qj',' -> tau- qj'/
C...LQ type
Character*7 LQCHA(14)
DATA LQCHA /'S_0L','S_0R','~S_0R','S_1L',
> 'V_1/2L','V_1/2R','~V_1/2L',
> 'V_0L','V_0R','~V_0R','V_1L',
> 'S_1/2L','S_1/2R','~S_1/2L'/
C...Local declarations
Real pxtot,pytot,pztot,etot,ecmtot,
> pxsum,pysum,pzsum,esum,ecmsum,
> pxlow,pxhi,pylow,pyhi,pzlow,pzhi,elow,ehi,ecmlow,ecmhi
C-----------------------------------------------------------------
Integer Nwds_HBOOK
Parameter (Nwds_HBOOK=100000)
Real HMEM
Common /PAWC/ HMEM(Nwds_HBOOK)
C...FLAG=0 -> First section: inizialization
If(flag.eq.0)then
C.. LQGENEP banner
call LQGBAN
C.. Hbook inizialization
if(LQGPAR1(3).gt.0)Call HLIMIT(Nwds_HBOOK)
if(LQGPAR1(3).lt.0)Call HLIMIT(-Nwds_HBOOK)
C...beams properties.
echar=beampar(1)
Ebeam=beampar(2)
Pbeam=beampar(3)
S=4.d0*Ebeam*Pbeam
C...LQ properties
MLQ=LQGPAR3(1)
G1=LQGPAR3(2)
G2=LQGPAR3(3)
LQTYPE=LQGPAR2(1)
C... outcoming lepton
l_o=LQGPAR2(4)
C... incoming and outcoming quark generation
q_i=LQGPAR2(2)
q_j=LQGPAR2(3)
C... kinematic ranges
xmin=LQGPAR3(4)
xmax=LQGPAR3(5)
ymin=LQGPAR3(6)
ymax=LQGPAR3(7)
Zmin=0.d0
Zmax=1.d0
Q2min=LQGPAR3(8)
C... print LQGENEP generation run settings
call LQGPRI1
C... structure function
parm(1)='NPTYPE'
parm(2)='NGROUP'
parm(3)='NSET'
pdfsf(1)= LQGPAR3(9)
pdfsf(2)= LQGPAR3(10)
pdfsf(3)= LQGPAR3(11)
call PDFSET(PARM,pdfsf)
C... Pythia initialization
P(1,1)=0D0
P(1,2)=0D0
P(1,3)=-Ebeam
P(2,1)=0D0
P(2,2)=0D0
P(2,3)=Pbeam
C...Evaluate limits for total momentum and energy histos
if(LQGPAR1(3).gt.0)then
pxtot=sngl(P(1,1)+P(2,1))
pytot=sngl(P(1,2)+P(2,2))
pztot=sngl(P(1,3)+P(2,3))
etot=sngl(dabs(P(1,3))+dabs(P(2,3)))
ecmtot=sqrt(etot*etot-(pxtot*pxtot+pytot*pytot+pztot*pztot))
if(pxtot.gt.0)then
pxlow=pxtot-0.01*pxtot
pxhi=pxtot+0.01*pxtot
else
pxlow=pxtot-1.
pxhi=pxtot+1.
endif
if(pytot.gt.0)then
pylow=pytot-0.01*pytot
pyhi=pytot+0.01*pytot
else
pylow=pytot-1.
pyhi=pytot+1.
endif
if(pztot.gt.0)then
pzlow=pztot-0.01*pztot
pzhi=pztot+0.01*pztot
else
pzlow=pztot-1.
pzhi=pztot+1.
endif
if(etot.gt.0)then
elow=etot-0.01*etot
ehi=etot+0.01*etot
else
elow=etot-1.
ehi=etot+1.
endif
if(ecmtot.gt.0)then
ecmlow=ecmtot-0.01*ecmtot
ecmhi=ecmtot+0.01*ecmtot
else
ecmlow=ecmtot-1.
ecmhi=ecmtot+1.
endif
endif
C...Initialize Pythia
if(LQGPAR1(5).eq.0)then
Isub=401
else
Isub=LQGPAR1(5)
endif
sch=0.d0
uch=0.d0
call vzero(gproc,8)
sigmax=LQGPAR3(12)
if(echar.gt.0)then
ibea=1
else
ibea=2
endif
CALL PYUPIN(ISUB,
> CHBEA(ibea)//LQCHA(LQTYPE)//CHPROD(ibea,l_o),sigmax)
MSEL=0
MSUB(ISUB)=1
*
if(beampar(1).GT.0)then
CALL PYINIT('USER','e+','p',0D0)
else
CALL PYINIT('USER','e-','p',0D0)
endif
if(LQGPAR1(3).ne.0)then
C...Book histos.
call hropen(69,'lqgenep','lqgenep.histo','N',1024,ierr)
CALL hbook1(1000,'x gen',50,sngl(xmin),sngl(xmax),0.)
CALL hbook1(1001,'x gen s-ch.',50,sngl(xmin),sngl(xmax),0.)
CALL hbook1(1002,'x gen u-ch',50,sngl(xmin),sngl(xmax),0.)
CALL hbook1(2000,'y gen',50,sngl(ymin),sngl(ymax),0.)
CALL hbook1(2001,'y gen s-ch',50,sngl(ymin),sngl(ymax),0.)
CALL hbook1(2002,'y gen u-ch',50,sngl(ymin),sngl(ymax),0.)
CALL hbook1(3000,'Q2 gen',50,0.,6.,0.)
call hbook1(5001,'sum px',100,pxlow,pxhi,0.)
call hbook1(5002,'sum py',100,pylow,pyhi,0.)
call hbook1(5003,'sum pz',100,pzlow,pzhi,0.)
call hbook1(5004,'sum e',100,elow,ehi,0.)
call hbook1(5000,'center of mass energy',
> 100,ecmlow,ecmhi,0.)
endif
write(6,*)
endif
C-----------------------------------------------------------------
C...FLAG=1 -> Second section: event generation
if(flag.eq.1)Then
CALL PYEVNT
print*,"The no. of event is",LQGPAR1(4)
CALL PYHEPC(1)
C...s-u channel
if(genproc.eq.1)sch=sch+1
if(genproc.eq.2)uch=uch+1
C...process type
gproc(genprtyp)=gproc(genprtyp)+1
C...Fill event informations common
LQGKPAR(1)=X
LQGKPAR(2)=Y
LQGKPAR(3)=Q2
LQGDDX(1)=(DXSEC(2)+DXSEC(3))*1.d-9
LQGDDX(2)=DXSEC(3)*1.d-9
LQGDDX(3)=DXSEC(2)*1.d-9
LQGPID(1)=q_s
LQGPID(2)=q_o
if(genproc.eq.1)then
LQGPID(3)=1
elseif(genproc.eq.2)then
LQGPID(3)=2
endif
**swadhin: HADRONIC TAU DECAY
*Here particle that are not decayed are called (except neutrinos) and their pT are added. The sum is called pT Miss.
do 60 J=1,N
if ((K(J,1).EQ.11).and.
> (K(J,2).EQ.15)) then ! find tau and get it's line number
idt=J
idtd=K(J,4) ! tau decay's to what line number
endif
do 45 l=1,N
if (l.EQ.idt) then
ptt=PYP(l,10)
pxt=P(l,1)
pyt=P(l,2)
pht=PYP(l,16)
ppt=PYP(l,14)
endif
45 enddo
if ((K(J,1).EQ.1).and.
> (K(J,2).EQ.16)
> .and.(K(J,3).EQ.idt)) then ! find tau neutrino and get it's line number
idtnu=J
endif
if ((J.EQ.idtd) ! line number is the decay of tau
> .and.(K(J,2).NE.-12) ! this decay is not nu_ebar
> .and.(K(J,2).NE.-14)) then ! this decay is not nu_mubar
ptid=0.d0
pxid=0.d0
pyid=0.d0
pzid=0.d0
do 50 I=1,N
if ((K(I,1).LT.11) ! Anything that doesn't decay = Final Product
> .and.(K(I,2).NE.12) ! Final Product NOT AN Electron neutrino
> .and.(K(I,2).NE.14) ! Final Product NOT AN Muon neutrino
> .and.(K(I,2).NE.16) ! Final Product NOT AN Tau neutrino
> .and.(K(I,2).NE.-12) ! Final Product NOT AN Electron neutrino
> .and.(K(I,2).NE.-14) ! Final Product NOT AN Muon neutrino
> .and.(K(I,2).NE.-16)) then ! Final Product NOT A Tau neutrino
ptid=ptid+PYP(I,10)
pxid=pxid+P(I,1)
pyid=pyid+P(I,2)
pzid=pzid+P(I,3)
endif
50 enddo
write(8,10)LQGPAR1(4),pxid,pyid,pxt,
> pyt,pht,ppt
10 FORMAT(I8,6(1PE14.6))
endif
60 enddo
C...List first few events.
LQGPAR1(4)=LQGPAR1(4)+1
if(LQGPAR1(4).LE.LQGPAR1(2)) CALL PYLIST(2)
C..
if(mod(LQGPAR1(4),100).eq.0)then
write(6,1000) LQGPAR1(4)
1000 format('>>>>>> ',I8,
> ' events succesfully generated <<<<<<')
endif
if(LQGPAR1(3).ne.0)then
C...Fill histos
CALL HF1(1000,sngl(x),1.)
if(genproc.eq.1)CALL HF1(1001,sngl(x),1.)
if(genproc.eq.2)CALL HF1(1002,sngl(x),1.)
CALL HF1(2000,sngl(y),1.)
if(genproc.eq.1)CALL HF1(2001,sngl(y),1.)
if(genproc.eq.2)CALL HF1(2002,sngl(y),1.)
CALL HF1(3000,log10(sngl(Q2)),1.)
C... final energy and momentum checks
px_sum=0.
py_sum=0.
pz_sum=0.
e_sum=0.
cme=0.
do 222 i=1,N
if(K(I,1).le.10)then
px_sum=px_sum+P(I,1)
py_sum=py_sum+P(I,2)
pz_sum=pz_sum+P(I,3)
e_sum=e_sum+P(I,4)
endif
222 enddo
cme=sqrt(e_sum**2-px_sum**2-py_sum**2-pz_sum**2)
call hf1(5001,sngl(px_sum),1.)
call hf1(5002,sngl(py_sum),1.)
call hf1(5003,sngl(pz_sum),1.)
call hf1(5004,sngl(e_sum),1.)
call hf1(5000,sngl(cme),1.)
endif
endif
C-----------------------------------------------------------------
C...FLAG=2 -> Third section: Termination
if(flag.eq.2)Then
write(6,*)
C...Pythia final table.
CALL PYSTAT(1)
write(6,*)
C...LQGENEP final statistics.
CALL LQGPRI2
C...Closing Histograms.
if(LQGPAR1(3).ne.0)then
Call HCDIR('//lqgenep',' ')
CALL HROUT(0,ICYCLE,' ')
CALL HREND('lqgenep')
endif
endif
END
*
C*********************************************************************
SUBROUTINE PYUPEV(ISUB,SIGEV)
C-------------------------------------------
C...Pythia routine for user external process
C-------------------------------------------
C...Double precision and integer declarations.
IMPLICIT DOUBLE PRECISION(A-H, O-Z)
IMPLICIT INTEGER(I-N)
INTEGER PYK,PYCHGE,PYCOMP
C# LQGpar1.inc #
integer echar
double precision ebeam,pbeam
common /LQGbeam/ebeam,pbeam,echar
C# LQGpdfC.inc #
double precision pdfsf(20)
common /LQGpdfC/ pdfsf
C# LQGKinC.inc #
double precision xmax,xmin,ymax,ymin,zmax,zmin,Q2min
common /LQGKinC/ xmax,xmin,ymax,ymin,zmax,zmin,Q2min
C# LQGproc.inc #
double precision Mlq,G1,G2
Integer LQtype,l_o,q_i,q_j
common /LQGproc/ Mlq,G1,G2,LQtype,l_o,q_i,q_j
C# LQGKinV.inc #
double precision S,Srad,x,y,z,Q2
common /LQGKinV/ S,Srad,x,y,z,Q2
C# LQGout.inc #
double precision DXSEC(3),pvalence
integer q_o,q_s,genproc,genprtyp,sch,uch,gproc(8)
common /LQGout/ DXSEC,pvalence,q_o,q_s,genproc,genprtyp,
>sch,uch,gproc
C...
CHARACTER CHAF*16
COMMON /PYDAT4/CHAF(500,2)
COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
COMMON/PYUPPR/NUP,KUP(20,7),NFUP,IFUP(10,2),PUP(20,5),Q2UP(0:10)
SAVE /PYDAT1/,/PYUPPR/
C...Local arrays and parameters.
DIMENSION XPPs(-25:25),XPPu(-25:25),XPE(-25:25),TERM(20)
DATA PI/3.141592653589793D0/
* conversion from pb to mb
DATA CONV/1.D-9/
c DATA CONV/1.D0/
C...LQGENEP parameters
double precision BEAMPAR,LQGPAR3
integer LQGPAR1,LQGPAR2
COMMON/LQGDATA/BEAMPAR(3),LQGPAR1(10),LQGPAR2(10),LQGPAR3(20)
C...LQ names according to Aachen convention
Character*7 LQCHA(14)
DATA LQCHA /'S_0L','S_0R','~S_0R','S_1L',
> 'V_1/2L','V_1/2R','~V_1/2L',
> 'V_0L','V_0R','~V_0R','V_1L',
> 'S_1/2L','S_1/2R','~S_1/2L'/
C...
DATA KLQ /39/
*
sigev=0.d0
irej=0
* sigma
X=pyr(0)*(Xmax-Xmin)+Xmin
Y=pyr(0)*(Ymax-Ymin)+Ymin
Z=1
Srad=S*z
Q2=S*X*Y*Z
*
C... Evaluate double differential cross section
call LQGDDXS
*
dxdydz=(Xmax-Xmin)*(Ymax-Ymin)*(Zmax-Zmin)
Sigev=(DXSEC(2)+DXSEC(3))*conv*dxdydz
* fill Pythia variables for the generated process
* e beam
ECM2XZ=S*X*Z
ECMXZ=sqrt(ECM2XZ)
NUP=5
KUP(1,1)=1
KUP(1,2)=(echar)*-11
KUP(1,3)=0
KUP(1,4)=0
KUP(1,5)=0
KUP(1,6)=0
KUP(1,7)=0
PUP(1,1)=0.
PUP(1,2)=0.
PUP(1,4)=Z*sqrt(S)/2.d0
PUP(1,3)=PUP(1,4)
PUP(1,5)=0.
* p beam
KUP(2,1)=1
KUP(2,2)=q_s
KUP(2,3)=0
KUP(2,4)=0
KUP(2,5)=0
KUP(2,6)=0
KUP(2,7)=0
if(q_s.gt.0)then
KUP(2,6)=5
else
KUP(2,7)=5
endif
PUP(2,1)=0.
PUP(2,2)=0.
PUP(2,4)=X*sqrt(S)/2.d0
PUP(2,3)=-PUP(2,4)
PUP(2,5)=0.
* LQ
KUP(3,1)=2
KUP(3,2)=KLQ
CHAF(pycomp(KLQ),1)=LQCHA(LQTYPE)
KUP(3,3)=0
KUP(3,4)=0
KUP(3,5)=0
KUP(3,6)=0
KUP(3,7)=0
PUP(3,1)=PUP(2,1)+PUP(1,1)
PUP(3,2)=PUP(2,2)+PUP(1,2)
PUP(3,3)=PUP(2,3)+PUP(1,3)
PUP(3,4)=sqrt(ECM2XZ+PUP(3,1)**2+PUP(3,2)**2+PUP(3,3)**2)
PUP(3,5)=sqrt(ECM2XZ)
* final state in sub-system cm.
* final state lepton
theta=acos(1.d0-2.d0*Y)
PHI=2D0*PI*PYR(0)
rtshat=ECMXZ
KUP(4,1)=1
KUP(4,2)=echar*-(11+2*(l_o-1))
KUP(5,1)=1
KUP(5,2)=q_o
PUP(4,5)=PYMASS(KUP(4,2))
PUP(5,5)=PYMASS(KUP(5,2))
PUP44=0.5D0*(RTSHAT**2+PUP(4,5)**2-PUP(5,5)**2)/RTSHAT
PUP54=RTSHAT-PUP44
KUP(4,3)=3
KUP(4,4)=0
KUP(4,5)=0
KUP(4,6)=0
KUP(4,7)=0
if(irej.eq.1.and.PUP44**2-PUP(4,5)**2.lt.0)then
PMOD=1.d0
else
PMOD=sqrt(PUP44**2-PUP(4,5)**2)
endif
PUP(4,1)=PMOD*sin(theta)*cos(phi)
PUP(4,2)=PMOD*sin(theta)*sin(phi)
PUP43=PMOD*cos(theta)
PUP44=PUP(3,5)/2.d0
* final state quark
KUP(5,3)=3
KUP(5,4)=0
KUP(5,5)=0
KUP(5,6)=0
KUP(5,7)=0
if(q_o.gt.0)then
KUP(5,4)=2
else
KUP(5,5)=2
endif
PUP(5,1)=0.
PUP(5,2)=0.
if(irej.eq.1.and.PUP54**2-PUP(5,5)**2.lt.0)then
PMOD=1.d0
else
PMOD=sqrt(PUP54**2-PUP(5,5)**2)
endif
PUP(5,1)=-PUP(4,1)
PUP(5,2)=-PUP(4,2)
PUP53=-PUP43
* Longitudinal boost to cm frame
beta=(z-x)/(z+x)
gamma=0.5d0*(z+x)/sqrt(x*z)
PUP(4,3)=GAMMA*(PUP43+BETA*PUP44)
PUP(4,4)=GAMMA*(PUP44+BETA*PUP43)
PUP(5,3)=GAMMA*(PUP53+BETA*PUP54)
PUP(5,4)=GAMMA*(PUP54+BETA*PUP53)
*
NFUP=1
IFUP(1,1)=4
IFUP(1,2)=5
Q2UP(0)=Q2
Q2UP(1)=Q2
RETURN
END
*
SUBROUTINE LQGDDXS
C----------------------------------------------
C...Evaluate double differential cross section
C... d^2 sigma / dx dy
C----------------------------------------------
*
implicit none
*
C# LQGpar1.inc #
integer echar
double precision ebeam,pbeam
common /LQGbeam/ebeam,pbeam,echar
C# LQGpdfC.inc #
double precision pdfsf(20)
common /LQGpdfC/ pdfsf
C# LQGKinC.inc #
double precision xmax,xmin,ymax,ymin,zmax,zmin,Q2min
common /LQGKinC/ xmax,xmin,ymax,ymin,zmax,zmin,Q2min
C# LQGproc.inc #
double precision Mlq,G1,G2
Integer LQtype,l_o,q_i,q_j
common /LQGproc/ Mlq,G1,G2,LQtype,l_o,q_i,q_j
C# LQGKinV.inc #
double precision S,Srad,x,y,z,Q2
common /LQGKinV/ S,Srad,x,y,z,Q2
C# LQGout.inc #
double precision DXSEC(3),pvalence
integer q_o,q_s,genproc,genprtyp,sch,uch,gproc(8)
common /LQGout/ DXSEC,pvalence,q_o,q_s,genproc,genprtyp,
>sch,uch,gproc
double precision DSIGMADXDY(4)
double precision rand(1),sfrac1,sfrac2,ufrac1,ufrac2
double precision pvalences_u,pvalences_d,pvalenceu_u,pvalenceu_d
*
cc--------------------------------------------------------
C...Leptoquark types ranges from 1 to 14.
C
C 1->S_0 LEFT
C 2->S_0 RIGHT
C 3->~S_0 RIGHT
C 4->S_1 LEFT
C 5->V_1/2 LEFT
C 6->V_1/2 RIGHT
C 7->~V_1/2 LEFT
C 8->V_0 LEFT
C 9->V_0 RIGHT
C 10->~V_0 RIGHT
C 11->V_1 LEFT
C 12->S_1/2 LEFT
C 13->S_1/2 RIGHT
C 14->~S_1/2 LEFT
C
C DSIGMADXDY(4) - Double differential cross section
C DSIGMADXDY(1) = Standard Model term (SM processes)
C DSIGMADXDY(2) = Interference term between SM and LQ
C DSIGMADXDY(3) = LQ term - u channel
C DSIGMADXDY(4) = LQ term - s channel
C ========================================================================
C INPUT PARAMETERS:
C X - standard DIS x variable
C Y - standard DIS y variable
C S - Center of mass energy
C MLQ - Leptoquark mass
C G1 - initial state coupling
C G2 - final state coupling
C l_o - generation of the outcoming lepton
C echar - charge of the incoming lepton
C q_i - generation of initial state quark
C q_j - generation of the final state quark
C LQTYPE - Leptoquark type (see table above)
C
C OUTPUT PARAMETERS:
C DXSEC = double differential cross section (pb):
C DXSEC(1)= LQ-SM interference term
C DXSEC(2)= LQ term - u channel
C DXSEC(3)= LQ term - s channel
C q_o = output quark (from LQ decay):
C 1 down -1 antidown
C 2 up -2 antiup
C 3 strange -3 antistrange
C 4 charm -4 anticharm
C 5 bottom -5 antibottom
C 6 top -6 antitop
C
C----------------------------------------------------------
double precision pyr
double precision C_R_P,C_L_P,C_R_E,C_L_E
& ,C_R_U,C_L_U,C_R_D,C_L_D
& ,B_RR_U,B_RL_U
& ,B_LR_U,B_LL_U
& ,B_RR_D,B_RL_D
& ,B_LR_D,B_LL_D
double precision CCCf2u,DDDf2u,EEEf2u,FFFf2u,
& CCCf2d,DDDf2d,EEEf2d,FFFf2d
double precision CCCf0u,DDDf0u,EEEf0u,FFFf0u,
& CCCf0d,DDDf0d,EEEf0d,FFFf0d
double precision CCCv2u,DDDv2u,EEEv2u,FFFv2u,
& CCCv2d,DDDv2d,EEEv2d,FFFv2d
double precision CCCv0u,DDDv0u,EEEv0u,FFFv0u,
& CCCv0d,DDDv0d,EEEv0d,FFFv0d
double precision weakmix,Mz2,Gz2,Gf,alpha,A,P,pi
parameter (weakmix=0.2315, Mz2=(91.187)**2,Gz2=(2.490)**2)
parameter (Gf=0.0000116639,alpha=1.0/137.036, A=27.5, P=820.0)
parameter (pi=3.141592653589793d0)
double precision UPV,DNV,USEA,DSEA,STR,CHM,BOT,TOP,GL
double precision UPQs(3),DNQs(3),UPQBs(3),DNQBs(3)
double precision UPQu(3),DNQu(3),UPQBu(3),DNQBu(3)
double precision scales,scaleu,LambdaL2,LambdaR2,Ms2
& ,aaa,bbb,ggg
& ,LambdaL2_1,LambdaL2_2
& ,LambdaR2_1,LambdaR2_2
& ,GAM
c......LH 0, RH 1
integer LRindex(14)
data LRindex/0,1,1,0,0,1,0,0,1,1,0,0,1,0/
integer SVindex(14)
data SVindex/1,1,1,1,2,2,2,3,3,3,3,4,4,4/
* protection
if(y.eq.1)y=1.d0-1.d-13
*
DSIGMADXDY(1)=0.d0
DSIGMADXDY(2)=0.d0
DSIGMADXDY(3)=0.d0
DSIGMADXDY(4)=0.d0
q_o=0
pvalence=0.
pvalences_u=0.
pvalenceu_u=0.
pvalences_d=0.
pvalenceu_d=0.
*
C_R_P = weakmix
C_L_P = -0.5+weakmix
C_R_U = -2.0*weakmix/3.0
C_L_U = 0.5-2.0*weakmix/3.0
C_R_D = weakmix/3.0
C_L_D = -0.5+weakmix/3.0
C_R_E = weakmix
C_L_E = -0.5+weakmix
Ms2=(MLQ)**2
Q2=Srad*X*Y
if(Q2.lt.Q2min)goto 999
* u channel densities
scaleu=sqrt(Srad*X*(1.-Y))
CALL STRUCTM(X,scaleu,UPV
& ,DNV,USEA,DSEA,STR,CHM,BOT,TOP,GL)
if(UPV+USEA.gt.0)
& pvalenceu_u=UPV/(UPV+USEA)
if(DNV+DSEA.gt.0)
& pvalenceu_d=DNV/(DNV+DSEA)
if(echar.eq.1)then
* case e+, mu+, tau+
UPQu(1)=UPV+USEA
UPQBu(1)=USEA
UPQu(2)=CHM
UPQBu(2)=CHM
UPQu(3)=TOP
UPQBu(3)=TOP
DNQu(1)=DNV+DSEA
DNQBu(1)=DSEA
DNQu(2)=STR
DNQBu(2)=STR
DNQu(3)=BOT
DNQBu(3)=BOT
elseif(echar.eq.-1)then
* case e-, mu-, tau-
UPQu(1)=USEA
UPQBu(1)=UPV+USEA
UPQu(2)=CHM
UPQBu(2)=CHM
UPQu(3)=TOP
UPQBu(3)=TOP
DNQu(1)=DSEA
DNQBu(1)=DNV+DSEA
DNQu(2)=STR
DNQBu(2)=STR
DNQu(3)=BOT
DNQBu(3)=BOT
endif
* s channel densities
scales=sqrt(Srad*X)
CALL STRUCTM(X,scales,UPV
& ,DNV,USEA,DSEA,STR,CHM,BOT,TOP,GL)
if(UPV+USEA.gt.0)
& pvalences_u=UPV/(UPV+USEA)
if(DNV+DSEA.gt.0)
& pvalences_d=DNV/(DNV+DSEA)
if(echar.eq.1)then
* case e+, mu+, tau+
UPQs(1)=UPV+USEA
UPQBs(1)=USEA
UPQs(2)=CHM
UPQBs(2)=CHM
UPQs(3)=TOP
UPQBs(3)=TOP
DNQs(1)=DNV+DSEA
DNQBs(1)=DSEA
DNQs(2)=STR
DNQBs(2)=STR
DNQs(3)=BOT
DNQBs(3)=BOT
elseif(echar.eq.-1)then
* case e-, mu-, tau-
UPQs(1)=USEA
UPQBs(1)=UPV+USEA
UPQs(2)=CHM
UPQBs(2)=CHM
UPQs(3)=TOP
UPQBs(3)=TOP
DNQs(1)=DSEA
DNQBs(1)=DNV+DSEA
DNQs(2)=STR
DNQBs(2)=STR
DNQs(3)=BOT
DNQBs(3)=BOT
endif
*
aaa = Q2*(Q2+Mz2)/((Q2+Mz2)**2+Mz2*Gz2)
bbb = sqrt(2.0)*Gf*Mz2/(pi*alpha)
B_RR_U = -2./3. + aaa*bbb*C_R_P*C_R_U
B_RL_U = -2./3. + aaa*bbb*C_R_P*C_L_U
B_LR_U = -2./3. + aaa*bbb*C_L_P*C_R_U
B_LL_U = -2./3. + aaa*bbb*C_L_P*C_L_U
B_RR_D = 1./3. + aaa*bbb*C_R_P*C_R_D
B_RL_D = 1./3. + aaa*bbb*C_R_P*C_L_D
B_LR_D = 1./3. + aaa*bbb*C_L_P*C_R_D
B_LL_D = 1./3. + aaa*bbb*C_L_P*C_L_D
IF (SVindex(LQTYPE).EQ.1) THEN
CCCf2u=Q2*(1.-Y)**2*(UPV+USEA)
& /(4.0*pi*alpha)
DDDf2u=Q2*USEA/(4.0*pi*alpha)
EEEf2u=(Q2-X*Srad)**2*Y**2*(UPQu(q_j))
& /(64.0*(pi*alpha)**2)
FFFf2u=Q2**2*UPQBs(q_i)/(64.0*(pi*alpha)**2)
CCCf2d=Q2*(1.-Y)**2*(DNV+DSEA)
& /(4.0*pi*alpha)
DDDf2d=Q2*DSEA/(4.0*pi*alpha)
EEEf2d=(Q2-X*Srad)**2*Y**2*(DNQu(q_j))
& /(64.0*(pi*alpha)**2)
FFFf2d=Q2**2*DNQBs(q_i)/(64.0*(pi*alpha)**2)
ELSE IF (SVindex(LQTYPE).EQ.4) THEN
CCCf0u=Q2*(1.-Y)**2*USEA/(4.0*pi*alpha)
DDDf0u=Q2*(UPV+USEA)/(4.0*pi*alpha)
EEEf0u=(Q2-X*Srad)**2*Y**2*UPQBu(q_j)
& /(64.0*(pi*alpha)**2)
FFFf0u=Q2**2*(UPQs(q_i))/(64.0*(pi*alpha)**2)
CCCf0d=Q2*(1.-Y)**2*DSEA/(4.0*pi*alpha)
DDDf0d=Q2*(DNV+DSEA)/(4.0*pi*alpha)
EEEf0d=(Q2-X*Srad)**2*Y**2*DNQBu(q_j)
& /(64.0*(pi*alpha)**2)
FFFf0d=Q2**2*(DNQs(q_i))/(64.0*(pi*alpha)**2)
ELSE IF (SVindex(LQTYPE).EQ.2) THEN
CCCv2u=Q2*(1.-Y)**2*USEA/(2.0*pi*alpha)
DDDv2u=Q2*(UPV+USEA)/(2.0*pi*alpha)
EEEv2u=Q2**2*UPQBs(q_i)/(16.0*(pi*alpha)**2)
FFFv2u=(Q2-X*Srad)**2*Y**2*(UPQu(q_j))
& /(16.0*(pi*alpha)**2*(1.0-Y)**2)
CCCv2d=Q2*(1.-Y)**2*DSEA/(2.0*pi*alpha)
DDDv2d=Q2*(DNV+DSEA)/(2.0*pi*alpha)
EEEv2d=Q2**2*DNQBs(q_i)/(16.0*(pi*alpha)**2)
FFFv2d=(Q2-X*Srad)**2*Y**2*(DNQu(q_j))
& /(16.0*(pi*alpha)**2*(1.0-Y)**2)
ELSE IF (SVindex(LQTYPE).EQ.3) THEN
CCCv0u=Q2*(1.-Y)**2*(UPV+USEA)
& /(2.0*pi*alpha)
DDDv0u=Q2*USEA/(2.0*pi*alpha)
EEEv0u=Q2**2*(UPQs(q_i))/(16.0*(pi*alpha)**2)
FFFv0u=(Q2-X*Srad)**2*Y**2*UPQBu(q_j)
& /(16.0*(pi*alpha)**2*(1.0-Y)**2)
CCCv0d=Q2*(1.-Y)**2*(DNV+DSEA)
& /(2.0*pi*alpha)
DDDv0d=Q2*DSEA/(2.0*pi*alpha)
EEEv0d=Q2**2*(DNQs(q_i))/(16.0*(pi*alpha)**2)
FFFv0d=(Q2-X*Srad)**2*Y**2*DNQBu(q_j)
& /(16.0*(pi*alpha)**2*(1.0-Y)**2)
ENDIF
DSIGMADXDY(1)=(B_RL_U**2+B_LR_U**2+
& (B_RR_U**2+B_LL_U**2)*(1.-Y)**2)
& *(UPV+USEA+CHM+TOP)+
& (B_RL_D**2+B_LR_D**2+
& (B_RR_D**2+B_LL_D**2)*(1.-Y)**2)
& *(DNV+DSEA+STR+BOT)+
& (B_RR_U**2+B_LL_U**2+
& (B_RL_U**2+B_LR_U**2)*(1.-Y)**2)
& *(USEA+CHM+TOP) +
& (B_RR_D**2+B_LL_D**2+
& (B_RL_D**2+B_LR_D**2)*(1.-Y)**2)
& *(DSEA+STR+BOT)
IF (LRindex(LQTYPE).EQ.0) THEN
LambdaL2_1=G1
LambdaL2_2=G2
if(G2.ne.0)then
LambdaL2=LambdaL2_1*LambdaL2_2
else
LambdaL2=G1*G1
endif
LambdaR2_1=0.0
LambdaR2_2=0.0
LambdaR2=LambdaR2_1*LambdaR2_2
ELSE IF (LRindex(LQTYPE).EQ.1) THEN
LambdaR2_1=G1
LambdaR2_2=G2
if(G2.ne.0)then
LambdaR2=LambdaR2_1*LambdaR2_2
else
LambdaR2=G1*G1
endif
LambdaL2_1=0.0
LambdaL2_2=0.0
LambdaL2=LambdaL2_1*LambdaL2_2
ENDIF
IF (LQTYPE.EQ.1.or.LQTYPE.EQ.2) THEN
GAM=MLQ*(sqrt(2.0)*LambdaL2_1+LambdaR2_1)**2
if(l_o.gt.1)GAM=GAM+
& MLQ*(sqrt(2.0)*LambdaL2_2+LambdaR2_2)**2
AAA=(X*Srad-Ms2)**2+
& Ms2*GAM**2/((16.0*pi)**2)
BBB=LambdaR2*B_RR_U+LambdaL2*B_LL_U
DSIGMADXDY(2)=BBB*CCCf2u/(Q2-X*Srad-Ms2)+
& BBB*DDDf2u*(X*Srad-Ms2)/AAA
GGG=(LambdaR2+LambdaL2)**2
if(q_i.ne.3)then
DSIGMADXDY(3)=EEEf2u*GGG/(Q2-X*Srad-Ms2)**2
else
* Top quark in the final state
DSIGMADXDY(3)=0.d0
endif
if(q_j.ne.3)then
DSIGMADXDY(4)=FFFf2u*GGG/AAA
else
* Top quark in the final state
DSIGMADXDY(4)=0.d0
endif
* output quark
if(DSIGMADXDY(3)+DSIGMADXDY(4).eq.0)then
goto 999
endif
sfrac1=DSIGMADXDY(4)/(DSIGMADXDY(4)+DSIGMADXDY(3))
c call rm48(rand,1)
rand(1)=pyr(0)
if(rand(1).lt.sfrac1)then
* s channel: e+ ub -> l+ ub
genproc=1
genprtyp=3
if(q_i.eq.1)then
if(echar.lt.0)pvalence=pvalences_u
endif
if(q_j.eq.1)q_o=-2
if(q_j.eq.2)q_o=-4
if(q_j.eq.3)q_o=-6
if(q_i.eq.1)q_s=-2
if(q_i.eq.2)q_s=-4
if(q_i.eq.3)q_s=-6
else
* u channel: e+ u -> l+ u
genproc=2
genprtyp=5