You are a guest. Restricted access. Read more.
SCaVis manual

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 systematic errors using the methods of the P1D class.

Here is a step-by step instruction:

You will see an image with the HepData points.

Reading ROOT files

You can read ROOT files with histograms or TGraph as discussed in reading root files. SCaVis use FreeHep Java API to read such files and convert to SCaVis native representation.

Reading events with Monte Carlo simulation

SCaVis can be used to read and process Monte Carlo simulation events with particle collisions. The files can be download Monte Carlo events can be downloaded from HepSim Monte Carlo repository supported at the ANL laboratory. Read the HepSim manual that shows how to read Monte Carlo simulations (including NLO) data. The HepSim also includes scripts illustrating how to access 4-momentum information on particles.

Reading PDG table

Use SCaVis to read PDG table. Here is a handy script that reads the file “mass_width_2008.csv” located inside the SCaVis directory “macros/data”.

Code example

  Download for this example is disabled for non-members
 1: # Physics/HEP | P | 1.7 |  Matt Williams  | Reading information on partions from PDG data (2008)
 2:
 3: # -*- coding: utf-8 -*-
 4:
 5: """
 6: Particle data from the PDG
 7: """
 8:
 9: class Particle(object):
10:     """
11:     An elementary or composite particle
12:     """
13:     def __init__(self, mass, masspositiveerror, massnegativeerror, width, widthpositiveerror, widthnegativeerror, isospin, gparity, totalspin, spaceparity, chargeconjugation, antiparticleflag, number, charge, rank, particlestatus, name, quarkcontent):
14:         self.number = number
15:         self.name = name
16:         self.mass = mass
17:         self.masspositiveerror = masspositiveerror
18:         self.massnegativeerror = massnegativeerror
19:         self.width = width
20:         self.widthpositiveerror = widthpositiveerror
21:         self.widthnegativeerror = widthnegativeerror
22:         self.isospin = isospin
23:         self.gparity = gparity
24:         self.totalspin = totalspin
25:         self.spaceparity = spaceparity
26:         self.chargeconjugation = chargeconjugation
27:         self.antiparticleflag = antiparticleflag
28:         self.charge = charge
29:         self.rank = rank
30:         self.particlestatus = particlestatus
31:         self.quarkcontent = quarkcontent
32:     def add_decay(self, decay):
33:         pass
34:     def __str__(self):
35:         return self.name+' : '+self.quarkcontent
36:     def __repr__(self):
37:         return '<Particle '+self.name+'>'
38:
39: class Decay(object):
40:     def __init__(self):
41:         pass
42:
43: file=SystemDir+fSep+"macros"+fSep+"examples"+fSep+"data"+fSep+"mass_width_2008.csv"
44: pdginfofile = open("mass_width_2008.csv")
45: particles = []
46: for line in pdginfofile:
47:     if line[0] == '*':
48:         continue
49:     line = line.split(',')
50:     if len(line) != 18:
51:         continue
52:     line = [element.strip() for element in line]
53:     print line
54:     particle = Particle(line[0], line[1], line[2], line[3], line[4], line[5], line[6], line[7], line[8], line[9], line[10], line[11], line[12], line[13], line[14], line[15], line[16], line[17])
55:     particles.append(particle)
56:
57: #for particle in particles: print particle
58: print particles

This examples create “particle” objects with all needed informations (masses, spins, charges etc). The script assumes that you run it inside the SCaVis which defines the path to the mass_width_2008.csv file. Look at examples in the Scientific data analysis using Jython and Java

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 &rarr; W b &rarr; 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:

Feynman diagrams

SCaVis includes Redberry computer algebra (CA) system designed for algebraic manipulations with tensors. It supports symbolic algebra, tensor-specific transformations, simplification, Feynman diagrams and one-loop counterterms Please read “Introduction to Redberry: the computer algebra system designed for tensor manipulation” by D. A. Bolotin and S. V. Poslavsky (arXiv:1302.1219 [cs.SC]).

Currently, the description of Redberry is beyond the scope of this manual. You can run the Groovy tutorials that are given in the Redberry link.

man/science/physics/hep.txt · Last modified: 2014/05/28 18:51 by admin
CC Attribution-Share Alike 3.0 Unported
Powered by PHP Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 Valid HTML5