CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
gbl::GblData Class Reference

Data (block) for independent scalar measurement. More...

#include <GblData.h>

Public Member Functions

template<typename LocalDerivative , typename TrafoDerivative >
void addDerivatives (unsigned int iRow, const std::array< unsigned int, 5 > &labDer, const Matrix5d &matDer, unsigned int iOff, const Eigen::MatrixBase< LocalDerivative > &derLocal, unsigned int nLocal, const Eigen::MatrixBase< TrafoDerivative > &derTrans)
 Add derivatives from measurement. More...
 
template<typename TrafoDerivative >
void addDerivatives (unsigned int iRow, const std::array< unsigned int, 7 > &labDer, const Matrix27d &matDer, unsigned int nLocal, const Eigen::MatrixBase< TrafoDerivative > &derTrans)
 Add derivatives from kink. More...
 
void addDerivatives (const std::vector< unsigned int > &index, const std::vector< double > &derivatives)
 Add derivatives from external seed. More...
 
 GblData (unsigned int aLabel, dataBlockType aType, double aMeas, double aPrec, unsigned int aTraj=0, unsigned int aPoint=0)
 Create data block. More...
 
 GblData (const GblData &)=default
 
 GblData (GblData &&)=default
 
void getAllData (double &aValue, double &aErr, unsigned int &numLocal, unsigned int *&indLocal, double *&derLocal, unsigned int &aTraj, unsigned int &aPoint, unsigned int &aRow)
 Get all Data for MP-II binary record. More...
 
double getChi2 () const
 Calculate Chi2 contribution. More...
 
unsigned int getLabel () const
 Get label. More...
 
void getLocalData (double &aValue, double &aWeight, unsigned int &numLocal, unsigned int *&indLocal, double *&derLocal)
 Get Data for local fit. More...
 
unsigned int getNumSimple () const
 
void getResidual (double &aResidual, double &aVariance, double &aDownWeight, unsigned int &numLocal, unsigned int *&indLocal, double *&derLocal)
 Get data for residual (and errors). More...
 
dataBlockType getType () const
 Get type. More...
 
GblDataoperator= (const GblData &)=default
 
GblDataoperator= (GblData &&)=default
 
void printData () const
 Print data block. More...
 
double setDownWeighting (unsigned int aMethod)
 Outlier down weighting with M-estimators (by GblTrajectory::fit). More...
 
void setPrediction (const VVector &aVector)
 Calculate prediction for data from fit (by GblTrajectory::fit). More...
 
virtual ~GblData ()
 

Private Attributes

std::vector< double > moreDerivatives
 List of derivatives for fit. More...
 
std::vector< unsigned int > moreParameters
 List of fit parameters (with non zero derivatives) More...
 
double theDerivatives [7]
 List of derivatives for fit. More...
 
double theDownWeight
 Down-weighting factor (0-1) More...
 
unsigned int theLabel
 Label (of corresponding point) More...
 
unsigned int theNumLocal
 Number of (non zero) local derivatives (max 7 for kinks) More...
 
unsigned int theParameters [7]
 List of parameters (with non zero derivatives) More...
 
unsigned int thePoint
 Point number (on trajectory) More...
 
double thePrecision
 Precision (1/sigma**2) More...
 
double thePrediction
 Prediction from fit. More...
 
unsigned int theRow
 Row number (of measurement) More...
 
unsigned int theTrajectory
 Trajectory number. More...
 
dataBlockType theType
 Type (None, InternalMeasurement, InternalKink, ExternalSeed, ExternalMeasurement) More...
 
double theValue
 Value (residual) More...
 

Detailed Description

Data (block) for independent scalar measurement.

Data (block) containing value, precision and derivatives for measurements, kinks and seeds. Created from attributes of GblPoints, used to construct linear equation system for track fit.

Definition at line 55 of file GblData.h.

Constructor & Destructor Documentation

gbl::GblData::GblData ( unsigned int  aLabel,
dataBlockType  aType,
double  aValue,
double  aPrec,
unsigned int  aTraj = 0,
unsigned int  aPoint = 0 
)

Create data block.

