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