Belle II Software  release-06-01-15
KlId.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 /* Belle2 headers. */
10 #include <mdst/dataobjects/KlId.h>
11 #include <mdst/dataobjects/KLMCluster.h>
12 #include <mdst/dataobjects/ECLCluster.h>
13 
14 using namespace Belle2;
15 
16 
17 bool KlId::isKLM() const
18 {
19  return getRelatedFrom<KLMCluster>();
20 }
21 
22 bool KlId::isECL() const
23 {
24  return getRelatedFrom<ECLCluster>();
25 }
26 
27 double KlId::getKlId() const
28 {
29  auto klmClusterWeight = getRelatedFromWithWeight<KLMCluster>();
30  if (klmClusterWeight.first) return klmClusterWeight.second;
31  auto eclClusterWeight = getRelatedFromWithWeight<ECLCluster>();
32  if (eclClusterWeight.first) return eclClusterWeight.second;
33  return nan("");
34 }
35 
double getKlId() const
get the klong classifier output
Definition: KlId.cc:27
bool isECL() const
is this ID originally a ECL Cluster ?
Definition: KlId.cc:22
bool isKLM() const
is this ID originally a KLM Cluster ?
Definition: KlId.cc:17
Abstract base class for different kinds of events.