Belle II Software development
ValidationTreeStruct.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10#include <cmath>
11
12namespace Belle2 {
17 namespace TOP {
18
23 enum {c_numModules = 16};
24 int expNo = 0;
25 int runNo = 0;
26 int numTracks = 0;
27 float commonT0 = 0;
28 float commonT0Err = 0;
29 float moduleT0[c_numModules] = {0};
30 float moduleT0Err[c_numModules] = {0};
31 int numTBCalibrated[c_numModules] = {0};
32 int numT0Calibrated[c_numModules] = {0};
33 int numActive[c_numModules] = {0};
34 int numActiveCalibrated[c_numModules] = {0};
35 float thrEffi[c_numModules] = {0};
36 float asicShifts[4] = {0};
37 float svdOffset = 0;
38 float svdSigma = 0;
39 float cdcOffset = 0;
40 float cdcSigma = 0;
43 int numMerged = 0;
48 void clear();
49
54
59 void merge(const ValidationTreeStruct& other);
60
65 void rescaleErrors(double scaleFactor);
66
74 void add(float& x, float& e, float x1, float e1);
75
76 };
77
78
79 inline void ValidationTreeStruct::add(float& x, float& e, float x1, float e1)
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 }
93
94 } // TOP
96} // Belle2
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28
Abstract base class for different kinds of events.
Calibration validation tree structure.
int numTBCalibrated[c_numModules]
number of timebase calibrated channels, index = slot - 1
void rescaleErrors(double scaleFactor)
Rescale errors.
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 fillPatternFraction
fraction of reconstructed buckets matched with filled ones
void merge(const ValidationTreeStruct &other)
Merge two structures.
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
void clearNumMerged()
Clear the number of merged entries.
float cdcSigma
CDC event T0 resolution.
void clear()
Clear the structure.
float cdcOffset
CDC event T0 offset.
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.
float asicShifts[4]
carrier shifts of BS13d, index = carrier number
int numT0Calibrated[c_numModules]
number of channel T0 calibrated channels, index = slot - 1