Belle II Software development
KsfwMoments.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
10// //
11// KsfwMoments.h //
12// //
13// moment-calculation of the k_sfw //
14// improved Super-Fox-Wolfram moments //
15// to be used with rooksfw.{cc,h} //
16// //
17// M. Nakao //
18// //
20#pragma once
21
22#include <Math/Vector3D.h>
23#include <Math/Vector4D.h>
24
25#include <vector>
26
27
28namespace Belle2 {
36 public:
37
42 {
43 for (int i = 0; i < 2; i++)
44 for (int j = 0; j < 3; j++)
45 for (int k = 0; k < 5; k++)
46 m_Hso[i][j][k] = 0.0;
47
48 for (int i = 0; i < 2; i++)
49 for (int j = 0; j < 5; j++)
50 m_Hoo[i][j] = 0.0;
51
52 for (int i = 0; i < 2; i++) {
53 m_et[i] = 0.0;
54 m_mm2[i] = 0.0;
55 }
56 };
57
61 KsfwMoments(double Hso0_max,
62 std::vector<std::pair<ROOT::Math::XYZVector, int>> p3_cms_q_sigA,
63 std::vector<std::pair<ROOT::Math::XYZVector, int>> p3_cms_q_sigB,
64 std::vector<std::pair<ROOT::Math::XYZVector, int>> p3_cms_q_roe,
65 const ROOT::Math::PxPyPzEVector& p_cms_missA,
66 const ROOT::Math::PxPyPzEVector& p_cms_missB,
67 const double et[2]
68 );
69
74
78 int usefinal(int uf) { if (uf == 0 || uf == 1) m_uf = uf; return m_uf; }
79
83 int usefinal() const { return m_uf; }
84
88 double mm2(int uf = -1) const { return m_mm2[uf < 0 ? m_uf : uf]; }
89
93 double et(int uf = -1) const { return m_et[uf < 0 ? m_uf : uf]; }
94
98 double Hoo(int i, int uf = -1) const { return m_Hoo[uf < 0 ? m_uf : uf][i]; }
99
103 double Hso(int i, int j, int uf = -1) const { return m_Hso[uf < 0 ? m_uf : uf][i][j]; }
104
105
110 double var(int i)
111 {
112 if (i < 0) return 0;
113 if (i < 1) return et();
114 if (i < 4) return Hso(i - 1, 0);
115 if (i < 5) return Hso(0, 1);
116 if (i < 8) return Hso(i - 5, 2);
117 if (i < 9) return Hso(0, 3);
118 if (i < 12) return Hso(i - 9, 4);
119 if (i < 17) return Hoo(i - 12);
120 return 0;
121 }
122
123 private:
124 int m_uf;
125 double m_Hso[2][3][5];
126 double m_Hoo[2][5];
127 double m_et[2];
128 double m_mm2[2];
129 };
130
132} // Belle2 namespace
Moment-calculation of the k_sfw improved Super-Fox-Wolfram moments.
Definition: KsfwMoments.h:35
int usefinal(int uf)
Sets the flag that specifiies we are using the finalstate for signal.
Definition: KsfwMoments.h:78
double var(int i)
Returns calculated KSFW Moments i is the index ordered as in Belle.
Definition: KsfwMoments.h:110
double et(int uf=-1) const
Returns calculated transverse energy.
Definition: KsfwMoments.h:93
double Hso(int i, int j, int uf=-1) const
Returns calculated KSFW Moments.
Definition: KsfwMoments.h:103
double m_et[2]
Transverse energy.
Definition: KsfwMoments.h:127
int m_uf
Flag that specifiies we are using the final state for signal.
Definition: KsfwMoments.h:124
double m_Hso[2][3][5]
KSFW moments.
Definition: KsfwMoments.h:125
KsfwMoments()
Initialize KSFW moments, et, and mm2 to 0.
Definition: KsfwMoments.h:41
double mm2(int uf=-1) const
Returns calculated missing mass squared.
Definition: KsfwMoments.h:88
double m_mm2[2]
Missing mass squared.
Definition: KsfwMoments.h:128
~KsfwMoments()
Destructor.
Definition: KsfwMoments.h:73
int usefinal() const
Return the flag that specifiies we are using the finalstate for signal.
Definition: KsfwMoments.h:83
double m_Hoo[2][5]
KSFW moments.
Definition: KsfwMoments.h:126
double Hoo(int i, int uf=-1) const
Returns calculated KSFW Moments.
Definition: KsfwMoments.h:98
Abstract base class for different kinds of events.