go-hep.org/x/hep@v0.38.1/lhef/lhef.go (about) 1 // Copyright ©2017 The go-hep Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Package lhef implements the "Les Houches Event File" data format. 6 package lhef // import "go-hep.org/x/hep/lhef" 7 8 // XSecInfo contains information given in the xsecinfo tag. 9 type XSecInfo struct { 10 Neve int64 // the number of events. 11 TotXSec float64 // the total cross section in pb. 12 MaxWeight float64 // the maximum weight. 13 MeanWeight float64 // the average weight. 14 NegWeights bool // does the file contain negative weights ? 15 VarWeights bool // does the file contain varying weights ? 16 } 17 18 // Cut represents a cut used by the Matrix Element generator. 19 type Cut struct { 20 Type string // the variable in which to cut. 21 NP1 string // symbolic name for p1. 22 NP2 string // symbolic name for p2. 23 P1 []int64 // the first types particle types for which this cut applies. 24 P2 []int64 // the second types particle types for which this cut applies. 25 Min float64 // the minimum value of the variable 26 Max float64 // the maximum value of the variable 27 } 28 29 // ProcInfo represents the information in a procinfo tag. 30 type ProcInfo struct { 31 Iproc int32 // the id number for the process. 32 Loops int32 // the number of loops. 33 QcdOrder int32 // the number of QCD vertices. 34 EwOrder int32 // the number of electro-weak vertices. 35 Fscheme string // the factorization scheme used. 36 Rscheme string // the renormalization scheme used. 37 Scheme string // the NLO scheme used. 38 Description string // Description of the process. 39 } 40 41 // MergeInfo represents the information in a mergeinfo tag. 42 type MergeInfo struct { 43 Iproc int32 // the id number for the process. 44 Scheme string // the scheme used to reweight events. 45 MergingScale float64 // the merging scale used if different from the cut definitions. 46 MaxMult bool // is this event reweighted as if it was the maximum multiplicity. 47 } 48 49 // Weight represents the information in a weight tag. 50 type Weight struct { 51 Name string // the identifier for this set of weights. 52 Born float64 // the relative size of the born cross section of this event. 53 Sudakov float64 // the relative size of the sudakov applied to this event. 54 Weights []float64 // the weights of this event. 55 } 56 57 // Clus represents a clustering of two particle entries into one as 58 // defined in a clustering tag. 59 type Clus struct { 60 P1 int32 // the first particle entry that has been clustered. 61 P2 int32 // the second particle entry that has been clustered. 62 P0 int32 // the particle entry corresponding to the clustered particles. 63 Scale float64 // the scale in GeV associated with the clustering. 64 Alphas float64 // the alpha_s used in the corresponding vertex, if this was used in the cross section. 65 } 66 67 // PDFInfo represents the information in a pdfinfo tag. 68 type PDFInfo struct { 69 P1 int64 // type of the incoming particle 1. 70 P2 int64 // type of the incoming particle 2. 71 X1 float64 // x-value used for the incoming particle 1. 72 X2 float64 // x-value used for the incoming particle 2. 73 XF1 float64 // value of the PDF for the incoming particle 1. 74 XF2 float64 // value of the PDF for the incoming particle 2. 75 Scale float64 // scale used in the PDFs 76 } 77 78 // HEPRUP is a simple container corresponding to the Les Houches accord common block (User Process Run common block.) 79 // http://arxiv.org/abs/hep-ph/0109068 has more details. 80 // The members are named in the same way as in the common block. 81 // However, FORTRAN arrays are represented by slices, except for the arrays of 82 // length 2 which are represented as arrays (of size 2.) 83 type HEPRUP struct { 84 IDBMUP [2]int64 // PDG id's of beam particles. 85 EBMUP [2]float64 // Energy of beam particles (in GeV.) 86 PDFGUP [2]int32 // Author group for the PDF used for the beams according to the PDFLib specifications. 87 PDFSUP [2]int32 // Id number of the PDF used for the beams according to the PDFLib specifications. 88 IDWTUP int32 // Master switch indicating how the ME generator envisages the events weights should be interpreted according to the Les Houches accord. 89 NPRUP int32 // number of different subprocesses in this file. 90 XSECUP []float64 // cross-sections for the different subprocesses in pb. 91 XERRUP []float64 // statistical error in the cross sections for the different subprocesses in pb. 92 XMAXUP []float64 // maximum event weights (in HEPEUP.XWGTUP) for different subprocesses. 93 LPRUP []int32 // subprocess code for the different subprocesses. 94 XSecInfo XSecInfo // contents of the xsecinfo tag 95 Cuts []Cut // contents of the cuts tag. 96 PTypes map[string][]int64 // a map of codes for different particle types. 97 ProcInfo map[int64]ProcInfo // contents of the procinfo tags 98 MergeInfo map[int64]MergeInfo // contents of the mergeinfo tags 99 GenName string // name of the generator which produced the file. 100 GenVersion string // version of the generator which produced the file. 101 } 102 103 // EventGroup represents a set of events which are to be considered together. 104 type EventGroup struct { 105 Events []HEPEUP // the list of events to be considered together 106 Nreal int32 // number of real event in this event group. 107 Ncounter int32 // number of counter events in this event group. 108 } 109 110 // HEPEUP is a simple container corresponding to the Les Houches accord common block (User Process Event common block.) 111 // http://arxiv.org/abs/hep-ph/0109068 has more details. 112 // The members are named in the same way as in the common block. 113 // However, FORTRAN arrays are represented by slices, except for the arrays of length 2 which are represented as arrays of size 2. 114 type HEPEUP struct { 115 NUP int32 // number of particle entries in the current event. 116 IDPRUP int32 // subprocess code for this event (as given in LPRUP) 117 XWGTUP float64 // weight for this event. 118 XPDWUP [2]float64 // PDF weights for the 2 incomong partons. Note that this variable is not present in the current LesHouches accord (http://arxiv.org/abs/hep-ph/0109068) but will hopefully be present in a future accord. 119 SCALUP float64 // scale in GeV used in the calculation of the PDFs in this event 120 AQEDUP float64 // value of the QED coupling used in this event. 121 AQCDUP float64 // value of the QCD coupling used in this event. 122 IDUP []int64 // PDG id's for the particle entries in this event. 123 ISTUP []int32 // status codes for the particle entries in this event. 124 MOTHUP [][2]int32 // indices for the first and last mother for the particle entries in this event. 125 ICOLUP [][2]int32 // colour-line indices (first(second) is (anti)colour) for the particle entries in this event. 126 PUP [][5]float64 // lab frame momentum (Px, Py, Pz, E and M in GeV) for the particle entries in this event. 127 VTIMUP []float64 // invariant lifetime (c*tau, distance from production to decay in mm) for the particle entries in this event. 128 SPINUP []float64 // spin info for the particle entries in this event given as the cosine of the angle between the spin vector of a particle and the 3-momentum of the decaying particle, specified in the lab frame. 129 Weights []Weight // weights associated with this event. 130 Clustering []Clus // contents of the clustering tag. 131 PdfInfo PDFInfo // contents of the pdfinfo tag. 132 SubEvents EventGroup // events included in the group if this is not a single event. 133 } 134 135 // EOF