Belle II Software
development
MCTruthEclSeedFilter.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/MCTruthEclSeedFilter.h>
9
10
#include <tracking/ckf/cdc/entities/CDCCKFState.h>
11
12
#include <ecl/dataobjects/ECLShower.h>
13
14
#include <mdst/dataobjects/MCParticle.h>
15
16
using namespace
Belle2
;
17
18
TrackFindingCDC::Weight
MCTruthEclSeedFilter::operator()
(
const
BaseCDCStateFilter::Object
& pair)
19
{
20
const
auto
& path = *(pair.first);
21
const
auto
& state = *(pair.second);
22
23
const
auto
& seed = path.front();
24
const
auto
* seedRecoTrack = seed.getSeed();
25
const
auto
* seedEclShower = seedRecoTrack->getRelated<
ECLShower
>(
"ECLShowers"
);
26
const
auto
* seedMCParticle = seedEclShower->
getRelated
<
MCParticle
>();
27
28
const
auto
* wireHit = state.getWireHit();
29
const
auto
* cdcHit = wireHit->getHit();
30
const
auto
* hitMCParticle = cdcHit->
getRelated
<
MCParticle
>();
31
32
if
(seedMCParticle != hitMCParticle) {
33
return
NAN;
34
}
35
36
return
1;
37
}
Belle2::ECLShower
Class to store ECL Showers.
Definition:
ECLShower.h:30
Belle2::MCParticle
A Class to store the Monte Carlo particle information.
Definition:
MCParticle.h:32
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:18
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:35
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
tracking
ckf
cdc
filters
states
src
MCTruthEclSeedFilter.cc
Generated on Fri Nov 8 2024 02:43:27 for Belle II Software by
1.9.6