CbmRoot
Loading...
Searching...
No Matches
KFParticleMatch.h
Go to the documentation of this file.
1/* Copyright (C) 2013 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Maksym Zyzak [committer] */
4
5/*
6 * CBM KF Track Quality
7 * KF Particles Finder performance
8 */
9
10#ifndef _KFParticleMatch_h_
11#define _KFParticleMatch_h_
12
13#include "TObject.h"
14
15#include <vector>
16
17class KFParticleMatch : public TObject {
18 public:
21
22 Int_t GetMatch() const { return fMatch; }
23 void SetMatch(Int_t i) { fMatch = i; }
24
25 void SetMatchType(Short_t i) { fMatchType = i; }
26
27 Bool_t IsCombinatorialBG() const { return (fMatchType == 0); }
28 Bool_t IsPhysicsBG() const { return (fMatchType == 1); }
29 Bool_t IsRecoParticle() const { return (fMatchType == 2); }
30
31 private:
32 Int_t fMatch;
33 Short_t fMatchType; // 0 - combinatorial BG, 1 - physics BG, 2 - reconstructed particle
34
36};
37
38
39struct KFMatchParticles // used for Reco to MC match as well as for MC to Reco
40{
42
43 bool IsMatched() const { return ids.size() != 0 || idsMI.size() != 0; };
44 bool IsMatchedWithPdg() const { return ids.size() != 0; };
45 int GetBestMatch() const
46 {
47 if (ids.size() != 0)
48 return ids[0];
49 else if (idsMI.size() != 0)
50 return idsMI[0];
51 else
52 return -1;
53 };
55 {
56 if (ids.size() != 0)
57 return ids[0];
58 else
59 return -1;
60 };
61 std::vector<int> ids;
62 std::vector<int> idsMI; // matched but pdg is different - miss identification
63};
64
65#endif // _KFParticleMatch_h_
void SetMatchType(Short_t i)
Bool_t IsRecoParticle() const
Bool_t IsCombinatorialBG() const
ClassDef(KFParticleMatch, 1)
Int_t GetMatch() const
Bool_t IsPhysicsBG() const
void SetMatch(Int_t i)
bool IsMatched() const
bool IsMatchedWithPdg() const
int GetBestMatchWithPdg() const
std::vector< int > idsMI
int GetBestMatch() const
std::vector< int > ids