Belle II Software development
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.
 
void rescaleErrors (double scaleFactor)
 Rescale errors.
 
void add (float &x, float &e, float x1, float e1)
 Add (x1, e1) to (x, e) using weighting by errors (e.g.
 

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
 
float svdOffset = 0
 SVD event T0 offset.
 
float svdSigma = 0
 SVD event T0 resolution.
 
float cdcOffset = 0
 CDC event T0 offset.
 
float cdcSigma = 0
 CDC event T0 resolution.
 
float fillPatternOffset = 0
 fill pattern offset
 
float fillPatternFraction = 0
 fraction of reconstructed buckets matched with filled ones
 
int numMerged = 0
 number of merged entries
 

Detailed Description

Calibration validation tree structure.

Definition at line 22 of file ValidationTreeStruct.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 23 of file ValidationTreeStruct.h.

23{c_numModules = 16};

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 79 of file ValidationTreeStruct.h.

80 {
81 if (e1 == 0) return;
82 if (e == 0) {
83 x = x1;
84 e = e1;
85 return;
86 }
87 e *= e;
88 e1 *= e1;
89 float s = 1 / e + 1 / e1;
90 x = (x / e + x1 / e1) / s;
91 e = sqrt(1 / s);
92 }
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28

◆ clear()

void clear ( )

Clear the structure.

Definition at line 19 of file ValidationTreeStruct.cc.

20 {
21 expNo = 0;
22 runNo = 0;
23 numTracks = 0;
24 commonT0 = 0;
25 commonT0Err = 0;
26 for (auto& x : moduleT0) x = 0;
27 for (auto& x : moduleT0Err) x = 0;
28 for (auto& x : numTBCalibrated) x = 0;
29 for (auto& x : numT0Calibrated) x = 0;
30 for (auto& x : numActive) x = 0;
31 for (auto& x : numActiveCalibrated) x = 0;
32 for (auto& x : thrEffi) x = 0;
33 for (auto& x : asicShifts) x = 0;
34 svdOffset = 0;
35 svdSigma = 0;
36 cdcOffset = 0;
37 cdcSigma = 0;
39 numMerged = 0;
40 }
int numTBCalibrated[c_numModules]
number of timebase calibrated channels, index = slot - 1
int numMerged
number of merged entries
int numTracks
number of selected tracks
int numActive[c_numModules]
number of active channels, index = slot - 1
float svdOffset
SVD event T0 offset.
float svdSigma
SVD event T0 resolution.
float fillPatternOffset
fill pattern offset
float commonT0Err
common T0 uncertainty (not scaled)
float thrEffi[c_numModules]
threshold efficiency: average over active calibrated channels, index = slot - 1
float moduleT0[c_numModules]
module T0 residuals, index = slot - 1
int numActiveCalibrated[c_numModules]
number of active calibrated channels, index = slot - 1
float cdcSigma
CDC event T0 resolution.
float cdcOffset
CDC event T0 offset.
float moduleT0Err[c_numModules]
module T0 uncertainties (not scaled), index = slot - 1
float asicShifts[4]
carrier shifts of BS13d, index = carrier number
int numT0Calibrated[c_numModules]
number of channel T0 calibrated channels, index = slot - 1

◆ clearNumMerged()

void clearNumMerged ( )
inline

Clear the number of merged entries.

Definition at line 53 of file ValidationTreeStruct.h.

53{numMerged = 0;}

◆ merge()

void merge ( const ValidationTreeStruct other)

Merge two structures.

Parameters
otherstructure to be merged with this one

Definition at line 42 of file ValidationTreeStruct.cc.

43 {
44 if (numMerged == 0) {
45 *this = other;
46 } else {
47 if (expNo != other.expNo or runNo != other.runNo) {
48 B2ERROR("TOP::ValidationTreeStruct: experiment and run numbers must be equal - objects not merged");
49 return;
50 }
51 numTracks += other.numTracks;
52 add(commonT0, commonT0Err, other.commonT0, other.commonT0Err);
53 for (unsigned i = 0; i < c_numModules; i++) {
54 add(moduleT0[i], moduleT0Err[i], other.moduleT0[i], other.moduleT0Err[i]);
55 }
56 }
57 numMerged++;
58 }
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 60 of file ValidationTreeStruct.cc.

61 {
62 commonT0Err *= scaleFactor;
63 for (auto& x : moduleT0Err) x *= scaleFactor;
64 }

Member Data Documentation

◆ asicShifts

float asicShifts[4] = {0}

carrier shifts of BS13d, index = carrier number

Definition at line 36 of file ValidationTreeStruct.h.

◆ cdcOffset

float cdcOffset = 0

CDC event T0 offset.

Definition at line 39 of file ValidationTreeStruct.h.

◆ cdcSigma

float cdcSigma = 0

CDC event T0 resolution.

Definition at line 40 of file ValidationTreeStruct.h.

◆ commonT0

float commonT0 = 0

common T0 residual

Definition at line 27 of file ValidationTreeStruct.h.

◆ commonT0Err

float commonT0Err = 0

common T0 uncertainty (not scaled)

Definition at line 28 of file ValidationTreeStruct.h.

◆ expNo

int expNo = 0

experiment number

Definition at line 24 of file ValidationTreeStruct.h.

◆ fillPatternFraction

float fillPatternFraction = 0

fraction of reconstructed buckets matched with filled ones

Definition at line 42 of file ValidationTreeStruct.h.

◆ fillPatternOffset

float fillPatternOffset = 0

fill pattern offset

Definition at line 41 of file ValidationTreeStruct.h.

◆ moduleT0

float moduleT0[c_numModules] = {0}

module T0 residuals, index = slot - 1

Definition at line 29 of file ValidationTreeStruct.h.

◆ moduleT0Err

float moduleT0Err[c_numModules] = {0}

module T0 uncertainties (not scaled), index = slot - 1

Definition at line 30 of file ValidationTreeStruct.h.

◆ numActive

int numActive[c_numModules] = {0}

number of active channels, index = slot - 1

Definition at line 33 of file ValidationTreeStruct.h.

◆ numActiveCalibrated

int numActiveCalibrated[c_numModules] = {0}

number of active calibrated channels, index = slot - 1

Definition at line 34 of file ValidationTreeStruct.h.

◆ numMerged

int numMerged = 0

number of merged entries

Definition at line 43 of file ValidationTreeStruct.h.

◆ numT0Calibrated

int numT0Calibrated[c_numModules] = {0}

number of channel T0 calibrated channels, index = slot - 1

Definition at line 32 of file ValidationTreeStruct.h.

◆ numTBCalibrated

int numTBCalibrated[c_numModules] = {0}

number of timebase calibrated channels, index = slot - 1

Definition at line 31 of file ValidationTreeStruct.h.

◆ numTracks

int numTracks = 0

number of selected tracks

Definition at line 26 of file ValidationTreeStruct.h.

◆ runNo

int runNo = 0

run number

Definition at line 25 of file ValidationTreeStruct.h.

◆ svdOffset

float svdOffset = 0

SVD event T0 offset.

Definition at line 37 of file ValidationTreeStruct.h.

◆ svdSigma

float svdSigma = 0

SVD event T0 resolution.

Definition at line 38 of file ValidationTreeStruct.h.

◆ thrEffi

float thrEffi[c_numModules] = {0}

threshold efficiency: average over active calibrated channels, index = slot - 1

Definition at line 35 of file ValidationTreeStruct.h.


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