Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
acts-fatras
analysis
blob
master
A_N
Ana
AndersonAnalysisModules
ColdQcdCorrelatorAnalysis
SCorrelatorJetTree
macros
scripts
src
SCorrelatorJetTree.cc
SCorrelatorJetTree.cst.h
SCorrelatorJetTree.evt.h
SCorrelatorJetTree.h
SCorrelatorJetTree.io.h
SCorrelatorJetTree.jet.h
SCorrelatorJetTree.sys.h
SCorrelatorJetTreeLinkDef.h
Fun4All_RunCorrelatorJetTree.C
SCorrelatorQAMaker
SCorrelatorUtilities
SEnergyCorrelator
SLambdaJetHunter
TrackStudies
AntiSigma
BBCStudy
Calo_Validation_Package
Calo_waveform_sim
Calorimeter
CalorimeterEmbedding
CalorimeterJets
cdbEMCalExample
cemcRecoAna
Centrality_Validation_Package
dNdEta_Run2023
EIC-IR
EIC-SynRad
EICAnalysis
EICMCAnalysis
EICTrigger
ElectronID
EMCal-analysis
EMCal-calibration
EMCal-commissioning
EMCal-LEDs
EMCal-position-dependent-calibration
EMCal-QA
EMCal_pi0_Calib_2023
EMCTemplateFitting
EpFinder
Event-Display
EventMix
FilterEvents
FilterEventsUpsilon
Fluence
ForwardCalo
ForwardTracking
FrawleyTrackEvalMacros
hbcup
HCal-analysis
HCalCosmicCalib
HCalHotTowerFinder
HCalib
HcalSingleHadronCalib
HF-Jet
HF-Particle
isoCluster
IsolatedTrackAnalysis
JS-Jet
mbdAnalysis
MBDStudy
MultiDetectorMultiplicity
MvtxTelescope
mybuild
ParticleID
PHFlowJetMaker
PhotonConversion
PhotonJet
pi0ClusterAna
pi0Efficiency
Pi0MassAnalysis
Prototype2
Prototype3
Prototype4
psTOF
pythiaEMCalAna
pythiaInfo
QuarkoniaBG
quickHIJING
ResonanceJetTaggingOutputs
runTrackingDiagnostics
Shift_emcal_g4hits
SimpleTrackingAnalysis
singlePhotonClusterAna
sPhenixAj
SvtxSimPerformanceCheckReco
TemplateCreation
Test
TowerInfoExample
TPC
TPC-ClusterAnimation
TPC-GemGain
Tracking
TrackPid
TreeMaker
ZDC-CALIB
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SCorrelatorJetTree.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SCorrelatorJetTree.cc
1
// ----------------------------------------------------------------------------
2
// 'SCorrelatorJetTree.cc'
3
// Derek Anderson
4
// 12.04.2022
5
//
6
// A module to produce a tree of jets for the sPHENIX
7
// Cold QCD Energy-Energy Correlator analysis.
8
//
9
// Derived from code by Antonio Silva (thanks!!)
10
// ----------------------------------------------------------------------------
11
12
#define SCORRELATORJETTREE_CC
13
14
// user includes
15
#include "
SCorrelatorJetTree.h
"
16
#include "
SCorrelatorJetTree.io.h
"
17
#include "
SCorrelatorJetTree.evt.h
"
18
#include "
SCorrelatorJetTree.jet.h
"
19
#include "
SCorrelatorJetTree.cst.h
"
20
#include "
SCorrelatorJetTree.sys.h
"
21
22
using namespace
std;
23
using namespace
fastjet;
24
using namespace
findNode;
25
26
27
28
namespace
SColdQcdCorrelatorAnalysis {
29
30
// ctor/dtor ----------------------------------------------------------------
31
32
SCorrelatorJetTree::SCorrelatorJetTree(
const
string
&
name
,
const
string
& outFile,
const
bool
isMC,
const
bool
isEmbed,
const
bool
debug
) :
SubsysReco
(name) {
33
34
// print debug statement
35
m_isMC
= isMC;
36
m_isEmbed
= isEmbed;
37
m_doDebug
=
debug
;
38
if
(
m_doDebug
) {
39
cout <<
"SCorrelatorJetTree::SCorrelatorJetTree(string, string, bool, bool, bool) Calling ctor"
<< endl;
40
}
41
m_outFileName
= outFile;
42
InitVariables
();
43
44
}
// end ctor(string&, string&, bool, bool, bool)
45
46
47
48
SCorrelatorJetTree::~SCorrelatorJetTree
() {
49
50
// print debug statement
51
if
(
m_doDebug
) {
52
cout <<
"SCorrelatorJetTree::~SCorrelatorJetTree() Calling dtor"
<< endl;
53
}
54
55
// clean up dangling pointers
56
if
(
m_histMan
) {
57
delete
m_histMan
;
58
m_histMan
= NULL;
59
}
60
if
(
m_evalStack
) {
61
delete
m_evalStack
;
62
m_evalStack
= NULL;
63
m_trackEval
= NULL;
64
}
65
if
(
m_trueJetDef
) {
66
delete
m_trueJetDef
;
67
m_trueJetDef
= NULL;
68
}
69
if
(
m_recoJetDef
) {
70
delete
m_recoJetDef
;
71
m_recoJetDef
= NULL;
72
}
73
if
(
m_trueClust
) {
74
delete
m_trueClust
;
75
m_trueClust
= NULL;
76
}
77
if
(
m_recoClust
) {
78
delete
m_recoClust
;
79
m_recoClust
= NULL;
80
}
81
82
}
// end dtor
83
84
85
86
// F4A methods --------------------------------------------------------------
87
88
int
SCorrelatorJetTree::Init
(
PHCompositeNode
* topNode) {
89
90
// print debug statement
91
if
(
m_doDebug
|| (
Verbosity
() > 1)) {
92
cout <<
"SCorrelatorJetTree::Init(PHCompositeNode*) Initializing..."
<< endl;
93
}
94
95
// intitialize output file
96
m_outFile
=
new
TFile(
m_outFileName
.c_str(),
"RECREATE"
);
97
if
(!
m_outFile
) {
98
cerr <<
"PANIC: couldn't open SCorrelatorJetTree output file!"
<< endl;
99
}
100
101
// create node for jet-tree
102
if
(
m_saveDST
) {
103
CreateJetNode
(topNode);
104
}
105
106
// initialize QA histograms/tuples, output trees, and functions
107
InitHists
();
108
InitTuples
();
109
InitTrees
();
110
InitFuncs
();
111
return
Fun4AllReturnCodes::EVENT_OK
;
112
113
}
// end 'Init(PHcompositeNode*)'
114
115
116
117
int
SCorrelatorJetTree::process_event
(
PHCompositeNode
* topNode) {
118
119
// print debug statement
120
if
(
m_doDebug
|| (
Verbosity
() > 1)) {
121
cout <<
"SCorrelatorJetTree::process_event(PHCompositeNode*) Processing Event..."
<< endl;
122
}
123
124
// reset event-wise variables & members
125
ResetVariables
();
126
127
// initialize evaluator & determine subevts to grab for event
128
if
(
m_isMC
) {
129
InitEvals
(topNode);
130
DetermineEvtsToGrab
(topNode);
131
}
132
133
// get event-wise variables
134
GetEventVariables
(topNode);
135
if
(
m_isMC
) {
136
GetPartonInfo
(topNode);
137
}
138
139
// check if reconstructed vertex is in in acceptance
140
bool
isGoodEvt =
true
;
141
if
(
m_doVtxCut
) {
142
isGoodEvt =
IsGoodVertex
(
m_recoVtx
);
143
}
144
145
// set event status
146
int
eventStatus =
Fun4AllReturnCodes::EVENT_OK
;
147
if
(
m_doVtxCut
&& !isGoodEvt) {
148
eventStatus =
Fun4AllReturnCodes::DISCARDEVENT
;
149
}
else
{
150
eventStatus =
Fun4AllReturnCodes::EVENT_OK
;
151
}
152
153
// if event is good, continue processing
154
if
(isGoodEvt) {
155
156
// find jets
157
FindRecoJets
(topNode);
158
if
(
m_isMC
) {
159
FindTrueJets
(topNode);
160
}
161
162
// fill output trees
163
FillRecoTree
();
164
if
(
m_isMC
) {
165
FillTrueTree
();
166
}
167
}
168
return
eventStatus;
169
170
}
// end 'process_event(PHCompositeNode*)'
171
172
173
174
int
SCorrelatorJetTree::End
(
PHCompositeNode
* topNode) {
175
176
// print debug statements
177
if
(
m_doDebug
|| (
Verbosity
() > 1)) {
178
cout <<
"SCorrelatorJetTree::End(PHCompositeNode*) This is the End..."
<< endl;
179
}
180
181
// save output and close
182
SaveOutput
();
183
m_outFile
->
cd
();
184
m_outFile
->
Close
();
185
return
Fun4AllReturnCodes::EVENT_OK
;
186
187
}
// end 'End(PHcompositeNode*)'
188
189
}
// end SColdQcdCorrelatorAnalysis namespace
190
191
// end ------------------------------------------------------------------------
analysis
blob
master
AndersonAnalysisModules
ColdQcdCorrelatorAnalysis
SCorrelatorJetTree
src
SCorrelatorJetTree.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:46
using
1.8.2 with
sPHENIX GitHub integration