Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
TrackClusEvaluator.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrackClusEvaluator.h
1
#ifndef TRACKCLUSEVALUATOR_H
2
#define TRACKCLUSEVALUATOR_H
3
// A class that will collect the clusters for SVTX and PHG$ tracks and compare them.
4
// The actual comparison, cluster to cluster, is from a pointer to a user provided TrkrClusterIsMatcher
5
#include "
TrkrClusLoc.h
"
6
7
#include <vector>
8
#include <array>
9
#include <
trackbase/TrkrDefs.h
>
10
11
class
TrkrClusterIsMatcher
;
12
class
SvtxTrack
;
13
class
TrkrTruthTrack
;
14
class
TrkrClusterContainer
;
15
16
class
TrackClusEvaluator
{
17
private
:
18
using
Vector
= std::vector<std::pair<TrkrDefs::hitsetkey,TrkrDefs::cluskey>>;
19
20
using
Iter
= Vector::iterator;
21
22
/* TrkrClusterComparer* comp {nullptr}; // DEPRECATED */
23
24
std::array<int,5>
cntclus
(
Vector
& keys);
// nclusters MVTX, INTT, TPC, TPOT, TOTAL
25
std::array<int,5>
cnt_matchedclus
(
Vector
& keys, std::vector<bool>& matches);
// same but number matched
26
27
public
:
28
29
TrkrClusterIsMatcher
*
ismatcher
{
nullptr
};
30
/* void set_ismatcher(TrkrClusterIsMatcher* _ismatcher) { ismatcher = _ismatcher; }; */
31
TrackClusEvaluator
(
TrkrClusterIsMatcher
*
_
=
nullptr
) :
ismatcher
{
_
} {};
32
33
TrkrClusterContainer
*
get_PHG4_clusters
();
34
TrkrClusterContainer
*
get_SVTX_clusters
();
35
36
Vector
svtx_keys
{};
37
Vector
phg4_keys
{};
38
39
bool
collect_match_statistic
=
false
;
40
double
match_stat
{0};
41
42
void
reset
();
43
std::array<int,3>
find_matches
();
// populated matches_{svtx,phg4};
44
// return's {n-matched, n-phg4, n-svtx}
45
std::array<int,3>
find_matches
(
TrkrTruthTrack
* g4_track,
SvtxTrack
* sv_track);
46
47
int
phg4_n_matched
();
// also same as phg4_cnt_matchedclus()[4]
48
int
svtx_n_matched
();
// should be almost always the same
49
// which is ALMOST guaranteed to be same as svtx_cnt_matchedclus()[4]
50
int
phg4_nclus
() {
return
(
int
)
phg4_keys
.size(); }
51
int
svtx_nclus
() {
return
(
int
)
svtx_keys
.size(); }
52
53
std::vector<bool>
svtx_matches
;
54
std::vector<bool>
phg4_matches
;
55
56
int
addClusKeys
(
SvtxTrack
*);
// return number of clusters
57
int
addClusKeys
(
TrkrTruthTrack
*);
// return number of clusters
58
59
std::array<int,5>
svtx_cntclus
() {
return
cntclus
(
svtx_keys
); };
// Mvtx Intt Tpc TPOT Sum
60
std::array<int,5>
phg4_cntclus
() {
return
cntclus
(
phg4_keys
); };
61
62
std::array<int,5>
svtx_cnt_matchedclus
() {
return
cnt_matchedclus
(
svtx_keys
,
svtx_matches
); };
63
std::array<int,5>
phg4_cnt_matchedclus
() {
return
cnt_matchedclus
(
phg4_keys
,
phg4_matches
); };
64
65
//Convenience functions, asking for cluster locations
66
std::vector<TrkrClusLoc>
phg4_clusloc_all
();
67
std::vector<TrkrClusLoc>
phg4_clusloc_unmatched
();
68
std::vector<TrkrClusLoc>
svtx_clusloc_all
();
69
std::vector<TrkrClusLoc>
svtx_clusloc_unmatched
();
70
std::vector<TrkrClusLoc>
clusloc_matched
();
71
72
};
73
74
#endif
coresoftware
blob
master
simulation
g4simulation
g4eval
TrackClusEvaluator.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:14
using
1.8.2 with
sPHENIX GitHub integration