GeneralBrokenLines V03-00-00
gblpy3
Public Member Functions | Private Attributes | List of all members
gblpy3.gblfit.GblData Class Reference

Data (block) containing value, precision and derivatives for measurements, kinks and external seed. More...

Inheritance diagram for gblpy3.gblfit.GblData:

Public Member Functions

def __init__ (self, aLabel=0, aType=0, aValue=0., aPrec=0., aMeas=0)
 Create new data. More...
 
def addDerivatives (self, iRow, labDer, matDer, derLocal=None, labGlobal=None, derGlobal=None)
 Add derivatives to data (block) from measurements and kinks. More...
 
def addExtDerivatives (self, indexExt, derExt)
 Add derivatives to data (block) from external seed. More...
 
def getMatrices (self)
 Calculate compressed matrix and right hand side from data. More...
 
def setPrediction (self, aVector)
 Calculate prediction for data from fit. More...
 
def setDownWeighting (self, aMethod)
 Outlier down weighting with M-estimators. More...
 
def getChi2 (self)
 Calculate Chi2 (contribution) from data. More...
 
def getLabel (self)
 Get Label. More...
 
def getType (self)
 Get type. More...
 
def getIndex (self)
 Get index. More...
 
def getResidual (self)
 Get data for residual (and errors). More...
 
def toRecord (self)
 Get data components (for copying to MP binaty record) More...
 
def fromRecord (self, dataList)
 Set data components (from MP binaty record) More...
 
def analyzeData (self, maxBand)
 Analyze labels of fit parameters to determine number of parameters and border size with given maximal band width. More...
 
def printData (self)
 Print data. More...
 

Private Attributes

 __label
 label of corresponding point; int More...
 
 __type
 type of data (0: none, 1: internal measurement, 2: internal kink, 3: external seed, 4: external measurement); int More...
 
 __index
 index for internal measurement More...
 
 __value
 value (residual or kink); float More...
 
 __precision
 precision (diagonal element of inverse covariance matrix); float More...
 
 __dwMethod
 down weighting method; int More...
 
 __downWeight
 down weighting factor (M-estimators); float More...
 
 __prediction
 prediction (for value from fit); float More...
 
 __parameters
 labels of fit parameters (with non zero derivative); list(int) More...
 
 __derivatives
 derivatives (prediction vs fit parameters); list(float) More...
 
 __globalLabels
 labels of global parameters; list(int) More...
 
 __globalDerivatives
 derivatives (prediction vs global parameters); list(float) More...
 

Detailed Description

Data (block) containing value, precision and derivatives for measurements, kinks and external seed.

Created from attributes of GblPoints, used to construct linear equation system for track fit.

Definition at line 449 of file gblfit.py.

Constructor & Destructor Documentation

◆ __init__()

def gblpy3.gblfit.GblData.__init__ (   self,
  aLabel = 0,
  aType = 0,
  aValue = 0.,
  aPrec = 0.,
  aMeas = 0 
)

Create new data.

Parameters
aLabellabel of corresponding point; int
aTypetype of data; int
aValuevalue; float
aPrecprecision; float
aMeasmeasurement index; float

Definition at line 459 of file gblfit.py.

Member Function Documentation

◆ addDerivatives()

def gblpy3.gblfit.GblData.addDerivatives (   self,
  iRow,
  labDer,
  matDer,
  derLocal = None,
  labGlobal = None,
  derGlobal = None 
)

Add derivatives to data (block) from measurements and kinks.

Generate lists of labels.

Parameters
iRowrow of measurement (vector); int
labDerlabels of derivatives vs curvature and band parameters (offsets); vector(int)
matDerderivatives vs curvature and band parameters (offsets); matrix(float)
derLocalderivatives vs local parameters; list(float)
labGloballabels of global parameters; list(int)
derGlobalderivatives vs global parameters; list(float)

Definition at line 496 of file gblfit.py.

References gblpy3.gblfit.GblData.__derivatives, gblpy3.gblfit.GblMeasurement.__globalDerivatives, gblpy3.gblfit.GblData.__globalDerivatives, gblpy3.gblfit.GblMeasurement.__globalLabels, gblpy3.gblfit.GblData.__globalLabels, and gblpy3.gblfit.GblData.__parameters.

◆ addExtDerivatives()

def gblpy3.gblfit.GblData.addExtDerivatives (   self,
  indexExt,
  derExt 
)

Add derivatives to data (block) from external seed.

Generate lists of labels.

Parameters
indexExtlabels from exteranl seed; list(int)
derExtderivatives from exteranl seed; list(float)

Definition at line 520 of file gblfit.py.

References gblpy3.gblfit.GblData.__derivatives, and gblpy3.gblfit.GblData.__parameters.

◆ analyzeData()

def gblpy3.gblfit.GblData.analyzeData (   self,
  maxBand 
)

Analyze labels of fit parameters to determine number of parameters and border size with given maximal band width.

Parameters
maxBandmaximal band width; int
Returns
number of parameters and border size (from this data); pair(int)

Definition at line 647 of file gblfit.py.

References gblpy3.gblfit.GblData.__parameters.

◆ fromRecord()

