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
CDCStateTruthVarSet.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
#include <tracking/ckf/cdc/filters/states/CDCStateTruthVarSet.h>
9
10
#include <tracking/ckf/cdc/entities/CDCCKFState.h>
11
12
#include <mdst/dataobjects/MCParticle.h>
13
14
#include <tracking/dataobjects/RecoTrack.h>
15
16
using namespace
std;
17
using namespace
Belle2
;
18
19
bool
CDCStateTruthVarSet::extract(
const
BaseCDCStateFilter::Object
* pair)
20
{
21
const
auto
& path = pair->first;
22
const
auto
& state = pair->second;
23
24
// check if hit belongs to same seed
25
const
auto
& seed = path->front();
26
const
auto
* seedRecoTrack = seed.getSeed();
27
const
auto
* seedMCTrack = seedRecoTrack->getRelated<
RecoTrack
>(
"MCRecoTracks"
);
28
const
auto
* seedMCParticle = seedMCTrack->
getRelated
<
MCParticle
>();
29
30
const
auto
* wireHit = state->getWireHit();
31
const
auto
* cdcHit = wireHit->getHit();
32
const
auto
* hitMCTrack = cdcHit->
getRelated
<
RecoTrack
>(
"MCRecoTracks"
);
33
34
// Bremsstrahlung etc (works for electron gun, check for other events later)
35
while
(seedMCParticle->getMother()) {
36
seedMCParticle = seedMCParticle->getMother();
37
}
38
39
// calculate the interesting quantities
40
var<named(
"match"
)>() = seedMCTrack == hitMCTrack ?
true
:
false
;
41
var<named(
"PDG"
)>() = seedMCParticle->getPDG();
42
43
return
true
;
44
}
Belle2::MCParticle
A Class to store the Monte Carlo particle information.
Definition:
MCParticle.h:32
Belle2::RecoTrack
This is the Reconstruction Event-Data Model Track.
Definition:
RecoTrack.h:76
Belle2::RelationsInterface::getRelated
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
Definition:
RelationsObject.h:278
Belle2::TrackFindingCDC::Filter::Object
AObject Object
Type of the object to be analysed.
Definition:
Filter.dcl.h:33
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
tracking
ckf
cdc
filters
states
src
CDCStateTruthVarSet.cc
Generated on Thu Dec 28 2023 02:33:20 for Belle II Software by
1.9.1