Merge lp:~maddevelopers/mg5amcnlo/fix_configs into lp:~madteam/mg5amcnlo/trunk

Proposed by Johan Alwall
Status: Merged
Merged at revision: 60
Proposed branch: lp:~maddevelopers/mg5amcnlo/fix_configs
Merge into: lp:~madteam/mg5amcnlo/trunk
Diff against target: 2509 lines (+2374/-33)
3 files modified
madgraph/core/helas_objects.py (+29/-32)
tests/input_files/test_8fs.pkl (+2051/-0)
tests/unit_tests/iolibs/test_export_v4.py (+294/-1)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/fix_configs
Reviewer Review Type Date Requested Status
Olivier Mattelaer Approve
Review via email: mp+44588@code.launchpad.net

Description of the change

- Fixed problem in generation of configs.inc with 8 or more final state particles
- Added the corresponding tests.

To post a comment you must log in.
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Thanks Johan!!

I didn't understand everything but it seems ok.
I suppose this should be release as 0.6.0.1
If you agree then go ahead for the release. (Otherwise I'll do tomorow)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'madgraph/core/helas_objects.py'
2--- madgraph/core/helas_objects.py 2010-12-17 01:47:59 +0000
3+++ madgraph/core/helas_objects.py 2010-12-23 16:04:09 +0000
4@@ -890,7 +890,8 @@
5 """Returns two lists of vertices corresponding to the s- and
6 t-channels that can be traced from this wavefunction, ordered
7 from the outermost s-channel and in/down towards the highest
8- number initial state leg."""
9+ number initial state leg. mother_leg corresponds to self but with
10+ correct leg number = min(final state mothers)."""
11
12 schannels = base_objects.VertexList()
13 tchannels = base_objects.VertexList()
14@@ -916,15 +917,7 @@
15 # leg of a decay process. Add vertex and continue stepping
16 # down towards external initial state
17 legs = base_objects.LegList()
18-
19- if ninitial == 1 or init_mothers[0].get('number_external') == 2 \
20- or init_mothers[0].get('leg_state') == True:
21- # This is an s-channel or a leg on its way towards the
22- # final vertex
23- mothers = final_mothers + init_mothers
24- else:
25- # This is a t-channel leg going up towards leg number 1
26- mothers = init_mothers + final_mothers
27+ mothers = final_mothers + init_mothers
28
29 for mother in mothers:
30 legs.append(base_objects.Leg({
31@@ -934,19 +927,20 @@
32 'from_group': False
33 }))
34
35- if ninitial == 1 or init_mothers[0].get('number_external') == 2 \
36- or init_mothers[0].get('leg_state') == True:
37- # For decay processes or if this is an s-channel leg
38- # or we are going towards external leg 2, mother leg
39- # is one of the mothers
40+ if init_mothers[0].get('number_external') == 1 and \
41+ not init_mothers[0].get('leg_state') and \
42+ ninitial > 1:
43+ # If this is t-channel going towards external leg 1,
44+ # mother_leg is resulting wf
45+ legs.append(mother_leg)
46+ else:
47+ # For decay processes or if init_mother is an s-channel leg
48+ # or we are going towards external leg 2, mother_leg
49+ # is one of the mothers (placed next-to-last)
50 legs.insert(-1, mother_leg)
51- # Also need to switch direction of the resulting s-channel
52+ # Need to switch direction of the resulting s-channel
53 legs[-1].set('id', init_mothers[0].get_anti_pdg_code())
54- else:
55- # If the mother is going
56- # towards external leg 1, mother leg is resulting wf
57- legs.append(mother_leg)
58-
59+
60 # Renumber resulting leg according to minimum leg number
61 legs[-1].set('number', min([l.get('number') for l in legs[:-1]]))
62
63@@ -954,30 +948,32 @@
64 'id': self.get('interaction_id'),
65 'legs': legs})
66
67- # Add s- and t-channels from further down
68+ # Add s- and t-channels from init_mother
69 new_mother_leg = legs[-1]
70- if init_mothers[0].get('number_external') == 1:
71- # If we are going towards external leg 1, mother of
72- # next vertex is legs[0]
73- new_mother_leg = legs[0]
74+ if init_mothers[0].get('number_external') == 1 and \
75+ not init_mothers[0].get('leg_state') and \
76+ ninitial > 1:
77+ # Mother of next vertex is init_mothers[0]
78+ # (next-to-last in legs)
79+ new_mother_leg = legs[-2]
80
81 mother_s, tchannels = \
82 init_mothers[0].get_s_and_t_channels(ninitial,
83 new_mother_leg)
84- schannels.extend(mother_s)
85-
86 if ninitial == 1 or init_mothers[0].get('leg_state') == True:
87- # This leg is s-channel
88+ # This vertex is s-channel
89 schannels.append(vertex)
90 elif init_mothers[0].get('number_external') == 1:
91- # If we are going towards external leg 1, add to
92- # t-channels, at end
93+ # If init_mothers is going towards external leg 1, add
94+ # to t-channels, at end
95 tchannels.append(vertex)
96 else:
97- # If we are going towards external leg 2, add to
98+ # If init_mothers is going towards external leg 2, add to
99 # t-channels, at start
100 tchannels.insert(0, vertex)
101
102+ schannels.extend(mother_s)
103+
104 elif len(init_mothers) == 2:
105 # This is a t-channel junction. Start with the leg going
106 # towards external particle 1, and then do external
107@@ -1019,6 +1015,7 @@
108 schannels.extend(mother_s)
109 tchannels.extend(mother_t)
110
111+
112 return schannels, tchannels
113
114 def get_conjugate_index(self):
115
116=== added file 'tests/input_files/test_8fs.pkl'
117--- tests/input_files/test_8fs.pkl 1970-01-01 00:00:00 +0000
118+++ tests/input_files/test_8fs.pkl 2010-12-23 16:04:09 +0000
119@@ -0,0 +1,2051 @@
120+(lp0
121+ccopy_reg
122+_reconstructor
123+p1
124+(cmadgraph.core.helas_objects
125+HelasDiagram
126+p2
127+c__builtin__
128+dict
129+p3
130+(dp4
131+S'wavefunctions'
132+p5
133+g1
134+(cmadgraph.core.helas_objects
135+HelasWavefunctionList
136+p6
137+c__builtin__
138+list
139+p7
140+(lp8
141+tp9
142+Rp10
143+sS'amplitudes'
144+p11
145+g1
146+(cmadgraph.core.helas_objects
147+HelasAmplitudeList
148+p12
149+g7
150+(lp13
151+g1
152+(cmadgraph.core.helas_objects
153+HelasAmplitude
154+p14
155+g3
156+(dp15
157+S'inter_color'
158+p16
159+g1
160+(cmadgraph.core.color_algebra
161+ColorString
162+p17
163+g7
164+(lp18
165+cmadgraph.core.color_algebra
166+T
167+p19
168+(I1
169+I0
170+tp20
171+Rp21
172+atp22
173+Rp23
174+(dp24
175+S'coeff'
176+p25
177+cfractions
178+Fraction
179+p26
180+(S'1'
181+p27
182+tp28
183+Rp29
184+sS'is_imaginary'
185+p30
186+I00
187+sS'Nc_power'
188+p31
189+I0
190+sbsS'coupling'
191+p32
192+S'GC_1'
193+p33
194+sS'mothers'
195+p34
196+g1
197+(g6
198+g7
199+(lp35
200+g1
201+(cmadgraph.core.helas_objects
202+HelasWavefunction
203+p36
204+g3
205+(dp37
206+S'number_external'
207+p38
208+I6
209+sS'fermionflow'
210+p39
211+I1
212+sS'coupl_key'
213+p40
214+(I0
215+I0
216+tp41
217+sS'number'
218+p42
219+I59
220+sS'onshell'
221+p43
222+I00
223+sS'antiparticle'
224+p44
225+g1
226+(cmadgraph.core.base_objects
227+Particle
228+p45
229+g3
230+(dp46
231+S'texname'
232+p47
233+S'b'
234+p48
235+sS'is_part'
236+p49
237+I01
238+sS'name'
239+p50
240+S'b'
241+p51
242+sS'self_antipart'
243+p52
244+I00
245+sS'color'
246+p53
247+I3
248+sS'width'
249+p54
250+S'ZERO'
251+p55
252+sS'charge'
253+p56
254+F-0.33333333333333331
255+sS'mass'
256+p57
257+S'MB'
258+p58
259+sS'antiname'
260+p59
261+S'b~'
262+p60
263+sS'line'
264+p61
265+S'straight'
266+p62
267+sS'propagating'
268+p63
269+I01
270+sS'spin'
271+p64
272+I2
273+sS'antitexname'
274+p65
275+g48
276+sS'pdg_code'
277+p66
278+I5
279+stp67
280+Rp68
281+sS'lorentz'
282+p69
283+S'FFV1'
284+p70
285+sS'leg_state'
286+p71
287+I01
288+sS'orders'
289+p72
290+(dp73
291+S'QCD'
292+p74
293+I1
294+ssg16
295+g1
296+(g17
297+g7
298+(lp75
299+g19
300+(I2
301+I1
302+I0
303+tp76
304+Rp77
305+atp78
306+Rp79
307+(dp80
308+g25
309+g26
310+(g27
311+tp81
312+Rp82
313+sg30
314+I00
315+sg31
316+I0
317+sbsg32
318+S'GC_5'
319+p83
320+sS'particle'
321+p84
322+g1
323+(g45
324+g3
325+(dp85
326+g47
327+g48
328+sg63
329+I01
330+sg50
331+g51
332+sg52
333+I00
334+sg53
335+I3
336+sg54
337+g55
338+sg56
339+F-0.33333333333333331
340+sg57
341+g58
342+sg59
343+g60
344+sg61
345+g62
346+sg49
347+I00
348+sg64
349+I2
350+sg65
351+g48
352+sg66
353+I5
354+stp86
355+Rp87
356+sg34
357+g1
358+(g6
359+g7
360+(lp88
361+g1
362+(g36
363+g3
364+(dp89
365+g38
366+I6
367+sg39
368+I1
369+sg40
370+g41
371+sg42
372+I45
373+sg43
374+I00
375+sg44
376+g68
377+sg69
378+g70
379+sg71
380+I01
381+sg72
382+g73
383+sg16
384+g79
385+sg32
386+g83
387+sg84
388+g87
389+sg34
390+g1
391+(g6
392+g7
393+(lp90
394+g1
395+(g36
396+g3
397+(dp91
398+g38
399+I6
400+sg39
401+I1
402+sg40
403+(I0
404+I0
405+tp92
406+sg42
407+I6
408+sg43
409+I00
410+sg44
411+g68
412+sg69
413+S''
414+p93
415+sg71
416+I01
417+sg72
418+(dp94
419+sg16
420+Nsg32
421+S'none'
422+p95
423+sg84
424+g87
425+sg34
426+g1
427+(g6
428+g7
429+(lp96
430+tp97
431+Rp98
432+sS'decay'
433+p99
434+I00
435+sS'state'
436+p100
437+S'incoming'
438+p101
439+sS'is_part'
440+p102
441+I00
442+sS'pdg_codes'
443+p103
444+(lp104
445+sS'interaction_id'
446+p105
447+I0
448+stp106
449+Rp107
450+ag1
451+(g36
452+g3
453+(dp108
454+g38
455+I8
456+sg39
457+I1
458+sg40
459+g92
460+sg42
461+I8
462+sg43
463+I00
464+sg44
465+g1
466+(g45
467+g3
468+(dp109
469+g47
470+S'G'
471+p110
472+sg49
473+I01
474+sg50
475+S'g'
476+p111
477+sg52
478+I01
479+sg53
480+I8
481+sg54
482+g55
483+sg56
484+F0.0
485+sg57
486+g55
487+sg59
488+S'g'
489+p112
490+sg61
491+S'curly'
492+p113
493+sg63
494+I01
495+sg64
496+I3
497+sg65
498+g110
499+sg66
500+I21
501+stp114
502+Rp115
503+sg69
504+g93
505+sg71
506+I01
507+sg72
508+(dp116
509+sg16
510+Nsg32
511+g95
512+sg84
513+g115
514+sg34
515+g1
516+(g6
517+g7
518+(lp117
519+tp118
520+Rp119
521+sg99
522+I00
523+sg100
524+S'final'
525+p120
526+sg102
527+I01
528+sg103
529+(lp121
530+sg105
531+I0
532+stp122
533+Rp123
534+atp124
535+Rp125
536+sg99
537+I00
538+sg100
539+g101
540+sg102
541+I00
542+sg103
543+(lp126
544+I-5
545+aI5
546+aI21
547+asg105
548+I25
549+stp127
550+Rp128
551+ag1
552+(g36
553+g3
554+(dp129
555+g38
556+I7
557+sg39
558+I1
559+sg40
560+g92
561+sg42
562+I7
563+sg43
564+I00
565+sg44
566+g115
567+sg69
568+g93
569+sg71
570+I01
571+sg72
572+(dp130
573+sg16
574+Nsg32
575+g95
576+sg84
577+g115
578+sg34
579+g1
580+(g6
581+g7
582+(lp131
583+tp132
584+Rp133
585+sg99
586+I00
587+sg100
588+g120
589+sg102
590+I01
591+sg103
592+(lp134
593+sg105
594+I0
595+stp135
596+Rp136
597+atp137
598+Rp138
599+sg99
600+I00
601+sg100
602+g101
603+sg102
604+I00
605+sg103
606+(lp139
607+I-5
608+aI5
609+aI21
610+asg105
611+I25
612+stp140
613+Rp141
614+ag1
615+(g36
616+g3
617+(dp142
618+g38
619+I5
620+sg39
621+I1
622+sg40
623+g92
624+sg42
625+I5
626+sg43
627+I00
628+sg44
629+g87
630+sg69
631+g93
632+sg71
633+I01
634+sg72
635+(dp143
636+sg16
637+Nsg32
638+g95
639+sg84
640+g68
641+sg34
642+g1
643+(g6
644+g7
645+(lp144
646+tp145
647+Rp146
648+sg99
649+I00
650+sg100
651+S'outgoing'
652+p147
653+sg102
654+I01
655+sg103
656+(lp148
657+sg105
658+I0
659+stp149
660+Rp150
661+ag1
662+(g36
663+g3
664+(dp151
665+g38
666+I1
667+sg39
668+I1
669+sg40
670+(I0
671+I0
672+tp152
673+sg42
674+I129
675+sg43
676+I00
677+sg44
678+g1
679+(g45
680+g3
681+(dp153
682+g47
683+S'A'
684+p154
685+sg49
686+I01
687+sg50
688+S'a'
689+p155
690+sg52
691+I01
692+sg53
693+I1
694+sg54
695+g55
696+sg56
697+F0.0
698+sg57
699+g55
700+sg59
701+S'a'
702+p156
703+sg61
704+S'wavy'
705+p157
706+sg63
707+I01
708+sg64
709+I3
710+sg65
711+g154
712+sg66
713+I22
714+stp158
715+Rp159
716+sg69
717+g70
718+sg71
719+I01
720+sg72
721+(dp160
722+S'QED'
723+p161
724+I1
725+ssg16
726+g1
727+(g17
728+g7
729+(lp162
730+g19
731+(I1
732+I0
733+tp163
734+Rp164
735+atp165
736+Rp166
737+(dp167
738+g25
739+g26
740+(g27
741+tp168
742+Rp169
743+sg30
744+I00
745+sg31
746+I0
747+sbsg32
748+g33
749+sg84
750+g159
751+sg34
752+g1
753+(g6
754+g7
755+(lp170
756+g1
757+(g36
758+g3
759+(dp171
760+g38
761+I1
762+sg39
763+I1
764+sg40
765+(I0
766+I0
767+tp172
768+sg42
769+I71
770+sg43
771+I00
772+sg44
773+g1
774+(g45
775+g3
776+(dp173
777+g47
778+S'd'
779+p174
780+sg49
781+I01
782+sg50
783+S'd'
784+p175
785+sg52
786+I00
787+sg53
788+I3
789+sg54
790+g55
791+sg56
792+F-0.33333333333333331
793+sg57
794+g55
795+sg59
796+S'd~'
797+p176
798+sg61
799+g62
800+sg63
801+I01
802+sg64
803+I2
804+sg65
805+g174
806+sg66
807+I1
808+stp177
809+Rp178
810+sg69
811+S'FFV2'
812+p179
813+sg71
814+I01
815+sg72
816+(dp180
817+g161
818+I1
819+ssg16
820+g1
821+(g17
822+g7
823+(lp181
824+g19
825+(I1
826+I0
827+tp182
828+Rp183
829+atp184
830+Rp185
831+(dp186
832+g25
833+g26
834+(g27
835+tp187
836+Rp188
837+sg30
838+I00
839+sg31
840+I0
841+sbsg32
842+S'GC_11'
843+p189
844+sg84
845+g1
846+(g45
847+g3
848+(dp190
849+g47
850+g174
851+sg63
852+I01
853+sg50
854+g175
855+sg52
856+I00
857+sg53
858+I3
859+sg54
860+g55
861+sg56
862+F-0.33333333333333331
863+sg57
864+g55
865+sg59
866+g176
867+sg61
868+g62
869+sg49
870+I00
871+sg64
872+I2
873+sg65
874+g174
875+sg66
876+I1
877+stp191
878+Rp192
879+sg34
880+g1
881+(g6
882+g7
883+(lp193
884+g1
885+(g36
886+g3
887+(dp194
888+g38
889+I1
890+sg39
891+I1
892+sg40
893+(I0
894+I0
895+tp195
896+sg42
897+I9
898+sg43
899+I00
900+sg44
901+g1
902+(g45
903+g3
904+(dp196
905+g47
906+S'u'
907+p197
908+sg49
909+I01
910+sg50
911+S'u'
912+p198
913+sg52
914+I00
915+sg53
916+I3
917+sg54
918+g55
919+sg56
920+F0.66666666666666663
921+sg57
922+g55
923+sg59
924+S'u~'
925+p199
926+sg61
927+g62
928+sg63
929+I01
930+sg64
931+I2
932+sg65
933+g197
934+sg66
935+I2
936+stp200
937+Rp201
938+sg69
939+g70
940+sg71
941+I01
942+sg72
943+g73
944+sg16
945+g1
946+(g17
947+g7
948+(lp202
949+g19
950+(I2
951+I1
952+I0
953+tp203
954+Rp204
955+atp205
956+Rp206
957+(dp207
958+g25
959+g26
960+(g27
961+tp208
962+Rp209
963+sg30
964+I00
965+sg31
966+I0
967+sbsg32
968+g83
969+sg84
970+g1
971+(g45
972+g3
973+(dp210
974+g47
975+g197
976+sg63
977+I01
978+sg50
979+g198
980+sg52
981+I00
982+sg53
983+I3
984+sg54
985+g55
986+sg56
987+F0.66666666666666663
988+sg57
989+g55
990+sg59
991+g199
992+sg61
993+g62
994+sg49
995+I00
996+sg64
997+I2
998+sg65
999+g197
1000+sg66
1001+I2
1002+stp211
1003+Rp212
1004+sg34
1005+g1
1006+(g6
1007+g7
1008+(lp213
1009+g1
1010+(g36
1011+g3
1012+(dp214
1013+g38
1014+I1
1015+sg39
1016+I1
1017+sg40
1018+g92
1019+sg42
1020+I1
1021+sg43
1022+I00
1023+sg44
1024+g201
1025+sg69
1026+g93
1027+sg71
1028+I00
1029+sg72
1030+(dp215
1031+sg16
1032+Nsg32
1033+g95
1034+sg84
1035+g212
1036+sg34
1037+g1
1038+(g6
1039+g7
1040+(lp216
1041+tp217
1042+Rp218
1043+sg99
1044+I00
1045+sg100
1046+g101
1047+sg102
1048+I01
1049+sg103
1050+(lp219
1051+sg105
1052+I0
1053+stp220
1054+Rp221
1055+ag1
1056+(g36
1057+g3
1058+(dp222
1059+g38
1060+I2
1061+sg39
1062+I1
1063+sg40
1064+g92
1065+sg42
1066+I2
1067+sg43
1068+I00
1069+sg44
1070+g115
1071+sg69
1072+g93
1073+sg71
1074+I00
1075+sg72
1076+(dp223
1077+sg16
1078+Nsg32
1079+g95
1080+sg84
1081+g115
1082+sg34
1083+g1
1084+(g6
1085+g7
1086+(lp224
1087+tp225
1088+Rp226
1089+sg99
1090+I00
1091+sg100
1092+S'initial'
1093+p227
1094+sg102
1095+I01
1096+sg103
1097+(lp228
1098+sg105
1099+I0
1100+stp229
1101+Rp230
1102+atp231
1103+Rp232
1104+sg99
1105+I00
1106+sg100
1107+g101
1108+sg102
1109+I00
1110+sg103
1111+(lp233
1112+I-2
1113+aI2
1114+aI21
1115+asg105
1116+I36
1117+stp234
1118+Rp235
1119+ag1
1120+(g36
1121+g3
1122+(dp236
1123+g38
1124+I4
1125+sg39
1126+I1
1127+sg40
1128+g92
1129+sg42
1130+I4
1131+sg43
1132+I00
1133+sg44
1134+g1
1135+(g45
1136+g3
1137+(dp237
1138+g47
1139+S'W+'
1140+p238
1141+sg63
1142+I01
1143+sg50
1144+S'w+'
1145+p239
1146+sg52
1147+I00
1148+sg53
1149+I1
1150+sg54
1151+S'WW'
1152+p240
1153+sg56
1154+F1.0
1155+sg57
1156+S'MW'
1157+p241
1158+sg59
1159+S'w-'
1160+p242
1161+sg61
1162+g157
1163+sg49
1164+I00
1165+sg64
1166+I3
1167+sg65
1168+g238
1169+sg66
1170+I24
1171+stp243
1172+Rp244
1173+sg69
1174+g93
1175+sg71
1176+I01
1177+sg72
1178+(dp245
1179+sg16
1180+Nsg32
1181+g95
1182+sg84
1183+g1
1184+(g45
1185+g3
1186+(dp246
1187+g47
1188+g238
1189+sg49
1190+I01
1191+sg50
1192+g239
1193+sg52
1194+I00
1195+sg53
1196+I1
1197+sg54
1198+g240
1199+sg56
1200+F1.0
1201+sg57
1202+g241
1203+sg59
1204+g242
1205+sg61
1206+g157
1207+sg63
1208+I01
1209+sg64
1210+I3
1211+sg65
1212+g238
1213+sg66
1214+I24
1215+stp247
1216+Rp248
1217+sg34
1218+g1
1219+(g6
1220+g7
1221+(lp249
1222+tp250
1223+Rp251
1224+sg99
1225+I00
1226+sg100
1227+g120
1228+sg102
1229+I01
1230+sg103
1231+(lp252
1232+sg105
1233+I0
1234+stp253
1235+Rp254
1236+atp255
1237+Rp256
1238+sg99
1239+I00
1240+sg100
1241+g101
1242+sg102
1243+I00
1244+sg103
1245+(lp257
1246+I-2
1247+aI1
1248+aI24
1249+asg105
1250+I33
1251+stp258
1252+Rp259
1253+ag1
1254+(g36
1255+g3
1256+(dp260
1257+g38
1258+I3
1259+sg39
1260+I1
1261+sg40
1262+g92
1263+sg42
1264+I3
1265+sg43
1266+I00
1267+sg44
1268+g192
1269+sg69
1270+g93
1271+sg71
1272+I01
1273+sg72
1274+(dp261
1275+sg16
1276+Nsg32
1277+g95
1278+sg84
1279+g178
1280+sg34
1281+g1
1282+(g6
1283+g7
1284+(lp262
1285+tp263
1286+Rp264
1287+sg99
1288+I00
1289+sg100
1290+g147
1291+sg102
1292+I01
1293+sg103
1294+(lp265
1295+sg105
1296+I0
1297+stp266
1298+Rp267
1299+atp268
1300+Rp269
1301+sg99
1302+I00
1303+sg100
1304+S'intermediate'
1305+p270
1306+sg102
1307+I01
1308+sg103
1309+(lp271
1310+I-1
1311+aI1
1312+aI22
1313+asg105
1314+I14
1315+stp272
1316+Rp273
1317+atp274
1318+Rp275
1319+sg40
1320+(I0
1321+I0
1322+tp276
1323+sg42
1324+I547
1325+sg103
1326+(lp277
1327+I-5
1328+aI5
1329+aI22
1330+asg69
1331+g70
1332+sg105
1333+I16
1334+sS'color_indices'
1335+p278
1336+(lp279
1337+I0
1338+aI0
1339+aI0
1340+aI0
1341+aI0
1342+aI0
1343+asg72
1344+g160
1345+sS'fermionfactor'
1346+p280
1347+I-1
1348+stp281
1349+Rp282
1350+atp283
1351+Rp284
1352+sg42
1353+I324
1354+stp285
1355+Rp286
1356+ag1
1357+(g2
1358+g3
1359+(dp287
1360+g5
1361+g1
1362+(g6
1363+g7
1364+(lp288
1365+tp289
1366+Rp290
1367+sg11
1368+g1
1369+(g12
1370+g7
1371+(lp291
1372+g1
1373+(g14
1374+g3
1375+(dp292
1376+g16
1377+g79
1378+sg32
1379+g83
1380+sg34
1381+g1
1382+(g6
1383+g7
1384+(lp293
1385+g107
1386+ag1
1387+(g36
1388+g3
1389+(dp294
1390+g38
1391+I2
1392+sg39
1393+I1
1394+sg40
1395+g41
1396+sg42
1397+I179
1398+sg43
1399+I00
1400+sg44
1401+g87
1402+sg69
1403+g70
1404+sg71
1405+I00
1406+sg72
1407+g73
1408+sg16
1409+g79
1410+sg32
1411+g83
1412+sg84
1413+g68
1414+sg34
1415+g1
1416+(g6
1417+g7
1418+(lp295
1419+g150
1420+ag1
1421+(g36
1422+g3
1423+(dp296
1424+g38
1425+I2
1426+sg39
1427+I1
1428+sg40
1429+(I0
1430+I0
1431+tp297
1432+sg42
1433+I178
1434+sg43
1435+I00
1436+sg44
1437+g115
1438+sg69
1439+S'VVV1'
1440+p298
1441+sg71
1442+I00
1443+sg72
1444+(dp299
1445+g74
1446+I1
1447+ssg16
1448+g1
1449+(g17
1450+g7
1451+(lp300
1452+cmadgraph.core.color_algebra
1453+f
1454+p301
1455+(I0
1456+I1
1457+I2
1458+tp302
1459+Rp303
1460+atp304
1461+Rp305
1462+(dp306
1463+g25
1464+g26
1465+(g27
1466+tp307
1467+Rp308
1468+sg30
1469+I00
1470+sg31
1471+I0
1472+sbsg32
1473+S'GC_4'
1474+p309
1475+sg84
1476+g115
1477+sg34
1478+g1
1479+(g6
1480+g7
1481+(lp310
1482+g230
1483+ag123
1484+atp311
1485+Rp312
1486+sg99
1487+I00
1488+sg100
1489+g270
1490+sg102
1491+I01
1492+sg103
1493+(lp313
1494+I21
1495+aI21
1496+aI21
1497+asg105
1498+I2
1499+stp314
1500+Rp315
1501+atp316
1502+Rp317
1503+sg99
1504+I00
1505+sg100
1506+g147
1507+sg102
1508+I01
1509+sg103
1510+(lp318
1511+I-5
1512+aI5
1513+aI21
1514+asg105
1515+I25
1516+stp319
1517+Rp320
1518+ag1
1519+(g36
1520+g3
1521+(dp321
1522+g38
1523+I1
1524+sg39
1525+I1
1526+sg40
1527+(I0
1528+I0
1529+tp322
1530+sg42
1531+I239
1532+sg43
1533+I00
1534+sg44
1535+g115
1536+sg69
1537+g70
1538+sg71
1539+I00
1540+sg72
1541+g73
1542+sg16
1543+g1
1544+(g17
1545+g7
1546+(lp323
1547+g19
1548+(I2
1549+I1
1550+I0
1551+tp324
1552+Rp325
1553+atp326
1554+Rp327
1555+(dp328
1556+g25
1557+g26
1558+(g27
1559+tp329
1560+Rp330
1561+sg30
1562+I00
1563+sg31
1564+I0
1565+sbsg32
1566+g83
1567+sg84
1568+g115
1569+sg34
1570+g1
1571+(g6
1572+g7
1573+(lp331
1574+g1
1575+(g36
1576+g3
1577+(dp332
1578+g38
1579+I1
1580+sg39
1581+I1
1582+sg40
1583+g322
1584+sg42
1585+I206
1586+sg43
1587+I00
1588+sg44
1589+g178
1590+sg69
1591+g70
1592+sg71
1593+I00
1594+sg72
1595+g73
1596+sg16
1597+g327
1598+sg32
1599+g83
1600+sg84
1601+g192
1602+sg34
1603+g1
1604+(g6
1605+g7
1606+(lp333
1607+g1
1608+(g36
1609+g3
1610+(dp334
1611+g38
1612+I1
1613+sg39
1614+I1
1615+sg40
1616+g172
1617+sg42
1618+I201
1619+sg43
1620+I00
1621+sg44
1622+g178
1623+sg69
1624+g179
1625+sg71
1626+I00
1627+sg72
1628+g180
1629+sg16
1630+g185
1631+sg32
1632+g189
1633+sg84
1634+g192
1635+sg34
1636+g1
1637+(g6
1638+g7
1639+(lp335
1640+g221
1641+ag254
1642+atp336
1643+Rp337
1644+sg99
1645+I00
1646+sg100
1647+g101
1648+sg102
1649+I00
1650+sg103
1651+(lp338
1652+I-2
1653+aI1
1654+aI24
1655+asg105
1656+I33
1657+stp339
1658+Rp340
1659+ag136
1660+atp341
1661+Rp342
1662+sg99
1663+I00
1664+sg100
1665+g101
1666+sg102
1667+I00
1668+sg103
1669+(lp343
1670+I-1
1671+aI1
1672+aI21
1673+asg105
1674+I23
1675+stp344
1676+Rp345
1677+ag267
1678+atp346
1679+Rp347
1680+sg99
1681+I00
1682+sg100
1683+g270
1684+sg102
1685+I01
1686+sg103
1687+(lp348
1688+I-1
1689+aI1
1690+aI21
1691+asg105
1692+I23
1693+stp349
1694+Rp350
1695+atp351
1696+Rp352
1697+sg40
1698+g41
1699+sg42
1700+I1573
1701+sg103
1702+(lp353
1703+I-5
1704+aI5
1705+aI21
1706+asg69
1707+g70
1708+sg105
1709+I25
1710+sg278
1711+(lp354
1712+I0
1713+aI0
1714+aI0
1715+aI0
1716+aI0
1717+aI0
1718+asg72
1719+g73
1720+sg280
1721+I-1
1722+stp355
1723+Rp356
1724+atp357
1725+Rp358
1726+sg42
1727+I955
1728+stp359
1729+Rp360
1730+ag1
1731+(g2
1732+g3
1733+(dp361
1734+g5
1735+g1
1736+(g6
1737+g7
1738+(lp362
1739+tp363
1740+Rp364
1741+sg11
1742+g1
1743+(g12
1744+g7
1745+(lp365
1746+g1
1747+(g14
1748+g3
1749+(dp366
1750+g16
1751+g305
1752+sg32
1753+g309
1754+sg34
1755+g1
1756+(g6
1757+g7
1758+(lp367
1759+g1
1760+(g36
1761+g3
1762+(dp368
1763+g38
1764+I5
1765+sg39
1766+I1
1767+sg40
1768+g297
1769+sg42
1770+I21
1771+sg43
1772+I00
1773+sg44
1774+g115
1775+sg69
1776+g298
1777+sg71
1778+I01
1779+sg72
1780+g299
1781+sg16
1782+g305
1783+sg32
1784+g309
1785+sg84
1786+g115
1787+sg34
1788+g1
1789+(g6
1790+g7
1791+(lp369
1792+g1
1793+(g36
1794+g3
1795+(dp370
1796+g38
1797+I5
1798+sg39
1799+I1
1800+sg40
1801+g41
1802+sg42
1803+I18
1804+sg43
1805+I00
1806+sg44
1807+g115
1808+sg69
1809+g70
1810+sg71
1811+I01
1812+sg72
1813+g73
1814+sg16
1815+g79
1816+sg32
1817+g83
1818+sg84
1819+g115
1820+sg34
1821+g1
1822+(g6
1823+g7
1824+(lp371
1825+g107
1826+ag150
1827+atp372
1828+Rp373
1829+sg99
1830+I00
1831+sg100
1832+g270
1833+sg102
1834+I01
1835+sg103
1836+(lp374
1837+I-5
1838+aI5
1839+aI21
1840+asg105
1841+I25
1842+stp375
1843+Rp376
1844+ag123
1845+atp377
1846+Rp378
1847+sg99
1848+I00
1849+sg100
1850+g270
1851+sg102
1852+I01
1853+sg103
1854+(lp379
1855+I21
1856+aI21
1857+aI21
1858+asg105
1859+I2
1860+stp380
1861+Rp381
1862+ag136
1863+ag1
1864+(g36
1865+g3
1866+(dp382
1867+g38
1868+I1
1869+sg39
1870+I1
1871+sg40
1872+g322
1873+sg42
1874+I298
1875+sg43
1876+I00
1877+sg44
1878+g115
1879+sg69
1880+g70
1881+sg71
1882+I01
1883+sg72
1884+g73
1885+sg16
1886+g327
1887+sg32
1888+g83
1889+sg84
1890+g115
1891+sg34
1892+g1
1893+(g6
1894+g7
1895+(lp383
1896+g1
1897+(g36
1898+g3
1899+(dp384
1900+g38
1901+I1
1902+sg39
1903+I1
1904+sg40
1905+g322
1906+sg42
1907+I290
1908+sg43
1909+I00
1910+sg44
1911+g178
1912+sg69
1913+g70
1914+sg71
1915+I01
1916+sg72
1917+g73
1918+sg16
1919+g327
1920+sg32
1921+g83
1922+sg84
1923+g192
1924+sg34
1925+g1
1926+(g6
1927+g7
1928+(lp385
1929+g340
1930+ag230
1931+atp386
1932+Rp387
1933+sg99
1934+I00
1935+sg100
1936+g101
1937+sg102
1938+I00
1939+sg103
1940+(lp388
1941+I-1
1942+aI1
1943+aI21
1944+asg105
1945+I23
1946+stp389
1947+Rp390
1948+ag267
1949+atp391
1950+Rp392
1951+sg99
1952+I00
1953+sg100
1954+g270
1955+sg102
1956+I01
1957+sg103
1958+(lp393
1959+I-1
1960+aI1
1961+aI21
1962+asg105
1963+I23
1964+stp394
1965+Rp395
1966+atp396
1967+Rp397
1968+sg40
1969+g297
1970+sg42
1971+I1880
1972+sg103
1973+(lp398
1974+I21
1975+aI21
1976+aI21
1977+asg69
1978+g298
1979+sg105
1980+I2
1981+sg278
1982+(lp399
1983+I0
1984+aI0
1985+aI0
1986+aI0
1987+aI0
1988+aI0
1989+asg72
1990+g299
1991+sg280
1992+I-1
1993+stp400
1994+Rp401
1995+atp402
1996+Rp403
1997+sg42
1998+I1124
1999+stp404
2000+Rp405
2001+ag1
2002+(g2
2003+g3
2004+(dp406
2005+g5
2006+g1
2007+(g6
2008+g7
2009+(lp407
2010+tp408
2011+Rp409
2012+sg11
2013+g1
2014+(g12
2015+g7
2016+(lp410
2017+g1
2018+(g14
2019+g3
2020+(dp411
2021+g16
2022+g327
2023+sg32
2024+g83
2025+sg34
2026+g1
2027+(g6
2028+g7
2029+(lp412
2030+g1
2031+(g36
2032+g3
2033+(dp413
2034+g38
2035+I1
2036+sg39
2037+I1
2038+sg40
2039+g322
2040+sg42
2041+I238
2042+sg43
2043+I00
2044+sg44
2045+g178
2046+sg69
2047+g70
2048+sg71
2049+I00
2050+sg72
2051+g73
2052+sg16
2053+g327
2054+sg32
2055+g83
2056+sg84
2057+g192
2058+sg34
2059+g1
2060+(g6
2061+g7
2062+(lp414
2063+g345
2064+ag123
2065+atp415
2066+Rp416
2067+sg99
2068+I00
2069+sg100
2070+g101
2071+sg102
2072+I00
2073+sg103
2074+(lp417
2075+I-1
2076+aI1
2077+aI21
2078+asg105
2079+I23
2080+stp418
2081+Rp419
2082+ag267
2083+ag1
2084+(g36
2085+g3
2086+(dp420
2087+g38
2088+I2
2089+sg39
2090+I1
2091+sg40
2092+g297
2093+sg42
2094+I292
2095+sg43
2096+I00
2097+sg44
2098+g115
2099+sg69
2100+g298
2101+sg71
2102+I00
2103+sg72
2104+g299
2105+sg16
2106+g305
2107+sg32
2108+g309
2109+sg84
2110+g115
2111+sg34
2112+g1
2113+(g6
2114+g7
2115+(lp421
2116+g230
2117+ag376
2118+atp422
2119+Rp423
2120+sg99
2121+I00
2122+sg100
2123+g270
2124+sg102
2125+I01
2126+sg103
2127+(lp424
2128+I21
2129+aI21
2130+aI21
2131+asg105
2132+I2
2133+stp425
2134+Rp426
2135+atp427
2136+Rp428
2137+sg40
2138+g322
2139+sg42
2140+I1910
2141+sg103
2142+(lp429
2143+I-1
2144+aI1
2145+aI21
2146+asg69
2147+g70
2148+sg105
2149+I23
2150+sg278
2151+(lp430
2152+I0
2153+aI0
2154+aI0
2155+aI0
2156+aI0
2157+aI0
2158+asg72
2159+g73
2160+sg280
2161+I-1
2162+stp431
2163+Rp432
2164+atp433
2165+Rp434
2166+sg42
2167+I1140
2168+stp435
2169+Rp436
2170+a.
2171\ No newline at end of file
2172
2173=== modified file 'tests/unit_tests/iolibs/test_export_v4.py'
2174--- tests/unit_tests/iolibs/test_export_v4.py 2010-12-17 01:47:59 +0000
2175+++ tests/unit_tests/iolibs/test_export_v4.py 2010-12-23 16:04:09 +0000
2176@@ -19,6 +19,10 @@
2177 import copy
2178 import fractions
2179 import os
2180+import sys
2181+
2182+root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0]
2183+sys.path.append(os.path.join(root_path, os.path.pardir, os.path.pardir))
2184
2185 import tests.unit_tests as unittest
2186
2187@@ -26,6 +30,7 @@
2188 import madgraph.iolibs.export_v4 as export_v4
2189 import madgraph.iolibs.file_writers as writers
2190 import madgraph.iolibs.helas_call_writers as helas_call_writers
2191+import madgraph.iolibs.save_load_object as save_load_object
2192 import madgraph.core.base_objects as base_objects
2193 import madgraph.core.helas_objects as helas_objects
2194 import madgraph.core.diagram_generation as diagram_generation
2195@@ -36,6 +41,9 @@
2196 import tests.unit_tests.iolibs.test_helas_call_writers as \
2197 test_helas_call_writers
2198
2199+_file_path = os.path.dirname(os.path.realpath(__file__))
2200+_input_file_path = os.path.join(_file_path, os.path.pardir, os.path.pardir,
2201+ 'input_files')
2202 #===============================================================================
2203 # IOImportV4Test
2204 #===============================================================================
2205@@ -4466,7 +4474,7 @@
2206 self.assertEqual(result[i], goal_string[i])
2207
2208 def test_configs_ug_ttxz(self):
2209- """Test config.inc which previously failed.
2210+ """Test configs.inc which previously failed.
2211 """
2212
2213 mypartlist = base_objects.ParticleList()
2214@@ -4800,6 +4808,247 @@
2215 POW(-3,10) = 1
2216 """)
2217
2218+ def test_configs_long_decay(self):
2219+ """Test configs.inc which previously failed.
2220+ """
2221+
2222+ mypartlist = base_objects.ParticleList()
2223+ myinterlist = base_objects.InteractionList()
2224+
2225+ # b and t quarks
2226+ mypartlist.append(base_objects.Particle({'name':'b',
2227+ 'antiname':'b~',
2228+ 'spin':2,
2229+ 'color':3,
2230+ 'mass':'zero',
2231+ 'width':'zero',
2232+ 'texname':'b',
2233+ 'antitexname':'\bar b',
2234+ 'line':'straight',
2235+ 'charge':-1. / 3.,
2236+ 'pdg_code':5,
2237+ 'propagating':True,
2238+ 'is_part':True,
2239+ 'self_antipart':False}))
2240+ b = mypartlist[len(mypartlist) - 1]
2241+ antib = copy.copy(b)
2242+ antib.set('is_part', False)
2243+
2244+ mypartlist.append(base_objects.Particle({'name':'t',
2245+ 'antiname':'t~',
2246+ 'spin':2,
2247+ 'color':3,
2248+ 'mass':'MT',
2249+ 'width':'WT',
2250+ 'texname':'y',
2251+ 'antitexname':'\bar t',
2252+ 'line':'straight',
2253+ 'charge':2. / 3.,
2254+ 'pdg_code':6,
2255+ 'propagating':True,
2256+ 'is_part':True,
2257+ 'self_antipart':False}))
2258+ t = mypartlist[len(mypartlist) - 1]
2259+ antit = copy.copy(t)
2260+ antit.set('is_part', False)
2261+
2262+ # A w
2263+ mypartlist.append(base_objects.Particle({'name':'w+',
2264+ 'antiname':'w+',
2265+ 'spin':3,
2266+ 'mass':'wmass',
2267+ 'width':'wwidth',
2268+ 'texname':'\gamma',
2269+ 'antitexname':'\gamma',
2270+ 'line':'wavy',
2271+ 'charge':1.,
2272+ 'pdg_code':24,
2273+ 'propagating':True,
2274+ 'is_part':True,
2275+ 'self_antipart':True}))
2276+ wplus = mypartlist[len(mypartlist) - 1]
2277+ wminus = copy.copy(wplus)
2278+ wplus.set('is_part', False)
2279+
2280+ # A gluon
2281+ mypartlist.append(base_objects.Particle({'name': 'g',
2282+ 'antiname': 'g',
2283+ 'spin': 3,
2284+ 'color': 8,
2285+ 'charge': 0.00,
2286+ 'mass': 'ZERO',
2287+ 'width': 'ZERO',
2288+ 'pdg_code': 21,
2289+ 'texname': '_',
2290+ 'antitexname': '_',
2291+ 'line': 'curly',
2292+ 'propagating': True,
2293+ 'is_part': True,
2294+ 'self_antipart': True}))
2295+
2296+ g = mypartlist[len(mypartlist) - 1]
2297+
2298+ # t b w couplings
2299+ myinterlist.append(base_objects.Interaction({
2300+ 'id': 1,
2301+ 'particles': base_objects.ParticleList(\
2302+ [t, \
2303+ antib, \
2304+ wminus]),
2305+ 'color': [color.ColorString([color.T(0, 1)])],
2306+ 'lorentz':['L1'],
2307+ 'couplings':{(0,0):'GC_23'},
2308+ 'orders':{'QED':1}}))
2309+
2310+ myinterlist.append(base_objects.Interaction({
2311+ 'id': 2,
2312+ 'particles': base_objects.ParticleList(\
2313+ [antit, \
2314+ b, \
2315+ wplus]),
2316+ 'color': [color.ColorString([color.T(0, 1)])],
2317+ 'lorentz':['L1'],
2318+ 'couplings':{(0,0):'GC_23'},
2319+ 'orders':{'QED':1}}))
2320+
2321+ # Gluon couplings to quarks
2322+ myinterlist.append(base_objects.Interaction({
2323+ 'id': 3,
2324+ 'particles': base_objects.ParticleList(\
2325+ [antib, \
2326+ b, \
2327+ g]),
2328+ 'color': [color.ColorString([color.T(2, 1, 0)])],
2329+ 'lorentz':[''],
2330+ 'couplings':{(0, 0):'GG'},
2331+ 'orders':{'QCD':1}}))
2332+
2333+ myinterlist.append(base_objects.Interaction({
2334+ 'id': 4,
2335+ 'particles': base_objects.ParticleList(\
2336+ [antit, \
2337+ t, \
2338+ g]),
2339+ 'color': [color.ColorString([color.T(2, 1, 0)])],
2340+ 'lorentz':[''],
2341+ 'couplings':{(0, 0):'GG'},
2342+ 'orders':{'QCD':1}}))
2343+
2344+ mymodel = base_objects.Model()
2345+ mymodel.set('particles', mypartlist)
2346+ mymodel.set('interactions', myinterlist)
2347+
2348+ myleglist = base_objects.LegList()
2349+
2350+ myleglist.append(base_objects.Leg({'id':6,
2351+ 'state':False}))
2352+ myleglist.append(base_objects.Leg({'id':21}))
2353+ myleglist.append(base_objects.Leg({'id':5}))
2354+ myleglist.append(base_objects.Leg({'id':24}))
2355+ myleglist.append(base_objects.Leg({'id':21}))
2356+
2357+ myproc = base_objects.Process({'legs':myleglist,
2358+ 'model':mymodel})
2359+ myamplitude = diagram_generation.Amplitude({'process': myproc})
2360+
2361+ me = helas_objects.HelasMatrixElement(myamplitude,
2362+ gen_color=False)
2363+
2364+ myfortranmodel = helas_call_writers.FortranHelasCallWriter(mymodel)
2365+ writer = writers.FortranWriter(self.give_pos('test'))
2366+
2367+ # Test configs file
2368+ nconfig, s_and_t_channels = export_v4.write_configs_file(writer,
2369+ me,
2370+ myfortranmodel)
2371+ writer.close()
2372+
2373+ self.assertFileContains('test',
2374+"""C Diagram 1, Amplitude 1
2375+ DATA MAPCONFIG(1)/1/
2376+ DATA (IFOREST(I,-1,1),I=1,2)/3,2/
2377+ DATA SPROP(-1,1)/5/
2378+ DATA (IFOREST(I,-2,1),I=1,2)/4,-1/
2379+ DATA SPROP(-2,1)/6/
2380+ DATA (IFOREST(I,-3,1),I=1,2)/5,-2/
2381+ DATA SPROP(-3,1)/6/
2382+C Diagram 2, Amplitude 2
2383+ DATA MAPCONFIG(2)/2/
2384+ DATA (IFOREST(I,-1,2),I=1,2)/3,2/
2385+ DATA SPROP(-1,2)/5/
2386+ DATA (IFOREST(I,-2,2),I=1,2)/5,-1/
2387+ DATA SPROP(-2,2)/5/
2388+ DATA (IFOREST(I,-3,2),I=1,2)/4,-2/
2389+ DATA SPROP(-3,2)/6/
2390+C Diagram 3, Amplitude 3
2391+ DATA MAPCONFIG(3)/3/
2392+ DATA (IFOREST(I,-1,3),I=1,2)/4,3/
2393+ DATA SPROP(-1,3)/6/
2394+ DATA (IFOREST(I,-2,3),I=1,2)/-1,2/
2395+ DATA SPROP(-2,3)/6/
2396+ DATA (IFOREST(I,-3,3),I=1,2)/5,-2/
2397+ DATA SPROP(-3,3)/6/
2398+C Diagram 4, Amplitude 4
2399+ DATA MAPCONFIG(4)/4/
2400+ DATA (IFOREST(I,-1,4),I=1,2)/4,3/
2401+ DATA SPROP(-1,4)/6/
2402+ DATA (IFOREST(I,-2,4),I=1,2)/5,-1/
2403+ DATA SPROP(-2,4)/6/
2404+ DATA (IFOREST(I,-3,4),I=1,2)/-2,2/
2405+ DATA SPROP(-3,4)/6/
2406+C Diagram 5, Amplitude 5
2407+ DATA MAPCONFIG(5)/5/
2408+ DATA (IFOREST(I,-1,5),I=1,2)/5,3/
2409+ DATA SPROP(-1,5)/5/
2410+ DATA (IFOREST(I,-2,5),I=1,2)/-1,2/
2411+ DATA SPROP(-2,5)/5/
2412+ DATA (IFOREST(I,-3,5),I=1,2)/4,-2/
2413+ DATA SPROP(-3,5)/6/
2414+C Diagram 6, Amplitude 6
2415+ DATA MAPCONFIG(6)/6/
2416+ DATA (IFOREST(I,-1,6),I=1,2)/5,3/
2417+ DATA SPROP(-1,6)/5/
2418+ DATA (IFOREST(I,-2,6),I=1,2)/4,-1/
2419+ DATA SPROP(-2,6)/6/
2420+ DATA (IFOREST(I,-3,6),I=1,2)/-2,2/
2421+ DATA SPROP(-3,6)/6/
2422+C Number of configs
2423+ DATA MAPCONFIG(0)/6/
2424+""")
2425+
2426+ def test_configs_8fs(self):
2427+ """Test configs.inc for 8fs process which previously failed.
2428+ """
2429+
2430+ diagrams = save_load_object.load_from_file(\
2431+ os.path.join(_input_file_path,
2432+ 'test_8fs.pkl'))
2433+
2434+ goal_schannels = [[[8, 6, -1], [7, -1, -2], [-2, 5, -3],
2435+ [-3, 3, -4], [4, -4, -5]],
2436+ [],
2437+ [[6, 5, -1], [8, -1, -2], [7, -2, -3], [-3, 3, -4]],
2438+ [[6, 5, -1]]]
2439+ goal_tchannels = [[[1, -5, -6]],
2440+ [[1, 4, -1], [-1, 7, -2], [-2, 3, -3],
2441+ [-3, 6, -4], [-4, 5, -5], [-5, 8, -6]],
2442+ [[1, 4, -5], [-5, -4, -6]],
2443+ [[1, 4, -2], [-2, 7, -3], [-3, 8, -4],
2444+ [-4, 3, -5], [-5, -1, -6]]]
2445+
2446+
2447+ for (idiag, diagram) in enumerate(diagrams):
2448+
2449+ schannels, tchannels = diagram.get('amplitudes')[0].\
2450+ get_s_and_t_channels(2)
2451+
2452+ self.assertEqual([[l.get('number') for l in v.get('legs')] for v \
2453+ in schannels],
2454+ goal_schannels[idiag])
2455+ self.assertEqual([[l.get('number') for l in v.get('legs')] for v \
2456+ in tchannels],
2457+ goal_tchannels[idiag])
2458+
2459 class AlohaFortranWriterTest(unittest.TestCase):
2460 """ A basic test to see if the Aloha Fortran Writter is working """
2461
2462@@ -4851,3 +5100,47 @@
2463 for i in range(len(split_sol)):
2464 self.assertEqual(split_sol[i]+'\n', textfile.readline())
2465
2466+if __name__ == '__main__':
2467+ """Write out pkl file with helas diagram for test_configs_8fs
2468+ """
2469+
2470+ import models.import_ufo
2471+ mymodel = models.import_ufo.import_model('sm')
2472+
2473+ myleglist = base_objects.LegList()
2474+
2475+ myleglist.append(base_objects.Leg({'id':2,
2476+ 'state':False}))
2477+ myleglist.append(base_objects.Leg({'id':21,
2478+ 'state':False}))
2479+ myleglist.append(base_objects.Leg({'id':1}))
2480+ myleglist.append(base_objects.Leg({'id':24}))
2481+ myleglist.append(base_objects.Leg({'id':5}))
2482+ myleglist.append(base_objects.Leg({'id':-5}))
2483+ myleglist.append(base_objects.Leg({'id':21}))
2484+ myleglist.append(base_objects.Leg({'id':21}))
2485+
2486+ myproc = base_objects.Process({'legs':myleglist,
2487+ 'model':mymodel})
2488+ myamplitude = diagram_generation.Amplitude({'process': myproc})
2489+
2490+ me = helas_objects.HelasMatrixElement(myamplitude,
2491+ gen_color=False)
2492+
2493+ import madgraph.iolibs.drawing_eps as draw
2494+ filename = os.path.join('diagrams_' + \
2495+ myamplitude.get('process').shell_string() + ".eps")
2496+ plot = draw.MultiEpsDiagramDrawer(myamplitude.get('diagrams'),
2497+ filename,
2498+ model=mymodel,
2499+ amplitude='',
2500+ legend=myamplitude.get('process').input_string())
2501+
2502+ plot.draw()
2503+
2504+
2505+
2506+ me = save_load_object.save_to_file(\
2507+ os.path.join(_input_file_path, 'test_8fs.pkl'),
2508+ [me.get('diagrams')[323], me.get('diagrams')[954],
2509+ me.get('diagrams')[1123], me.get('diagrams')[1139]])

Subscribers

People subscribed via source and target branches