Parameters
[in]aLabelLabel of corresponding point
[in]aTypeType of (scalar) measurement
[in]aValueValue of (scalar) measurement
[in]aPrecPrecision of (scalar) measurement
[in]aTrajTrajectory number
[in]aPointPoint number

Definition at line 45 of file GblData.cc.

46  :
47  theLabel(aLabel), theRow(0), theType(aType), theValue(aValue),
48  thePrecision(aPrec), theTrajectory(aTraj), thePoint(aPoint),
51  {
52  }
unsigned int thePoint
Point number (on trajectory)
Definition: GblData.h:101
dataBlockType theType
Type (None, InternalMeasurement, InternalKink, ExternalSeed, ExternalMeasurement) ...
Definition: GblData.h:97
unsigned int theNumLocal
Number of (non zero) local derivatives (max 7 for kinks)
Definition: GblData.h:105
unsigned int theLabel
Label (of corresponding point)
Definition: GblData.h:95
std::vector< double > moreDerivatives
List of derivatives for fit.
Definition: GblData.h:110
double theDownWeight
Down-weighting factor (0-1)
Definition: GblData.h:102
double thePrediction
Prediction from fit.
Definition: GblData.h:103
std::vector< unsigned int > moreParameters
List of fit parameters (with non zero derivatives)
Definition: GblData.h:109
double thePrecision
Precision (1/sigma**2)
Definition: GblData.h:99
unsigned int theRow
Row number (of measurement)
Definition: GblData.h:96
double theValue
Value (residual)
Definition: GblData.h:98
unsigned int theTrajectory
Trajectory number.
Definition: GblData.h:100
gbl::GblData::GblData ( const GblData )
default
gbl::GblData::GblData ( GblData &&  )
default
gbl::GblData::~GblData ( )
virtual

Definition at line 54 of file GblData.cc.

54  {
55  }

Member Function Documentation

template<typename LocalDerivative , typename TrafoDerivative >
void gbl::GblData::addDerivatives ( unsigned int  iRow,
const std::array< unsigned int, 5 > &  labDer,
const Matrix5d matDer,
unsigned int  iOff,
const Eigen::MatrixBase< LocalDerivative > &  derLocal,
unsigned int  extOff,
const Eigen::MatrixBase< TrafoDerivative > &  extDer 
)

Add derivatives from measurement.

Add (non-zero) derivatives to data block. Fill list of labels of used fit parameters.

Parameters
[in]iRowRow index (0-4) in up to 5D measurement
[in]labDerLabels for derivatives
[in]matDerDerivatives (matrix) 'measurement vs track fit parameters'
[in]iOffOffset for row index for additional parameters
[in]derLocalDerivatives (matrix) for additional local parameters
[in]extOffOffset for external parameters
[in]extDerDerivatives for external Parameters

Definition at line 126 of file GblData.h.

References mps_fire::i, moreDerivatives, moreParameters, theDerivatives, theNumLocal, theParameters, and theRow.

Referenced by gbl::GblTrajectory::prepare().

