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
HFJetTruthTrigger.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file HFJetTruthTrigger.h
1
#ifndef __HFJetTruthTrigger_H__
2
#define __HFJetTruthTrigger_H__
3
4
// --- need to check all these includes...
5
#include <
fun4all/SubsysReco.h
>
6
#include <vector>
7
#include <cmath>
8
#include <string>
9
#include <limits.h>
10
11
class
TTree;
12
class
TFile;
13
class
TH2D;
14
15
class
PHCompositeNode
;
16
class
Jet
;
17
namespace
HepMC
18
{
19
class
GenEvent;
20
}
21
22
class
HFJetTruthTrigger
:
public
SubsysReco
23
{
24
25
public
:
26
27
HFJetTruthTrigger
(
std::string
filename
,
int
flavor = 5,
std::string
jet_node =
"AntiKt_Truth_r04"
,
int
maxevent = INT_MAX);
28
29
int
30
Init
(
PHCompositeNode
*);
31
int
32
process_event
(
PHCompositeNode
*);
33
int
34
End
(
PHCompositeNode
*);
35
36
float
37
deltaR
(
float
eta1,
float
eta2,
float
phi1,
float
phi2)
38
{
39
40
float
deta = eta1 - eta2;
41
float
dphi
= phi1 - phi2;
42
if
(dphi > +3.14159)
43
dphi -= 2 * 3.14159;
44
if
(dphi < -3.14159)
45
dphi += 2 * 3.14159;
46
47
return
sqrt(pow(deta, 2) + pow(dphi, 2));
48
49
}
50
51
double
52
get_eta_max
()
const
53
{
54
return
_eta_max
;
55
}
56
57
void
58
set_eta_max
(
double
etaMax)
59
{
60
_eta_max
= etaMax;
61
}
62
63
double
64
get_eta_min
()
const
65
{
66
return
_eta_min
;
67
}
68
69
void
70
set_eta_min
(
double
etaMin)
71
{
72
_eta_min
= etaMin;
73
}
74
75
double
76
get_pt_max
()
const
77
{
78
return
_pt_max
;
79
}
80
81
void
82
set_pt_max
(
double
ptMax)
83
{
84
_pt_max
= ptMax;
85
}
86
87
double
88
get_pt_min
()
const
89
{
90
return
_pt_min
;
91
}
92
93
void
94
set_pt_min
(
double
ptMin)
95
{
96
_pt_min
= ptMin;
97
}
98
101
void
102
set_rejection_action
(
int
action
)
103
{
104
_rejection_action
=
action
;
105
}
106
112
int
get_embedding_id
()
const
{
return
_embedding_id
; }
113
//
119
void
set_embedding_id
(
int
id
) {
_embedding_id
=
id
; }
120
private
:
121
123
int
124
parton_tagging
(
Jet
* jet, HepMC::GenEvent*,
const
double
match_radius);
125
127
int
128
hadron_tagging
(
Jet
* jet, HepMC::GenEvent*,
const
double
match_radius);
129
130
bool
_verbose
;
131
132
int
_ievent
;
133
int
_total_pass
;
134
135
TFile *
_f
;
136
137
TH2D *
_h2
;
138
TH2D *
_h2all
;
139
TH2D *
_h2_b
;
140
TH2D *
_h2_c
;
141
142
std::string
_foutname
;
143
144
int
_flavor
;
145
int
_maxevent
;
146
147
double
_pt_min
;
148
double
_pt_max
;
149
150
double
_eta_min
;
151
double
_eta_max
;
152
153
std::string
_jet_name
;
154
156
int
_rejection_action
;
157
162
int
_embedding_id
;
163
164
};
165
166
#endif // __HFJetTruthTrigger_H__
analysis
blob
master
HF-Jet
TruthGeneration
HFJetTruthTrigger.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:52
using
1.8.2 with
sPHENIX GitHub integration