PandaRoot
KFPartMatch.h
Go to the documentation of this file.
1 #ifndef KFPartMatch_H
2 #define KFPartMatch_H
3 
4 struct KFPartMatch // used for Reco to MC match as well as for MC to Reco
5 {
6  KFPartMatch() : ids(), idsMI(){};
7 
8  bool IsMatched() const { return ids.size() != 0 || idsMI.size() != 0; };
9  bool IsMatchedWithPdg() const { return ids.size() != 0; };
10  int GetBestMatch() const
11  {
12  if (ids.size() != 0)
13  return ids[0];
14  else if (idsMI.size() != 0)
15  return idsMI[0];
16  else
17  return -1;
18  };
19  int GetBestMatchWithPdg() const
20  {
21  if (ids.size() != 0)
22  return ids[0];
23  else
24  return -1;
25  };
26  vector<int> ids;
27  vector<int> idsMI; // matched but pdg is different - miss identification
28 };
29 
30 #endif
vector< int > idsMI
Definition: KFPartMatch.h:27
bool IsMatchedWithPdg() const
Definition: KFPartMatch.h:9
int GetBestMatch() const
Definition: KFPartMatch.h:10
bool IsMatched() const
Definition: KFPartMatch.h:8
int GetBestMatchWithPdg() const
Definition: KFPartMatch.h:19
vector< int > ids
Definition: KFPartMatch.h:25