Belle II Software  release-05-02-19
BoostVectorStandAlone.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2020 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Radek Zlebcik *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 #include <vector>
13 #include <map>
14 #include <utility>
15 #include <tuple>
16 #include <TVector3.h>
17 
18 #include <Eigen/Dense>
19 
20 //If compiled within BASF2
21 #ifdef _PACKAGE_
22 #include <tracking/calibration/Splitter.h>
23 #else
24 #include <Splitter.h>
25 #endif
26 
27 namespace Belle2 {
32  namespace BoostVectorCalib {
33 
34  static const double realNaN = std::numeric_limits<double>::quiet_NaN();
35  static const int intNaN = std::numeric_limits<int>::quiet_NaN();
36  static const TVector3 vecNaN(realNaN, realNaN, realNaN);
37 
39  struct Track {
40  TVector3 p = vecNaN;
41  double pid = realNaN;
42  };
43 
45  struct Event {
46  int exp = intNaN;
47  int run = intNaN;
48  int evtNo = intNaN;
49 
50 
51  Track mu0;
52  Track mu1;
53 
55  bool isSig = false;
56  double t = realNaN;
57 
58  };
59 
60 
62  std::vector<Event> getEvents(TTree* tr);
63 
64 
70  std::tuple<std::vector<Eigen::VectorXd>, std::vector<Eigen::MatrixXd>, Eigen::MatrixXd> runBoostVectorAnalysis(
71  std::vector<Event> evts,
72  const std::vector<double>& splitPoints);
73 
74  }
76 }
Belle2::BoostVectorCalib::Event::evtNo
int evtNo
event number
Definition: BoostVectorStandAlone.h:56
Belle2::BoostVectorCalib::Event::mu0
Track mu0
track in the event
Definition: BoostVectorStandAlone.h:59
Belle2::intNaN
const static int intNaN
constant for integer NaN
Definition: ECLBhabhaTCollectorModule.h:42
Belle2::BoostVectorCalib::Track::pid
double pid
particle ID of mu/e separation
Definition: BoostVectorStandAlone.h:49
Belle2::BoostVectorCalib::Event::mu1
Track mu1
other track in the event
Definition: BoostVectorStandAlone.h:60
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::BoostVectorCalib::Event::exp
int exp
experiment number
Definition: BoostVectorStandAlone.h:54
Belle2::BoostVectorCalib::Track::p
TVector3 p
momentum vector of the track
Definition: BoostVectorStandAlone.h:48
Belle2::BoostVectorCalib::Track
track parameters (neglecting curvature)
Definition: BoostVectorStandAlone.h:47
Belle2::BoostVectorCalib::Event::run
int run
run number
Definition: BoostVectorStandAlone.h:55
Belle2::realNaN
static const double realNaN
shortcut for NaN of double type
Definition: TagVertexModule.cc:64
Belle2::vecNaN
static const TVector3 vecNaN(realNaN, realNaN, realNaN)
vector with NaN entries
Belle2::BoostVectorCalib::Event::nBootStrap
int nBootStrap
random bootstrap weight (n=1 -> original sample)
Definition: BoostVectorStandAlone.h:62
Belle2::BoostVectorCalib::Event::isSig
bool isSig
is not removed by quality cuts?
Definition: BoostVectorStandAlone.h:63
Belle2::BoostVectorCalib::Event::t
double t
time of event [hours]
Definition: BoostVectorStandAlone.h:64