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
17
class
KFParticleMatch
:
public
TObject {
18
public
:
19
KFParticleMatch
();
20
~KFParticleMatch
();
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
35
ClassDef
(
KFParticleMatch
, 1);
36
};
37
38
39
struct
KFMatchParticles
// used for Reco to MC match as well as for MC to Reco
40
{
41
KFMatchParticles
() :
ids
(),
idsMI
(){};
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
};
54
int
GetBestMatchWithPdg
()
const
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_
KFParticleMatch
Definition
KFParticleMatch.h:17
KFParticleMatch::KFParticleMatch
KFParticleMatch()
Definition
KFParticleMatch.cxx:16
KFParticleMatch::~KFParticleMatch
~KFParticleMatch()
Definition
KFParticleMatch.cxx:18
KFParticleMatch::SetMatchType
void SetMatchType(Short_t i)
Definition
KFParticleMatch.h:25
KFParticleMatch::IsRecoParticle
Bool_t IsRecoParticle() const
Definition
KFParticleMatch.h:29
KFParticleMatch::IsCombinatorialBG
Bool_t IsCombinatorialBG() const
Definition
KFParticleMatch.h:27
KFParticleMatch::fMatchType
Short_t fMatchType
Definition
KFParticleMatch.h:33
KFParticleMatch::ClassDef
ClassDef(KFParticleMatch, 1)
KFParticleMatch::GetMatch
Int_t GetMatch() const
Definition
KFParticleMatch.h:22
KFParticleMatch::fMatch
Int_t fMatch
Definition
KFParticleMatch.h:32
KFParticleMatch::IsPhysicsBG
Bool_t IsPhysicsBG() const
Definition
KFParticleMatch.h:28
KFParticleMatch::SetMatch
void SetMatch(Int_t i)
Definition
KFParticleMatch.h:23
KFMatchParticles
Definition
KFParticleMatch.h:40
KFMatchParticles::IsMatched
bool IsMatched() const
Definition
KFParticleMatch.h:43
KFMatchParticles::KFMatchParticles
KFMatchParticles()
Definition
KFParticleMatch.h:41
KFMatchParticles::IsMatchedWithPdg
bool IsMatchedWithPdg() const
Definition
KFParticleMatch.h:44
KFMatchParticles::GetBestMatchWithPdg
int GetBestMatchWithPdg() const
Definition
KFParticleMatch.h:54
KFMatchParticles::idsMI
std::vector< int > idsMI
Definition
KFParticleMatch.h:62
KFMatchParticles::GetBestMatch
int GetBestMatch() const
Definition
KFParticleMatch.h:45
KFMatchParticles::ids
std::vector< int > ids
Definition
KFParticleMatch.h:61
reco
KF
KFQA
KFParticleMatch.h
Generated on Sun Dec 22 2024 23:04:16 for CbmRoot by
1.12.0