FairRoot/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  if (ids.size() != 0) return ids[0];
12  else if (idsMI.size() != 0) return idsMI[0];
13  else return -1;
14  };
15  int GetBestMatchWithPdg() const {
16  if (ids.size() != 0) return ids[0];
17  else return -1;
18  };
19  vector<int> ids;
20  vector<int> idsMI; // matched but pdg is different - miss identification
21 };
22 
23 #endif
vector< int > idsMI
Definition: KFPartMatch.h:20
int GetBestMatchWithPdg() const
Definition: KFPartMatch.h:15
bool IsMatchedWithPdg() const
Definition: KFPartMatch.h:9
bool IsMatched() const
Definition: KFPartMatch.h:8
int GetBestMatch() const
Definition: KFPartMatch.h:10
vector< int > ids
Definition: KFPartMatch.h:18