Belle II Software development
BeamSpotStandAlone.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
11#include <vector>
12#include <tuple>
13#include <TTree.h>
14#include <Eigen/Dense>
15
16//If compiled within BASF2
17#ifdef _PACKAGE_
18#include <reconstruction/calibration/BeamSpotBoostInvMass/Splitter.h>
19#else
20#include <Splitter.h>
21#endif
22
23namespace Belle2::BeamSpotCalib {
24
25
27 struct Track {
28 double d0;
29 double z0;
30 double phi0;
31 double tanlambda;
32 };
33
35 struct Event {
36 int exp;
37 int run;
38 int evtNo;
39
40
43
45 bool isSig;
46 double t;
47
49 void toMicroM()
50 {
51 mu0.d0 *= 1e4;
52 mu1.d0 *= 1e4;
53 mu0.z0 *= 1e4;
54 mu1.z0 *= 1e4;
55 }
56 };
57
58
59
64 std::vector<Event> getEvents(TTree* tr);
65
71 std::tuple<std::vector<Eigen::VectorXd>, std::vector<Eigen::MatrixXd>, Eigen::MatrixXd> runBeamSpotAnalysis(
72 std::vector<Event> evts,
73 const std::vector<double>& splitPoints);
74
75
76}
Event containing two tracks.
int nBootStrap
random bootstrap weight (n=1 -> original sample)
Track mu1
other track in the event
Track mu0
track in the event
void toMicroM()
from [cm] to [um]
double t
time of event [hours]
bool isSig
is not removed by quality cuts?
track parameters (neglecting curvature)
double z0
z position of the POCA
double tanlambda
tan of angle in the z-dirrection, if zero no movement in z
double d0
signed distance to the POCA in x-y plane
double phi0
angle of the track in x-y plane