You are a guest. Restricted access. Read more.

Particle Physics

Showing data from HepData database

The best approach is to download “scavis” Jython script from Durham HepData database and run it in the SCaVis editor or as a batch script. This is the best supported approach which also allows to deal with statistical and systematical errors separately since data are imported to the P1D object. You can further modify P1D graphical attributes or replace HPlot canvas with other canvaces (like HPlotJa). You can also combine statistical and systematical errors using the methods of the P1D class.

Lorentz representation of a particle

You can represent a relativistic particle using a Lorentz representation. Use the class LParticle which defines a particle in terms of the four-Lorentz vector. A particle is characterized by either (px,py,pz,E) or (x,y,z,time).

For example, below we define a “top” quark with the mass 170 GeV and with the momentum pZ=400 GeV

from hephysics.particle import *
Top=LParticle("top quark",170)
Top.setV3( 0,0,400 )
print Top.toString()

Now we are ready to go with a small Monte Carlo simulation for decay of the top particle. Below we calculate the maximum opening angle between its decay products

Code example

  Download for this example is disabled for non-members
 1: # Max angle between decay products. A Monte Carlo simulation
 2: # S.Chekanov.
 3:
 4: from java.awt import Color
 5: from jhplot  import *
 6: from java.util import Random
 7: from hephysics.particle import *
 8: from math import *
 9:
10: P=400
11: # define initial  Lorentz particle
12: Top=LParticle("Top quark",170)
13: Top.setV3( 0,0,P )
14: print Top.toString()
15:
16: # define Lorentz particles
17: W = LParticle("W",80)
18: b = LParticle("b",5)
19: q1 = LParticle("q1",0.004)
20: q2 = LParticle("q2",0.004)
21:
22: r = Random()
23: PI=3.1415926
24: PI2=2*PI
25: deg= 180 / PI
26:
27: h1 = H1D("maxAngle",100, 0,180)
28: for i in range(10000):
29:      if (i%1000==0): print "event=",i
30:
31:      Top.twoBodyDecay(W, b,1);
32:      theta = acos(2.0*r.nextDouble()-1.0 )
33:      phi   = PI2 *r.nextDouble()
34:      Top.setThetaPhiP(theta,phi,P)
35:      W.boost( Top )
36:      b.boost( Top )
37:      # W decay
38:      W.twoBodyDecay(q1,q2,1)
39:      # the boost
40:      q1.boost( W )
41:      q2.boost( W )
42:
43:      # print q1.toString()
44:      p=P0D("max angle")
45:      p.add(W.angle(q1)*deg)
46:      p.add(W.angle(q2)*deg)
47:      pmax=p.getMax()
48:      h1.fill(pmax)
49:
50: c1 = HPlot("Canvas",600,400,1, 1)
51: c1.setGTitle("Max angle t → W b → b q #bar{q}")
52: c1.visible(1)
53: c1.setRange(0,180,0,1000)
54: c1.setNameX("angle_{max} [deg]")
55: c1.setNameY("Events")
56:
57: h1.setFill(1)
58: h1.setFillColor(Color.blue)
59: c1.draw(h1)
60:
61: # export to EPS figure
62: c1.export("angle"+".eps")

The output of the code is below:

Under construction

Navigation

Print/export