README

fastjet

GoDoc

Simple Go-based implementation of the C++ FastJet library.

Expand ▾ Collapse ▴

Documentation

Overview

    Package fastjet is a Go-based implementation of the C++ FastJet library.

    Index

    Constants

    View Source
    const (
    	// Used to protect against parton-level events where pt can be zero
    	// for some partons, giving rapidity=infinity. KtJet fails in those cases.
    	MaxRap = 1e5
    )

    Variables

    This section is empty.

    Functions

    func Distance

    func Distance(j1, j2 *Jet) float64

      Distance returns the squared cylinder (rapidity-phi) distance between 2 jets

      func Register

      func Register(name string, plugin Plugin)

      Types

      type AreaDefinition

      type AreaDefinition struct{}

      type Builder

      type Builder interface {
      	// InclusiveJets returns all jets (in the sense of
      	// the inclusive algorithm) with pt >= ptmin
      	InclusiveJets(ptmin float64) ([]Jet, error)
      
      	// Constituents retrieves the constituents of a jet
      	Constituents(jet *Jet) ([]Jet, error)
      }

        Builder builds jets out of 4-vectors

        type ByPt

        type ByPt []Jet

          ByPt sorts jets by descending Pt

          func (ByPt) Len

          func (p ByPt) Len() int

          func (ByPt) Less

          func (p ByPt) Less(i, j int) bool

          func (ByPt) Swap

          func (p ByPt) Swap(i, j int)

          type ClusterSequence

          type ClusterSequence struct {
          	// contains filtered or unexported fields
          }

          func NewClusterSequence

          func NewClusterSequence(jets []Jet, def JetDefinition) (*ClusterSequence, error)

          func (*ClusterSequence) Constituents

          func (cs *ClusterSequence) Constituents(jet *Jet) ([]Jet, error)

            Constituents retrieves the list of constituents of a given jet

            func (*ClusterSequence) ExclusiveJets

            func (cs *ClusterSequence) ExclusiveJets(dcut float64) ([]Jet, error)

            func (*ClusterSequence) ExclusiveJetsUpTo

            func (cs *ClusterSequence) ExclusiveJetsUpTo(njets int) ([]Jet, error)

            func (*ClusterSequence) InclusiveJets

            func (cs *ClusterSequence) InclusiveJets(ptmin float64) ([]Jet, error)

            func (*ClusterSequence) NumExclusiveJets

            func (cs *ClusterSequence) NumExclusiveJets(dcut float64) int

              NumExclusiveJets returns the number of exclusive jets that would have been obtained running the algorithm in exclusive mode with the given dcut

              type ClusterSequenceArea

              type ClusterSequenceArea struct {
              	// contains filtered or unexported fields
              }

              func NewClusterSequenceArea

              func NewClusterSequenceArea(jets []Jet, def JetDefinition, area AreaDefinition) (*ClusterSequenceArea, error)

              func (*ClusterSequenceArea) Area

              func (csa *ClusterSequenceArea) Area(jet *Jet) float64

              func (*ClusterSequenceArea) AreaErr

              func (csa *ClusterSequenceArea) AreaErr(jet *Jet) float64

              func (*ClusterSequenceArea) ExclusiveJets

              func (cs *ClusterSequenceArea) ExclusiveJets(dcut float64) ([]Jet, error)

              func (*ClusterSequenceArea) ExclusiveJetsUpTo

              func (cs *ClusterSequenceArea) ExclusiveJetsUpTo(njets int) ([]Jet, error)

              func (*ClusterSequenceArea) InclusiveJets

              func (csa *ClusterSequenceArea) InclusiveJets(ptmin float64) ([]Jet, error)

              func (*ClusterSequenceArea) NumExclusiveJets

              func (csa *ClusterSequenceArea) NumExclusiveJets(dcut float64) int

              type ClusterSequenceStructure

              type ClusterSequenceStructure struct {
              	// contains filtered or unexported fields
              }

                ClusterSequenceStructure is a ClusterSequence that implements the JetStructure interface.

                func (ClusterSequenceStructure) Constituents

                func (css ClusterSequenceStructure) Constituents(jet *Jet) ([]Jet, error)

                type DefaultRecombiner

                type DefaultRecombiner struct {
                	// contains filtered or unexported fields
                }

                func NewRecombiner

                func NewRecombiner(scheme RecombinationScheme) DefaultRecombiner

                func (DefaultRecombiner) Description

                func (rec DefaultRecombiner) Description() string

                func (DefaultRecombiner) Preprocess

                func (rec DefaultRecombiner) Preprocess(jet *Jet) error

                func (DefaultRecombiner) Recombine

                func (rec DefaultRecombiner) Recombine(j1, j2 *Jet) (Jet, error)

                func (DefaultRecombiner) Scheme

                type Jet

                type Jet struct {
                	fmom.PxPyPzE
                
                	UserInfo UserInfo // holds extra user information for this Jet
                	// contains filtered or unexported fields
                }

                  Jet holds minimal information of use for jet-clustering routines

                  func NewJet

                  func NewJet(px, py, pz, e float64) Jet

                  func (*Jet) Constituents

                  func (jet *Jet) Constituents() []Jet

                    Constituents returns the list of constituents for this jet.

                    func (*Jet) Phi

                    func (jet *Jet) Phi() float64

                    func (*Jet) Pt2

                    func (jet *Jet) Pt2() float64

                    func (*Jet) Rapidity

                    func (jet *Jet) Rapidity() float64

                    type JetAlgorithm

                    type JetAlgorithm int

                      JetAlgorithm defines the algorithm used for clustering jets

                      const (
                      	UndefinedJetAlgorithm JetAlgorithm = iota
                      	KtAlgorithm
                      	CambridgeAlgorithm
                      	AntiKtAlgorithm
                      	GenKtAlgorithm
                      	CambridgeForPassiveAlgorithm
                      	GenKtForPassiveAlgorithm
                      	EeKtAlgorithm
                      	EeGenKtAlgorithm
                      	PluginAlgorithm
                      
                      	AachenAlgorithm          = CambridgeAlgorithm
                      	CambridgeAachenAlgorithm = CambridgeAlgorithm
                      )

                      type JetDefinition

                      type JetDefinition struct {
                      	// contains filtered or unexported fields
                      }

                        JetDefinition contains a full specification of how to carry out jet clustering.

                        func NewJetDefinition

                        func NewJetDefinition(alg JetAlgorithm, r float64, scheme RecombinationScheme, strategy Strategy) JetDefinition

                          NewJetDefinition returns a new JetDefinition with the provided configuration.

                          func NewJetDefinitionExtra

                          func NewJetDefinitionExtra(alg JetAlgorithm, r float64, scheme RecombinationScheme, strategy Strategy, extra float64) JetDefinition

                            NewJetDefinitionExtra returns a new JetDefinition with an extra float64 parameter.

                            func (JetDefinition) Algorithm

                            func (def JetDefinition) Algorithm() JetAlgorithm

                            func (JetDefinition) Description

                            func (def JetDefinition) Description() string

                              Description returns a string description of the current JetDefinition matching the one from C++ FastJet.

                              func (JetDefinition) ExtraParam

                              func (def JetDefinition) ExtraParam() float64

                              func (JetDefinition) Plugin

                              func (def JetDefinition) Plugin() Plugin

                              func (JetDefinition) R

                              func (def JetDefinition) R() float64

                              func (JetDefinition) RecombinationScheme

                              func (def JetDefinition) RecombinationScheme() RecombinationScheme

                              func (JetDefinition) Recombiner

                              func (def JetDefinition) Recombiner() Recombiner

                              func (JetDefinition) Strategy

                              func (def JetDefinition) Strategy() Strategy

                              type JetStructure

                              type JetStructure interface {
                              	Constituents(jet *Jet) ([]Jet, error)
                              }

                                JetStructure allows to retrieve information related to the clustering.

                                type Plugin

                                type Plugin interface {
                                	Description() string
                                	RunClustering(builder Builder) error
                                	R() float64
                                }

                                func GetPlugin

                                func GetPlugin(name string) (Plugin, error)

                                type RecombinationScheme

                                type RecombinationScheme int

                                  RecombinationScheme defines the recombination choice for the 4-momenta of pseudo-jets during the clustering procedure

                                  const (
                                  	EScheme   RecombinationScheme = iota // summing the 4-momenta
                                  	PtScheme                             // pt-weighted recombination of y,phi
                                  	Pt2Scheme                            // pt^2 weighted recombination of y,phi
                                  	EtScheme
                                  	Et2Scheme
                                  	BIPtScheme
                                  	BIPt2Scheme
                                  
                                  	ExternalScheme RecombinationScheme = 99
                                  )

                                  func (RecombinationScheme) String

                                  func (s RecombinationScheme) String() string

                                  type Recombiner

                                  type Recombiner interface {
                                  	Description() string
                                  	Recombine(j1, j2 *Jet) (Jet, error)
                                  	Preprocess(jet *Jet) error
                                  	Scheme() RecombinationScheme
                                  }

                                  type Strategy

                                  type Strategy int

                                    Strategy defines the algorithmic strategy used while clustering.

                                    const (
                                    	N2MinHeapTiledStrategy Strategy = -4
                                    	N2TiledStrategy        Strategy = -3
                                    	N2PoorTiledStrategy    Strategy = -2
                                    	N2PlainStrategy        Strategy = -1
                                    	N3DumbStrategy         Strategy = 0
                                    	BestStrategy           Strategy = 1
                                    	NlnNStrategy           Strategy = 2
                                    	NlnN3piStrategy        Strategy = 3
                                    	NlnN4piStrategy        Strategy = 4
                                    	NlnNCam4piStrategy     Strategy = 14
                                    	NlnNCam2pi2RStrategy   Strategy = 13
                                    	NlnNCamStrategy        Strategy = 12
                                    
                                    	PluginStrategy Strategy = 999
                                    )

                                    func (Strategy) String

                                    func (s Strategy) String() string

                                    type UserInfo

                                    type UserInfo interface{}

                                      UserInfo holds extra user information in a Jet

                                      Directories

                                      Path Synopsis
                                      internal
                                      delaunay
                                      package delaunay contains functions to compute a Delaunay Triangulation
                                      package delaunay contains functions to compute a Delaunay Triangulation
                                      heap
                                      package heap implements a min-heap for pairs of jets.
                                      package heap implements a min-heap for pairs of jets.
                                      plot
                                      package plot contains functions to plot the Delaunay Triangulation and the Voronoi Diagram.
                                      package plot contains functions to plot the Delaunay Triangulation and the Voronoi Diagram.
                                      predicates
                                      package predicates handles the geometric predicates for a delaunay triangulation
                                      package predicates handles the geometric predicates for a delaunay triangulation