Belle II Software  release-05-01-25
KlId.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Jo-Frederik Krohn *
7  * *
8  * *
9  * *
10  * This software is provided "as is" without any warranty. *
11  **************************************************************************/
12 
13 /* Belle2 headers. */
14 #include <mdst/dataobjects/KlId.h>
15 #include <mdst/dataobjects/KLMCluster.h>
16 #include <mdst/dataobjects/ECLCluster.h>
17 
18 using namespace Belle2;
19 
20 
21 bool KlId::isKLM() const
22 {
23  return getRelatedFrom<KLMCluster>();
24 }
25 
26 bool KlId::isECL() const
27 {
28  return getRelatedFrom<ECLCluster>();
29 }
30 
31 double KlId::getKlId() const
32 {
33  auto klmClusterWeight = getRelatedFromWithWeight<KLMCluster>();
34  if (klmClusterWeight.first) return klmClusterWeight.second;
35  auto eclClusterWeight = getRelatedFromWithWeight<ECLCluster>();
36  if (eclClusterWeight.first) return eclClusterWeight.second;
37  return nan("");
38 }
39 
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::KlId::getKlId
double getKlId() const
get the klong classifier output
Belle2::KlId::isKLM
bool isKLM() const
is this ID originally a KLM Cluster ?
Belle2::KlId::isECL
bool isECL() const
is this ID originally a ECL Cluster ?