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
BuildResonanceJetTaggingTree.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file BuildResonanceJetTaggingTree.h
1
#ifndef BUILDRESONANCEJETTAGGINGTREE_H__
2
#define BUILDRESONANCEJETTAGGINGTREE_H__
3
4
#include <resonancejettagging/ResonanceJetTagging.h>
5
6
#include <
fun4all/SubsysReco.h
>
7
8
#include <
jetbase/JetContainerv1.h
>
9
10
#pragma GCC diagnostic push
11
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
12
#include <HepMC/GenEvent.h>
13
#pragma GCC diagnostic pop
14
15
#include <vector>
16
18
class
PHCompositeNode
;
19
class
TFile;
20
class
TTree;
21
class
TH1I;
22
class
PHG4Particle
;
23
class
KFParticle_Container
;
24
class
SvtxEvalStack
;
25
class
SvtxTrackEval
;
26
28
class
BuildResonanceJetTaggingTree
:
public
SubsysReco
29
{
30
public
:
31
33
BuildResonanceJetTaggingTree
(
const
std::string
&
name
=
"BuildResonanceJetTaggingTree"
,
const
std::string
&
fname
=
"BuildResonanceJetTaggingTree.root"
,
const
ResonanceJetTagging::TAG
tag = ResonanceJetTagging::TAG::D0);
34
35
// Destructor
36
virtual
~BuildResonanceJetTaggingTree
();
37
39
int
Init
(
PHCompositeNode
*);
40
42
int
process_event
(
PHCompositeNode
*);
43
45
int
End
(
PHCompositeNode
*);
46
int
loopHFHadronic
(
PHCompositeNode
*topNode);
47
void
findMatchedTruthD0
(
PHCompositeNode
*topNode,
Jet
*&mcTagJet, HepMC::GenParticle *&mcTag, std::vector<int> decays);
48
HepMC::GenParticle *
getMother
(
PHCompositeNode
*topNode,
PHG4Particle
*g4daughter);
49
bool
isReconstructed
(
int
index
, std::vector<int> indexRecVector);
50
51
void
initializeVariables
();
52
void
initializeTrees
();
53
void
resetTreeVariables
();
54
55
void
setDoRecunstructed
(
bool
b
) {
m_dorec
=
b
; }
56
bool
getDoRecunstructed
() {
return
m_dorec
; }
57
void
setDoTruth
(
bool
b
) {
m_dotruth
=
b
; }
58
bool
getDoTruth
() {
return
m_dotruth
; }
59
60
void
setTagContainerName
(
const
std::string
&tagContName) {
m_tagcontainer_name
= tagContName; }
61
std::string
getTagContainerName
() {
return
m_tagcontainer_name
; }
62
void
setJetContainerName
(
const
std::string
&jetContName) {
m_jetcontainer_name
= jetContName; }
63
std::string
getJetContainerName
() {
return
m_jetcontainer_name
; }
64
void
setTruthJetContainerName
(
const
std::string
&jetContName) {
m_truth_jetcontainer_name
= jetContName; }
65
std::string
getTruthJetContainerName
() {
return
m_truth_jetcontainer_name
; }
66
67
private
:
68
69
JetContainerv1
*
getJetContainerFromNode
(
PHCompositeNode
*topNode,
const
std::string
&
name
);
70
KFParticle_Container
*
getKFParticleContainerFromNode
(
PHCompositeNode
*topNode,
const
std::string
&
name
);
71
HepMC::GenEvent*
getGenEventFromNode
(
PHCompositeNode
*topNode,
const
std::string
&
name
);
73
std::string
m_outfilename
;
74
std::string
m_tagcontainer_name
;
75
std::string
m_jetcontainer_name
;
76
std::string
m_truth_jetcontainer_name
;
77
JetContainerv1
*
m_taggedJetContainer
;
78
JetContainerv1
*
m_truth_taggedJetContainer
;
79
bool
m_dorec
;
80
bool
m_dotruth
;
81
int
m_nDaughters
;
82
SvtxEvalStack
*
m_svtx_evalstack
=
nullptr
;
83
SvtxTrackEval
*
m_trackeval
=
nullptr
;
84
85
std::vector<float>
m_truthjet_const_px
,
m_truthjet_const_py
,
86
m_truthjet_const_pz
,
m_truthjet_const_e
;
87
88
ResonanceJetTagging::TAG
m_tag_particle
;
89
int
m_tag_pdg
;
90
92
TFile *
m_outfile
=
nullptr
;
93
TH1I *
m_eventcount_h
=
nullptr
;
94
TTree *
m_taggedjettree
=
nullptr
;
95
TTree *
m_runinfo
=
nullptr
;
96
// Tagged-Jet reconstructed variables
97
float
m_reco_tag_px
= NAN;
98
float
m_reco_tag_py
= NAN;
99
float
m_reco_tag_pz
= NAN;
100
float
m_reco_tag_pt
= NAN;
101
float
m_reco_tag_eta
= NAN;
102
float
m_reco_tag_phi
= NAN;
103
float
m_reco_tag_m
= NAN;
104
float
m_reco_tag_e
= NAN;
105
float
m_reco_jet_px
= NAN;
106
float
m_reco_jet_py
= NAN;
107
float
m_reco_jet_pz
= NAN;
108
float
m_reco_jet_pt
= NAN;
109
float
m_reco_jet_eta
= NAN;
110
float
m_reco_jet_phi
= NAN;
111
float
m_reco_jet_m
= NAN;
112
float
m_reco_jet_e
= NAN;
113
//Truth info
114
float
m_truth_tag_px
= NAN;
115
float
m_truth_tag_py
= NAN;
116
float
m_truth_tag_pz
= NAN;
117
float
m_truth_tag_pt
= NAN;
118
float
m_truth_tag_eta
= NAN;
119
float
m_truth_tag_phi
= NAN;
120
float
m_truth_tag_m
= NAN;
121
float
m_truth_tag_e
= NAN;
122
float
m_truth_jet_px
= NAN;
123
float
m_truth_jet_py
= NAN;
124
float
m_truth_jet_pz
= NAN;
125
float
m_truth_jet_pt
= NAN;
126
float
m_truth_jet_eta
= NAN;
127
float
m_truth_jet_phi
= NAN;
128
float
m_truth_jet_m
= NAN;
129
float
m_truth_jet_e
= NAN;
130
131
float
m_intlumi
= NAN;
132
float
m_nprocessedevents
= NAN;
133
float
m_nacceptedevents
= NAN;
134
float
m_xsecprocessedevents
= NAN;
135
float
m_xsecacceptedevents
= NAN;
136
137
};
138
139
#endif
analysis
blob
master
ResonanceJetTaggingOutputs
BuildResonanceJetTaggingTree.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:57
using
1.8.2 with
sPHENIX GitHub integration