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
TpcClusterBuilder.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TpcClusterBuilder.h
1
#ifndef G4TPC_TPCCLUSTERBUILDER_H
2
#define G4TPC_TPCCLUSTERBUILDER_H
3
4
// Revised 04-Dec-2022, David Stewart
5
// basic use:
6
// (a) optionally used set_current_track() (pointless to not set the track though,
7
// otherwise the new TrkrClsuters won't be assigned to the proper location)
8
// (b) fill with TrkrHits in addhitset() (in the MapToPadPlane module)
9
// (c) after all TrkrHit's have been added for a given truth track,
10
// call cluster_and_reset(false) to generate the TrkrClusters from the
11
// TrkrHit's, fill in the clusterkeys in the truth_track, and reset
12
// the TrkrHit container.
13
// (d) at the end of the event, run cluster_and_reset(true) which will check
14
// if there are clusters to make, and also clear out the counter for the
15
// hitsetkeys
16
//
17
// Note:
18
// - the algorithm to get the local surface will probably be updated in
19
// TpcClusterizer, when that happens update here as well
20
21
#include <
phool/PHObject.h
>
22
#include <
trackbase/TrkrDefs.h
>
23
#include <
trackbase/TpcDefs.h
>
24
#include <
trackbase/TrkrHitSetContainerv1.h
>
25
#include <
trackbase/ActsGeometry.h
>
26
#include <map>
27
#include <climits>
28
#include <iostream>
29
30
using
std::ostream;
31
32
class
PHG4TpcCylinderGeom
;
33
class
PHG4TpcCylinderGeomContainer
;
34
class
TrkrCluster
;
35
class
TrkrClusterContainer
;
36
class
TrkrHitSetContainer
;
37
class
TrkrTruthTrack
;
38
class
TrkrTruthTrackContainer
;
39
class
ClusHitsVerbosev1
;
40
41
// This is the basic data for each set of TrkrHits from each TrkrHitsSet
42
// to be used in tpc/TpcClusterizer.cc
43
class
TpcClusterBuilder
{
44
double
square
(
double
);
45
double
square
(
float
);
46
47
TrkrClusterContainer
*
m_clusterlist
{
nullptr
};
// fill for output
48
ActsGeometry
*
m_tGeometry
{
nullptr
};
// used to generate clusters
49
PHG4TpcCylinderGeomContainer
*
geom_container
{
nullptr
};
50
51
// internal containers to fill and consume hits and fill with tracks
52
TrkrHitSetContainer
*
m_hits
{
new
TrkrHitSetContainerv1
() };
53
/* TrkrTruthTrack* current_track { nullptr }; */
54
std::map<TrkrDefs::hitsetkey,unsigned int>
hitsetkey_cnt
{};
55
56
public
:
57
private
:
58
59
int
n_tracks
{0};
60
int
verbosity
{0};
61
62
public
:
63
TpcClusterBuilder
( ) { };
64
/* TrkrClusterContainer* _truth_cluster_container */
65
/* , ActsGeometry* _ActsGeometry */
66
/* , PHG4TpcCylinderGeomContainer* _geom_container */
67
/* ); */
68
69
void
fixme_check
();
70
void
fixme_short_check
();
71
72
bool
b_collect_hits
{
false
};
73
/* bool is_embedded_track {false}; */
74
void
cluster_hits
(
TrkrTruthTrack
* track);
75
void
addhitset
(
TrkrDefs::hitsetkey
,
TrkrDefs::hitkey
,
float
neffelectrons);
76
void
set_current_track
(
TrkrTruthTrack
* _trkrtruthtrack);
77
void
print
(
TrkrTruthTrackContainer
*,
int
nclusprint=-1);
78
void
print_file
(
TrkrTruthTrackContainer
*,
std::string
);
79
void
set_verbosity
(
int
verbosity_level);
80
81
~TpcClusterBuilder
(){
82
delete
m_hits
;
83
};
84
85
private
:
// from TpcClusterizer.h parameters; also used as general
86
/* bool do_wedge_emulation = false; */
87
/* double SectorFiducialCut = 0.5; */
88
/* unsigned short MaxClusterHalfSizePhi = 3; */
89
/* unsigned short MaxClusterHalfSizeT = 5; */
90
/* int cluster_version = 4; */
91
double
AdcClockPeriod
= 53.0;
// ns
92
93
// TPC shaping offset correction parameter
94
// From Tony Frawley July 5, 2022
95
double
m_sampa_tbias
= 39.6;
// ns
96
97
98
// for pixel thresholds
99
private
:
100
double
m_pixel_thresholdrat
{ 0.01 };
101
ClusHitsVerbosev1
*
mClusHitsVerbose
{
nullptr
};
102
103
public
:
104
void
clear_hitsetkey_cnt
();
105
void
set_pixel_thresholdrat
(
double
val) {
m_pixel_thresholdrat
= val; };
106
bool
needs_input_nodes
=
true
;
107
void
set_input_nodes
(
108
TrkrClusterContainer
* _truth_cluster_container
109
,
ActsGeometry
* _ActsGeometry
110
,
PHG4TpcCylinderGeomContainer
* _geom_container
111
,
ClusHitsVerbosev1
* _clushitsverbose
112
);
113
};
114
115
#endif //TRACKBASE_PADPLANEREADOUTSTRUCT_H
coresoftware
blob
master
simulation
g4simulation
g4tpc
TpcClusterBuilder.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:16
using
1.8.2 with
sPHENIX GitHub integration