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.

You can create a list with particles from HepSim and ProMC files using hephysics.hepsim.PromcUtil class. You can create a lists for fast manipulation with hephysics.jet.FastParticle class, or list with the standard hephysics.particle.LParticle class.

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)
 3: # -*- coding: utf-8 -*-
 5: """
 6: Particle data from the PDG
 7: """
 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: = 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.quarkcontent
36:     def __repr__(self):
37:         return '<Particle ''>'
39: class Decay(object):
40:     def __init__(self):
41:         pass
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)
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 hephysics.particle.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: # Physics/HEP | P | 1.7 | S.Chekanov | Max angle between decay products. A Monte Carlo simulation
 3: from java.awt import Color
 4: from jhplot  import *
 5: from java.util import Random
 6: from hephysics.particle import *
 7: from math import *
 9: P=400
10: # define initial  Lorentz particle
11: Top=LParticle("Top quark",170)
12: Top.setV3( 0,0,P )
13: print Top.toString()
15: # define Lorentz particles
16: W = LParticle("W",80)
17: b = LParticle("b",5)
18: q1 = LParticle("q1",0.004)
19: q2 = LParticle("q2",0.004)
21: r = Random()
22: PI=3.1415926
23: PI2=2*PI
24: deg= 180 / PI
26: h1 = H1D("maxAngle",100, 0,180)
27: for i in range(10000):
28:      if (i%1000==0): print "event=",i
30:      Top.twoBodyDecay(W, b,1);
31:      theta = acos(2.0*r.nextDouble()-1.0 )
32:      phi   = PI2 *r.nextDouble()
33:      Top.setThetaPhiP(theta,phi,P)
34:      W.boost( Top )
35:      b.boost( Top )
36:      # W decay
37:      W.twoBodyDecay(q1,q2,1)
38:      # the boost
39:      q1.boost( W )
40:      q2.boost( W )
42:      # print q1.toString()
43:      p=P0D("max angle")
44:      p.add(W.angle(q1)*deg)
45:      p.add(W.angle(q2)*deg)
46:      pmax=p.getMax()
47:      h1.fill(pmax)
49: c1 = HPlot("Canvas",600,400,1, 1)
50: c1.setGTitle("Max angle t &rarr; W b &rarr; b q #bar{q}")
51: c1.visible(1)
52: c1.setRange(0,180,0,1000)
53: c1.setNameX("angle_{max} [deg]")
54: c1.setNameY("Events")
56: h1.setFill(1)
57: h1.setFillColor(
58: c1.draw(h1)
60: # export to EPS figure
61: 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]).

Jet algorithms

SCaVis includes a number of jet algorithms implemented in Java. This is a list of the algorithms:

The KT algorithm is interfaces with the LParticle class.

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: 2015/01/28 20:52 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