Belle II Software  release-06-00-14
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 <vector>
11 #include <tuple>
12 #include <TVector3.h>
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 
22 namespace Belle2::BoostVectorCalib {
23 
24  static const double realNaN = std::numeric_limits<double>::quiet_NaN();
25  static const TVector3 vecNaN(realNaN, realNaN, realNaN);
26 
28  struct Track {
29  TVector3 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 }
static const double realNaN
shortcut for NaN of double type
static const TVector3 vecNaN(realNaN, realNaN, realNaN)
vector with NaN entries
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)
TVector3 p
momentum vector of the track
double pid
particle ID of mu/e separation