133  {
134 
135  unsigned int nParMax = 5 + derLocal.cols() + extDer.cols();
136  theRow = iRow - iOff;
137  if (nParMax > 7) {
138  // dynamic data block size
139  moreParameters.reserve(nParMax); // have to be sorted
140  moreDerivatives.reserve(nParMax);
141 
142  for (int i = 0; i < derLocal.cols(); ++i) // local derivatives
143  {
144  if (derLocal(iRow - iOff, i)) {
145  moreParameters.push_back(i + 1);
146  moreDerivatives.push_back(derLocal(iRow - iOff, i));
147  }
148  }
149 
150  for (int i = 0; i < extDer.cols(); ++i) // external derivatives
151  {
152  if (extDer(iRow - iOff, i)) {
153  moreParameters.push_back(extOff + i + 1);
154  moreDerivatives.push_back(extDer(iRow - iOff, i));
155  }
156  }
157 
158  for (size_t i = 0; i < labDer.size(); ++i) // curvature, offset derivatives
159  {
160  if (labDer[i] and matDer(iRow, i)) {
161  moreParameters.push_back(labDer[i]);
162  moreDerivatives.push_back(matDer(iRow, i));
163  }
164  }
165  } else {
166  // simple (static) data block
167  for (int i = 0; i < derLocal.cols(); ++i) // local derivatives
168  {
169  if (derLocal(iRow - iOff, i)) {
170  theParameters[theNumLocal] = i + 1;
171  theDerivatives[theNumLocal] = derLocal(iRow - iOff, i);
172  theNumLocal++;
173  }
174  }
175 
176  for (int i = 0; i < extDer.cols(); ++i) // external derivatives
177  {
178  if (extDer(iRow - iOff, i)) {
179  theParameters[theNumLocal] = extOff + i + 1;
180  theDerivatives[theNumLocal] = extDer(iRow - iOff, i);
181  theNumLocal++;
182  }
183  }
184  for (size_t i = 0; i < labDer.size(); ++i) // curvature, offset derivatives
185  {
186  if (labDer[i] and matDer(iRow, i)) {
187  theParameters[theNumLocal] = labDer[i];
188  theDerivatives[theNumLocal] = matDer(iRow, i);
189  theNumLocal++;
190  }
191  }
192  }
193  }
unsigned int theParameters[7]
List of parameters (with non zero derivatives)
Definition: GblData.h:106
unsigned int theNumLocal
Number of (non zero) local derivatives (max 7 for kinks)
Definition: GblData.h:105
std::vector< double > moreDerivatives
List of derivatives for fit.
Definition: GblData.h:110
double theDerivatives[7]
List of derivatives for fit.
Definition: GblData.h:107
std::vector< unsigned int > moreParameters
List of fit parameters (with non zero derivatives)
Definition: GblData.h:109
unsigned int theRow
Row number (of measurement)
Definition: GblData.h:96
template<typename TrafoDerivative >
void gbl::GblData::addDerivatives ( unsigned int  iRow,
const std::array< unsigned int, 7 > &  labDer,
const Matrix27d matDer,
unsigned int  extOff,
const Eigen::MatrixBase< TrafoDerivative > &  extDer 
)

Add derivatives from kink.

Add (non-zero) derivatives to data block. Fill list of labels of used fit parameters.

Parameters
[in]iRowRow index (0-1) in 2D kink
[in]labDerLabels for derivatives
[in]matDerDerivatives (matrix) 'kink vs track fit parameters'
[in]extOffOffset for external parameters
[in]extDerDerivatives for external Parameters

Definition at line 205 of file GblData.h.

References mps_fire::i, moreDerivatives, moreParameters, theDerivatives, theNumLocal, theParameters, and theRow.

210  {
211 
212  unsigned int nParMax = 7 + extDer.cols();
213  theRow = iRow;
214  if (nParMax > 7) {
215  // dynamic data block size
216  moreParameters.reserve(nParMax); // have to be sorted
217  moreDerivatives.reserve(nParMax);
218 
219  for (int i = 0; i < extDer.cols(); ++i) // external derivatives
220  {
221  if (extDer(iRow, i)) {
222  moreParameters.push_back(extOff + i + 1);
223  moreDerivatives.push_back(extDer(iRow, i));
224  }
225  }
226 
227  for (size_t i = 0; i < labDer.size(); ++i) // curvature, offset derivatives
228  {
229  if (labDer[i] and matDer(iRow, i)) {
230  moreParameters.push_back(labDer[i]);
231  moreDerivatives.push_back(matDer(iRow, i));
232  }
233  }
234  } else {
235  // simple (static) data block
236  for (size_t i = 0; i < labDer.size(); ++i) // curvature, offset derivatives
237  {
238  if (labDer[i] and matDer(iRow, i)) {
239  theParameters[theNumLocal] = labDer[i];
240  theDerivatives[theNumLocal] = matDer(iRow, i);
241  theNumLocal++;
242  }
243  }
244  }
245  }
unsigned int theParameters[7]
List of parameters (with non zero derivatives)
Definition: GblData.h:106
unsigned int theNumLocal
Number of (non zero) local derivatives (max 7 for kinks)
Definition: GblData.h:105
std::vector< double > moreDerivatives
List of derivatives for fit.
Definition: GblData.h:110
double theDerivatives[7]
List of derivatives for fit.
Definition: GblData.h:107
std::vector< unsigned int > moreParameters
List of fit parameters (with non zero derivatives)
Definition: GblData.h:109
unsigned int theRow
Row number (of measurement)
Definition: GblData.h:96
void gbl::GblData::addDerivatives ( const std::vector< unsigned int > &  index,
const std::vector< double > &  derivatives 
)

