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

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

Inheritance diagram for gblpy.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 gblpy.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 gblpy.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 gblpy.gblfit.GblData.__derivatives, gblpy.gblfit.GblMeasurement.__globalDerivatives, gblpy.gblfit.GblData.__globalDerivatives, gblpy.gblfit.GblMeasurement.__globalLabels, gblpy.gblfit.GblData.__globalLabels, and gblpy.gblfit.GblData.__parameters.

◆ addExtDerivatives()

def gblpy.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 gblpy.gblfit.GblData.__derivatives, and gblpy.gblfit.GblData.__parameters.

◆ analyzeData()

def gblpy.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 gblpy.gblfit.GblData.__parameters.

◆ fromRecord()

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

◆ getChi2()

def gblpy.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 gblpy.gblfit.GblData.__dwMethod, gblpy.gblfit.GblData.__precision, gblpy.gblsit.gblSiliconLayer.__precision, gblpy.gblfit.GblData.__prediction, and gblpy.gblfit.GblData.__value.

◆ getIndex()

def gblpy.gblfit.GblData.getIndex (   self)

Get index.

Returns
type; int

Definition at line 615 of file gblfit.py.

References gblpy.gblfit.GblData.__index.

◆ getLabel()

def gblpy.gblfit.GblData.getLabel (   self)

Get Label.

Returns
label; int

Definition at line 601 of file gblfit.py.

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

◆ getMatrices()

def gblpy.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 gblpy.gblfit.GblData.__derivatives, gblpy.gblfit.GblData.__downWeight, gblpy.gblfit.GblData.__parameters, gblpy.gblfit.GblData.__precision, gblpy.gblsit.gblSiliconLayer.__precision, and gblpy.gblfit.GblData.__value.

◆ getResidual()

def gblpy.gblfit.GblData.getResidual (   self)

◆ getType()

def gblpy.gblfit.GblData.getType (   self)

Get type.

Returns
type; int

Definition at line 608 of file gblfit.py.

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

◆ printData()

def gblpy.gblfit.GblData.printData (   self)

◆ setDownWeighting()

def gblpy.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 gblpy.gblfit.GblData.__downWeight, gblpy.gblfit.GblData.__dwMethod, gblpy.gblfit.GblData.__precision, gblpy.gblsit.gblSiliconLayer.__precision, gblpy.gblfit.GblData.__prediction, and gblpy.gblfit.GblData.__value.

◆ setPrediction()

def gblpy.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 gblpy.gblfit.GblData.__derivatives, gblpy.gblfit.GblData.__parameters, and gblpy.gblfit.GblData.__prediction.

◆ toRecord()

def gblpy.gblfit.GblData.toRecord (   self)

Member Data Documentation

◆ __derivatives

gblpy.gblfit.GblData.__derivatives
private

◆ __downWeight

gblpy.gblfit.GblData.__downWeight
private

down weighting factor (M-estimators); float

Definition at line 473 of file gblfit.py.

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

◆ __dwMethod

gblpy.gblfit.GblData.__dwMethod
private

down weighting method; int

Definition at line 471 of file gblfit.py.

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

◆ __globalDerivatives

gblpy.gblfit.GblData.__globalDerivatives
private

◆ __globalLabels

gblpy.gblfit.GblData.__globalLabels
private

◆ __index

gblpy.gblfit.GblData.__index
private

index for internal measurement

Definition at line 465 of file gblfit.py.

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

◆ __label

gblpy.gblfit.GblData.__label
private

◆ __parameters

gblpy.gblfit.GblData.__parameters
private

◆ __precision

gblpy.gblfit.GblData.__precision
private

◆ __prediction

gblpy.gblfit.GblData.__prediction
private

◆ __type

gblpy.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 gblpy.gblfit.GblData.getType(), gblpy.gblfit.GblPoint.isFirst(), gblpy.gblfit.GblPoint.isLast(), gblpy.gblfit.GblData.printData(), and gblpy.gblfit.GblPoint.setType().

◆ __value

gblpy.gblfit.GblData.__value
private

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