tbuilder

package
v0.0.0-...-cbb5184 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(cfg *config)

Options encodes the various settings to pass to the reconstruction.

func WithDebug

func WithDebug(d bool) Option

WithDebug enables debugging print messages. Default is false.

func WithRndSeed

func WithRndSeed(s uint64) Option

WithRndSeed sets the seed for random number generations used in the smearing. Default is 1234

func WithSmearAll

func WithSmearAll(d bool) Option

WithSmearAll enables smearing of all kinematics quantities This include lepton pT, polar, and azimuth angles as well as jet energy, polar and azimuth angles. Enabled by default. Default number of iterations is 10, but can be changed using WithSmearN(n) function.

func WithSmearJetAzimu

func WithSmearJetAzimu(d bool) Option

WithSmearJetAzimtu enables smearing of jet azimuth angle. Disabled by default. To activate individual smearings, the option WithSmearAll(false) must be passed.

func WithSmearJetPt

func WithSmearJetPt(d bool) Option

WithSmearLepPt enables smearing of jet pT (actually jet energy). Disabled by default. To activate individual smearings, the option WithSmearAll(false) must be passed.

func WithSmearJetTheta

func WithSmearJetTheta(d bool) Option

WithSmearJetTheta enables smearing of jet theta (polar) angle. Disabled by default. To activate individual smearings, the option WithSmearAll(false) must be passed.

func WithSmearLepAzimu

func WithSmearLepAzimu(d bool) Option

WithSmearLepAzimtu enables smearing of lepton azimuth angle. Disabled by default. To activate individual smearings, the option WithSmearAll(false) must be passed.

func WithSmearLepPt

func WithSmearLepPt(d bool) Option

WithSmearLepPt enables smearing of lepton pT. Disabled by default. To activate individual smearings, the option WithSmearAll(false) must be passed.

func WithSmearLepTheta

func WithSmearLepTheta(d bool) Option

WithSmearLepTheta enables smearing of lepton theta (polar) angle. Disabled by default. To activate individual smearings, the option WithSmearAll(false) must be passed.

func WithSmearN

func WithSmearN(n int) Option

WithSmearN sets the number of iteration used in the smearing of the kinematics. Default is 10.

type TopBuilder

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

TopBuilder reconstructs ttbar pairs in dilepton final state. Two methods can be used:

Each of these method is implemented along a smearing of object kinematics in order to maximize the reconstruction efficiency.

func New

func New(fname string, opts ...Option) (*TopBuilder, error)

New returns a new TopBuilder object from the path to a ROOT file holding histograms used to smear object kinematics, and set of options.

func (*TopBuilder) AllReco

func (tb *TopBuilder) AllReco(
	lepTLV, lepbarTLV fmom.PxPyPzE, pdgIDLep, pdgIDLepBar int,
	jetTLV, jetbarTLV fmom.PxPyPzE, isbJet, isbJetbar bool,
	emissx, emissy float64, rdnNumbers ...[12]float64) ([2]fmom.PxPyPzE, [2]fmom.PxPyPzE, [2]int)

AllReco performs the Sonnenschein and the Ellipse reconstruction and return 2 array of 4-momenta (top[2] and anti-top[2]) as well as an array of status[2] of the reconstruction. The array index value is 0 for the Sonnenschein method and 1 for the Ellipse method. Status[i] = N means the reconstruction i worked for N smearing iterations. Therefore, Status[i] = 0 means the reconstruction has failed. Four-momemtum and missing Et components must be given in GeV. rdnNumbers are tuples of the 12 numbers needed per smearing iteration. If rndNumbers is not empty, smearing is automatically activated for this function call for all kinematic variables. When several tuples are passed, the number of smearing iterations is set to be number of tuples, ie len(rdnNumbers). The ordering of random numbers is the following:

rdn[12] = [12]float64{
  scaleLep , scaleLepBar ,
  thetaLep , thetaLepBar ,
  azimuLep , azimuLepBar ,
  scaleJet0, scaleJet0Bar,
  thetaJet0, thetaJet0Bar,
  azimuJet0, azimuJet0Bar,
  scaleJet1, scaleJet1Bar,
  thetaJet1, thetaJet1Bar,
  azimuJet1, azimuJet1Bar,
}

func (*TopBuilder) ElliReco

func (tb *TopBuilder) ElliReco(
	lepTLV, lepbarTLV fmom.PxPyPzE, pdgIDLep, pdgIDLepBar int,
	jetTLV, jetbarTLV fmom.PxPyPzE, isbJet, isbJetbar bool,
	emissx, emissy float64, rdnNumbers ...[12]float64) (fmom.PxPyPzE, fmom.PxPyPzE, int)

ElliReco performs the Sonnenschein reconstruction and return 2 4-momentum (top and anti-top) as well as a status of the reconstruction. Status = N means the reconstruction worked for N smearing iterations. Therefore, Status = 0 means the reconstruction has failed. Four-momemtum and missing Et components must be given in GeV. rdnNumbers are tuples of the 12 numbers needed per smearing iteration. If rndNumbers is not empty, smearing is automatically activated for this function call for all kinematic variables. When several tuples are passed, the number of smearing iterations is set to be number of tuples, ie len(rdnNumbers). The ordering of random numbers is the following:

rdn[12] = [12]float64{
  scaleLep , scaleLepBar ,
  thetaLep , thetaLepBar ,
  azimuLep , azimuLepBar ,
  scaleJet0, scaleJet0Bar,
  thetaJet0, thetaJet0Bar,
  azimuJet0, azimuJet0Bar,
  scaleJet1, scaleJet1Bar,
  thetaJet1, thetaJet1Bar,
  azimuJet1, azimuJet1Bar,
}

func (*TopBuilder) SonnReco

func (tb *TopBuilder) SonnReco(
	lepTLV, lepbarTLV fmom.PxPyPzE, pdgIDLep, pdgIDLepBar int,
	jetTLV, jetbarTLV fmom.PxPyPzE, isbJet, isbJetbar bool,
	emissx, emissy float64, rdnNumbers ...[12]float64) (fmom.PxPyPzE, fmom.PxPyPzE, int)

SonnReco performs the Sonnenschein reconstruction and return 2 4-momentum (top and anti-top) as well as a status of the reconstruction. Status = N means the reconstruction worked for N smearing iterations. Therefore, Status = 0 means the reconstruction has failed. Four-momemtum and missing Et components must be given in GeV. rdnNumbers are tuples of the 12 numbers needed per smearing iteration. If rndNumbers is not empty, smearing is automatically activated for this function call for all kinematic variables. When several tuples are passed, the number of smearing iterations is set to be number of tuples, ie len(rdnNumbers). The ordering of random numbers is the following:

rdn[12] = [12]float64{
  scaleLep , scaleLepBar ,
  thetaLep , thetaLepBar ,
  azimuLep , azimuLepBar ,
  scaleJet0, scaleJet0Bar,
  thetaJet0, thetaJet0Bar,
  azimuJet0, azimuJet0Bar,
  scaleJet1, scaleJet1Bar,
  thetaJet1, thetaJet1Bar,
  azimuJet1, azimuJet1Bar,
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL