Belle II Software development
BoostVectorStandAlone.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 <framework/geometry/B2Vector3.h>
11#include <vector>
12#include <tuple>
13#include <Eigen/Dense>
14
15//If compiled within BASF2
16#ifdef _PACKAGE_
17#include <tracking/calibration/Splitter.h>
18#else
19#include <Splitter.h>
20#endif
21
22namespace Belle2::BoostVectorCalib {
23
24 static const double realNaN = std::numeric_limits<double>::quiet_NaN();
25 static const B2Vector3D vecNaN(realNaN, realNaN, realNaN);
26
28 struct Track {
29 B2Vector3D p = vecNaN;
30 double pid = realNaN;
31 };
32
34 struct Event {
35 int exp = -1;
36 int run = -1;
37 int evtNo = -1;
38
39
42
43 int nBootStrap = 1;
44 bool isSig = false;
45 double t = realNaN;
46
47 };
48
49
51 std::vector<Event> getEvents(TTree* tr);
52
53
55 double median(double* v, int n);
56
57
63 std::tuple<std::vector<Eigen::VectorXd>, std::vector<Eigen::MatrixXd>, Eigen::MatrixXd> runBoostVectorAnalysis(
64 std::vector<Event> evts,
65 const std::vector<double>& splitPoints);
66
67}
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516
Event containing two tracks.
int nBootStrap
random bootstrap weight (n=1 -> original sample)
Track mu1
other track in the event
double t
time of event [hours]
bool isSig
is not removed by quality cuts?
track parameters (neglecting curvature)
B2Vector3D p
momentum vector of the track
double pid
particle ID of mu/e separation