Add derivatives from external seed.

Add (non-zero) derivatives to data block. Fill list of labels of used fit parameters.

Parameters
[in]indexLabels for derivatives
[in]derivativesDerivatives (vector)

Definition at line 63 of file GblData.cc.

References mps_fire::i, moreDerivatives, and moreParameters.

64  {
65  for (unsigned int i = 0; i < derivatives.size(); ++i) // any derivatives
66  {
67  if (derivatives[i]) {
68  moreParameters.push_back(index[i]);
69  moreDerivatives.push_back(derivatives[i]);
70  }
71  }
72  }
std::vector< double > moreDerivatives
List of derivatives for fit.
Definition: GblData.h:110
std::vector< unsigned int > moreParameters
List of fit parameters (with non zero derivatives)
Definition: GblData.h:109
void gbl::GblData::getAllData ( double &  aValue,
double &  aErr,
unsigned int &  numLocal,
unsigned int *&  indLocal,
double *&  derLocal,
unsigned int &  aTraj,
unsigned int &  aPoint,
unsigned int &  aRow 
)

Get all Data for MP-II binary record.

Parameters
[out]aValueValue
[out]aErrError
[out]numLocalNumber of local labels/derivatives
[out]indLocalArray of labels of used (local) fit parameters
[out]derLocalArray of derivatives for used (local) fit parameters
[out]aTrajTrajectory number
[out]aPointPoint number
[out]aRowRow number

Definition at line 203 of file GblData.cc.

References moreDerivatives, moreParameters, mathSSE::sqrt(), theDerivatives, theNumLocal, theParameters, thePoint, thePrecision, theRow, theTrajectory, and theValue.

205  {
206  aValue = theValue;
207  aErr = 1.0 / sqrt(thePrecision);
208  if (theNumLocal > 0) {
209  numLocal = theNumLocal;
210  indLocal = theParameters;
211  derLocal = theDerivatives;
212  } else {
213  numLocal = moreParameters.size();
214  indLocal = &moreParameters[0];
215  derLocal = &moreDerivatives[0];
216  }
217  aTraj = theTrajectory;
218  aPoint = thePoint;
219  aRow = theRow;
220  }
unsigned int theParameters[7]
List of parameters (with non zero derivatives)
Definition: GblData.h:106
unsigned int thePoint
Point number (on trajectory)
Definition: GblData.h:101
unsigned int theNumLocal
Number of (non zero) local derivatives (max 7 for kinks)
Definition: GblData.h:105
T sqrt(T t)
Definition: SSEVec.h:18
std::vector< double > moreDerivatives
List of derivatives for fit.
Definition: GblData.h:110
double theDerivatives[7]
List of derivatives for fit.
Definition: GblData.h:107
std::vector< unsigned int > moreParameters
List of fit parameters (with non zero derivatives)
Definition: GblData.h:109
double thePrecision
Precision (1/sigma**2)
Definition: GblData.h:99
unsigned int theRow
Row number (of measurement)
Definition: GblData.h:96
double theValue
Value (residual)
Definition: GblData.h:98
unsigned int theTrajectory
Trajectory number.
Definition: GblData.h:100
double gbl::GblData::getChi2 ( ) const

Calculate Chi2 contribution.

Returns
(down-weighted) Chi2

Definition at line 123 of file GblData.cc.

References theDownWeight, thePrecision, thePrediction, and theValue.

123  {
124  double aDiff = theValue - thePrediction;
125  return aDiff * aDiff * thePrecision * theDownWeight;
126  }
double theDownWeight
Down-weighting factor (0-1)
Definition: GblData.h:102
double thePrediction
Prediction from fit.
Definition: GblData.h:103
double thePrecision
Precision (1/sigma**2)
Definition: GblData.h:99
double theValue
Value (residual)
Definition: GblData.h:98
unsigned int gbl::GblData::getLabel ( ) const

Get label.

Returns
label of corresponding point

Definition at line 156 of file GblData.cc.

References theLabel.

156  {
157  return theLabel;
158  }
unsigned int theLabel
Label (of corresponding point)
Definition: GblData.h:95
void gbl::GblData::getLocalData ( double &  aValue,
double &  aWeight,
unsigned int &  numLocal,
unsigned int *&  indLocal,
double *&  derLocal 
)

Get Data for local fit.

Parameters
[out]aValueValue
[out]aWeightWeight
[out]numLocalNumber of local labels/derivatives
[out]indLocalArray of labels of used (local) fit parameters
[out]derLocalArray of derivatives for used (local) fit parameters

Definition at line 176 of file GblData.cc.

References moreDerivatives, moreParameters, theDerivatives, theDownWeight, theNumLocal, theParameters, thePrecision, and theValue.

177  {
178 
179  aValue = theValue;
180  aWeight = thePrecision * theDownWeight;
181  if (theNumLocal > 0) {
182  numLocal = theNumLocal;
183  indLocal = theParameters;
184  derLocal = theDerivatives;
185  } else {
186  numLocal = moreParameters.size();
187  indLocal = &moreParameters[0];
188  derLocal = &moreDerivatives[0];
189  }
190  }
unsigned int theParameters[7]
List of parameters (with non zero derivatives)
Definition: GblData.h:106
unsigned int theNumLocal
Number of (non zero) local derivatives (max 7 for kinks)
Definition: GblData.h:105
std::vector< double > moreDerivatives
List of derivatives for fit.
Definition: GblData.h:110
double theDownWeight
Down-weighting factor (0-1)
Definition: GblData.h:102
double theDerivatives[7]
List of derivatives for fit.
Definition: GblData.h:107
std::vector< unsigned int > moreParameters
List of fit parameters (with non zero derivatives)
Definition: GblData.h:109
double thePrecision
Precision (1/sigma**2)
Definition: GblData.h:99
double theValue
Value (residual)
Definition: GblData.h:98
unsigned int gbl::GblData::getNumSimple ( ) const
void gbl::GblData::getResidual ( double &  aResidual,
double &  aVariance,
double &  aDownWeight,
unsigned int &  numLocal,
unsigned int *&  indLocal,
double *&  derLocal 
)

Get data for residual (and errors).

Parameters
[out]aResidualMeasurement-Prediction
[out]aVarianceVariance (of measurement)
[out]aDownWeightDown-weighting factor
[out]numLocalNumber of local labels/derivatives
[out]indLocalArray of labels of used (local) fit parameters
[out]derLocalArray of derivatives for used (local) fit parameters

Definition at line 231 of file GblData.cc.

References moreDerivatives, moreParameters, theDerivatives, theDownWeight, theNumLocal, theParameters, thePrecision, thePrediction, and theValue.

233  {
234  aResidual = theValue - thePrediction;
235  aVariance = 1.0 / thePrecision;
236  aDownWeight = theDownWeight;
237  if (theNumLocal > 0) {
238  numLocal = theNumLocal;
239  indLocal = theParameters;
240  derLocal = theDerivatives;
241  } else {
242  numLocal = moreParameters.size();
243  indLocal = &moreParameters[0];
244  derLocal = &moreDerivatives[0];
245  }
246  }
unsigned int theParameters[7]
List of parameters (with non zero derivatives)
Definition: GblData.h:106
unsigned int theNumLocal
Number of (non zero) local derivatives (max 7 for kinks)
Definition: GblData.h:105
std::vector< double > moreDerivatives
List of derivatives for fit.
Definition: GblData.h:110
double theDownWeight
Down-weighting factor (0-1)
Definition: GblData.h:102
double theDerivatives[7]
List of derivatives for fit.
Definition: GblData.h:107
double thePrediction
Prediction from fit.
Definition: GblData.h:103
std::vector< unsigned int > moreParameters
List of fit parameters (with non zero derivatives)
Definition: GblData.h:109
double thePrecision
Precision (1/sigma**2)
Definition: GblData.h:99
double theValue
Value (residual)
Definition: GblData.h:98
dataBlockType gbl::GblData::getType ( ) const