def gblpy3.gblfit.GblData.fromRecord (   self,
  dataList 
)

◆ getChi2()

def gblpy3.gblfit.GblData.getChi2 (   self)

Calculate Chi2 (contribution) from data.

For down-weighting with M-estimators the corresponding objective function is used.

Returns
Chi2; float

Definition at line 582 of file gblfit.py.

References gblpy3.gblfit.GblData.__dwMethod, gblpy3.gblfit.GblData.__precision, gblsit3.gblSiliconLayer.__precision, gblpy3.gblfit.GblData.__prediction, and gblpy3.gblfit.GblData.__value.

◆ getIndex()

def gblpy3.gblfit.GblData.getIndex (   self)

Get index.

Returns
type; int

Definition at line 615 of file gblfit.py.

References gblpy3.gblfit.GblData.__index.

◆ getLabel()

def gblpy3.gblfit.GblData.getLabel (   self)

Get Label.

Returns
label; int

Definition at line 601 of file gblfit.py.

References gblpy3.gblfit.GblPoint.__label, and gblpy3.gblfit.GblData.__label.

◆ getMatrices()

def gblpy3.gblfit.GblData.getMatrices (   self)

Calculate compressed matrix and right hand side from data.

Returns
indices, compressed right hand side and matrix; list

Definition at line 530 of file gblfit.py.

References gblpy3.gblfit.GblData.__derivatives, gblpy3.gblfit.GblData.__downWeight, gblpy3.gblfit.GblData.__parameters, gblpy3.gblfit.GblData.__precision, gblsit3.gblSiliconLayer.__precision, and gblpy3.gblfit.GblData.__value.

◆ getResidual()

def gblpy3.gblfit.GblData.getResidual (   self)

◆ getType()

def gblpy3.gblfit.GblData.getType (   self)

Get type.

Returns
type; int

Definition at line 608 of file gblfit.py.

References gblpy3.gblfit.GblPoint.__type, and gblpy3.gblfit.GblData.__type.

◆ printData()

def gblpy3.gblfit.GblData.printData (   self)

◆ setDownWeighting()

def gblpy3.gblfit.GblData.setDownWeighting (   self,
  aMethod 
)

Outlier down weighting with M-estimators.

Parameters
aMethodmethod (1=Tukey, 2=Huber, 3=Cauchy); int
Returns
weight (0..1); float

Definition at line 558 of file gblfit.py.

References gblpy3.gblfit.GblData.__downWeight, gblpy3.gblfit.GblData.__dwMethod, gblpy3.gblfit.GblData.__precision, gblsit3.gblSiliconLayer.__precision, gblpy3.gblfit.GblData.__prediction, and gblpy3.gblfit.GblData.__value.

◆ setPrediction()

def gblpy3.gblfit.GblData.setPrediction (   self,
  aVector 
)

Calculate prediction for data from fit.

Parameters
aVectorvalues of fit parameters; vector(float)

Definition at line 541 of file gblfit.py.

References gblpy3.gblfit.GblData.__derivatives, gblpy3.gblfit.GblData.__parameters, and gblpy3.gblfit.GblData.__prediction.

◆ toRecord()

def gblpy3.gblfit.GblData.toRecord (   self)

Member Data Documentation

◆ __derivatives

gblpy3.gblfit.GblData.__derivatives
private

◆ __downWeight

gblpy3.gblfit.GblData.__downWeight
private

down weighting factor (M-estimators); float

Definition at line 473 of file gblfit.py.

Referenced by gblpy3.gblfit.GblData.getMatrices(), gblpy3.gblfit.GblData.getResidual(), and gblpy3.gblfit.GblData.setDownWeighting().

◆ __dwMethod

gblpy3.gblfit.GblData.__dwMethod
private

down weighting method; int

Definition at line 471 of file gblfit.py.

Referenced by gblpy3.gblfit.GblData.getChi2(), and gblpy3.gblfit.GblData.setDownWeighting().

◆ __globalDerivatives

gblpy3.gblfit.GblData.__globalDerivatives
private

◆ __globalLabels

gblpy3.gblfit.GblData.__globalLabels
private

◆ __index

gblpy3.gblfit.GblData.__index
private

index for internal measurement

Definition at line 465 of file gblfit.py.

Referenced by gblpy3.gblfit.GblData.getIndex().

◆ __label

gblpy3.gblfit.GblData.__label
private

◆ __parameters

gblpy3.gblfit.GblData.__parameters
private

◆ __precision

gblpy3.gblfit.GblData.__precision
private

◆ __prediction

gblpy3.gblfit.GblData.__prediction
private

◆ __type

gblpy3.gblfit.GblData.__type
private

type of data (0: none, 1: internal measurement, 2: internal kink, 3: external seed, 4: external measurement); int

Definition at line 463 of file gblfit.py.

Referenced by gblpy3.gblfit.GblData.getType(), gblpy3.gblfit.GblPoint.isFirst(), gblpy3.gblfit.GblPoint.isLast(), gblpy3.gblfit.GblData.printData(), and gblpy3.gblfit.GblPoint.setType().

◆ __value

gblpy3.gblfit.GblData.__value
private

The documentation for this class was generated from the following file: