Event Analysis

Introduction

The routines in this section are intended to be used to analyze event properties. As such they are not part of the main event generation chain, but can be used in comparisons between Monte Carlo events and real data. They are rather free-standing, but assume that input is provided in the PYTHIA 8 Event format, and use a few basic facilities such as four-vectors.

Sphericity

The standard sphericity tensor is
S^{ab} = (sum_i p_i^a p_i^b) / (sum_i p_i^2)
where the sum i runs over the particles in the event, a, b = x, y, z, and p without such an index is the absolute size of the three-momentum . This tensor can be diagonalized to find eigenvalues and eigenvectors.

The above tensor can be generalized by introducing a power r, such that
S^{ab} = (sum_i p_i^a p_i^b p_i^{r-2}) / (sum_i p_i^r)
In particular, r = 1 gives a linear dependence on momenta and thus a collinear safe definition, unlike sphericity.

A sphericity analysis object is declared by

class  Sphericity sph( power, select)  
where
argument power (default = 2.) : is the power r defined above, i.e.
argumentoption 2. : gives Spericity, and
argumentoption 1. : gives the linear form.
argument select (default = 2) : tells which particles are analyzed,
argumentoption 1 : all final-state particles,
argumentoption 2 : all observable final-state particles, i.e. excluding neutrinos and other particles without strong or electromagnetic interactions (the isVisible() particle method), and
argumentoption 3 : only charged final-state particles.

The analysis is performed by a call to the method

method  analyze( event)  
where
argument event : is an object of the Event class, most likely the pythia.event one.
If the routine returns false the analysis failed, e.g. if too few particles are present to analyze.

After the analysis has been performed, a few Sphericity class methods are available to return the result of the analysis:

method  sphericity()  
gives the sphericity (or equivalent if r is not 2),

method  aplanarity()  
gives the aplanarity (with the same comment),

method  eigenValue(i)  
gives one of the three eigenvalues for i = 1, 2 or 3, in descending order,

method  EventAxis(i)  
gives the matching eigenvector, as a Vec4 with vanishing time/energy component.

method  list()  
provides a listing of the above information.

method  nError()  
tells the number of times analyze failed to analyze events.

Thrust

Thrust is obtained by varying the thrust axis so that the longitudinal momentum component projected onto it is maximized, and thrust itself is then defined as the sum of absolute longitudinal momenta divided by the sum of absolute momenta. The major axis is found correspondingly in the plane transverse to thrust, and the minor one is then defined to be transverse to both. Oblateness is the difference between the major and the minor values.

The calculation of thrust is more computer-time-intensive than e.g. linear sphericity, introduced above, and has no specific advantages except historical precedent. In the PYTHIA 6 implementation the search was speeded up at the price of then not being guaranteed to hit the absolute maximum. The current implementation studies all possibilities, but at the price of being slower, with time consumption for an event with n particles growing like n^3.

A thrust analysis object is declared by

class  Thrust thr( select)  
where
argument select (default = 2) : tells which particles are analyzed,
argumentoption 1 : all final-state particles,
argumentoption 2 : all observable final-state particles, i.e. excluding neutrinos and other particles without strong or electromagnetic interactions (the isVisible() particle method), and
argumentoption 3 : only charged final-state particles.

The analysis is performed by a call to the method

method  analyze( event)  
where
argument event : is an object of the Event class, most likely the pythia.event one.
If the routine returns false the analysis failed, e.g. if too few particles are present to analyze.

After the analysis has been performed, a few Thrust class methods are available to return the result of the analysis:

method  thrust(), tMajor(), tMinor(), oblateness()  
gives the thrust, major, minor and oblateness values, respectively,

method  EventAxis(i)  
gives the matching event-axis vectors, for i = 1, 2 or 3 corresponding to thrust, major or minor, as a Vec4 with vanishing time/energy component.

method  list()  
provides a listing of the above information.

method  nError()  
tells the number of times analyze failed to analyze events.

ClusterJet

ClusterJet (a.k.a. LUCLUS and PYCLUS) is a clustering algorithm of the type used for analyses of e^+e^- events, see the PYTHIA 6 manual. A few options are available for some well-known distance measures. Cutoff distances can either be given in terms of a scaled quadratic quantity like y = pT^2/E^2 or an unscaled linear one like pT.

A cluster-jet analysis object is declared by

class  ClusterJet clusterJet( measure, select, massSet,precluster, reassign)  
where
argument measure (default = Lund) : distance measure, to be provided as a character string (actually, only the first character is necessary)
argumentoption Lund : the Lund pT distance,
argumentoption JADE : the JADE mass distance, and
argumentoption Durham : the Durham kT measure.
argument select (default = 2) : tells which particles are analyzed,
argumentoption 1 : all final-state particles,
argumentoption 2 : all observable final-state particles, i.e. excluding neutrinos and other particles without strong or electromagnetic interactions (the isVisible() particle method), and
argumentoption 3 : only charged final-state particles.
argument massSet (default = 2) : masses assumed for the particles used in the analysis
argumentoption 0 : all massless,
argumentoption 1 : photons are massless while all others are assigned the pi+- mass, and
argumentoption 2 : all given their correct masses.
argument precluster (default = false) : perform or not a early preclustering step, where nearby particles are lumped together so as to speed up the subsequent normal clustering.
argument reassign (default = false) : reassign all particles to the nearest jet each time after two jets have been joined.

The analysis is performed by a

method  analyze( event, yScale, pTscale, nJetMin, nJetMax)  
where
argument event : is an object of the Event class, most likely the pythia.event one.
argument yScale : is the cutoff joining scale, below which jets are joined. Is given in quadratic dimensionless quantities. Either yScale or pTscale must be set nonvanishing, and the larger of the two dictates the actual value.
argument pTscale : is the cutoff joining scale, below which jets are joined. Is given in linear quantities, such as pT or m depending on the measure used, but always in units of GeV. Either yScale or pTscale must be set nonvanishing, and the larger of the two dictates the actual value.
argument nJetMin (default = 1) : the minimum number of jets to be reconstructed. If used, it can override the yScale and pTscale values.
argument nJetMax (default = 0) : the maximum number of jets to be reconstructed. Is not used if below nJetMin. If used, it can override the yScale and pTscale values. Thus e.g. nJetMin = nJetMax = 3 can be used to reconstruct exactly 3 jets.
If the routine returns false the analysis failed, e.g. because the number of particles was smaller than the minimum number of jets requested.

After the analysis has been performed, a few ClusterJet class methods are available to return the result of the analysis:

method  size()  
gives the number of jets found, with jets numbered 0 through size() - 1,

method  p(i)  
gives a Vec4 corresponding to the four-momentum defined by the sum of all the contributing particles to the i'th jet,

method  jetAssignment(i)  
gives the index of the jet that the particle i of the event record belongs to,

method  list()  
provides a listing of the reconstructed jets.

method  nError()  
tells the number of times analyze failed to analyze events.

CellJet

CellJet (a.k.a. PYCELL) is a simple cone jet finder in the UA1 spirit, see the PYTHIA 6 manual. It works in an (eta, phi, eT) space, where eta is pseudorapidity, phi azimuthal angle and eT transverse energy. It will draw cones in R = sqrt(Delta-eta^2 + Delta-phi^2) around seed cells. If the total eT inside the cone exceeds the threshold, a jet is formed, and the cells are removed from further analysis. There are no split or merge procedures, so later-found jets may be missing some of the edge regions already used up by previous ones.

A cell-jet analysis object is declared by

class  CellJet cellJet( etaMax, nEta, nPhi, select, smear, resolution, upperCut, threshold)  
where
argument etaMax (default = 5.) : the maximum +-pseudorapidity that the detector is assumed to cover.
argument nEta (default = 50) : the number of equal-sized bins that the +-etaMax range is assumed to be divided into.
argument nPhi (default = 32) : the number of equal-sized bins that the phi range +-pi is assumed to be divided into.
argument select (default = 2) : tells which particles are analyzed,
argumentoption 1 : all final-state particles,
argumentoption 2 : all observable final-state particles, i.e. excluding neutrinos and other particles without strong or electromagnetic interactions (the isVisible() particle method), and
argumentoption 3 : only charged final-state particles.
argument smear (default = 0) : strategy to smear the actual eT bin by bin,
argumentoption 0 : no smearing,
argumentoption 1 : smear the eT according to a Gaussian with width resolution * sqrt(eT), with the Gaussian truncated at 0 and upperCut * eT,
argumentoption 2 : smear the e = eT * cosh(eta) according to a Gaussian with width resolution * sqrt(e), with the Gaussian truncated at 0 and upperCut * e.
argument resolution (default = 0.5) : see above
argument upperCut (default = 2.) : see above
argument threshold (default = 0 GeV) : completely neglect all bins with an eT < threshold.

The analysis is performed by a

method  analyze( event, eTjetMin, coneRadius, eTseed)  
where
argument event : is an object of the Event class, most likely the pythia.event one.
argument eTjetMin (default = 20. GeV) : is the minimum transverse energy inside a cone for this to be accepted as a jet.
argument coneRadius (default = 0.7) : is the size of the cone in (eta, phi) space drawn around the geometric center of the jet.
argument eTseed (default = 1.5 GeV) : the mimimum eT in a cell for this to be acceptable as the trial center of a jet.
If the routine returns false the analysis failed, but currently this is not foreseen ever to happen.

After the analysis has been performed, a few CellJet class methods are available to return the result of the analysis:

method  size()  
gives the number of jets found, with jets numbered 0 through size() - 1,

method  eT(i)  
gives the eT of the i'th jet, where jets have been ordered with decreasing eT values,

method  etaCenter(i), phiCenter(i)  
gives the eta and phi coordinates of the geometrical center of the i'th jet,

method  etaWeighted(i), phiWeighted(i)  
gives the eta and phi coordinates of the eT-weighted center of the i'th jet,

method  multiplicity(i)  
gives the number of particles clustered into the i'th jet,

method  pMassless(i)  
gives a Vec4 corresponding to the four-momentum defined by the eT and the weighted center of the i'th jet,

method  pMassive(i)  
gives a Vec4 corresponding to the four-momentum defined by the sum of all the contributing cells to the i'th jet, where each cell contributes a four-momentum as if all the eT is deposited in the center of the cell,

method  m(i)  
gives the invariant mass of the i'th jet, defined by the pMassive above,

method  list()  
provides a listing of the above information (except pMassless, for reasons of space).

method  nError()  
tells the number of times analyze failed to analyze events.