Belle II Software
release-05-01-25
MCTruthEclSeedFilter.cc
1
/**************************************************************************
2
* BASF2 (Belle Analysis Framework 2) *
3
* Copyright(C) 2019 - Belle II Collaboration *
4
* *
5
* Author: The Belle II Collaboration *
6
* Contributors: Simon Kurz, Nils Braun *
7
* *
8
* This software is provided "as is" without any warranty. *
9
**************************************************************************/
10
#include <tracking/ckf/cdc/filters/states/MCTruthEclSeedFilter.h>
11
12
#include <tracking/ckf/cdc/entities/CDCCKFState.h>
13
14
#include <ecl/dataobjects/ECLShower.h>
15
16
#include <mdst/dataobjects/MCParticle.h>
17
18
using namespace
Belle2
;
19
20
TrackFindingCDC::Weight
MCTruthEclSeedFilter::operator()
(
const
BaseCDCStateFilter::Object
& pair)
21
{
22
const
auto
& path = *(pair.first);
23
const
auto
& state = *(pair.second);
24
25
const
auto
& seed = path.front();
26
const
auto
* seedRecoTrack = seed.getSeed();
27
const
auto
* seedEclShower = seedRecoTrack->getRelated<
ECLShower
>(
"ECLShowers"
);
28
const
auto
* seedMCParticle = seedEclShower->
getRelated
<
MCParticle
>();
29
30
const
auto
* wireHit = state.getWireHit();
31
const
auto
* cdcHit = wireHit->getHit();
32
const
auto
* hitMCParticle = cdcHit->
getRelated
<
MCParticle
>();
33
34
if
(seedMCParticle != hitMCParticle) {
35
return
NAN;
36
}
37
38
return
1;
39
}
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:280
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::MCParticle
A Class to store the Monte Carlo particle information.
Definition:
MCParticle.h:43
Belle2::MCTruthEclSeedFilter::operator()
TrackFindingCDC::Weight operator()(const BaseCDCStateFilter::Object &pair) final
return 1 if matched truth hit belongs to matched truth track, NAN otherwise
Definition:
MCTruthEclSeedFilter.cc:20
Belle2::TrackFindingCDC::Filter::Object
AObject Object
Type of the object to be analysed.
Definition:
Filter.dcl.h:43
Belle2::ECLShower
Class to store ECL Showers.
Definition:
ECLShower.h:42
tracking
ckf
cdc
filters
states
src
MCTruthEclSeedFilter.cc
Generated on Fri Nov 5 2021 03:59:48 for Belle II Software by
1.8.17