BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
KFParticleMatch.h
Go to the documentation of this file.
1/*
2 *====================================================================
3 *
4 * CBM KF Track Quality
5 *
6 * Authors: M.Zyzak
7 *
8 * e-mail :
9 *
10 *====================================================================
11 *
12 * KF Particles Finder performance
13 *
14 *====================================================================
15 */
16
17#ifndef _KFParticleMatch_h_
18#define _KFParticleMatch_h_
19
20#include "TObject.h"
21
22#include <vector>
23
24class KFParticleMatch : public TObject
25{
26 public:
29
30 Int_t GetMatch() const { return fMatch; }
31 void SetMatch(Int_t i) { fMatch = i; }
32
34
35 Bool_t IsCombinatorialBG() const { return (fMatchType == 0); }
36 Bool_t IsPhysicsBG() const { return (fMatchType == 1); }
37 Bool_t IsRecoParticle() const { return (fMatchType == 2); }
38
39 private:
41 Short_t fMatchType; // 0 - combinatorial BG, 1 - physics BG, 2 - reconstructed particle
42
44};
45
46struct KFMatchParticles // used for Reco to MC match as well as for MC to Reco
47{
49 : ids()
50 , idsMI() {};
51
52 bool IsMatched() const { return ids.size() != 0 || idsMI.size() != 0; };
53 bool IsMatchedWithPdg() const { return ids.size() != 0; };
54 int GetBestMatch() const
55 {
56 if (ids.size() != 0)
57 return ids[0];
58 else if (idsMI.size() != 0)
59 return idsMI[0];
60 else
61 return -1;
62 };
64 {
65 if (ids.size() != 0)
66 return ids[0];
67 else
68 return -1;
69 };
70 std::vector<int> ids;
71 std::vector<int> idsMI; // matched but pdg is different - miss identification
72};
73
74#endif // _KFParticleMatch_h_
int i
Definition P4_F32vec4.h:22
bool Bool_t
int Int_t
short Short_t
#define ClassDef(name, id)
void SetMatchType(Short_t i)
Bool_t IsRecoParticle() const
Bool_t IsCombinatorialBG() const
Int_t GetMatch() const
Bool_t IsPhysicsBG() const
void SetMatch(Int_t i)
bool IsMatched() const
bool IsMatchedWithPdg() const
int GetBestMatchWithPdg() const
int GetBestMatch() const
std::vector< int > ids
std::vector< int > idsMI