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
TruthClusterizerBase.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TruthClusterizerBase.h
1
#ifndef G4TRACKING_TRUTHCLUSTERIZERBASE
2
#define G4TRACKING_TRUTHCLUSTERIZERBASE
3
4
// Generated March 2023, David Stewart
5
//
6
// Virtual base class used to cluster TrkrHits into TrkrClusters, but using only the reconstructed hits
7
// from phg4 embedded (``truth'') tracks. In each of the following modules, a child-class will be derived
8
// with the "cluster_hits()" virtual function implemented
9
// - PHG4MvtxHitReco
10
// - PHG4InttHitReco
11
// - PHG4TpcElectronDrift
12
// - (maybe?) tpot?
13
//
14
// It's job is to:
15
// (1) build TrkrTruthTracks in the TrkrTruthTrackContainer
16
// (2) build TrkrClusters in the truth clusters TrkrClusterContainer
17
// It does this by collecting the TrkrHit's associated with each PHG4 truth track, and when they
18
// are all collected, it calls the down-stream macros (the same ones which do the Svtx clustering)
19
// on this subset of the TrkrHits, and assigning these clusters to the TrkrClusterContainer and
20
// the associated TrkrTruthTrackContainer.
21
22
#include <
trackbase/TrkrDefs.h
>
23
#include <
fun4all/Fun4AllReturnCodes.h
>
24
#include <map>
25
#include <iostream>
26
27
class
PHCompositeNode
;
28
class
TrkrHitSetContainer
;
29
class
TrkrClusterContainer
;
30
class
TrkrTruthTrackContainer
;
31
class
TrkrTruthTrack
;
32
class
PHG4TruthInfoContainer
;
33
class
PHG4Hit
;
34
35
class
TruthClusterizerBase
{
36
protected
:
37
TrkrHitSetContainer
*
m_hits
;
38
int
m_verbosity
{ 0 };
39
PHCompositeNode
*
m_topNode
{
nullptr
};
40
TrkrTruthTrackContainer
*
m_truthtracks
{
nullptr
};
41
TrkrClusterContainer
*
m_clusters
{
nullptr
};
// cluster container passed to individual clusterers
42
PHG4TruthInfoContainer
*
m_truthinfo
{
nullptr
};
43
int
m_trkid
{ -1 };
44
bool
m_is_emb
{
false
};
45
bool
m_was_emb
{
false
};
46
bool
m_is_new_track
{
false
};
47
TrkrTruthTrack
*
m_current_track
{
nullptr
};
48
49
50
std::map<TrkrDefs::hitsetkey,unsigned int>
m_hitsetkey_cnt
{};
// counter for making ckeys form hitsetkeys
51
52
// implemented individually for mvtx, intt and tpc cluster hits
53
/* static int dummy_cluster_hits() { */
54
/* return Fun4AllReturnCodes::EVENT_OK; */
55
/* }; */
56
57
public
:
58
TruthClusterizerBase
( );
59
void
init_clusterizer_base
(
PHCompositeNode
*& _topNode,
int
verbosity
);
60
virtual
~TruthClusterizerBase
();
61
62
// main use functions
63
void
check_g4hit_status
(
PHG4Hit
*);
64
void
transfer_clusters
(
TrkrClusterContainer
*);
65
void
update_track
();
66
void
transfer_clusters
();
67
68
void
addhitset
(
TrkrDefs::hitsetkey
,
TrkrDefs::hitkey
,
float
neffelectrons);
69
70
// convenience
71
int
Verbosity
() {
return
m_verbosity
; };
72
void
set_verbosity
(
int
_
) {
m_verbosity
=
_
; };
73
void
print_clusters
(
int
nclusprint=20);
74
75
};
76
77
#endif
coresoftware
blob
master
simulation
g4simulation
g4tracking
TruthClusterizerBase.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:16
using
1.8.2 with
sPHENIX GitHub integration