PandaRoot
KFPartMatch.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef KFPartMatch_H
14 #define KFPartMatch_H
15 
16 struct KFPartMatch // used for Reco to MC match as well as for MC to Reco
17 {
18  KFPartMatch() : ids(), idsMI(){};
19 
20  bool IsMatched() const { return ids.size() != 0 || idsMI.size() != 0; };
21  bool IsMatchedWithPdg() const { return ids.size() != 0; };
22  int GetBestMatch() const
23  {
24  if (ids.size() != 0)
25  return ids[0];
26  else if (idsMI.size() != 0)
27  return idsMI[0];
28  else
29  return -1;
30  };
31  int GetBestMatchWithPdg() const
32  {
33  if (ids.size() != 0)
34  return ids[0];
35  else
36  return -1;
37  };
38  vector<int> ids;
39  vector<int> idsMI; // matched but pdg is different - miss identification
40 };
41 
42 #endif
vector< int > idsMI
Definition: KFPartMatch.h:39
bool IsMatchedWithPdg() const
Definition: KFPartMatch.h:21
int GetBestMatch() const
Definition: KFPartMatch.h:22
bool IsMatched() const
Definition: KFPartMatch.h:20
int GetBestMatchWithPdg() const
Definition: KFPartMatch.h:31
vector< int > ids
Definition: KFPartMatch.h:37