Belle II Software  release-06-02-00
ValidationTreeStruct Struct Reference

Calibration validation tree structure. More...

#include <ValidationTreeStruct.h>

Public Types

enum  { c_numModules = 16 }
 

Public Member Functions

void clear ()
 Clear the structure.
 
void clearNumMerged ()
 Clear the number of merged entries.
 
void merge (const ValidationTreeStruct &other)
 Merge two structures. More...
 
void rescaleErrors (double scaleFactor)
 Rescale errors. More...
 
void add (float &x, float &e, float x1, float e1)
 Add (x1, e1) to (x, e) using weighting by errors (e.g. More...
 

Public Attributes

int expNo = 0
 experiment number
 
int runNo = 0
 run number
 
int numTracks = 0
 number of selected tracks
 
float commonT0 = 0
 common T0 residual
 
float commonT0Err = 0
 common T0 uncertainty (not scaled)
 
float moduleT0 [c_numModules] = {0}
 module T0 residuals, index = slot - 1
 
float moduleT0Err [c_numModules] = {0}
 module T0 uncertainties (not scaled), index = slot - 1
 
int numTBCalibrated [c_numModules] = {0}
 number of timebase calibrated channels, index = slot - 1
 
int numT0Calibrated [c_numModules] = {0}
 number of channel T0 calibrated channels, index = slot - 1
 
int numActive [c_numModules] = {0}
 number of active channels, index = slot - 1
 
int numActiveCalibrated [c_numModules] = {0}
 number of active calibrated channels, index = slot - 1
 
float thrEffi [c_numModules] = {0}
 threshold efficiency: average over active calibrated channels, index = slot - 1
 
float asicShifts [4] = {0}
 carrier shifts of BS13d, index = carrier number
 
int numMerged = 0
 number of merged entries
 

Detailed Description

Calibration validation tree structure.

Definition at line 22 of file ValidationTreeStruct.h.

Member Function Documentation

◆ add()

void add ( float &  x,
float &  e,
float  x1,
float  e1 
)
inline

Add (x1, e1) to (x, e) using weighting by errors (e.g.

least square fit of a constant)

Parameters
xinput/output value
einput/output error
x1value to be added
e1error to be added

Definition at line 73 of file ValidationTreeStruct.h.

74  {
75  if (e1 == 0) return;
76  if (e == 0) {
77  x = x1;
78  e = e1;
79  return;
80  }
81  e *= e;
82  e1 *= e1;
83  float s = 1 / e + 1 / e1;
84  x = (x / e + x1 / e1) / s;
85  e = sqrt(1 / s);
86  }

◆ merge()

void merge ( const ValidationTreeStruct other)

Merge two structures.

Parameters
otherstructure to be merged with this one

Definition at line 37 of file ValidationTreeStruct.cc.

38  {
39  if (numMerged == 0) {
40  *this = other;
41  } else {
42  if (expNo != other.expNo or runNo != other.runNo) {
43  B2ERROR("TOP::ValidationTreeStruct: experiment and run numbers must be equal - objects not merged");
44  return;
45  }
46  numTracks += other.numTracks;
47  add(commonT0, commonT0Err, other.commonT0, other.commonT0Err);
48  for (unsigned i = 0; i < c_numModules; i++) {
49  add(moduleT0[i], moduleT0Err[i], other.moduleT0[i], other.moduleT0Err[i]);
50  }
51  }
52  numMerged++;
53  }
int numMerged
number of merged entries
int numTracks
number of selected tracks
float commonT0Err
common T0 uncertainty (not scaled)
float moduleT0[c_numModules]
module T0 residuals, index = slot - 1
float moduleT0Err[c_numModules]
module T0 uncertainties (not scaled), index = slot - 1
void add(float &x, float &e, float x1, float e1)
Add (x1, e1) to (x, e) using weighting by errors (e.g.

◆ rescaleErrors()

void rescaleErrors ( double  scaleFactor)

Rescale errors.

Parameters
scaleFactorscale factor

Definition at line 55 of file ValidationTreeStruct.cc.


The documentation for this struct was generated from the following files: