Belle II Software
release-06-02-00
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
z
Typedefs
a
b
c
d
e
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
Enumerator
c
d
f
p
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
SelectorCut.cc
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
#include <analysis/modules/CurlTagger/SelectorCut.h>
10
11
//Root includes
12
#include "TVector3.h"
13
#include "TMath.h"
14
15
using namespace
Belle2
;
16
using namespace
CurlTagger;
17
18
SelectorCut::SelectorCut
(
bool
belleFlag)
19
{
20
if
(belleFlag) {
21
//BN1079 cuts
22
m_magDiffPCut
= 0.1;
23
m_sameChargePhiCut
= 15;
24
m_oppositeChargePhiCut
= 165;
25
}
else
{
26
// TODO - update these with actual values. Is this even worth if switching to MVA anyway?
27
m_magDiffPCut
= 0.1;
28
m_sameChargePhiCut
= 15;
29
m_oppositeChargePhiCut
= 165;
30
}
31
32
}
33
34
SelectorCut::~SelectorCut
() =
default
;
35
36
std::vector<float>
SelectorCut::getVariables
(
Particle
* iPart,
Particle
* jPart)
37
{
38
float
chargeProduct = iPart -> getCharge() * jPart -> getCharge();
39
float
magDiffP = (iPart->
getMomentum
() - jPart->
getMomentum
()).Mag();
40
float
phi = iPart->
getMomentum
().Angle(jPart->
getMomentum
());
41
return
{chargeProduct, magDiffP, phi};
42
}
43
44
float
SelectorCut::getResponse
(
Particle
* iPart,
Particle
* jPart)
45
{
46
//Selection from BN1079
47
std::vector<float> variables =
getVariables
(iPart, jPart);
48
float
chargeProduct = variables[0];
49
float
magDiffP = variables[1];
50
float
phi = variables[2];
51
52
if
(magDiffP >
m_magDiffPCut
) {
return
0.;}
53
if
(chargeProduct > 0) {
54
if
(phi <
m_sameChargePhiCut
* TMath::Pi() / 180) {
return
1.;}
55
}
56
if
(chargeProduct < 0) {
57
if
(phi >
m_oppositeChargePhiCut
* TMath::Pi() / 180) {
return
1.;}
58
}
59
60
return
0.;
61
}
Belle2::CurlTagger::SelectorCut::~SelectorCut
~SelectorCut()
Destructor.
Belle2::CurlTagger::SelectorCut::getVariables
virtual std::vector< float > getVariables(Particle *iPart, Particle *jPart) override
returns vector of variables used by this selector.
Definition:
SelectorCut.cc:36
Belle2::CurlTagger::SelectorCut::m_sameChargePhiCut
double m_sameChargePhiCut
cut for angle between momenta of the two particles when they have the same charge
Definition:
SelectorCut.h:44
Belle2::CurlTagger::SelectorCut::SelectorCut
SelectorCut(bool belleFlag)
Constructor.
Definition:
SelectorCut.cc:18
Belle2::CurlTagger::SelectorCut::m_oppositeChargePhiCut
double m_oppositeChargePhiCut
cut for angle between momenta of the two particles when they have the opposite charge
Definition:
SelectorCut.h:47
Belle2::CurlTagger::SelectorCut::m_magDiffPCut
double m_magDiffPCut
cut for momentum magnitude difference
Definition:
SelectorCut.h:41
Belle2::CurlTagger::SelectorCut::getResponse
virtual float getResponse(Particle *iPart, Particle *jPart) override
Selector response that this pair of particles come from the same mc/actual particle.
Definition:
SelectorCut.cc:44
Belle2::Particle
Class to store reconstructed particles.
Definition:
Particle.h:74
Belle2::Particle::getMomentum
TVector3 getMomentum() const
Returns momentum vector.
Definition:
Particle.h:488
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
analysis
modules
CurlTagger
src
SelectorCut.cc
Generated on Thu Dec 28 2023 02:17:41 for Belle II Software by
1.9.1