15 using namespace findNode;
19 namespace SColdQcdCorrelatorAnalysis {
23 void SCorrelatorJetTree::InitVariables() {
27 cout <<
"SCorrelatorJetTree::InitVariables() Initializing class members..." << endl;
31 m_partonID[0] = -9999;
32 m_partonID[1] = -9999;
33 m_partonMom[0] = CLHEP::Hep3Vector(-9999., -9999., -9999.);
34 m_partonMom[1] = CLHEP::Hep3Vector(-9999., -9999., -9999.);
35 m_vecEvtsToGrab.clear();
36 m_mapCstToEmbedID.clear();
39 m_trueVtx = CLHEP::Hep3Vector(-9999., -9999., -9999.);
41 m_trueNumChrgPars = -9999;
42 m_trueSumPar = -9999.;
43 m_truePartonID[0] = -9999;
44 m_truePartonID[1] = -9999;
45 m_truePartonMomX[0] = -9999.;
46 m_truePartonMomX[1] = -9999.;
47 m_truePartonMomY[0] = -9999.;
48 m_truePartonMomY[1] = -9999.;
49 m_truePartonMomZ[0] = -9999.;
50 m_truePartonMomZ[1] = -9999.;
52 m_trueJetNCst.clear();
58 m_trueJetArea.clear();
60 m_trueCstEmbedID.clear();
69 m_recoVtx = CLHEP::Hep3Vector(-9999., -9999., -9999.);
77 m_recoNumTrks = -9999;
78 m_recoSumECal = -9999.;
79 m_recoSumHCal = -9999.;
81 m_recoJetNCst.clear();
87 m_recoJetArea.clear();
88 m_recoCstMatchID.clear();
101 void SCorrelatorJetTree::InitHists() {
105 cout <<
"SCorrelatorJetTree::InitHists() Initializing QA histograms..." << endl;
109 const uint64_t nNumBins(500);
110 const uint64_t nEneBins(200);
111 const uint64_t nPhiBins(63);
113 const uint64_t nPtBins(200);
114 const uint64_t nDcaBins(10000);
115 const uint64_t nQualBins(200);
116 const uint64_t nDeltaBins(1000);
117 const uint64_t nAreaBins(1000);
130 m_hNumObject[OBJECT::TRACK] =
new TH1D(
"hNumTrks",
"N_{accept} (tracks)", nNumBins, rNumBins[0], rNumBins[1]);
131 m_hNumObject[OBJECT::ECLUST] =
new TH1D(
"hNumEClust",
"N_{accept} (EMCal clust.)", nNumBins, rNumBins[0], rNumBins[1]);
132 m_hNumObject[OBJECT::HCLUST] =
new TH1D(
"hNumHClust",
"N_{accept} (HCal clust.)", nNumBins, rNumBins[0], rNumBins[1]);
133 m_hNumObject[
OBJECT::FLOW] =
new TH1D(
"hNumFlow",
"N_{accept} (flow)", nNumBins, rNumBins[0], rNumBins[1]);
134 m_hNumObject[OBJECT::PART] =
new TH1D(
"hNumPart",
"N_{accept} (par.s)", nNumBins, rNumBins[0], rNumBins[1]);
135 m_hNumObject[OBJECT::TJET] =
new TH1D(
"hNumTruthJet",
"N_{jet} (truth)", nNumBins, rNumBins[0], rNumBins[1]);
136 m_hNumObject[OBJECT::RJET] =
new TH1D(
"hNumRecoJets",
"N_{jet} (reco.)", nNumBins, rNumBins[0], rNumBins[1]);
137 m_hNumObject[OBJECT::TCST] =
new TH1D(
"hNumTruthCst",
"N_{cst} (truth)", nNumBins, rNumBins[0], rNumBins[1]);
138 m_hNumObject[OBJECT::RCST] =
new TH1D(
"hNumRecoCst",
"N_{cst} (reco.)", nNumBins, rNumBins[0], rNumBins[1]);
140 m_hSumCstEne[CST_TYPE::PART_CST] =
new TH1D(
"hSumPartEne",
"#SigmaE (cst. par.s)", nEneBins, rEneBins[0], rEneBins[1]);
141 m_hSumCstEne[CST_TYPE::FLOW_CST] =
new TH1D(
"hSumFlowEne",
"#SigmaE (cst. flow)", nEneBins, rEneBins[0], rEneBins[1]);
142 m_hSumCstEne[CST_TYPE::TRACK_CST] =
new TH1D(
"hSumTrackEne",
"#SigmaE (cst. track)", nEneBins, rEneBins[0], rEneBins[1]);
143 m_hSumCstEne[CST_TYPE::ECAL_CST] =
new TH1D(
"hSumECalEne",
"#SigmaE (cst. ecal)", nEneBins, rEneBins[0], rEneBins[1]);
144 m_hSumCstEne[CST_TYPE::HCAL_CST] =
new TH1D(
"hSumHCalEne",
"#SigmaE (cst. hcal)", nEneBins, rEneBins[0], rEneBins[1]);
146 m_hObjectQA[OBJECT::PART][
INFO::PT] =
new TH1D(
"hPartPt",
"p_{T} (par.s)", nPtBins, rPtBins[0], rPtBins[1]);
147 m_hObjectQA[OBJECT::PART][INFO::ETA] =
new TH1D(
"hPartEta",
"#eta (par.s)", nEtaBins, rEtaBins[0], rEtaBins[1]);
148 m_hObjectQA[OBJECT::PART][INFO::PHI] =
new TH1D(
"hPartPhi",
"#phi (par.s)", nPhiBins, rPhiBins[0], rPhiBins[1]);
149 m_hObjectQA[OBJECT::PART][INFO::ENE] =
new TH1D(
"hPartEne",
"E (par.s)", nEneBins, rEneBins[0], rEneBins[1]);
150 m_hObjectQA[OBJECT::PART][INFO::QUAL] =
new TH1D(
"hPartQuality",
"Quality (par.s, N/A)", nQualBins, rQualBins[0], rQualBins[1]);
151 m_hObjectQA[OBJECT::PART][INFO::DCAXY] =
new TH1D(
"hPartDcaXY",
"DCA_{xy} (par.s, N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
152 m_hObjectQA[OBJECT::PART][INFO::DCAZ] =
new TH1D(
"hPartDcaZ",
"DCA_{z} (par.s, N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
153 m_hObjectQA[OBJECT::PART][INFO::DELTAPT] =
new TH1D(
"hPartDeltaPt",
"#deltap_{T}/p_{T} (par.s, N/A)", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
154 m_hObjectQA[OBJECT::PART][INFO::NTPC] =
new TH1D(
"hPartNumTpc",
"N_{clust}^{tpc} (par.s, N/A)", nNumBins, rNumBins[0], rNumBins[1]);
156 m_hObjectQA[OBJECT::TRACK][
INFO::PT] =
new TH1D(
"hTrackPt",
"p_{T} (tracks)", nPtBins, rPtBins[0], rPtBins[1]);
157 m_hObjectQA[OBJECT::TRACK][INFO::ETA] =
new TH1D(
"hTrackEta",
"#eta (tracks)", nEtaBins, rEtaBins[0], rEtaBins[1]);
158 m_hObjectQA[OBJECT::TRACK][INFO::PHI] =
new TH1D(
"hTrackPhi",
"#phi (tracks)", nPhiBins, rPhiBins[0], rPhiBins[1]);
159 m_hObjectQA[OBJECT::TRACK][INFO::ENE] =
new TH1D(
"hTrackEne",
"E (tracks)", nEneBins, rEneBins[0], rEneBins[1]);
160 m_hObjectQA[OBJECT::TRACK][INFO::QUAL] =
new TH1D(
"hTrackQuality",
"Quality (tracks)", nQualBins, rQualBins[0], rQualBins[1]);
161 m_hObjectQA[OBJECT::TRACK][INFO::DCAXY] =
new TH1D(
"hTrackDcaXY",
"DCA_{xy} (tracks)", nDcaBins, rDcaBins[0], rDcaBins[1]);
162 m_hObjectQA[OBJECT::TRACK][INFO::DCAZ] =
new TH1D(
"hTrackDcaZ",
"DCA_{z} (tracks)", nDcaBins, rDcaBins[0], rDcaBins[1]);
163 m_hObjectQA[OBJECT::TRACK][INFO::DELTAPT] =
new TH1D(
"hTrackDeltaPt",
"#deltap_{T}/p_{T} (tracks)", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
164 m_hObjectQA[OBJECT::TRACK][INFO::NTPC] =
new TH1D(
"hTrackNumTpc",
"N_{clust}^{tpc} (tracks)", nNumBins, rNumBins[0], rNumBins[1]);
166 m_hObjectQA[
OBJECT::FLOW][
INFO::PT] =
new TH1D(
"hFlowPt",
"p_{T} (flow)", nPtBins, rPtBins[0], rPtBins[1]);
167 m_hObjectQA[
OBJECT::FLOW][INFO::ETA] =
new TH1D(
"hFlowEta",
"#eta (flow)", nEtaBins, rEtaBins[0], rEtaBins[1]);
168 m_hObjectQA[
OBJECT::FLOW][INFO::PHI] =
new TH1D(
"hFlowPhi",
"#phi (flow)", nPhiBins, rPhiBins[0], rPhiBins[1]);
169 m_hObjectQA[
OBJECT::FLOW][INFO::ENE] =
new TH1D(
"hFlowEne",
"E (flow)", nEneBins, rEneBins[0], rEneBins[1]);
170 m_hObjectQA[
OBJECT::FLOW][INFO::QUAL] =
new TH1D(
"hFlowQuality",
"Quality (flow, N/A)", nQualBins, rQualBins[0], rQualBins[1]);
171 m_hObjectQA[
OBJECT::FLOW][INFO::DCAXY] =
new TH1D(
"hFlowDcaXY",
"DCA_{xy} (flow, N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
172 m_hObjectQA[
OBJECT::FLOW][INFO::DCAZ] =
new TH1D(
"hFlowDcaZ",
"DCA_{z} (flow, N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
173 m_hObjectQA[
OBJECT::FLOW][INFO::DELTAPT] =
new TH1D(
"hFlowDeltaPt",
"#deltap_{T}/p_{T} (flow, N/A)", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
174 m_hObjectQA[
OBJECT::FLOW][INFO::NTPC] =
new TH1D(
"hFlowNumTpc",
"N_{clust}^{tpc} (flow, N/A)", nNumBins, rNumBins[0], rNumBins[1]);
176 m_hObjectQA[OBJECT::ECLUST][
INFO::PT] =
new TH1D(
"hEClustPt",
"p_{T} (EMCal clust.)", nPtBins, rPtBins[0], rPtBins[1]);
177 m_hObjectQA[OBJECT::ECLUST][INFO::ETA] =
new TH1D(
"hEClustEta",
"#eta (EMCal clust.)", nEtaBins, rEtaBins[0], rEtaBins[1]);
178 m_hObjectQA[OBJECT::ECLUST][INFO::PHI] =
new TH1D(
"hEClustPhi",
"#phi (EMCal clust.)", nPhiBins, rPhiBins[0], rPhiBins[1]);
179 m_hObjectQA[OBJECT::ECLUST][INFO::ENE] =
new TH1D(
"hEClustEne",
"E (EMCal clust.)", nEneBins, rEneBins[0], rEneBins[1]);
180 m_hObjectQA[OBJECT::ECLUST][INFO::QUAL] =
new TH1D(
"hEClustQuality",
"Quality (EMCal, N/A)", nQualBins, rQualBins[0], rQualBins[1]);
181 m_hObjectQA[OBJECT::ECLUST][INFO::DCAXY] =
new TH1D(
"hEClustDcaXY",
"DCA_{xy} (EMCal, N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
182 m_hObjectQA[OBJECT::ECLUST][INFO::DCAZ] =
new TH1D(
"hEClustDcaZ",
"DCA_{z} (EMCal, N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
183 m_hObjectQA[OBJECT::ECLUST][INFO::DELTAPT] =
new TH1D(
"hEClustDeltaPt",
"#deltap_{T}/p_{T} (EMCal, N/A)", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
184 m_hObjectQA[OBJECT::ECLUST][INFO::NTPC] =
new TH1D(
"hEClustNumTpc",
"N_{clust}^{tpc} (EMCal, N/A)", nNumBins, rNumBins[0], rNumBins[1]);
186 m_hObjectQA[OBJECT::HCLUST][
INFO::PT] =
new TH1D(
"hHClustPt",
"p_{T} (HCal clust.)", nPtBins, rPtBins[0], rPtBins[1]);
187 m_hObjectQA[OBJECT::HCLUST][INFO::ETA] =
new TH1D(
"hHClustEta",
"#eta (HCal clust.)", nEtaBins, rEtaBins[0], rEtaBins[1]);
188 m_hObjectQA[OBJECT::HCLUST][INFO::PHI] =
new TH1D(
"hHClustPhi",
"#phi (HCal clust.)", nPhiBins, rPhiBins[0], rPhiBins[1]);
189 m_hObjectQA[OBJECT::HCLUST][INFO::ENE] =
new TH1D(
"hHClustEne",
"E (HCal clust.)", nEneBins, rEneBins[0], rEneBins[1]);
190 m_hObjectQA[OBJECT::HCLUST][INFO::QUAL] =
new TH1D(
"hHClustQuality",
"Quality (HCal, N/A)", nQualBins, rQualBins[0], rQualBins[1]);
191 m_hObjectQA[OBJECT::HCLUST][INFO::DCAXY] =
new TH1D(
"hHClustDcaXY",
"DCA_{xy} (HCal, N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
192 m_hObjectQA[OBJECT::HCLUST][INFO::DCAZ] =
new TH1D(
"hHClustDcaZ",
"DCA_{z} (HCal, N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
193 m_hObjectQA[OBJECT::HCLUST][INFO::DELTAPT] =
new TH1D(
"hHClustDeltaPt",
"#deltap_{T}/p_{T} (HCal, N/A)", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
194 m_hObjectQA[OBJECT::HCLUST][INFO::NTPC] =
new TH1D(
"hHClustNumTpc",
"N_{clust}^{tpc} (HCal, N/A)", nNumBins, rNumBins[0], rNumBins[1]);
196 m_hObjectQA[OBJECT::TJET][
INFO::PT] =
new TH1D(
"hTruthJetPt",
"p_{T} (truth jet)", nPtBins, rPtBins[0], rPtBins[1]);
197 m_hObjectQA[OBJECT::TJET][INFO::ETA] =
new TH1D(
"hTruthJetEta",
"#eta (truth jet)", nEtaBins, rEtaBins[0], rEtaBins[1]);
198 m_hObjectQA[OBJECT::TJET][INFO::PHI] =
new TH1D(
"hTruthJetPhi",
"#phi (truth jet)", nPhiBins, rPhiBins[0], rPhiBins[1]);
199 m_hObjectQA[OBJECT::TJET][INFO::ENE] =
new TH1D(
"hTruthJetEne",
"E (truth jet)", nEneBins, rEneBins[0], rEneBins[1]);
200 m_hObjectQA[OBJECT::TJET][INFO::QUAL] =
new TH1D(
"hTruthJetQuality",
"Quality (truth jet, N/A)", nQualBins, rQualBins[0], rQualBins[1]);
201 m_hObjectQA[OBJECT::TJET][INFO::DCAXY] =
new TH1D(
"hTruthJetDcaXY",
"DCA_{xy} (truth jet, N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
202 m_hObjectQA[OBJECT::TJET][INFO::DCAZ] =
new TH1D(
"hTruthJetDcaZ",
"DCA_{z} (truth jet, N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
203 m_hObjectQA[OBJECT::TJET][INFO::DELTAPT] =
new TH1D(
"hTruthJetDeltaPt",
"#deltap_{T}/p_{T} (truth jet, N/A)", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
204 m_hObjectQA[OBJECT::TJET][INFO::NTPC] =
new TH1D(
"hTruthJetNumTpc",
"N_{clust}^{tpc} (truth jet, N/A)", nNumBins, rNumBins[0], rNumBins[1]);
205 m_hJetArea[0] =
new TH1D(
"hTruthJetArea",
"Area (truth jet)", nAreaBins, rAreaBins[0], rAreaBins[1]);
206 m_hJetNumCst[0] =
new TH1D(
"hTruthJetNCst",
"N_{cst} (truth jet)", nNumBins, rNumBins[0], rNumBins[1]);
208 m_hObjectQA[OBJECT::RJET][
INFO::PT] =
new TH1D(
"hRecoJetPt",
"p_{T} (reco. jet)", nPtBins, rPtBins[0], rPtBins[1]);
209 m_hObjectQA[OBJECT::RJET][INFO::ETA] =
new TH1D(
"hRecoJetEta",
"#eta (reco. jet)", nEtaBins, rEtaBins[0], rEtaBins[1]);
210 m_hObjectQA[OBJECT::RJET][INFO::PHI] =
new TH1D(
"hRecoJetPhi",
"#phi (reco. jet)", nPhiBins, rPhiBins[0], rPhiBins[1]);
211 m_hObjectQA[OBJECT::RJET][INFO::ENE] =
new TH1D(
"hRecoJetEne",
"E (reco. jet)", nEneBins, rEneBins[0], rEneBins[1]);
212 m_hObjectQA[OBJECT::RJET][INFO::QUAL] =
new TH1D(
"hRecoJetQuality",
"Quality (reco. jet, N/A)", nQualBins, rQualBins[0], rQualBins[1]);
213 m_hObjectQA[OBJECT::RJET][INFO::DCAXY] =
new TH1D(
"hRecoJetDcaXY",
"DCA_{xy} (reco. jet, N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
214 m_hObjectQA[OBJECT::RJET][INFO::DCAZ] =
new TH1D(
"hRecoJetDcaZ",
"DCA_{z} (reco. jet, N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
215 m_hObjectQA[OBJECT::RJET][INFO::DELTAPT] =
new TH1D(
"hRecoJetDeltaPt",
"#deltap_{T}/p_{T} (reco. jet, N/A)", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
216 m_hObjectQA[OBJECT::RJET][INFO::NTPC] =
new TH1D(
"hRecoJetNumTpc",
"N_{clust}^{tpc} (reco. jet, N/A)", nNumBins, rNumBins[0], rNumBins[1]);
217 m_hJetArea[1] =
new TH1D(
"hRecoJetArea",
"Area (reco. jet)", nAreaBins, rAreaBins[0], rAreaBins[1]);
218 m_hJetNumCst[1] =
new TH1D(
"hRecoJetNCst",
"N_{cst} (reco. jet)", nNumBins, rNumBins[0], rNumBins[1]);
220 m_hObjectQA[OBJECT::TCST][
INFO::PT] =
new TH1D(
"hTruthCstPt",
"p_{T} (truth cst.)", nPtBins, rPtBins[0], rPtBins[1]);
221 m_hObjectQA[OBJECT::TCST][INFO::ETA] =
new TH1D(
"hTruthCstEta",
"#eta (truth cst.)", nEtaBins, rEtaBins[0], rEtaBins[1]);
222 m_hObjectQA[OBJECT::TCST][INFO::PHI] =
new TH1D(
"hTruthCstPhi",
"#phi (truth cst.)", nPhiBins, rPhiBins[0], rPhiBins[1]);
223 m_hObjectQA[OBJECT::TCST][INFO::ENE] =
new TH1D(
"hTruthCstEne",
"E (truth cst.)", nEneBins, rEneBins[0], rEneBins[1]);
224 m_hObjectQA[OBJECT::TCST][INFO::QUAL] =
new TH1D(
"hTruthCstQuality",
"Quality (truth cst., N/A)", nQualBins, rQualBins[0], rQualBins[1]);
225 m_hObjectQA[OBJECT::TCST][INFO::DCAXY] =
new TH1D(
"hTruthCstDcaXY",
"DCA_{xy} (truth cst., N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
226 m_hObjectQA[OBJECT::TCST][INFO::DCAZ] =
new TH1D(
"hTruthCstDcaZ",
"DCA_{z} (truth cst., N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
227 m_hObjectQA[OBJECT::TCST][INFO::DELTAPT] =
new TH1D(
"hTruthCstDeltaPt",
"#deltap_{T}/p_{T} (truth cst., N/A)", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
228 m_hObjectQA[OBJECT::TCST][INFO::NTPC] =
new TH1D(
"hTruthCstNumTpc",
"N_{clust}^{tpc} (truth cst., N/A)", nNumBins, rNumBins[0], rNumBins[1]);
230 m_hObjectQA[OBJECT::RCST][
INFO::PT] =
new TH1D(
"hRecoCstPt",
"p_{T} (reco. cst.)", nPtBins, rPtBins[0], rPtBins[1]);
231 m_hObjectQA[OBJECT::RCST][INFO::ETA] =
new TH1D(
"hRecoCstEta",
"#eta (reco. cst.)", nEtaBins, rEtaBins[0], rEtaBins[1]);
232 m_hObjectQA[OBJECT::RCST][INFO::PHI] =
new TH1D(
"hRecoCstPhi",
"#phi (reco. cst.)", nPhiBins, rPhiBins[0], rPhiBins[1]);
233 m_hObjectQA[OBJECT::RCST][INFO::ENE] =
new TH1D(
"hRecoCstEne",
"E (reco. cst.)", nEneBins, rEneBins[0], rEneBins[1]);
234 m_hObjectQA[OBJECT::RCST][INFO::QUAL] =
new TH1D(
"hRecoCstQuality",
"Quality (reco. cst., N/A)", nQualBins, rQualBins[0], rQualBins[1]);
235 m_hObjectQA[OBJECT::RCST][INFO::DCAXY] =
new TH1D(
"hRecoCstDcaXY",
"DCA_{xy} (reco. cst., N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
236 m_hObjectQA[OBJECT::RCST][INFO::DCAZ] =
new TH1D(
"hRecoCstDcaZ",
"DCA_{z} (reco. cst., N/A)", nDcaBins, rDcaBins[0], rDcaBins[1]);
237 m_hObjectQA[OBJECT::RCST][INFO::DELTAPT] =
new TH1D(
"hRecoCstDeltaPt",
"#deltap_{T}/p_{T} (reco. cst., N/A)", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
238 m_hObjectQA[OBJECT::RCST][INFO::NTPC] =
new TH1D(
"hRecoCstNumTpc",
"N_{clust}^{tpc} (reco. cst., N/A)", nNumBins, rNumBins[0], rNumBins[1]);
240 m_hNumCstAccept[CST_TYPE::PART_CST][0] =
new TH1D(
"hNumPartCstTot",
"N_{cst}^{par} total", nNumBins, rNumBins[0], rNumBins[1]);
241 m_hNumCstAccept[CST_TYPE::PART_CST][1] =
new TH1D(
"hNumPartCstAcc",
"N_{cst}^{par} accepted", nNumBins, rNumBins[0], rNumBins[1]);
242 m_hNumCstAccept[CST_TYPE::TRACK_CST][0] =
new TH1D(
"hNumTrkCstTot",
"N_{cst}^{trk} total", nNumBins, rNumBins[0], rNumBins[1]);
243 m_hNumCstAccept[CST_TYPE::TRACK_CST][1] =
new TH1D(
"hNumTrkCstAcc",
"N_{cst}^{trk} accepted", nNumBins, rNumBins[0], rNumBins[1]);
244 m_hNumCstAccept[CST_TYPE::FLOW_CST][0] =
new TH1D(
"hNumFlowCstTot",
"N_{cst}^{flow} total", nNumBins, rNumBins[0], rNumBins[1]);
245 m_hNumCstAccept[CST_TYPE::FLOW_CST][1] =
new TH1D(
"hNumFlowCstAcc",
"N_{cst}^{flow} accepted", nNumBins, rNumBins[0], rNumBins[1]);
246 m_hNumCstAccept[CST_TYPE::ECAL_CST][0] =
new TH1D(
"hNumECalCstTot",
"N_{cst}^{clust} total", nNumBins, rNumBins[0], rNumBins[1]);
247 m_hNumCstAccept[CST_TYPE::ECAL_CST][1] =
new TH1D(
"hNumECalCstAcc",
"N_{cst}^{clust} accepted", nNumBins, rNumBins[0], rNumBins[1]);
248 m_hNumCstAccept[CST_TYPE::HCAL_CST][0] =
new TH1D(
"hNumHCalCstTot",
"N_{cst}^{clust} total", nNumBins, rNumBins[0], rNumBins[1]);
249 m_hNumCstAccept[CST_TYPE::HCAL_CST][1] =
new TH1D(
"hNumHCalCstAcc",
"N_{cst}^{clust} accepted", nNumBins, rNumBins[0], rNumBins[1]);
252 for (
size_t iObj = OBJECT::TRACK; iObj < CONST::NObjType; iObj++) {
253 m_hNumObject[iObj] -> Sumw2();
254 for (
size_t iInfo =
INFO::PT; iInfo < CONST::NInfoQA; iInfo++) {
255 m_hObjectQA[iObj][iInfo] -> Sumw2();
258 for (
size_t iCst = CST_TYPE::TRACK_CST; iCst < CONST::NCstType; iCst++) {
259 m_hNumCstAccept[iCst][0] -> Sumw2();
260 m_hNumCstAccept[iCst][1] -> Sumw2();
261 m_hSumCstEne[iCst] -> Sumw2();
263 m_hJetArea[0] -> Sumw2();
264 m_hJetNumCst[0] -> Sumw2();
265 m_hJetArea[1] -> Sumw2();
266 m_hJetNumCst[1] -> Sumw2();
273 void SCorrelatorJetTree::InitFuncs() {
277 cout <<
"SCorrelatorJetTree::InitFuncs() Initializing functions for internal calculations..." << endl;
281 const pair<float, float> ptRange = {0., 100.};
284 m_fSigDcaXY =
new TF1(
"fSigmaDcaXY",
"[0]+[1]/x+[2]/(x*x)", ptRange.first, ptRange.second);
285 m_fSigDcaZ =
new TF1(
"fSigmaDcaZ",
"[0]+[1]/x+[2]/(x*x)", ptRange.first, ptRange.second);
286 for (uint8_t iParam = 0; iParam < CONST::NParam; iParam++) {
287 m_fSigDcaXY ->
SetParameter(iParam, m_parSigDcaXY[iParam]);
288 m_fSigDcaZ ->
SetParameter(iParam, m_parSigDcaZ[iParam]);
296 void SCorrelatorJetTree::InitTuples() {
300 cout <<
"SCorrelatorJetTree::InitTuples() Initializing output tuples..." << endl;
304 const vector<string> vecTrkQALeaves = {
322 string argTrkQALeaves(
"");
323 for (
size_t iLeaf = 0; iLeaf < vecTrkQALeaves.size(); iLeaf++) {
324 argTrkQALeaves.append(vecTrkQALeaves[iLeaf]);
325 if ((iLeaf + 1) != vecTrkQALeaves.size()) {
326 argTrkQALeaves.append(
":");
329 m_ntTrkQA =
new TNtuple(
"ntTrkQA",
"Track QA", argTrkQALeaves.data());
332 const vector<string> vecWeirdTrkLeaves = {
375 string argWeirdTrkLeaves(
"");
376 for (
size_t iLeaf = 0; iLeaf < vecWeirdTrkLeaves.size(); iLeaf++) {
377 argWeirdTrkLeaves.append(vecWeirdTrkLeaves[iLeaf]);
378 if ((iLeaf + 1) != vecWeirdTrkLeaves.size()) {
379 argWeirdTrkLeaves.append(
":");
382 m_ntWeirdTracks =
new TNtuple(
"ntWeirdTracks",
"Weird Tracks", argWeirdTrkLeaves.data());
389 void SCorrelatorJetTree::InitTrees() {
393 cout <<
"SCorrelatorJetTree::InitTrees() Initializing output trees..." << endl;
397 m_trueTree =
new TTree(
"TruthJetTree",
"A tree of truth jets");
398 m_trueTree ->
Branch(
"EvtNumJets", &m_trueNumJets,
"EvtNumJets/I");
399 m_trueTree ->
Branch(
"EvtNumChrgPars", &m_trueNumChrgPars,
"EvtNumChrgPars/I");
400 m_trueTree ->
Branch(
"Parton3_ID", &m_truePartonID[0],
"Parton3_ID/I");
401 m_trueTree ->
Branch(
"Parton4_ID", &m_truePartonID[1],
"Parton4_ID/I");
402 m_trueTree ->
Branch(
"Parton3_MomX", &m_truePartonMomX[0],
"Parton3_MomX/D");
403 m_trueTree ->
Branch(
"Parton3_MomY", &m_truePartonMomY[0],
"Parton3_MomY/D");
404 m_trueTree ->
Branch(
"Parton3_MomZ", &m_truePartonMomZ[0],
"Parton3_MomZ/D");
405 m_trueTree ->
Branch(
"Parton4_MomX", &m_truePartonMomX[1],
"Parton4_MomX/D");
406 m_trueTree ->
Branch(
"Parton4_MomY", &m_truePartonMomY[1],
"Parton4_MomY/D");
407 m_trueTree ->
Branch(
"Parton4_MomZ", &m_truePartonMomZ[1],
"Parton4_MomZ/D");
408 m_trueTree ->
Branch(
"EvtVtxX", &m_trueVtxX,
"EvtVtxX/D");
409 m_trueTree ->
Branch(
"EvtVtxY", &m_trueVtxY,
"EvtVtxY/D");
410 m_trueTree ->
Branch(
"EvtVtxZ", &m_trueVtxZ,
"EvtVtxZ/D");
411 m_trueTree ->
Branch(
"EvtSumParEne", &m_trueSumPar,
"EvtSumParEne/D");
412 m_trueTree ->
Branch(
"JetNumCst", &m_trueJetNCst);
413 m_trueTree ->
Branch(
"JetID", &m_trueJetID);
414 m_trueTree ->
Branch(
"JetEnergy", &m_trueJetE);
415 m_trueTree ->
Branch(
"JetPt", &m_trueJetPt);
416 m_trueTree ->
Branch(
"JetEta", &m_trueJetEta);
417 m_trueTree ->
Branch(
"JetPhi", &m_trueJetPhi);
418 m_trueTree ->
Branch(
"JetArea", &m_trueJetArea);
419 m_trueTree ->
Branch(
"CstID", &m_trueCstID);
420 m_trueTree ->
Branch(
"CstEmbedID", &m_trueCstEmbedID);
421 m_trueTree ->
Branch(
"CstZ", &m_trueCstZ);
422 m_trueTree ->
Branch(
"CstDr", &m_trueCstDr);
423 m_trueTree ->
Branch(
"CstEnergy", &m_trueCstE);
424 m_trueTree ->
Branch(
"CstPt", &m_trueCstPt);
425 m_trueTree ->
Branch(
"CstEta", &m_trueCstEta);
426 m_trueTree ->
Branch(
"CstPhi", &m_trueCstPhi);
429 m_recoTree =
new TTree(
"RecoJetTree",
"A tree of reconstructed jets");
430 m_recoTree ->
Branch(
"EvtNumJets", &m_recoNumJets,
"EvtNumJets/I");
431 m_recoTree ->
Branch(
"EvtNumTrks", &m_recoNumTrks,
"EvtNumTrks/I");
432 m_recoTree ->
Branch(
"EvtVtxX", &m_recoVtxX,
"EvtVtxX/D");
433 m_recoTree ->
Branch(
"EvtVtxY", &m_recoVtxY,
"EvtVtxY/D");
434 m_recoTree ->
Branch(
"EvtVtxZ", &m_recoVtxZ,
"EvtVtxZ/D");
435 m_recoTree ->
Branch(
"EvtSumECalEne", &m_recoSumECal,
"EvtSumECalEne/D");
436 m_recoTree ->
Branch(
"EvtSumHCalEne", &m_recoSumHCal,
"EvtSumHCalEne/D");
437 m_recoTree ->
Branch(
"JetNumCst", &m_recoJetNCst);
438 m_recoTree ->
Branch(
"JetID", &m_recoJetID);
439 m_recoTree ->
Branch(
"JetEnergy", &m_recoJetE);
440 m_recoTree ->
Branch(
"JetPt", &m_recoJetPt);
441 m_recoTree ->
Branch(
"JetEta", &m_recoJetEta);
442 m_recoTree ->
Branch(
"JetPhi", &m_recoJetPhi);
443 m_recoTree ->
Branch(
"JetArea", &m_recoJetArea);
444 m_recoTree ->
Branch(
"CstMatchID", &m_recoCstMatchID);
445 m_recoTree ->
Branch(
"CstZ", &m_recoCstZ);
446 m_recoTree ->
Branch(
"CstDr", &m_recoCstDr);
447 m_recoTree ->
Branch(
"CstEnergy", &m_recoCstE);
448 m_recoTree ->
Branch(
"CstPt", &m_recoCstPt);
449 m_recoTree ->
Branch(
"CstEta", &m_recoCstEta);
450 m_recoTree ->
Branch(
"CstPhi", &m_recoCstPhi);
461 cout <<
"SCorrelatorJetTree::InitEvals(PHCompositeNode*) Initializing evaluators..." << endl;
466 cerr <<
"SCorrelatorJetTree::InitEvals(PHCompositeNode*) PANIC: couldn't grab SvtxEvalStack! Aborting!" << endl;
469 m_evalStack -> next_event(topNode);
472 m_trackEval = m_evalStack -> get_track_eval();
474 cerr <<
"SCorrelatorJetTree::InitEvals(PHCompositeNode*) PANIC: couldn't grab track evaluator! Aborting!" << endl;
483 void SCorrelatorJetTree::FillTrueTree() {
487 cout <<
"SCorrelatorJetTree::FillTrueTree() Filling truth jet tree..." << endl;
491 m_trueJetNCst.clear();
495 m_trueJetEta.clear();
496 m_trueJetPhi.clear();
497 m_trueJetArea.clear();
499 m_trueCstEmbedID.clear();
504 m_trueCstEta.clear();
505 m_trueCstPhi.clear();
508 vector<int> vecTruCstID;
509 vector<int> vecTruCstEmbedID;
510 vector<double> vecTruCstZ;
511 vector<double> vecTruCstDr;
512 vector<double> vecTruCstE;
513 vector<double> vecTruCstPt;
514 vector<double> vecTruCstEta;
515 vector<double> vecTruCstPhi;
521 vecTruCstEta.clear();
522 vecTruCstPhi.clear();
525 unsigned int nTruJet(0);
526 unsigned int nTruCst(0);
527 for (
unsigned int iTruJet = 0; iTruJet < m_trueJets.size(); ++iTruJet) {
530 const unsigned int jetNCst = m_trueJets[iTruJet].constituents().size();
531 const unsigned int jetTruID = iTruJet;
532 const double jetPhi = m_trueJets[iTruJet].phi_std();
533 const double jetEta = m_trueJets[iTruJet].pseudorapidity();
534 const double jetArea = 0.;
535 const double jetE = m_trueJets[iTruJet].E();
536 const double jetPt = m_trueJets[iTruJet].perp();
537 const double jetPx = m_trueJets[iTruJet].px();
538 const double jetPy = m_trueJets[iTruJet].py();
539 const double jetPz = m_trueJets[iTruJet].pz();
540 const double jetP = sqrt((jetPx * jetPx) + (jetPy * jetPy) + (jetPz * jetPz));
544 vecTruCstEmbedID.clear();
549 vecTruCstEta.clear();
550 vecTruCstPhi.clear();
553 vector<fastjet::PseudoJet> trueCsts = m_trueJets[iTruJet].constituents();
554 for (
unsigned int iTruCst = 0; iTruCst < trueCsts.size(); ++iTruCst) {
557 const double cstPhi = trueCsts[iTruCst].phi_std();
558 const double cstEta = trueCsts[iTruCst].pseudorapidity();
559 const double cstE = trueCsts[iTruCst].E();
560 const double cstPt = trueCsts[iTruCst].perp();
561 const double cstPx = trueCsts[iTruCst].px();
562 const double cstPy = trueCsts[iTruCst].py();
563 const double cstPz = trueCsts[iTruCst].pz();
564 const double cstP = ((cstPx * cstPx) + (cstPy * cstPy) + (cstPz * cstPz));
565 const double cstZ = cstP / jetP;
566 const double cstDf = cstPhi - jetPhi;
567 const double cstDh = cstEta - jetEta;
568 const double cstDr = sqrt((cstDf * cstDf) + (cstDh * cstDh));
571 const int cstID = trueCsts[iTruCst].user_index();
572 const int embedID = m_mapCstToEmbedID[cstID];
575 vecTruCstID.push_back(abs(cstID));
576 vecTruCstEmbedID.push_back(embedID);
577 vecTruCstZ.push_back(cstZ);
578 vecTruCstDr.push_back(cstDr);
579 vecTruCstE.push_back(cstE);
580 vecTruCstPt.push_back(cstPt);
581 vecTruCstEta.push_back(cstEta);
582 vecTruCstPhi.push_back(cstPhi);
586 m_hObjectQA[OBJECT::TCST][INFO::ETA] ->
Fill(cstEta);
587 m_hObjectQA[OBJECT::TCST][INFO::PHI] ->
Fill(cstPhi);
588 m_hObjectQA[OBJECT::TCST][INFO::ENE] ->
Fill(cstE);
593 m_trueJetNCst.push_back(jetNCst);
594 m_trueJetID.push_back(jetTruID);
595 m_trueJetE.push_back(jetE);
596 m_trueJetPt.push_back(jetPt);
597 m_trueJetEta.push_back(jetEta);
598 m_trueJetPhi.push_back(jetPhi);
599 m_trueJetArea.push_back(jetArea);
600 m_trueCstID.push_back(vecTruCstID);
601 m_trueCstEmbedID.push_back(vecTruCstEmbedID);
602 m_trueCstZ.push_back(vecTruCstZ);
603 m_trueCstDr.push_back(vecTruCstDr);
604 m_trueCstE.push_back(vecTruCstE);
605 m_trueCstPt.push_back(vecTruCstPt);
606 m_trueCstEta.push_back(vecTruCstEta);
607 m_trueCstPhi.push_back(vecTruCstPhi);
610 m_hJetArea[0] ->
Fill(jetArea);
611 m_hJetNumCst[0] ->
Fill(jetNCst);
613 m_hObjectQA[OBJECT::TJET][INFO::ETA] ->
Fill(jetEta);
614 m_hObjectQA[OBJECT::TJET][INFO::PHI] ->
Fill(jetPhi);
615 m_hObjectQA[OBJECT::TJET][INFO::ENE] ->
Fill(jetE);
620 m_hNumObject[OBJECT::TJET] ->
Fill(nTruJet);
621 m_hNumObject[OBJECT::TCST] ->
Fill(nTruCst);
624 m_trueNumJets = nTruJet;
625 m_truePartonID[0] = m_partonID[0];
626 m_truePartonID[1] = m_partonID[1];
627 m_truePartonMomX[0] = m_partonMom[0].x();
628 m_truePartonMomX[1] = m_partonMom[1].x();
629 m_truePartonMomY[0] = m_partonMom[0].y();
630 m_truePartonMomY[1] = m_partonMom[1].y();
631 m_truePartonMomZ[0] = m_partonMom[0].z();
632 m_truePartonMomZ[1] = m_partonMom[1].z();
633 m_trueVtxX = m_trueVtx.x();
634 m_trueVtxY = m_trueVtx.y();
635 m_trueVtxZ = m_trueVtx.z();
638 m_trueTree ->
Fill();
645 void SCorrelatorJetTree::FillRecoTree() {
649 cout <<
"SCorrelatorJetTree::FillRecoTree() Filling reco jet tree..." << endl;
653 m_recoJetNCst.clear();
657 m_recoJetEta.clear();
658 m_recoJetPhi.clear();
659 m_recoJetArea.clear();
660 m_recoCstMatchID.clear();
665 m_recoCstEta.clear();
666 m_recoCstPhi.clear();
669 vector<int> vecRecCstMatchID;
670 vector<double> vecRecCstZ;
671 vector<double> vecRecCstDr;
672 vector<double> vecRecCstE;
673 vector<double> vecRecCstPt;
674 vector<double> vecRecCstEta;
675 vector<double> vecRecCstPhi;
676 vecRecCstMatchID.clear();
681 vecRecCstEta.clear();
682 vecRecCstPhi.clear();
685 unsigned long nRecJet(0);
686 unsigned long nRecCst(0);
687 for (
unsigned int iJet = 0; iJet < m_recoJets.size(); ++iJet) {
690 const unsigned int jetNCst = m_recoJets[iJet].constituents().size();
691 const unsigned int jetRecID = iJet;
692 const double jetPhi = m_recoJets[iJet].phi_std();
693 const double jetEta = m_recoJets[iJet].pseudorapidity();
694 const double jetArea = 0.;
695 const double jetE = m_recoJets[iJet].E();
696 const double jetPt = m_recoJets[iJet].perp();
697 const double jetPx = m_recoJets[iJet].px();
698 const double jetPy = m_recoJets[iJet].py();
699 const double jetPz = m_recoJets[iJet].pz();
700 const double jetP = sqrt((jetPx * jetPx) + (jetPy * jetPy) + (jetPz * jetPz));
703 vecRecCstMatchID.clear();
708 vecRecCstEta.clear();
709 vecRecCstPhi.clear();
712 vector<fastjet::PseudoJet> recoCsts = m_recoJets[iJet].constituents();
713 for (
unsigned int iCst = 0; iCst < recoCsts.size(); ++iCst) {
716 const double cstMatchID = recoCsts[iCst].user_index();
717 const double cstPhi = recoCsts[iCst].phi_std();
718 const double cstEta = recoCsts[iCst].pseudorapidity();
719 const double cstE = recoCsts[iCst].E();
720 const double cstPt = recoCsts[iCst].perp();
721 const double cstPx = recoCsts[iCst].px();
722 const double cstPy = recoCsts[iCst].py();
723 const double cstPz = recoCsts[iCst].pz();
724 const double cstP = ((cstPx * cstPx) + (cstPy * cstPy) + (cstPz * cstPz));
725 const double cstZ = cstP / jetP;
726 const double cstDf = cstPhi - jetPhi;
727 const double cstDh = cstEta - jetEta;
728 const double cstDr = sqrt((cstDf * cstDf) + (cstDh * cstDh));
731 vecRecCstMatchID.push_back(cstMatchID);
732 vecRecCstZ.push_back(cstZ);
733 vecRecCstDr.push_back(cstDr);
734 vecRecCstE.push_back(cstE);
735 vecRecCstPt.push_back(cstPt);
736 vecRecCstEta.push_back(cstEta);
737 vecRecCstPhi.push_back(cstPhi);
741 m_hObjectQA[OBJECT::RCST][INFO::ETA] ->
Fill(cstEta);
742 m_hObjectQA[OBJECT::RCST][INFO::PHI] ->
Fill(cstPhi);
743 m_hObjectQA[OBJECT::RCST][INFO::ENE] ->
Fill(cstE);
748 m_recoJetNCst.push_back(jetNCst);
749 m_recoJetID.push_back(jetRecID);
750 m_recoJetE.push_back(jetE);
751 m_recoJetPt.push_back(jetPt);
752 m_recoJetEta.push_back(jetEta);
753 m_recoJetPhi.push_back(jetPhi);
754 m_recoJetArea.push_back(jetArea);
755 m_recoCstMatchID.push_back(vecRecCstMatchID);
756 m_recoCstZ.push_back(vecRecCstZ);
757 m_recoCstDr.push_back(vecRecCstDr);
758 m_recoCstE.push_back(vecRecCstE);
759 m_recoCstPt.push_back(vecRecCstPt);
760 m_recoCstEta.push_back(vecRecCstEta);
761 m_recoCstPhi.push_back(vecRecCstPhi);
764 m_hJetArea[1] ->
Fill(jetArea);
765 m_hJetNumCst[1] ->
Fill(jetNCst);
767 m_hObjectQA[OBJECT::RJET][INFO::ETA] ->
Fill(jetEta);
768 m_hObjectQA[OBJECT::RJET][INFO::PHI] ->
Fill(jetPhi);
769 m_hObjectQA[OBJECT::RJET][INFO::ENE] ->
Fill(jetE);
774 m_hNumObject[OBJECT::RJET] ->
Fill(nRecJet);
775 m_hNumObject[OBJECT::RCST] ->
Fill(nRecCst);
778 m_recoNumJets = nRecJet;
779 m_recoVtxX = m_recoVtx.x();
780 m_recoVtxY = m_recoVtx.y();
781 m_recoVtxZ = m_recoVtx.z();
784 m_recoTree ->
Fill();
791 void SCorrelatorJetTree::SaveOutput() {
795 cout <<
"SCorrelatorJetTree::SaveOutput() Saving output trees and histograms..." << endl;
799 const string sQuality[CONST::NDirectory + 1] = {
"Tracks",
"CaloClusters",
"ParticleFlow",
"Particles",
"TruthJets",
"RecoJets",
"QA"};
800 TDirectory* dQuality[CONST::NDirectory + 1];
801 if (m_doQualityPlots) {
804 dQuality[CONST::NDirectory] = (TDirectory*) m_outFile -> mkdir(sQuality[CONST::NDirectory].
data());
805 for (
size_t iDirect = 0; iDirect < CONST::NDirectory; iDirect++) {
806 dQuality[iDirect] = (TDirectory*) dQuality[CONST::NDirectory] -> mkdir(sQuality[iDirect].
data());
810 for (
size_t iObj = OBJECT::TRACK; iObj < CONST::NObjType; iObj++) {
840 m_hNumObject[iObj] ->
Write();
841 for (
size_t iInfo =
INFO::PT; iInfo < CONST::NInfoQA; iInfo++) {
842 m_hObjectQA[iObj][iInfo] ->
Write();
847 for (
size_t iCst = CST_TYPE::TRACK_CST; iCst < CONST::NCstType; iCst++) {
849 case CST_TYPE::TRACK_CST:
852 case CST_TYPE::ECAL_CST:
855 case CST_TYPE::HCAL_CST:
858 case CST_TYPE::FLOW_CST:
861 case CST_TYPE::PART_CST:
865 m_hNumCstAccept[iCst][0] ->
Write();
866 m_hNumCstAccept[iCst][1] ->
Write();
867 m_hSumCstEne[iCst] ->
Write();
872 m_hJetArea[0] ->
Write();
873 m_hJetNumCst[0] ->
Write();
875 m_hJetArea[1] ->
Write();
876 m_hJetNumCst[1] ->
Write();
881 m_ntTrkQA ->
Write();
882 if (m_checkWeirdTrks) {
883 m_ntWeirdTracks ->
Write();
888 m_recoTree ->
Write();
890 m_trueTree ->
Write();
898 void SCorrelatorJetTree::ResetVariables() {
902 cout <<
"SCorrelatorJetTree::ResetTreeVariables() Resetting tree variables..." << endl;
912 m_partonID[0] = -9999;
913 m_partonID[1] = -9999;
914 m_partonMom[0] = CLHEP::Hep3Vector(-9999., -9999., -9999.);
915 m_partonMom[1] = CLHEP::Hep3Vector(-9999., -9999., -9999.);
916 m_vecEvtsToGrab.clear();
917 m_mapCstToEmbedID.clear();
920 m_trueVtx = CLHEP::Hep3Vector(-9999., -9999., -9999.);
922 m_trueNumChrgPars = -9999;
923 m_trueSumPar = -9999.;
924 m_truePartonID[0] = -9999;
925 m_truePartonID[1] = -9999;
926 m_truePartonMomX[0] = -9999.;
927 m_truePartonMomX[1] = -9999.;
928 m_truePartonMomY[0] = -9999.;
929 m_truePartonMomY[1] = -9999.;
930 m_truePartonMomZ[0] = -9999.;
931 m_truePartonMomZ[1] = -9999.;
933 m_trueJetNCst.clear();
937 m_trueJetEta.clear();
938 m_trueJetPhi.clear();
939 m_trueJetArea.clear();
941 m_trueCstEmbedID.clear();
946 m_trueCstEta.clear();
947 m_trueCstPhi.clear();
950 m_recoVtx = CLHEP::Hep3Vector(-9999., -9999., -9999.);
952 m_recoNumTrks = -9999;
953 m_recoSumECal = -9999.;
954 m_recoSumHCal = -9999.;
956 m_recoJetNCst.clear();
960 m_recoJetEta.clear();
961 m_recoJetPhi.clear();
962 m_recoJetArea.clear();
967 m_recoCstEta.clear();
968 m_recoCstPhi.clear();
979 cout <<
"SCorrelatorJetTree::DetermineEvtsToGrab() Determining which subevents to grab..." << endl;
983 m_vecEvtsToGrab.clear();
988 m_vecEvtsToGrab.push_back(1);
990 PHHepMCGenEventMap* mapMcEvts = findNode::getClass<PHHepMCGenEventMap>(topNode,
"PHHepMCGenEventMap");
992 m_vecEvtsToGrab.push_back(itEvt -> second -> get_embedding_id());
1005 cout <<
"SCorrelatorJetTree::CreateJetNode(PHCompositeNode*) Creating jet node..." << endl;
1013 topNode -> addNode(lowerNode);
1014 cout <<
"DST node added" << endl;
1019 string recoNodeName;
1020 string trueNodeName;
1021 if (m_jetTreeName.empty()) {
1022 baseName =
"JetTree";
1024 baseName = m_jetTreeName;
1028 string undrscr =
"_";
1029 string nothing =
"";
1032 map<string, string> forbiddenStrings;
1033 forbiddenStrings[
"/"] = undrscr;
1034 forbiddenStrings[
"("] = undrscr;
1035 forbiddenStrings[
")"] = nothing;
1036 forbiddenStrings[
"+"] =
"plus";
1037 forbiddenStrings[
"-"] =
"minus";
1038 forbiddenStrings[
"*"] =
"star";
1039 for (
auto const& [badString, goodString] : forbiddenStrings) {
1041 while ((pos = baseName.find(badString)) != string::npos) {
1042 baseName.replace(pos, 1, goodString);
1047 recoNodeName = baseName +
"_RecoJets";
1048 trueNodeName = baseName +
"_TruthJets";
1052 if (m_isMC && m_saveDST) {
1059 lowerNode -> addNode(recoJetNode);
1060 cout << recoNodeName <<
" node added" << endl;
1064 if(m_isMC && m_saveDST) {
1066 lowerNode -> addNode(trueJetNode);
1067 cout << trueNodeName <<
" node added" << endl;
1079 cout <<
"SCorrelatorJetTree::GetEmbedID(PHCompositeNode*) Grabbing embedding ID from MC subevent #" << iEvtToGrab <<
"..." << endl;
1083 PHHepMCGenEventMap* mapMcEvts = findNode::getClass<PHHepMCGenEventMap>(topNode,
"PHHepMCGenEventMap");
1086 <<
"PANIC: HEPMC event map node is missing!"
1095 <<
"PANIC: Couldn't grab start of mc events!"
1099 return mcEvtStart -> get_embedding_id();
1109 cout <<
"SCorrelatorJetTree::GetTrackMap(PHCompositeNode*) Grabbing track map..." << endl;
1113 SvtxTrackMap* mapTrks = findNode::getClass<SvtxTrackMap>(topNode,
"SvtxTrackMap");
1116 <<
"PANIC: SvtxTrackMap node is missing!"
1130 cout <<
"SCorrelatorJetTree::GetGlobalVertex(PHCompositeNode*) Getting global vertex..." << endl;
1138 if (iVtxToGrab < 0) {
1139 vtx = mapVtx ->
begin() -> second;
1141 vtx = mapVtx ->
get(iVtxToGrab);
1147 <<
"PANIC: no vertex!"
1161 cout <<
"SCorrelatorJetTree::GetVertexMap(PHCompositeNode*) Getting global vertex map..." << endl;
1165 GlobalVertexMap* mapVtx = findNode::getClass<GlobalVertexMap>(topNode,
"GlobalVertexMap");
1168 const bool isVtxMapGood = (mapVtx && !(mapVtx -> empty()));
1169 if (!isVtxMapGood) {
1171 <<
"PANIC: GlobalVertexMap node is missing or empty!\n"
1172 <<
" Please turn on the do_global flag in the main macro in order to reconstruct the global vertex!"
1186 cout <<
"SCorrelatorJetTree::GetMcEvent(PHCompositeNode*, int) Grabbing mc subevent #" << iEvtToGrab <<
"..." << endl;
1190 PHHepMCGenEventMap* mapMcEvts = findNode::getClass<PHHepMCGenEventMap>(topNode,
"PHHepMCGenEventMap");
1193 <<
"PANIC: HEPMC event map node is missing!"
1202 <<
"PANIC: Couldn't grab start of mc events!"
1207 HepMC::GenEvent* mcEvt = mcEvtStart -> getEvent();
1210 <<
"PANIC: Couldn't grab HepMC event!"
1224 cout <<
"SCorrelatorJetTree::GetClusterStore(PHCompositeNode*, TString) Grabbing calorimeter cluster container..." << endl;
1228 RawClusterContainer *clustStore = findNode::getClass<RawClusterContainer>(topNode, sNodeName.Data());
1231 <<
"PANIC: " << sNodeName.Data() <<
" node is missing!"
1245 cout <<
"SCorrelatorJetTree::GetFlowStore(PHCompositeNode*) Grabbing particle flow container..." << endl;
1252 <<
"PANIC: Couldn't grab particle flow container!"