HepMC

[1]:
import pyhepmc
print(pyhepmc.__version__)
2.10.0
[55]:
def rec_track(p, nchildren=-1):
    ps = [p]
    if len(p.children)==0 or (nchildren >0 and len(p.children) != nchildren):
        return ps
    for pss in p.children:
        ps = ps + rec_track(pss,nchildren)
    return ps
[56]:
with pyhepmc.open("example.HepMC") as f:
    for event in f:
        print("incoming:")
        for p in event.particles:
            if p.status == 21:
                print(p, p.id)
                print([pp.id for pp in rec_track(p,1)])
        print("outgoing:")
        for p in event.particles:
            if p.status == 23:
                print(p,p.id)
                print([pp.id for pp in rec_track(p,1)])

        break
incoming:
GenParticle(FourVector(0, 0, -117, 117), mass=0, pid=3, status=21) 187
[187]
GenParticle(FourVector(0, 0, 183, 183), mass=0, pid=2, status=21) 188
[188]
outgoing:
GenParticle(FourVector(-33.6, -15, 133, 138), mass=1.90735e-06, pid=2, status=23) 189
[189, 192]
GenParticle(FourVector(51.1, 18.9, -106, 119), mass=1.3487e-06, pid=3, status=23) 190
[190, 361, 505, 592, 647, 648]
GenParticle(FourVector(-17.5, -3.92, 39, 43), mass=4.76837e-07, pid=22, status=23) 191
[191, 362, 506, 593]
[3]:
event
[3]:
event number = 0 -1 -3 -1->-3 u 0.65 TeV -4 -1->-4 g 1.2 TeV -5 -1->-5 g 34 GeV -6 -1->-6 u 0.14 TeV -7 -1->-7 g 0.11 TeV -8 -1->-8 u̅ 50 GeV -9 -1->-9 (ud)₁ 4.3 TeV -2 -10 -2->-10 s 0.12 TeV -11 -2->-11 g 0.61 TeV -12 -2->-12 g 0.13 TeV -13 -2->-13 g 9 GeV -14 -2->-14 d 0.77 TeV -15 -2->-15 g 0.41 TeV -16 -2->-16 (uu)₁ 0.72 TeV -17 -2->-17 s̅ 3.7 TeV -18 -3->-18 u 0.65 TeV -19 -4->-19 g 1.2 TeV -20 -5->-20 g 34 GeV -21 -6->-21 u 0.14 TeV -22 -7->-22 g 0.11 TeV -23 -8->-23 u̅ 50 GeV -32 -9->-32 (ud)₁ 4.3 TeV -35 -10->-35 s 0.12 TeV -36 -11->-36 g 0.61 TeV -37 -12->-37 g 0.13 TeV -38 -13->-38 g 8.9 GeV -24 -14->-24 d 0.77 TeV -39 -15->-39 g 0.41 TeV -142 -16->-142 (uu)₁ 0.72 TeV -149 -17->-149 s̅ 3.7 TeV -123 -18->-123 u 0.19 TeV -184 -18->-184 g 0.46 TeV -185 -19->-185 g 1.1 TeV -187 -19->-187 g 90 GeV -188 -20->-188 g 34 GeV -155 -21->-155 u 0.14 TeV -27 -22->-27 g 0.11 TeV -157 -23->-157 u̅ 50 GeV -26 -24->-26 d 0.77 TeV -195 -24->-195 g 1 GeV -25 -26->-25 d 0.77 TeV -27->-25 g 0.012 GeV -266 -27->-266 g 0.11 TeV -28 -25->-28 d 0.7 TeV -62 -25->-62 g 66 GeV -29 -28->-29 d 0.76 TeV -30 -29->-30 d 0.76 TeV -31 -30->-31 d 0.74 TeV -33 -31->-33 d 0.65 TeV -52 -31->-52 g 97 GeV -34 -33->-34 d 0.65 TeV -34->-32 d 0.65 TeV -160 -32->-160 π⁰ 48 GeV -161 -32->-161 η 46 GeV -162 -32->-162 K̅⁰ 7.9 GeV -189 -32->-189 ρ(770)⁰ 1 GeV -164 -32->-164 K⁰ 1.5 GeV -190 -32->-190 K̅*(892)⁰ 1.1 GeV -166 -32->-166 η 0.7 GeV -167 -32->-167 η 6.8 GeV -168 -32->-168 π⁰ 20 GeV -169 -32->-169 π⁰ 52 GeV -191 -32->-191 Δ(1232)⁺⁺ 40 GeV -192 -32->-192 η'(958) 1.1 TeV -193 -32->-193 Δ(1232)⁰ 2.8 TeV -32->out_53 π⁻ 0.26 TeV -32->out_54 π⁺ 0.14 TeV -32->out_55 π⁻ 32 GeV -32->out_57 K⁺ 0.11 TeV -32->out_64 π⁻ 0.49 GeV -32->out_65 π⁺ 2.2 GeV -32->out_68 π⁻ 7.3 GeV -32->out_71 π⁻ 12 GeV -32->out_72 p̅ 54 GeV -32->out_73 π⁺ 0.18 TeV -120 -35->-120 s 0.12 TeV -40 -36->-40 g 0.61 TeV -58 -37->-58 g 0.13 TeV -38->-155 g 8.4 GeV -194 -38->-194 g 2 GeV -47 -39->-47 g 0.41 TeV -39->-157 g 0.13 GeV -41 -40->-41 g 0.61 TeV -42 -41->-42 g 0.61 TeV -179 -41->-179 g 4.1 GeV -43 -42->-43 g 0.61 TeV -44 -43->-44 g 0.59 TeV -45 -44->-45 g 0.59 TeV -46 -45->-46 g 0.59 TeV -46->-142 g 0.59 TeV -49 -47->-49 g 0.41 TeV -50 -49->-50 g 0.41 TeV -51 -50->-51 g 0.31 TeV -54 -50->-54 g 99 GeV -48 -51->-48 g 0.31 TeV -52->-48 g 97 GeV -53 -48->-53 g 0.4 TeV -53->-142 g 0.4 TeV -55 -54->-55 g 99 GeV -56 -55->-56 g 94 GeV -57 -56->-57 g 94 GeV -57->-142 g 94 GeV -59 -58->-59 g 0.13 TeV -60 -59->-60 g 58 GeV -80 -59->-80 g 71 GeV -61 -60->-61 g 58 GeV -61->-142 g 58 GeV -63 -62->-63 g 4.9 GeV -64 -63->-64 g 4.8 GeV -65 -64->-65 g 3.7 GeV -115 -64->-115 g 1.5 GeV -66 -65->-66 g 3.7 GeV -68 -66->-68 g 3.2 GeV -76 -66->-76 g 26 GeV -69 -68->-69 g 4.8 GeV -197 -68->-197 g 3.7 GeV -67 -69->-67 g 4.8 GeV -71 -179->-71 g 4.7 GeV -250 -179->-250 g 0.96 TeV -72 -71->-72 g 4.1 GeV -73 -72->-73 g 4.1 GeV -74 -73->-74 g 17 GeV -97 -73->-97 g 6 GeV -75 -74->-75 g 17 GeV -75->-67 g 17 GeV -70 -67->-70 g 22 GeV -77 -76->-77 g 20 GeV -78 -77->-78 g 15 GeV -78->-70 g 15 GeV -79 -70->-79 g 37 GeV -79->-142 g 37 GeV -81 -80->-81 g 71 GeV -82 -81->-82 g 70 GeV -186 -81->-186 g 0.67 GeV -83 -82->-83 g 70 GeV -84 -83->-84 g 70 GeV -85 -84->-85 g 68 GeV -101 -84->-101 g 2.6 GeV -86 -85->-86 g 68 GeV -86->-142 g 68 GeV -87 -157->-87 u̅ 46 GeV -148 -157->-148 g 4.8 GeV -89 -87->-89 u̅ 39 GeV -90 -89->-90 g 11 GeV -199 -89->-199 u̅ 28 GeV -91 -90->-91 g 1.5 GeV -200 -90->-200 g 9.5 GeV -92 -91->-92 g 1.5 GeV -93 -92->-93 g 1 GeV -201 -92->-201 g 0.88 GeV -94 -93->-94 g 0.39 GeV -135 -93->-135 g 1.2 GeV -95 -94->-95 g 4.3 GeV -104 -94->-104 g 0.93 GeV -96 -95->-96 g 4.1 GeV -202 -95->-202 g 0.66 GeV -88 -96->-88 g 4.1 GeV -98 -97->-98 g 6 GeV -98->-88 g 6 GeV -99 -88->-99 g 10 GeV -99->-142 g 10 GeV -102 -101->-102 g 2.2 GeV -103 -102->-103 g 2.2 GeV -103->-142 g 2.2 GeV -105 -104->-105 g 0.47 GeV -100 -105->-100 g 0.47 GeV -106 -155->-106 g 8.6 GeV -177 -155->-177 u 0.14 TeV -108 -106->-108 g 8.5 GeV -109 -108->-109 g 1.7 GeV -203 -108->-203 g 8.1 GeV -110 -109->-110 g 1.4 GeV -204 -109->-204 g 6.2 GeV -111 -110->-111 g 1.5 GeV -133 -110->-133 g 0.91 GeV -112 -111->-112 g 2.4 GeV -205 -111->-205 g 1.7 GeV -113 -112->-113 g 1.9 GeV -113->-100 g 2 GeV -114 -100->-114 g 2.4 GeV -114->-142 g 2.4 GeV -117 -115->-117 g 1.5 GeV -118 -117->-118 g 1.7 GeV -206 -117->-206 g 0.64 GeV -119 -118->-119 g 1.8 GeV -119->-142 g 1.8 GeV -121 -120->-121 s 0.12 TeV -122 -121->-122 s 0.12 TeV -107 -122->-107 s 0.12 TeV -123->-107 u 0.18 TeV -246 -123->-246 g 7.6 GeV -125 -107->-125 u 0.14 TeV -207 -107->-207 s 0.12 TeV -208 -107->-208 γ 43 GeV -126 -125->-126 u 0.14 TeV -127 -126->-127 g 45 GeV -174 -126->-174 u 96 GeV -128 -127->-128 g 23 GeV -159 -127->-159 g 22 GeV -129 -128->-129 g 23 GeV -130 -129->-130 g 1.1 GeV -154 -129->-154 g 26 GeV -132 -130->-132 g 1.1 GeV -132->-142 g 1.1 GeV -134 -133->-134 g 0.57 GeV -292 -133->-292 g 0.82 GeV -116 -134->-116 g 0.54 GeV -135->-116 g 1.2 GeV -124 -116->-124 g 1.8 GeV -136 -186->-136 g 20 GeV -278 -186->-278 g 5.5 GeV -137 -136->-137 g 24 GeV -138 -137->-138 g 24 GeV -139 -138->-139 g 24 GeV -140 -139->-140 g 12 GeV -151 -139->-151 g 12 GeV -141 -140->-141 g 0.73 GeV -145 -140->-145 g 12 GeV -143 -141->-143 g 1.7 GeV -209 -141->-209 g 0.75 GeV -143->-124 g 1.7 GeV -144 -124->-144 g 3.5 GeV -144->-142 g 3.5 GeV -146 -145->-146 g 10 GeV -147 -146->-147 g 10 GeV -147->-142 g 10 GeV -150 -148->-150 g 11 GeV -131 -150->-131 g 11 GeV -152 -151->-152 g 6.7 GeV -315 -151->-315 g 6.9 GeV -152->-131 g 6.7 GeV -153 -131->-153 g 18 GeV -153->-142 g 18 GeV -156 -154->-156 g 19 GeV -158 -156->-158 g 19 GeV -158->-142 g 19 GeV -163 -159->-163 g 22 GeV -165 -163->-165 g 18 GeV -170 -165->-170 g 11 GeV -172 -165->-172 g 14 GeV -171 -170->-171 g 11 GeV -171->-142 g 11 GeV -173 -172->-173 g 14 GeV -173->-142 g 14 GeV -175 -174->-175 u 96 GeV -176 -175->-176 u 96 GeV -176->-142 u 96 GeV -210 -142->-210 ρ(770)⁻ 37 GeV -211 -142->-211 ρ(770)⁰ 9.9 GeV -212 -142->-212 ρ(770)⁰ 4.6 GeV -213 -142->-213 Δ̅(1232)⁺ 15 GeV -214 -142->-214 ρ(770)⁺ 7.9 GeV -216 -142->-216 ω(782) 6.3 GeV -217 -142->-217 ρ(770)⁺ 16 GeV -215 -142->-215 η 0.72 GeV -219 -142->-219 ρ(770)⁻ 2.4 GeV -221 -142->-221 K*(892)⁺ 1.7 GeV -218 -142->-218 π⁰ 2.9 GeV -222 -142->-222 K̅*(892)⁰ 17 GeV -220 -142->-220 π⁰ 1.7 GeV -223 -142->-223 ρ(770)⁺ 10 GeV -225 -142->-225 Δ(1232)⁺⁺ 0.28 TeV -226 -142->-226 Δ̅(1232)⁻ 0.41 TeV -224 -142->-224 η 0.24 TeV -231 -142->-231 Δ(1232)⁺ 0.39 TeV -232 -142->-232 ρ(770)⁺ 0.37 TeV -142->out_243 π⁺ 59 GeV -142->out_246 n 7.4 GeV -142->out_249 π⁻ 4.8 GeV -142->out_251 π⁻ 1.6 GeV -142->out_257 K⁻ 2.3 GeV -142->out_259 K⁺ 6.6 GeV -142->out_262 π⁻ 16 GeV -142->out_264 π⁻ 11 GeV -142->out_265 π⁺ 6.9 GeV -142->out_266 n 47 GeV -142->out_267 p̅ 27 GeV -142->out_268 π⁺ 66 GeV -142->out_269 π⁻ 71 GeV -142->out_271 π⁻ 12 GeV -178 -177->-178 u 0.14 TeV -180 -178->-180 u 0.14 TeV -181 -180->-181 u 0.13 TeV -182 -181->-182 u 0.12 TeV -183 -182->-183 u 0.12 TeV -183->-149 u 0.12 TeV -227 -149->-227 π⁰ 3.3 GeV -228 -149->-228 π⁰ 29 GeV -229 -149->-229 π⁰ 21 GeV -230 -149->-230 π⁰ 25 GeV -234 -149->-234 ρ(770)⁺ 1.1 GeV -235 -149->-235 ω(782) 1.5 GeV -233 -149->-233 π⁰ 0.25 GeV -238 -149->-238 ρ(770)⁺ 1.3 GeV -240 -149->-240 ω(782) 4.6 GeV -236 -149->-236 π⁰ 5.4 GeV -237 -149->-237 π⁰ 2.8 GeV -242 -149->-242 ρ(770)⁰ 19 GeV -239 -149->-239 π⁰ 40 GeV -243 -149->-243 ρ(770)⁰ 0.39 TeV -241 -149->-241 K⁰ 0.3 TeV -244 -149->-244 K*(892)⁻ 0.83 TeV -245 -149->-245 K*(892)⁺ 2 TeV -149->out_285 π⁺ 17 GeV -149->out_288 π⁻ 17 GeV -149->out_289 p 5.2 GeV -149->out_290 p̅ 1.2 GeV -149->out_294 π⁻ 1.5 GeV -149->out_300 π⁻ 94 GeV -149->out_301 π⁺ 27 GeV -247 -184->-247 g 0.45 TeV -248 -184->-248 g 9.1 GeV -196 -185->-196 g 0.96 TeV -249 -185->-249 g 0.15 TeV -254 -187->-254 g 90 GeV -198 -188->-198 g 25 GeV -257 -188->-257 g 9.6 GeV -160->out_316 γ 41 GeV -160->out_317 γ 6.6 GeV -258 -161->-258 π⁰ 13 GeV -259 -161->-259 π⁰ 25 GeV -260 -161->-260 π⁰ 7.8 GeV -162->out_321 K(L)⁰ 7.9 GeV -189->out_322 π⁺ 0.52 GeV -189->out_323 π⁻ 0.48 GeV -261 -164->-261 K(S)⁰ 1.5 GeV -262 -190->-262 K̅⁰ 0.76 GeV -263 -190->-263 π⁰ 0.3 GeV -166->out_327 γ 0.53 GeV -166->out_328 γ 0.17 GeV -167->out_329 γ 4.7 GeV -167->out_330 γ 2.2 GeV -168->out_331 γ 10 GeV -168->out_332 γ 10 GeV -169->out_333 γ 7.4 GeV -169->out_334 γ 45 GeV -191->out_335 p 26 GeV -191->out_336 π⁺ 14 GeV -264 -192->-264 η 0.77 TeV -192->out_337 π⁺ 68 GeV -192->out_338 π⁻ 0.28 TeV -265 -193->-265 π⁰ 1 TeV -193->out_340 n 1.8 TeV -267 -194->-267 g 1 GeV -268 -194->-268 g 2.3 GeV -274 -195->-274 g 1 GeV -196->-179 g 0.96 TeV -277 -197->-277 g 2.8 GeV -198->-186 g 25 GeV -279 -199->-279 u̅ 25 GeV -280 -200->-280 g 11 GeV -281 -200->-281 g 2.2 GeV -282 -201->-282 g 0.3 GeV -284 -202->-284 g 0.66 GeV -287 -203->-287 g 6.8 GeV -288 -204->-288 g 5.2 GeV -291 -204->-291 g 14 GeV -289 -205->-289 g 1.7 GeV -290 -206->-290 g 0.65 GeV -294 -207->-294 s 0.12 TeV -295 -208->-295 γ 44 GeV -316 -209->-316 g 1.1 GeV -317 -209->-317 g 0.63 GeV -296 -210->-296 π⁰ 22 GeV -210->out_366 π⁻ 15 GeV -211->out_368 π⁺ 3.5 GeV -211->out_369 π⁻ 6.5 GeV -212->out_370 π⁺ 3.4 GeV -212->out_371 π⁻ 1.2 GeV -213->out_372 n̅ 12 GeV -213->out_373 π⁺ 3.1 GeV -297 -214->-297 π⁰ 1.6 GeV -214->out_374 π⁺ 6.2 GeV -298 -216->-298 π⁰ 0.91 GeV -216->out_376 π⁺ 3 GeV -216->out_377 π⁻ 2.3 GeV -299 -217->-299 π⁰ 8.6 GeV -217->out_379 π⁺ 7.1 GeV -215->out_381 γ 0.19 GeV -215->out_382 γ 0.53 GeV -300 -219->-300 π⁰ 2 GeV -219->out_383 π⁻ 0.46 GeV -301 -221->-301 π⁰ 0.31 GeV -221->out_385 K⁺ 1.3 GeV -218->out_387 γ 0.75 GeV -218->out_388 γ 2.1 GeV -302 -222->-302 K̅⁰ 12 GeV -303 -222->-303 π⁰ 4.1 GeV -220->out_391 γ 1.1 GeV -220->out_392 γ 0.58 GeV -304 -223->-304 π⁰ 0.89 GeV -223->out_393 π⁺ 9.2 GeV -225->out_395 p 0.24 TeV -225->out_396 π⁺ 43 GeV -305 -226->-305 π⁰ 0.14 TeV -226->out_397 p̅ 0.27 TeV -224->out_399 γ 53 GeV -224->out_400 γ 0.18 TeV -306 -231->-306 π⁰ 53 GeV -231->out_401 p 0.34 TeV -307 -232->-307 π⁰ 0.21 TeV -232->out_403 π⁺ 0.16 TeV -227->out_405 γ 0.88 GeV -227->out_406 γ 2.4 GeV -228->out_407 γ 23 GeV -228->out_408 γ 5.7 GeV -229->out_409 γ 11 GeV -229->out_410 γ 9.5 GeV -230->out_411 γ 3.2 GeV -230->out_412 γ 21 GeV -308 -234->-308 π⁰ 0.65 GeV -234->out_413 π⁺ 0.43 GeV -309 -235->-309 π⁰ 0.18 GeV -235->out_415 π⁺ 0.39 GeV -235->out_416 π⁻ 0.9 GeV -233->out_418 γ 0.18 GeV -233->out_419 γ 0.073 GeV -310 -238->-310 π⁰ 0.69 GeV -238->out_420 π⁺ 0.61 GeV -311 -240->-311 π⁰ 1.2 GeV -240->out_422 π⁺ 1.8 GeV -240->out_423 π⁻ 1.6 GeV -236->out_425 γ 4 GeV -236->out_426 γ 1.4 GeV -237->out_427 γ 2.4 GeV -237->out_428 γ 0.39 GeV -242->out_429 π⁺ 15 GeV -242->out_430 π⁻ 3 GeV -239->out_431 γ 31 GeV -239->out_432 γ 8.6 GeV -243->out_433 π⁺ 0.32 TeV -243->out_434 π⁻ 65 GeV -312 -241->-312 K(S)⁰ 0.3 TeV -313 -244->-313 K̅⁰ 0.54 TeV -244->out_437 π⁻ 0.3 TeV -314 -245->-314 π⁰ 0.95 TeV -245->out_438 K⁺ 1.1 TeV -269 -246->-269 g 7.2 GeV -318 -246->-318 g 9.4 GeV -319 -247->-319 g 0.19 TeV -320 -247->-320 g 0.26 TeV -321 -248->-321 g 8.7 GeV -322 -249->-322 g 0.13 TeV -251 -250->-251 g 0.96 TeV -252 -251->-252 g 0.96 TeV -253 -252->-253 g 0.37 TeV -323 -252->-323 g 0.61 TeV -255 -253->-255 g 65 GeV -324 -253->-324 g 0.45 TeV -256 -255->-256 g 65 GeV -256->-254 g 65 GeV -325 -254->-325 g 0.15 TeV -326 -257->-326 g 9.6 GeV -330 -266->-330 g 0.11 TeV -331 -266->-331 g 1.6 GeV -258->out_458 γ 0.81 GeV -258->out_459 γ 12 GeV -259->out_460 γ 2.2 GeV -259->out_461 γ 23 GeV -260->out_462 γ 0.59 GeV -260->out_463 γ 7.3 GeV -327 -261->-327 π⁰ 0.43 GeV -328 -261->-328 π⁰ 1.1 GeV -329 -262->-329 K(S)⁰ 0.76 GeV -263->out_467 γ 0.029 GeV -263->out_468 γ 0.27 GeV -264->out_469 γ 7.9 GeV -264->out_470 γ 0.77 TeV -265->out_471 γ 0.37 TeV -265->out_472 γ 0.66 TeV -293 -267->-293 g 1.1 GeV -332 -267->-332 g 0.44 GeV -333 -268->-333 g 1.8 GeV -270 -269->-270 g 2.5 GeV -371 -269->-371 g 5.8 GeV -271 -270->-271 g 2.5 GeV -272 -271->-272 g 1.8 GeV -283 -271->-283 g 1.5 GeV -273 -272->-273 g 2.6 GeV -334 -272->-334 g 0.25 GeV -275 -273->-275 g 1.9 GeV -276 -275->-276 g 3.1 GeV -335 -275->-335 g 0.24 GeV -276->-274 g 3.1 GeV -336 -274->-336 g 4.1 GeV -277->-289 g 2.8 GeV -337 -278->-337 g 1.7 GeV -338 -279->-338 u̅ 25 GeV -339 -280->-339 g 11 GeV -340 -281->-340 g 2.2 GeV -341 -282->-341 g 0.3 GeV -285 -283->-285 g 1.4 GeV -286 -285->-286 g 0.72 GeV -343 -285->-343 g 1.1 GeV -286->-284 g 0.72 GeV -344 -284->-344 g 1.4 GeV -345 -287->-345 g 5.8 GeV -347 -288->-347 g 5.3 GeV -348 -291->-348 g 14 GeV -351 -292->-351 g 0.89 GeV -356 -289->-356 g 4.6 GeV -293->-290 g 1.2 GeV -357 -290->-357 g 1.8 GeV -358 -294->-358 s 0.11 TeV -359 -295->-359 γ 44 GeV -342 -315->-342 g 8.5 GeV -361 -315->-361 g 1 GeV -360 -316->-360 g 1 GeV -364 -317->-364 g 0.64 GeV -296->out_511 γ 13 GeV -296->out_512 γ 9.8 GeV -297->out_513 γ 0.6 GeV -297->out_514 γ 1 GeV -298->out_515 γ 0.39 GeV -298->out_516 γ 0.52 GeV -299->out_517 γ 1.5 GeV -299->out_518 γ 7.2 GeV -300->out_519 γ 1.8 GeV -300->out_520 γ 0.16 GeV -301->out_521 γ 0.18 GeV -301->out_522 γ 0.13 GeV -365 -302->-365 K(S)⁰ 12 GeV -303->out_524 γ 4.1 GeV -303->out_525 γ 4.8 MeV -304->out_526 γ 0.29 GeV -304->out_527 γ 0.6 GeV -305->out_528 γ 0.12 TeV -305->out_529 γ 15 GeV -306->out_530 γ 42 GeV -306->out_531 γ 11 GeV -307->out_532 γ 0.18 TeV -307->out_533 γ 35 GeV -308->out_534 γ 0.16 GeV -308->out_535 γ 0.48 GeV -309->out_536 γ 0.033 GeV -309->out_537 γ 0.15 GeV -310->out_538 γ 0.62 GeV -310->out_539 γ 0.07 GeV -311->out_540 γ 1 GeV -311->out_541 γ 0.16 GeV -312->out_542 π⁺ 0.15 TeV -312->out_543 π⁻ 0.14 TeV -313->out_544 K(L)⁰ 0.54 TeV -314->out_545 γ 0.85 TeV -314->out_546 γ 98 GeV -370 -318->-370 g 8.4 GeV -372 -319->-372 g 0.19 TeV -352 -320->-352 g 20 GeV -373 -320->-373 g 0.24 TeV -374 -321->-374 g 7.8 GeV -375 -322->-375 g 0.13 TeV -376 -323->-376 g 0.46 TeV -377 -324->-377 g 0.45 TeV -394 -325->-394 g 0.15 TeV -346 -326->-346 g 8.9 GeV -380 -330->-380 g 0.11 TeV -424 -331->-424 g 1.2 GeV -327->out_560 γ 0.17 GeV -327->out_561 γ 0.26 GeV -328->out_562 γ 0.096 GeV -328->out_563 γ 0.98 GeV -329->out_564 π⁺ 0.35 GeV -329->out_565 π⁻ 0.41 GeV -398 -332->-398 g 0.41 GeV -392 -333->-392 g 1.5 GeV -412 -334->-412 g 0.25 GeV -335->-341 g 0.24 GeV -336->-394 g 4.1 GeV -366 -337->-366 g 1.6 GeV -338->-394 u̅ 25 GeV -339->-394 g 11 GeV -342->-340 g 8.5 GeV -418 -340->-418 g 11 GeV -410 -341->-410 g 0.54 GeV -343->-398 g 1.1 GeV -344->-394 g 1.4 GeV -353 -345->-353 g 3.1 GeV -349 -346->-349 g 7.7 GeV -350 -349->-350 g 5.1 GeV -350->-347 g 5.1 GeV -417 -347->-417 g 10 GeV -352->-348 g 20 GeV -420 -348->-420 g 35 GeV -354 -353->-354 g 0.46 GeV -362 -353->-362 g 2.9 GeV -355 -354->-355 g 0.14 GeV -355->-351 g 0.14 GeV -416 -351->-416 g 1 GeV -356->-394 g 4.6 GeV -357->-394 g 1.8 GeV -407 -358->-407 s 0.11 TeV -359->out_593 γ 44 GeV -409 -361->-409 g 1 GeV -363 -362->-363 g 0.41 GeV -396 -362->-396 g 2.8 GeV -363->-360 g 0.4 GeV -411 -360->-411 g 1.5 GeV -367 -366->-367 g 1.6 GeV -368 -367->-368 g 1.5 GeV -369 -368->-369 g 1.2 GeV -383 -368->-383 g 0.71 GeV -369->-364 g 1.2 GeV -413 -364->-413 g 1.9 GeV -414 -365->-414 π⁰ 5.2 GeV -415 -365->-415 π⁰ 7.3 GeV -385 -370->-385 g 8.3 GeV -399 -371->-399 g 5.8 GeV -372->-394 g 0.19 TeV -423 -373->-423 g 0.24 TeV -419 -374->-419 g 7.8 GeV -421 -375->-421 g 0.13 TeV -378 -376->-378 g 0.46 TeV -422 -377->-422 g 0.45 TeV -379 -378->-379 g 0.46 TeV -379->-394 g 0.46 TeV -381 -380->-381 g 0.11 TeV -381->-394 g 0.11 TeV -382 -409->-382 g 2.2 GeV -382->-394 g 2.2 GeV -384 -383->-384 g 0.71 GeV -384->-394 g 0.71 GeV -386 -385->-386 g 8.3 GeV -387 -386->-387 g 4.2 GeV -389 -386->-389 g 4.1 GeV -388 -387->-388 g 4.2 GeV -388->-394 g 4.2 GeV -390 -389->-390 g 3.7 GeV -391 -390->-391 g 3.7 GeV -391->-394 g 3.7 GeV -393 -392->-393 g 1.4 GeV -393->-394 g 1.4 GeV -395 -398->-395 g 1.5 GeV -395->-394 g 1.5 GeV -397 -396->-397 g 2.7 GeV -397->-394 g 2.7 GeV -400 -399->-400 g 5 GeV -401 -400->-401 g 3.9 GeV -402 -401->-402 g 4.2 GeV -405 -401->-405 g 0.43 GeV -403 -402->-403 g 2.8 GeV -404 -403->-404 g 2.8 GeV -404->-394 g 2.8 GeV -406 -405->-406 g 0.43 GeV -406->-394 g 0.43 GeV -408 -407->-408 s 0.11 TeV -408->-394 s 0.11 TeV -410->-394 g 0.54 GeV -411->-394 g 1.5 GeV -412->-394 g 0.25 GeV -413->-394 g 1.9 GeV -416->-394 g 1 GeV -417->-394 g 10 GeV -418->-394 g 11 GeV -419->-394 g 7.8 GeV -420->-394 g 35 GeV -421->-394 g 0.13 TeV -422->-394 g 0.45 TeV -423->-394 g 0.24 TeV -425 -394->-425 K̅⁰ 20 GeV -427 -394->-427 ω(782) 11 GeV -429 -394->-429 Σ̅(1385)⁺ 4.3 GeV -428 -394->-428 K⁰ 0.62 GeV -430 -394->-430 ρ(770)⁺ 1.7 GeV -431 -394->-431 ρ(770)⁺ 2 GeV -432 -394->-432 ω(782) 1.5 GeV -435 -394->-435 ρ(770)⁻ 1.9 GeV -433 -394->-433 π⁰ 0.88 GeV -434 -394->-434 π⁰ 1.1 GeV -436 -394->-436 ρ(770)⁻ 1.7 GeV -437 -394->-437 K̅*(892)⁰ 1.7 GeV -439 -394->-439 ρ(770)⁻ 1.4 GeV -438 -394->-438 π⁰ 1 GeV -440 -394->-440 η'(958) 4.2 GeV -441 -394->-441 ρ(770)⁺ 2.7 GeV -443 -394->-443 ρ(770)⁻ 2.8 GeV -442 -394->-442 π⁰ 1.7 GeV -447 -394->-447 K*(892)⁰ 25 GeV -444 -394->-444 K⁰ 62 GeV -445 -394->-445 K̅⁰ 32 GeV -446 -394->-446 π⁰ 84 GeV -450 -394->-450 ω(782) 50 GeV -448 -394->-448 π⁰ 0.3 TeV -449 -394->-449 η 0.23 TeV -451 -394->-451 K*(892)⁰ 0.23 TeV -452 -394->-452 K̅*(892)⁰ 0.19 TeV -453 -394->-453 ρ(770)⁰ 0.21 TeV -454 -394->-454 Δ(1232)⁺ 0.14 TeV -455 -394->-455 Δ̅(1232)⁻ 76 GeV -394->out_662 π⁻ 60 GeV -394->out_663 π⁺ 9.2 GeV -394->out_665 n 11 GeV -394->out_666 K⁻ 0.7 GeV -394->out_669 K⁻ 1.7 GeV -394->out_671 π⁻ 1.3 GeV -394->out_672 π⁺ 0.19 GeV -394->out_673 n 3.7 GeV -394->out_674 p̅ 1.7 GeV -394->out_676 π⁻ 0.88 GeV -394->out_678 π⁺ 0.47 GeV -394->out_682 π⁺ 1 GeV -394->out_684 K⁺ 2.5 GeV -394->out_691 π⁺ 0.75 GeV -394->out_692 π⁻ 4.9 GeV -394->out_693 π⁺ 4.3 GeV -394->out_694 π⁻ 0.29 GeV -394->out_696 π⁺ 4.9 GeV -394->out_698 K⁻ 42 GeV -394->out_699 π⁺ 30 GeV -394->out_708 π⁻ 0.11 TeV -426 -424->-426 g 1.2 GeV -426->-409 g 1.2 GeV -414->out_714 γ 5 GeV -414->out_715 γ 0.2 GeV -415->out_716 γ 4.8 GeV -415->out_717 γ 2.5 GeV -425->out_718 K(L)⁰ 20 GeV -456 -427->-456 π⁰ 6.4 GeV -427->out_719 π⁺ 2.1 GeV -427->out_720 π⁻ 2.1 GeV -457 -429->-457 Λ̅ 3.4 GeV -429->out_723 π⁺ 0.97 GeV -458 -428->-458 K(S)⁰ 0.62 GeV -459 -430->-459 π⁰ 0.37 GeV -430->out_725 π⁺ 1.3 GeV -460 -431->-460 π⁰ 1.1 GeV -431->out_727 π⁺ 0.91 GeV -461 -432->-461 π⁰ 0.19 GeV -432->out_729 π⁺ 0.54 GeV -432->out_730 π⁻ 0.77 GeV -462 -435->-462 π⁰ 0.71 GeV -435->out_732 π⁻ 1.2 GeV -433->out_734 γ 0.54 GeV -433->out_735 γ 0.34 GeV -434->out_736 γ 0.63 GeV -434->out_737 γ 0.48 GeV -463 -436->-463 π⁰ 0.59 GeV -436->out_738 π⁻ 1.1 GeV -464 -437->-464 K̅⁰ 1.2 GeV -465 -437->-465 π⁰ 0.52 GeV -466 -439->-466 π⁰ 0.88 GeV -439->out_742 π⁻ 0.5 GeV -438->out_744 γ 0.48 GeV -438->out_745 γ 0.51 GeV -467 -440->-467 η 2.5 GeV -440->out_746 π⁺ 0.92 GeV -440->out_747 π⁻ 0.75 GeV -468 -441->-468 π⁰ 1.4 GeV -441->out_749 π⁺ 1.2 GeV -469 -443->-469 π⁰ 0.88 GeV -443->out_751 π⁻ 1.9 GeV -442->out_753 γ 0.44 GeV -442->out_754 γ 1.3 GeV -447->out_755 K⁺ 16 GeV -447->out_756 π⁻ 9.4 GeV -444->out_757 K(L)⁰ 62 GeV -445->out_758 K(L)⁰ 32 GeV -446->out_759 γ 30 GeV -446->out_760 γ 53 GeV -470 -450->-470 π⁰ 6.4 GeV -450->out_761 π⁺ 19 GeV -450->out_762 π⁻ 25 GeV -448->out_764 γ 0.28 TeV -448->out_765 γ 21 GeV -449->out_766 γ 31 GeV -449->out_767 γ 0.2 TeV -451->out_768 K⁺ 0.2 TeV -451->out_769 π⁻ 32 GeV -471 -452->-471 K̅⁰ 0.16 TeV -472 -452->-472 π⁰ 24 GeV -453->out_772 π⁺ 29 GeV -453->out_773 π⁻ 0.18 TeV -473 -454->-473 π⁰ 38 GeV -454->out_774 p 0.1 TeV -474 -455->-474 π⁰ 18 GeV -455->out_776 p̅ 58 GeV -456->out_778 γ 0.57 GeV -456->out_779 γ 5.9 GeV -457->out_780 p̅ 3 GeV -457->out_781 π⁺ 0.41 GeV -475 -458->-475 π⁰ 0.22 GeV -476 -458->-476 π⁰ 0.4 GeV -459->out_784 γ 0.24 GeV -459->out_785 γ 0.13 GeV -460->out_786 γ 0.26 GeV -460->out_787 γ 0.86 GeV -461->out_788 γ 0.12 GeV -461->out_789 γ 0.073 GeV -462->out_790 γ 0.35 GeV -462->out_791 γ 0.36 GeV -463->out_792 γ 0.073 GeV -463->out_793 γ 0.52 GeV -464->out_794 K(L)⁰ 1.2 GeV -465->out_795 γ 0.35 GeV -465->out_796 γ 0.17 GeV -466->out_797 γ 0.83 GeV -466->out_798 γ 0.046 GeV -467->out_799 γ 2.1 GeV -467->out_800 γ 0.35 GeV -468->out_801 γ 1.4 GeV -468->out_802 γ 0.033 GeV -469->out_803 γ 0.43 GeV -469->out_804 γ 0.45 GeV -470->out_805 γ 6.2 GeV -470->out_806 γ 0.25 GeV -477 -471->-477 K(S)⁰ 0.16 TeV -472->out_808 γ 1.7 GeV -472->out_809 γ 22 GeV -473->out_810 γ 31 GeV -473->out_811 γ 7.1 GeV -474->out_812 γ 11 GeV -474->out_813 γ 7 GeV -475->out_814 γ 0.12 GeV -475->out_815 γ 0.097 GeV -476->out_816 γ 0.23 GeV -476->out_817 γ 0.17 GeV -477->out_818 π⁺ 74 GeV -477->out_819 π⁻ 91 GeV in_1->-1 p 6.5 TeV in_9->-2 p 6.5 TeV
[ ]:

[75]:
import pyfeyn2.interface.hepmc as hepmc

from pyfeyn2.render.latex.tikzfeynman import TikzFeynmanRender
from pyfeyn2.render.pyx.pyxrender import PyxRender
from pyfeyn2.feynmandiagram import FeynML

from pyfeyn2.auto.bend import auto_bend
from pyfeyn2.auto.label import auto_label
from pyfeyn2.auto.position import feynman_adjust_points,remove_unnecessary_vertices

fd = hepmc.event_to_feynman(event)
fd.legs[0].with_xy(7,-7).with_external(r"$\textcolor{green}{p}$").style.color = "green"
fd.legs[1].with_xy(-6,6).with_external(r"$\textcolor{green}{p}$").style.color = "green"

props=[]
for prop in fd.propagators:
    if prop.id in ["Propagator" + str(ii) for ii in [
        187,
        188,
        189, 192,
        190, 361, 505, 592, 647, 648,
        191, 362, 506, 593]]:
        prop.style.color="red"
        props += [prop]

for p in props:
    fd.remove_propagator(p)
fd.propagators += props

for prop in fd.legs:
    if prop.id in ["Leg" + str(ii) for ii in [
        187,
        188,
        189, 192,
        190, 361, 505, 592, 647, 648,
        191, 362, 506, 593]]:
        prop.style.color="blue"
        if prop.pdgid == 22:
            prop.with_xy(0,6).with_external(r"$\textcolor{blue}{\gamma}$")




d = remove_unnecessary_vertices(fd)
d = feynman_adjust_points(d,size=15)
auto_bend(d)
auto_label(d.propagators)
auto_label(d.legs)
#print(d)
t = TikzFeynmanRender(d)
#print(t.get_src())
#t.src_diag
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 2212
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 2103
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 2203
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid -211
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 211
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 111
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 321
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 221
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid -311
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 113
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 311
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid -313
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 2224
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid -2212
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 331
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 2114
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid -213
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 2112
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid -1114
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 213
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 223
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 323
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid -321
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid -2214
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 2214
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid -323
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 130
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 310
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid -2112
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid -3114
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid 313
  warnings.warn(
/home/apn/data/de.neuwirthinformatik.Alexander/Development/git/feynml/feynml/pdgid.py:70: UserWarning: Inferring type from pdgid not implemented for pdgid -3122
  warnings.warn(
[76]:
t.render(show=True,file="render.pdf")
../../_images/interfaces_hepmc_hepmc_7_0.png
[76]:
../../_images/interfaces_hepmc_hepmc_7_1.png
[ ]:

[ ]: