Belle II Software  release-08-01-10
InvariantMassMuMuStandAlone.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 
10 
11 #pragma once
12 #include <vector>
13 #include <tuple>
14 #include <functional>
15 #include <framework/geometry/B2Vector3.h>
16 #include <TTree.h>
17 #include <Eigen/Dense>
18 
19 //If compiled within BASF2
20 #ifdef _PACKAGE_
21 #include <tracking/calibration/Splitter.h>
22 #else
23 #include <Splitter.h>
24 #endif
25 
26 namespace Belle2::InvariantMassMuMuCalib {
27 
28  static const double realNaN = std::numeric_limits<double>::quiet_NaN();
29  static const B2Vector3D vecNaN(realNaN, realNaN, realNaN);
30 
32  struct Track {
33  B2Vector3D p = vecNaN;
34  double pid = realNaN;
35  };
36 
38  struct Event {
39  int exp = -1;
40  int run = -1;
41  int evtNo = -1;
42 
43 
46  double m;
47 
48  int nBootStrap = 1;
49  bool isSig = false;
50  double t = realNaN;
51  bool is4S = false;
52 
53  };
54 
55 
56  std::vector<Event> getEvents(TTree* tr, bool is4S);
57 
63  std::tuple<std::vector<Eigen::VectorXd>, std::vector<Eigen::MatrixXd>, Eigen::MatrixXd> runMuMuInvariantMassAnalysis(
64  std::vector<Event> evts,
65  const std::vector<double>& splitPoints);
66 
67 
73  double gausExpConv(double mean, double sigma, double bMean, double bDelta, double tauL, double tauR, double sigmaK, double x);
74 
75 
84  double integrate(std::function<double(double)> f, double a, double b);
85 
86 }
static const double realNaN
constant for double NaN
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516
int nBootStrap
random bootstrap weight (n=1 -> original sample)
bool is4S
to distinguish between 4S and off-resonance runs
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