Get type.

Returns
type

Definition at line 164 of file GblData.cc.

References theType.

Referenced by Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::getDaughterObjects(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::getObjectRef(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::getShortType(), and Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::properties().

164  {
165  return theType;
166  }
dataBlockType theType
Type (None, InternalMeasurement, InternalKink, ExternalSeed, ExternalMeasurement) ...
Definition: GblData.h:97
GblData& gbl::GblData::operator= ( const GblData )
default
GblData& gbl::GblData::operator= ( GblData &&  )
default
void gbl::GblData::printData ( ) const

Print data block.

Definition at line 129 of file GblData.cc.

References gather_cfg::cout, mps_fire::i, moreDerivatives, moreParameters, theDerivatives, theLabel, theNumLocal, theParameters, thePrecision, theRow, theType, and theValue.

129  {
130 
131  std::cout << " measurement at label " << theLabel << " of type " << theType
132  << " from row " << theRow << ": " << theValue << ", "
133  << thePrecision << std::endl;
134  std::cout << " param " << moreParameters.size() + theNumLocal << ":";
135  for (unsigned int i = 0; i < moreParameters.size(); ++i) {
136  std::cout << " " << moreParameters[i];
137  }
138  for (unsigned int i = 0; i < theNumLocal; ++i) {
139  std::cout << " " << theParameters[i];
140  }
141  std::cout << std::endl;
142  std::cout << " deriv " << moreDerivatives.size() + theNumLocal << ":";
143  for (unsigned int i = 0; i < moreDerivatives.size(); ++i) {
144  std::cout << " " << moreDerivatives[i];
145  }
146  for (unsigned int i = 0; i < theNumLocal; ++i) {
147  std::cout << " " << theDerivatives[i];
148  }
149  std::cout << std::endl;
150  }
unsigned int theParameters[7]
List of parameters (with non zero derivatives)
Definition: GblData.h:106
dataBlockType theType
Type (None, InternalMeasurement, InternalKink, ExternalSeed, ExternalMeasurement) ...
Definition: GblData.h:97
unsigned int theNumLocal
Number of (non zero) local derivatives (max 7 for kinks)
Definition: GblData.h:105
unsigned int theLabel
Label (of corresponding point)
Definition: GblData.h:95
std::vector< double > moreDerivatives
List of derivatives for fit.
Definition: GblData.h:110
double theDerivatives[7]
List of derivatives for fit.
Definition: GblData.h:107
std::vector< unsigned int > moreParameters
List of fit parameters (with non zero derivatives)
Definition: GblData.h:109
double thePrecision
Precision (1/sigma**2)
Definition: GblData.h:99
unsigned int theRow
Row number (of measurement)
Definition: GblData.h:96
double theValue
Value (residual)
Definition: GblData.h:98
double gbl::GblData::setDownWeighting ( unsigned int  aMethod)

Outlier down weighting with M-estimators (by GblTrajectory::fit).

Parameters
[in]aMethodM-estimator (1: Tukey, 2:Huber, 3:Cauchy)

Definition at line 94 of file GblData.cc.

References mathSSE::sqrt(), theDownWeight, thePrecision, thePrediction, and theValue.

94  {
95 
96  double aWeight = 1.;
97  double scaledResidual = fabs(theValue - thePrediction) * sqrt(thePrecision);
98  if (aMethod == 1) // Tukey
99  {
100  if (scaledResidual < 4.6851) {
101  aWeight = (1.0 - 0.045558 * scaledResidual * scaledResidual);
102  aWeight *= aWeight;
103  } else {
104  aWeight = 0.;
105  }
106  } else if (aMethod == 2) //Huber
107  {
108  if (scaledResidual >= 1.345) {
109  aWeight = 1.345 / scaledResidual;
110  }
111  } else if (aMethod == 3) //Cauchy
112  {
113  aWeight = 1.0 / (1.0 + (scaledResidual * scaledResidual / 5.6877));
114  }
115  theDownWeight = aWeight;
116  return aWeight;
117  }
T sqrt(T t)
Definition: SSEVec.h:18
double theDownWeight
Down-weighting factor (0-1)
Definition: GblData.h:102
double thePrediction
Prediction from fit.
Definition: GblData.h:103
double thePrecision
Precision (1/sigma**2)
Definition: GblData.h:99
double theValue
Value (residual)
Definition: GblData.h:98
void gbl::GblData::setPrediction ( const VVector aVector)

Calculate prediction for data from fit (by GblTrajectory::fit).

Definition at line 75 of file GblData.cc.

References mps_fire::i, moreDerivatives, moreParameters, theDerivatives, theNumLocal, theParameters, and thePrediction.

75  {
76 
77  thePrediction = 0.;
78  if (theNumLocal > 0) {
79  for (unsigned int i = 0; i < theNumLocal; ++i) {
80  thePrediction += theDerivatives[i] * aVector(theParameters[i] - 1);
81  }
82  } else {
83  for (unsigned int i = 0; i < moreDerivatives.size(); ++i) {
85  * aVector(moreParameters[i] - 1);
86  }
87  }
88  }
unsigned int theParameters[7]
List of parameters (with non zero derivatives)
Definition: GblData.h:106
unsigned int theNumLocal
Number of (non zero) local derivatives (max 7 for kinks)
Definition: GblData.h:105
std::vector< double > moreDerivatives
List of derivatives for fit.
Definition: GblData.h:110
double theDerivatives[7]
List of derivatives for fit.
Definition: GblData.h:107
double thePrediction
Prediction from fit.
Definition: GblData.h:103
std::vector< unsigned int > moreParameters
List of fit parameters (with non zero derivatives)
Definition: GblData.h:109

Member Data Documentation

std::vector<double> gbl::GblData::moreDerivatives
private

List of derivatives for fit.

Definition at line 110 of file GblData.h.

Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().

std::vector<unsigned int> gbl::GblData::moreParameters
private

List of fit parameters (with non zero derivatives)

Definition at line 109 of file GblData.h.

Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().

double gbl::GblData::theDerivatives[7]
private

List of derivatives for fit.

Definition at line 107 of file GblData.h.

Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().

double gbl::GblData::theDownWeight
private

Down-weighting factor (0-1)

Definition at line 102 of file GblData.h.

Referenced by getChi2(), getLocalData(), getResidual(), and setDownWeighting().

unsigned int gbl::GblData::theLabel
private

Label (of corresponding point)

Definition at line 95 of file GblData.h.

Referenced by getLabel(), and printData().

unsigned int gbl::GblData::theNumLocal
private

Number of (non zero) local derivatives (max 7 for kinks)

Definition at line 105 of file GblData.h.

Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().

unsigned int gbl::GblData::theParameters[7]
private

List of parameters (with non zero derivatives)

Definition at line 106 of file GblData.h.

Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().

unsigned int gbl::GblData::thePoint
private

Point number (on trajectory)

Definition at line 101 of file GblData.h.

Referenced by getAllData().

double gbl::GblData::thePrecision
private

Precision (1/sigma**2)

Definition at line 99 of file GblData.h.

Referenced by getAllData(), getChi2(), getLocalData(), getResidual(), printData(), and setDownWeighting().

double gbl::GblData::thePrediction
private

Prediction from fit.

Definition at line 103 of file GblData.h.

Referenced by getChi2(), getResidual(), setDownWeighting(), and setPrediction().

unsigned int gbl::GblData::theRow
private

Row number (of measurement)

Definition at line 96 of file GblData.h.

Referenced by addDerivatives(), getAllData(), and printData().

unsigned int gbl::GblData::theTrajectory
private

Trajectory number.

Definition at line 100 of file GblData.h.

Referenced by getAllData().

dataBlockType gbl::GblData::theType
private

Type (None, InternalMeasurement, InternalKink, ExternalSeed, ExternalMeasurement)

Definition at line 97 of file GblData.h.

Referenced by twikiExport.Constituent::__str__(), getType(), and printData().

double gbl::GblData::theValue
private

Value (residual)

Definition at line 98 of file GblData.h.

Referenced by getAllData(), getChi2(), getLocalData(), getResidual(), printData(), and setDownWeighting().