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
truthDecayTester.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file truthDecayTester.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef GEANTTESTER_H
4
#define GEANTTESTER_H
5
6
#include <
fun4all/SubsysReco.h
>
7
8
#include <
decayfinder/DecayFinderContainer_v1.h
>
// for DecayFinderContainer_v1
9
10
#include <
g4main/PHG4Particle.h
>
11
#include <
g4main/PHG4TruthInfoContainer.h
>
12
#include <
g4main/PHG4VtxPoint.h
>
13
14
#include <TBranch.h>
15
#include <TFile.h>
16
#include <TTree.h>
17
18
#include <string>
19
20
class
PHCompositeNode
;
21
class
PHG4TruthInfoContainer
;
22
class
PHG4Particle
;
23
class
PHG4VtxPoint
;
24
25
class
truthDecayTester
:
public
SubsysReco
26
{
27
public
:
28
truthDecayTester
(
const
std::string
&
name
=
"truthDecayTester"
);
29
30
virtual
~truthDecayTester
();
31
37
int
Init
(
PHCompositeNode
*topNode)
override
;
38
42
int
process_event
(
PHCompositeNode
*topNode)
override
;
43
44
std::string
get_histo_prefix
();
45
47
int
End
(
PHCompositeNode
*topNode)
override
;
48
49
void
setMotherPDG
(
int
PDGID) {
m_decay_pdg_id
= PDGID; }
50
void
setMinPT
(
float
value
) {
m_min_pt
=
value
; }
51
void
setEtaRange
(
float
min
,
float
max)
52
{
53
m_min_eta
=
min
;
54
m_max_eta
= max;
55
}
56
void
setDFNodeName
(
const
std::string
&
name
) {
m_df_module_name
=
name
; }
57
void
setOutputName
(
const
std::string
&
name
) {
m_outfile_name
=
name
; }
58
void
writeTuple
(
bool
write
) {
m_write_nTuple
=
write
; }
59
60
private
:
61
unsigned
int
m_nTracks
;
62
float
m_min_pt
;
63
float
m_min_eta
;
64
;
65
float
m_max_eta
;
66
bool
m_write_nTuple
;
67
int
m_decay_pdg_id
;
68
69
PHG4TruthInfoContainer
*
m_truth_info
;
70
PHG4Particle
*
m_g4particle
;
71
std::string
m_df_module_name
;
72
std::string
m_outfile_name
;
73
TFile *
m_outfile
;
74
TTree *
m_tree
;
75
bool
m_write_QAHists
;
76
DecayFinderContainer_v1
*
m_decayMap
=
nullptr
;
77
78
void
initializeBranches
();
79
void
getMotherPDG
(
PHCompositeNode
*topNode);
80
std::vector<int>
getDecayFinderMothers
(
PHCompositeNode
*topNode);
81
bool
isInRange
(
float
min
,
float
value
,
float
max);
82
void
resetValues
();
83
84
static
const
int
max_tracks
= 20;
85
unsigned
int
m_event_number
= 0;
86
float
m_mother_mass
= -99;
87
float
m_daughter_sum_mass
= 0;
88
float
m_mother_decayLength
= -99;
89
float
m_mother_decayTime
= -99;
90
int
m_mother_pdg_id
= -99;
91
float
m_mother_px
= 0;
92
float
m_mother_py
= 0;
93
float
m_mother_pz
= 0;
94
float
m_mother_pE
= 0;
95
float
m_mother_pT
= 0;
96
float
m_mother_eta
= 0;
97
int
m_mother_barcode
= -99;
98
int
m_track_pdg_id
[
max_tracks
] = {0};
99
float
m_track_px
[
max_tracks
] = {0};
100
float
m_track_py
[
max_tracks
] = {0};
101
float
m_track_pz
[
max_tracks
] = {0};
102
float
m_track_pE
[
max_tracks
] = {0};
103
float
m_track_pT
[
max_tracks
] = {0};
104
float
m_track_eta
[
max_tracks
] = {0};
105
float
m_track_mass
[
max_tracks
] = {0};
106
int
m_track_mother_barcode
[
max_tracks
] = {0};
107
float
m_delta_px
= 0;
108
float
m_delta_py
= 0;
109
float
m_delta_pz
= 0;
110
float
m_delta_pE
= 0;
111
bool
m_accept_px_1percent
=
false
;
112
bool
m_accept_py_1percent
=
false
;
113
bool
m_accept_pz_1percent
=
false
;
114
bool
m_accept_pE_1percent
=
false
;
115
bool
m_accept_px_5percent
=
false
;
116
bool
m_accept_py_5percent
=
false
;
117
bool
m_accept_pz_5percent
=
false
;
118
bool
m_accept_pE_5percent
=
false
;
119
bool
m_accept_px_15percent
=
false
;
120
bool
m_accept_py_15percent
=
false
;
121
bool
m_accept_pz_15percent
=
false
;
122
bool
m_accept_pE_15percent
=
false
;
123
bool
m_accept_eta
=
true
;
124
bool
m_accept_pT
=
true
;
125
};
126
127
#endif // GEANTTESTER_H
coresoftware
blob
master
offline
QA
modules
truthDecayTester.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:12
using
1.8.2 with
sPHENIX GitHub integration