18 #include <TClonesArray.h>
26 #include <TLorentzVector.h>
29 #include "AliMCEvent.h"
30 #include "AliPythia.h"
33 #include "AliVTrack.h"
34 #include "AliVHeader.h"
40 #include "AliAODTrack.h"
42 #include "AliVParticle.h"
63 fEventExtractionPercentage(0),
64 fEventExtractionMinJetPt(0),
65 fEventExtractionMaxJetPt(0),
66 fConstPtFilterBit(1024),
67 fNumberOfCentralityBins(10),
70 fJetParticleArrayName("JetsDPhiBasicParticles"),
71 fTrackParticleArrayName(""),
73 fJetEmbeddingArrayName(""),
74 fJetEmbeddingTrackArrayName(""),
75 fJetEmbeddingMaxDistance(0.3),
76 fJetEmbeddingNumMatchedJets(2),
77 fJetEmbeddingUsePerTrackMCPercentage(kTRUE),
78 fJetEmbeddingUseBgrdForMCPercentage(kFALSE),
79 fJetEmbeddingCreatePtPlotPerCut(kFALSE),
82 fJetVetoArrayName(""),
89 fInitialPartonMatchedJet1(0),
90 fInitialPartonMatchedJet2(0),
95 SetMakeGeneralHistograms(kTRUE);
96 fRandom =
new TRandom3(0);
105 fEventExtractionPercentage(0),
106 fEventExtractionMinJetPt(0),
107 fEventExtractionMaxJetPt(0),
108 fConstPtFilterBit(1024),
109 fNumberOfCentralityBins(10),
112 fJetParticleArrayName(
"JetsDPhiBasicParticles"),
113 fTrackParticleArrayName(
""),
114 fJetEmbeddingArray(),
115 fJetEmbeddingArrayName(
""),
116 fJetEmbeddingTrackArrayName(
""),
117 fJetEmbeddingMaxDistance(0.3),
118 fJetEmbeddingNumMatchedJets(2),
119 fJetEmbeddingUsePerTrackMCPercentage(kTRUE),
120 fJetEmbeddingUseBgrdForMCPercentage(kFALSE),
121 fJetEmbeddingCreatePtPlotPerCut(kFALSE),
124 fJetVetoArrayName(
""),
131 fInitialPartonMatchedJet1(0),
132 fInitialPartonMatchedJet2(0),
166 AddHistogram2D<TH2D>(
"hTrackPt",
"Tracks p_{T} distribution",
"", 300, 0., 300.,
fNumberOfCentralityBins, 0, 100,
"p_{T} (GeV/c)",
"Centrality",
"dN^{Tracks}/dp_{T}");
167 AddHistogram2D<TH2D>(
"hTrackPhi",
"Track angular distribution in #phi",
"LEGO2", 180, 0., 2*TMath::Pi(),
fNumberOfCentralityBins, 0, 100,
"#phi",
"Centrality",
"dN^{Tracks}/(d#phi)");
168 AddHistogram2D<TH2D>(
"hTrackEta",
"Track angular distribution in #eta",
"LEGO2", 100, -2.5, 2.5,
fNumberOfCentralityBins, 0, 100,
"#eta",
"Centrality",
"dN^{Tracks}/(d#eta)");
169 AddHistogram2D<TH2D>(
"hTrackPhiEta",
"Track angular distribution #phi/#eta",
"COLZ", 180, 0., 2*TMath::Pi(), 100, -2.5, 2.5,
"#phi",
"#eta",
"dN^{Tracks}/d#phi d#eta");
171 AddHistogram2D<TH2D>(
"hLeadingTrackPt",
"Leading tracks p_{T} distribution",
"", 300, 0., 300.,
fNumberOfCentralityBins, 0, 100,
"p_{T} (GeV/c)",
"Centrality",
"dN^{Tracks}/dp_{T}");
172 AddHistogram2D<TH2D>(
"hLeadingTrackPhi",
"Leading tracks angular distribution in #phi",
"LEGO2", 180, 0., 2*TMath::Pi(),
fNumberOfCentralityBins, 0, 100,
"#phi",
"Centrality",
"dN^{Tracks}/(d#phi)");
173 AddHistogram2D<TH2D>(
"hLeadingTrackEta",
"Leading tracks angular distribution in #eta",
"LEGO2", 100, -2.5, 2.5,
fNumberOfCentralityBins, 0, 100,
"#eta",
"Centrality",
"dN^{Tracks}/(d#eta)");
174 AddHistogram2D<TH2D>(
"hLeadingTrackPhiEta",
"Track angular distribution #phi/#eta",
"COLZ", 180, 0., 2*TMath::Pi(), 100, -2.5, 2.5,
"#phi",
"#eta",
"dN^{Tracks}/d#phi d#eta");
176 AddHistogram2D<TH2D>(
"hTrackEtaPt",
"Track angular distribution in #eta vs. p_{T}",
"LEGO2", 100, -2.5, 2.5, 300, 0., 300.,
"#eta",
"p_{T} (GeV/c)",
"dN^{Tracks}/(d#eta dp_{T})");
177 AddHistogram2D<TH2D>(
"hTrackPhiPt",
"Track angular distribution in #phi vs. p_{T}",
"LEGO2", 180, 0, 2*TMath::Pi(), 300, 0., 300.,
"#phi",
"p_{T} (GeV/c)",
"dN^{Tracks}/(d#phi dp_{T})");
182 const char* appendix =
"";
186 appendix = Form(
"_%s", currentCut.
fCutName.Data());
189 if( static_cast<TH1*>(
fOutput->FindObject(Form(
"hJetPtRaw%s", appendix))) )
193 AddHistogram2D<TH2D>(Form(
"hJetPtRaw%s", appendix),
"Jets p_{T} distribution (no bgrd. corr.)",
"", 300, 0., 300.,
fNumberOfCentralityBins, 0, 100,
"p_{T, jet} (GeV/c)",
"Centrality",
"dN^{Jets}/dp_{T}");
194 AddHistogram2D<TH2D>(Form(
"hJetPt%s", appendix),
"Jets p_{T} distribution (background subtracted)",
"", 400, -100., 300.,
fNumberOfCentralityBins, 0, 100,
"p_{T, jet} (GeV/c)",
"Centrality",
"dN^{Jets}/dp_{T}");
195 AddHistogram2D<TH2D>(Form(
"hJetPhi%s", appendix),
"Jet angular distribution #phi",
"LEGO2", 180, 0., 2*TMath::Pi(),
fNumberOfCentralityBins, 0, 100,
"#phi",
"Centrality",
"dN^{Jets}/d#phi");
196 AddHistogram2D<TH2D>(Form(
"hJetEta%s", appendix),
"Jet angular distribution #eta",
"LEGO2", 100, -2.5, 2.5,
fNumberOfCentralityBins, 0, 100,
"#eta",
"Centrality",
"dN^{Jets}/d#eta");
197 AddHistogram2D<TH2D>(Form(
"hJetPhiPt%s", appendix),
"Jet angular distribution #phi vs. p_{T}",
"LEGO2", 180, 0., 2*TMath::Pi(), 400, -100., 300.,
"#phi",
"p_{T, jet} (GeV/c)",
"dN^{Jets}/d#phi dp_{T}");
198 AddHistogram2D<TH2D>(Form(
"hJetEtaPt%s", appendix),
"Jet angular distribution #eta vs. p_{T}",
"LEGO2", 100, -2.5, 2.5, 400, -100., 300.,
"#eta",
"p_{T, jet} (GeV/c)",
"dN^{Jets}/d#eta dp_{T}");
199 AddHistogram2D<TH2D>(Form(
"hJetPhiEta%s", appendix),
"Jet angular distribution #phi/#eta",
"COLZ", 180, 0., 2*TMath::Pi(), 100, -2.5, 2.5,
"#phi",
"#eta",
"dN^{Jets}/d#phi d#eta");
200 AddHistogram2D<TH2D>(Form(
"hJetArea%s", appendix),
"Jet area",
"LEGO2", 200, 0., 2.,
fNumberOfCentralityBins, 0, 100,
"Jet A",
"Centrality",
"dN^{Jets}/dA");
201 AddHistogram2D<TH2D>(Form(
"hJetAreaPt%s", appendix),
"Jet area vs. p_{T}",
"LEGO2", 200, 0., 2., 400, -100., 300.,
"Jet A",
"p_{T, jet} (GeV/c)",
"dN^{Jets}/dA dp_{T}");
202 AddHistogram2D<TH2D>(Form(
"hJetPtLeadingHadron%s", appendix),
"Jet leading hadron p_{T} distribution vs. jet p_{T}",
"", 300, 0., 300., 300, 0., 300.,
"p_{T, jet} (GeV/c)",
"p_{T,lead had} (GeV/c)",
"dN^{Jets}/dp_{T}dp_{T,had}");
205 AddHistogram2D<TH2D>(Form(
"hLeadingJetPtRaw%s", appendix),
"Jets p_{T} distribution (no bgrd. corr.)",
"", 300, 0., 300.,
fNumberOfCentralityBins, 0, 100,
"p_{T, jet} (GeV/c)",
"Centrality",
"dN^{Jets}/dp_{T}");
206 AddHistogram2D<TH2D>(Form(
"hLeadingJetPt%s", appendix),
"Jets p_{T} distribution (background subtracted)",
"", 400, -100., 300.,
fNumberOfCentralityBins, 0, 100,
"p_{T, jet} (GeV/c)",
"Centrality",
"dN^{Jets}/dp_{T}");
207 AddHistogram2D<TH2D>(Form(
"hLeadingJetPhi%s", appendix),
"Jet angular distribution #phi",
"LEGO2", 180, 0., 2*TMath::Pi(),
fNumberOfCentralityBins, 0, 100,
"#phi",
"Centrality",
"dN^{Jets}/d#phi");
208 AddHistogram2D<TH2D>(Form(
"hLeadingJetEta%s", appendix),
"Jet angular distribution #eta",
"LEGO2", 100, -2.5, 2.5,
fNumberOfCentralityBins, 0, 100,
"#eta",
"Centrality",
"dN^{Jets}/d#eta");
209 AddHistogram2D<TH2D>(Form(
"hLeadingJetPhiPt%s", appendix),
"Jet angular distribution #phi vs. p_{T}",
"LEGO2", 180, 0., 2*TMath::Pi(), 400, -100., 300.,
"#phi",
"p_{T, jet} (GeV/c)",
"dN^{Jets}/d#phi dp_{T}");
210 AddHistogram2D<TH2D>(Form(
"hLeadingJetEtaPt%s", appendix),
"Jet angular distribution #eta vs. p_{T}",
"LEGO2", 100, -2.5, 2.5, 400, -100., 300.,
"#eta",
"p_{T, jet} (GeV/c)",
"dN^{Jets}/d#eta dp_{T}");
211 AddHistogram2D<TH2D>(Form(
"hLeadingJetPhiEta%s", appendix),
"Jet angular distribution #phi/#eta",
"COLZ", 180, 0., 2*TMath::Pi(), 100, -2.5, 2.5,
"#phi",
"#eta",
"dN^{Jets}/d#phi d#eta");
212 AddHistogram2D<TH2D>(Form(
"hLeadingJetArea%s", appendix),
"Jet area",
"LEGO2", 200, 0., 2.,
fNumberOfCentralityBins, 0, 100,
"Jet A",
"Centrality",
"dN^{Jets}/dA");
213 AddHistogram2D<TH2D>(Form(
"hLeadingJetAreaPt%s", appendix),
"Jet area vs. p_{T}",
"LEGO2", 200, 0., 2., 400, -100., 300.,
"Jet A",
"p_{T, jet} (GeV/c)",
"dN^{Jets}/dA dp_{T}");
214 AddHistogram2D<TH2D>(Form(
"hLeadingJetPtLeadingHadron%s", appendix),
"Jet leading hadron p_{T} distribution vs. jet p_{T}",
"", 300, 0., 300., 300, 0., 300.,
"p_{T, jet} (GeV/c)",
"p_{T,lead had} (GeV/c)",
"dN^{Jets}/dp_{T}dp_{T,had}");
216 AddHistogram2D<TH2D>(Form(
"hSubleadingJetPtRaw%s", appendix),
"Jets p_{T} distribution (no bgrd. corr.)",
"", 300, 0., 300.,
fNumberOfCentralityBins, 0, 100,
"p_{T, jet} (GeV/c)",
"Centrality",
"dN^{Jets}/dp_{T}");
217 AddHistogram2D<TH2D>(Form(
"hSubleadingJetPt%s", appendix),
"Jets p_{T} distribution (background subtracted)",
"", 400, -100., 300.,
fNumberOfCentralityBins, 0, 100,
"p_{T, jet} (GeV/c)",
"Centrality",
"dN^{Jets}/dp_{T}");
218 AddHistogram2D<TH2D>(Form(
"hSubleadingJetPhi%s", appendix),
"Jet angular distribution #phi",
"LEGO2", 180, 0., 2*TMath::Pi(),
fNumberOfCentralityBins, 0, 100,
"#phi",
"Centrality",
"dN^{Jets}/d#phi");
219 AddHistogram2D<TH2D>(Form(
"hSubleadingJetEta%s", appendix),
"Jet angular distribution #eta",
"LEGO2", 100, -2.5, 2.5,
fNumberOfCentralityBins, 0, 100,
"#eta",
"Centrality",
"dN^{Jets}/d#eta");
220 AddHistogram2D<TH2D>(Form(
"hSubleadingJetPhiPt%s", appendix),
"Jet angular distribution #phi vs. p_{T}",
"LEGO2", 180, 0., 2*TMath::Pi(), 400, -100., 300.,
"#phi",
"p_{T, jet} (GeV/c)",
"dN^{Jets}/d#phi dp_{T}");
221 AddHistogram2D<TH2D>(Form(
"hSubleadingJetEtaPt%s", appendix),
"Jet angular distribution #eta vs. p_{T}",
"LEGO2", 100, -2.5, 2.5, 400, -100., 300.,
"#eta",
"p_{T, jet} (GeV/c)",
"dN^{Jets}/d#eta dp_{T}");
222 AddHistogram2D<TH2D>(Form(
"hSubleadingJetPhiEta%s", appendix),
"Jet angular distribution #phi/#eta",
"COLZ", 180, 0., 2*TMath::Pi(), 100, -2.5, 2.5,
"#phi",
"#eta",
"dN^{Jets}/d#phi d#eta");
223 AddHistogram2D<TH2D>(Form(
"hSubleadingJetArea%s", appendix),
"Jet area",
"LEGO2", 200, 0., 2.,
fNumberOfCentralityBins, 0, 100,
"Jet A",
"Centrality",
"dN^{Jets}/dA");
224 AddHistogram2D<TH2D>(Form(
"hSubleadingJetAreaPt%s", appendix),
"Jet area vs. p_{T}",
"LEGO2", 200, 0., 2., 400, -100., 300.,
"Jet A",
"p_{T, jet} (GeV/c)",
"dN^{Jets}/dA dp_{T}");
225 AddHistogram2D<TH2D>(Form(
"hSubleadingJetPtLeadingHadron%s", appendix),
"Jet leading hadron p_{T} distribution vs. jet p_{T}",
"", 300, 0., 300., 300, 0., 300.,
"p_{T, jet} (GeV/c)",
"p_{T,lead had} (GeV/c)",
"dN^{Jets}/dp_{T}dp_{T,had}");
227 AddHistogram2D<TH2D>(Form(
"hJetConstituentPt_Cent0_100%s", appendix),
"Jet constituent p_{T} distribution vs. jet p_T (background subtracted)",
"", 400, -100., 300., 300, 0., 300.,
"p_{T, jet} (GeV/c)",
"p_{T, track} (GeV/c)",
"dN^{Tracks}/d^{2}p_{T}");
228 AddHistogram2D<TH2D>(Form(
"hJetConstituentPt_Cent0_10%s", appendix),
"Jet constituent p_{T} distribution vs. jet p_T (background subtracted), 0-10 centrality",
"", 400, -100., 300., 300, 0., 300.,
"p_{T, jet} (GeV/c)",
"p_{T, track} (GeV/c)",
"dN^{Tracks}/d^{2}p_{T}");
229 AddHistogram2D<TH2D>(Form(
"hJetConstituentPt_Cent10_30%s", appendix),
"Jet constituent p_{T} distribution vs. jet p_T (background subtracted), 10-30 centrality",
"", 400, -100., 300., 300, 0., 300.,
"p_{T, jet} (GeV/c)",
"p_{T, track} (GeV/c)",
"dN^{Tracks}/d^{2}p_{T}");
230 AddHistogram2D<TH2D>(Form(
"hJetConstituentPt_Cent30_50%s", appendix),
"Jet constituent p_{T} distribution vs. jet p_T (background subtracted), 30-50 centrality",
"", 400, -100., 300., 300, 0., 300.,
"p_{T, jet} (GeV/c)",
"p_{T, track} (GeV/c)",
"dN^{Tracks}/d^{2}p_{T}");
231 AddHistogram2D<TH2D>(Form(
"hJetConstituentPt_Cent50_90%s", appendix),
"Jet constituent p_{T} distribution vs. jet p_T (background subtracted), 50-90 centrality",
"", 400, -100., 300., 300, 0., 300.,
"p_{T, jet} (GeV/c)",
"p_{T, track} (GeV/c)",
"dN^{Tracks}/d^{2}p_{T}");
233 AddHistogram2D<TH2D>(Form(
"hJetConstituentPt_Cent0_100_FilterBit%i%s",
fConstPtFilterBit, appendix),
"Jet constituent p_{T} distribution vs. jet p_T (background subtracted)",
"", 400, -100., 300., 300, 0., 300.,
"p_{T, jet} (GeV/c)",
"p_{T, track} (GeV/c)",
"dN^{Tracks}/d^{2}p_{T}");
234 AddHistogram2D<TH2D>(Form(
"hJetConstituentPt_Cent0_10_FilterBit%i%s",
fConstPtFilterBit, appendix),
"Jet constituent p_{T} distribution vs. jet p_T (background subtracted), 0-10 centrality",
"", 400, -100., 300., 300, 0., 300.,
"p_{T, jet} (GeV/c)",
"p_{T, track} (GeV/c)",
"dN^{Tracks}/d^{2}p_{T}");
235 AddHistogram2D<TH2D>(Form(
"hJetConstituentPt_Cent10_30_FilterBit%i%s",
fConstPtFilterBit, appendix),
"Jet constituent p_{T} distribution vs. jet p_T (background subtracted), 10-30 centrality",
"", 400, -100., 300., 300, 0., 300.,
"p_{T, jet} (GeV/c)",
"p_{T, track} (GeV/c)",
"dN^{Tracks}/d^{2}p_{T}");
236 AddHistogram2D<TH2D>(Form(
"hJetConstituentPt_Cent30_50_FilterBit%i%s",
fConstPtFilterBit, appendix),
"Jet constituent p_{T} distribution vs. jet p_T (background subtracted), 30-50 centrality",
"", 400, -100., 300., 300, 0., 300.,
"p_{T, jet} (GeV/c)",
"p_{T, track} (GeV/c)",
"dN^{Tracks}/d^{2}p_{T}");
237 AddHistogram2D<TH2D>(Form(
"hJetConstituentPt_Cent50_90_FilterBit%i%s",
fConstPtFilterBit, appendix),
"Jet constituent p_{T} distribution vs. jet p_T (background subtracted), 50-90 centrality",
"", 400, -100., 300., 300, 0., 300.,
"p_{T, jet} (GeV/c)",
"p_{T, track} (GeV/c)",
"dN^{Tracks}/d^{2}p_{T}");
239 AddHistogram2D<TH2D>(Form(
"hJetConstituentCount_Cent0_100%s", appendix),
"Jet constituent count vs. jet p_T (background subtracted)",
"", 400, -100., 300., 200, 0., 200.,
"p_{T, jet} (GeV/c)",
"Count",
"dN^{Jets}/dNdp_{T}");
240 AddHistogram2D<TH2D>(Form(
"hJetConstituentCount_Cent0_10%s", appendix),
"Jet constituent count vs. jet p_T (background subtracted), 0-10 centrality",
"", 400, -100., 300., 200, 0., 200.,
"p_{T, jet} (GeV/c)",
"Count",
"dN^{Jets}/dNdp_{T}");
252 const char* appendix =
"";
256 appendix = Form(
"_%s", currentCut.
fCutName.Data());
259 if( static_cast<TH1*>(
fOutput->FindObject(Form(
"hEmbeddingDeltaR%s", appendix))) )
262 AddHistogram2D<TH2D>(Form(
"hEmbeddingDeltaR%s", appendix),
"Matched jet #Delta R distribution",
"", 200, -50., 150., 100, 0, 1.0,
"p_{T, jet} (GeV/c)",
"#Delta R",
"dN^{Matched}/dp_{T}dR");
263 AddHistogram2D<TH2D>(Form(
"hEmbeddingDeltaEta%s", appendix),
"Matched jet #Delta #eta distribution",
"", 200, -50., 150., 100, -1.0, 1.0,
"p_{T, jet} (GeV/c)",
"#Delta #eta",
"dN^{Matched}/dp_{T}d#eta");
264 AddHistogram2D<TH2D>(Form(
"hEmbeddingDeltaPhi%s", appendix),
"Matched jet #Delta #phi distribution",
"", 200, -50., 150., 100, -1.0, 1.0,
"p_{T, jet} (GeV/c)",
"#Delta #phi",
"dN^{Matched}/dp_{T}d#phi");
265 AddHistogram1D<TH1D>(Form(
"hEmbeddingJetPt%s", appendix),
"Embedded jets p_{T} distribution",
"", 200, -50., 150.,
"p_{T, jet} (GeV/c)",
"dN/dp_{T}");
266 AddHistogram2D<TH2D>(Form(
"hEmbeddingJetPhiEta%s", appendix),
"Embedded jet angular distribution #phi/#eta",
"COLZ", 180, 0., 2*TMath::Pi(), 100, -2.5, 2.5,
"#phi",
"#eta",
"dN^{Jets}/d#phi d#eta");
270 AddHistogram3D<TH3D>(Form(
"hEmbeddingPtCorr010%s", appendix),
"Matched jet p_{T} distributions (0-10% centrality)",
"", 150, 0., 150., 150, 0., 150., 100, 0., maxRatio,
"p_{T, MC jet} (GeV/c)",
"p_{T, emb} (GeV/c)",
"% MC");
271 AddHistogram3D<TH3D>(Form(
"hEmbeddingPtCorr1030%s", appendix),
"Matched jet p_{T} distributions (10-30% centrality)",
"", 150, 0., 150., 150, 0., 150., 100, 0., maxRatio,
"p_{T, MC jet} (GeV/c)",
"p_{T, emb} (GeV/c)",
"% MC");
272 AddHistogram3D<TH3D>(Form(
"hEmbeddingPtCorr3050%s", appendix),
"Matched jet p_{T} distributions (30-50% centrality)",
"", 150, 0., 150., 150, 0., 150., 100, 0., maxRatio,
"p_{T, MC jet} (GeV/c)",
"p_{T, emb} (GeV/c)",
"% MC");
273 AddHistogram3D<TH3D>(Form(
"hEmbeddingPtCorr5090%s", appendix),
"Matched jet p_{T} distributions (50-90% centrality)",
"", 150, 0., 150., 150, 0., 150., 100, 0., maxRatio,
"p_{T, MC jet} (GeV/c)",
"p_{T, emb} (GeV/c)",
"% MC");
277 AddHistogram2D<TH2D>(Form(
"hEmbeddingPtCorr010_Above20%s", appendix),
"Matched jet p_{T} distributions, MC ratio > 20% (0-10% centrality)",
"", 150, 0., 150., 150, 0., 150.,
"p_{T, MC jet} (GeV/c)",
"p_{T, emb} (GeV/c)",
"% MC");
278 AddHistogram2D<TH2D>(Form(
"hEmbeddingPtCorr1030_Above20%s", appendix),
"Matched jet p_{T} distributions, MC ratio > 20% (10-30% centrality)",
"", 150, 0., 150., 150, 0., 150.,
"p_{T, MC jet} (GeV/c)",
"p_{T, emb} (GeV/c)",
"% MC");
279 AddHistogram2D<TH2D>(Form(
"hEmbeddingPtCorr3050_Above20%s", appendix),
"Matched jet p_{T} distributions, MC ratio > 20% (30-50% centrality)",
"", 150, 0., 150., 150, 0., 150.,
"p_{T, MC jet} (GeV/c)",
"p_{T, emb} (GeV/c)",
"% MC");
280 AddHistogram2D<TH2D>(Form(
"hEmbeddingPtCorr5090_Above20%s", appendix),
"Matched jet p_{T} distributions, MC ratio > 20% (50-90% centrality)",
"", 150, 0., 150., 150, 0., 150.,
"p_{T, MC jet} (GeV/c)",
"p_{T, emb} (GeV/c)",
"% MC");
286 AddHistogram3D<TH3D>(
"hEmbeddingPtCorr010",
"Matched jet p_{T} distributions (0-10% centrality)",
"", 150, 0., 150., 150, 0., 150., 100, 0., maxRatio,
"p_{T, MC jet} (GeV/c)",
"p_{T, emb} (GeV/c)",
"% MC");
287 AddHistogram3D<TH3D>(
"hEmbeddingPtCorr1030",
"Matched jet p_{T} distributions (10-30% centrality)",
"", 150, 0., 150., 150, 0., 150., 100, 0., maxRatio,
"p_{T, MC jet} (GeV/c)",
"p_{T, emb} (GeV/c)",
"% MC");
288 AddHistogram3D<TH3D>(
"hEmbeddingPtCorr3050",
"Matched jet p_{T} distributions (30-50% centrality)",
"", 150, 0., 150., 150, 0., 150., 100, 0., maxRatio,
"p_{T, MC jet} (GeV/c)",
"p_{T, emb} (GeV/c)",
"% MC");
289 AddHistogram3D<TH3D>(
"hEmbeddingPtCorr5090",
"Matched jet p_{T} distributions (50-90% centrality)",
"", 150, 0., 150., 150, 0., 150., 100, 0., maxRatio,
"p_{T, MC jet} (GeV/c)",
"p_{T, emb} (GeV/c)",
"% MC");
294 AddHistogram2D<TH2D>(
"hRandomConePt",
"Random cone p_{T} distribution",
"", 400, -100., 300.,
fNumberOfCentralityBins, 0, 100,
"p_{T, cone} (GeV/c)",
"Centrality",
"dN^{Tracks}/dp_{T}");
295 AddHistogram2D<TH2D>(
"hRandomConePtCut3GeV",
"Random cone p_{T} distribution, cut p_{T} > 3 GeV/c",
"", 400, -100., 300.,
fNumberOfCentralityBins, 0, 100,
"p_{T, cone} (GeV/c)",
"Centrality",
"dN^{Tracks}/dp_{T}");
296 AddHistogram2D<TH2D>(
"hRandomConeRawPt",
"Random cone p_{T} distribution (no bgrd. correction)",
"", 300, 0., 300.,
fNumberOfCentralityBins, 0, 100,
"p_{T, cone} (GeV/c)",
"Centrality",
"dN^{Tracks}/dp_{T}");
297 AddHistogram2D<TH2D>(
"hRandomConeRawPtCut3GeV",
"Random cone p_{T} distribution (no bgrd. correction), cut p_{T} > 3 GeV/c",
"", 300, 0., 300.,
fNumberOfCentralityBins, 0, 100,
"p_{T, cone} (GeV/c)",
"Centrality",
"dN^{Tracks}/dp_{T}");
299 AddHistogram2D<TH2D>(
"hTrackCount",
"Number of tracks in acceptance vs. centrality",
"LEGO2", 500, 0., 5000.,
fNumberOfCentralityBins, 0, 100,
"N tracks",
"Centrality",
"dN^{Events}/dN^{Tracks}");
300 AddHistogram2D<TH2D>(
"hJetCount",
"Number of jets in acceptance vs. centrality",
"LEGO2", 100, 0., 100.,
fNumberOfCentralityBins, 0, 100,
"N Jets",
"Centrality",
"dN^{Events}/dN^{Jets}");
301 AddHistogram2D<TH2D>(
"hBackgroundPt",
"Background p_{T} distribution",
"", 150, 0., 150.,
fNumberOfCentralityBins, 0, 100,
"Background p_{T} (GeV/c)",
"Centrality",
"dN^{Events}/dp_{T}");
306 const char* appendix =
"";
310 appendix = Form(
"_%s", currentCut.
fCutName.Data());
313 if( static_cast<TH1*>(
fOutput->FindObject(Form(
"hBackgroundPtJetPt_Cent0_100%s", appendix))) )
316 AddHistogram2D<TH2D>(Form(
"hBackgroundPtJetPt_Cent0_100%s", appendix),
"Background p_{T} distribution vs. jet p_{T}",
"", 150, 0., 150., 400, -100., 300.,
"Background p_{T} (GeV/c)",
"Jet p_{T} (GeV/c)",
"dN^{Events}/dp_{T}");
317 AddHistogram2D<TH2D>(Form(
"hBackgroundPtJetPt_Cent0_10%s", appendix),
"Background p_{T} distribution vs. jet p_{T}",
"", 150, 0., 150., 400, -100., 300.,
"Background p_{T} (GeV/c)",
"Jet p_{T} (GeV/c)",
"dN^{Events}/dp_{T}");
318 AddHistogram2D<TH2D>(Form(
"hBackgroundPtConstCount_Cent0_100%s", appendix),
"Background p_{T} distribution vs. const. count",
"", 150, 0., 150., 200, 0., 200.,
"Background p_{T} (GeV/c)",
"Count",
"dN^{Events}/dp_{T}");
319 AddHistogram2D<TH2D>(Form(
"hBackgroundPtConstCount_Cent0_10%s", appendix),
"Background p_{T} distribution vs. const. count",
"", 150, 0., 150., 200, 0., 200.,
"Background p_{T} (GeV/c)",
"Count",
"dN^{Events}/dp_{T}");
336 fJetsOutput.push_back(
new TClonesArray(
"AliPicoTrack"));
341 AliFatal(Form(
"%s: Object with name %s already in event!", GetName(), Form(
"%s",
fJetParticleArrayName.Data())));
348 if (fInputEvent->FindListObject(Form(
"%s",
fJetEmbeddingCuts.at(i).fOutputName.Data())))
349 AliFatal(Form(
"%s: Object with name %s already in event!", GetName(), Form(
"%s",
fJetEmbeddingCuts.at(i).fOutputName.Data())));
354 if (!fInputEvent->FindListObject(Form(
"%s",
fJetEmbeddingCuts.at(i).fOutputName.Data())))
356 fJetsOutput.push_back(
new TClonesArray(
"AliPicoTrack"));
387 AliFatal(Form(
"%s: Object with name %s already in event!", GetName(), Form(
"%s",
fTrackParticleArrayName.Data())));
395 AliFatal(Form(
"Importing jets for embedding failed! Array '%s' not found!",
fJetEmbeddingArrayName.Data()));
398 AliFatal(Form(
"fJetEmbeddingArrayName must be set in jet output mode 4 or 5."));
405 AliFatal(Form(
"Importing jets for veto failed! Array '%s' not found!",
fJetVetoArrayName.Data()));
446 appendix = Form(
"_%s", cutName);
497 AliVParticle* constituent =
static_cast<AliVParticle*
>(jet->
TrackAt(i,
fTracksCont->GetArray()));
501 Bool_t filterConditionFulfilled = kFALSE;
502 AliAODTrack* aodTrack =
static_cast<AliAODTrack*
>(constituent);
508 if(filterConditionFulfilled)
513 if(filterConditionFulfilled)
519 if(filterConditionFulfilled)
525 if(filterConditionFulfilled)
531 if(filterConditionFulfilled)
549 Double_t deltaPhi = TMath::Min(TMath::Abs(jet->
Phi()-refJet->
Phi()),TMath::TwoPi() - TMath::Abs(jet->
Phi()-refJet->
Phi()));
550 if(jet->
Phi() < refJet->
Phi())
551 deltaPhi = -deltaPhi;
553 Double_t deltaR = TMath::Sqrt(deltaEta*deltaEta + deltaPhi*deltaPhi);
557 FillHistogram(Form(
"hEmbeddingJetPt%s", appendix.Data()), refJet->
Pt());
558 FillHistogram(Form(
"hEmbeddingJetPhiEta%s", appendix.Data()), refJet->
Phi(), refJet->
Eta());
612 jetsAlreadyInArray++;
636 static Int_t numSavedEvents = 0;
640 AddHistogram2D<TH2D>(Form(
"Event%i", numSavedEvents),
"Event display",
"COLZ", 180, 0., 2*TMath::Pi(), 100, -2.5, 2.5,
"#phi",
"#eta",
"dN^{Tracks}/d#phi d#eta");
643 FillHistogram(Form(
"Event%i", numSavedEvents), track->Phi(), track->Eta(), track->Pt());
686 vetoJetPt = vetoJet->
Pt();
705 Int_t trackcount = 0;
713 tmpRandConePt += track->Pt();
714 if (track->Pt() > 3.0)
715 tmpRandConePt3GeV += track->Pt();
743 FillHistogram(
"hLeadingTrackPhiEta", leadTrack->Phi(), leadTrack->Eta());
757 AliError(
"fPythiaInfo object not available. Is it activated with SetGeneratePythiaInfoObject()?");
771 Double_t deltaR1 = TMath::Sqrt(deltaEta1*deltaEta1 + deltaPhi1*deltaPhi1);
772 Double_t deltaR2 = TMath::Sqrt(deltaEta2*deltaEta2 + deltaPhi2*deltaPhi2);
774 if(deltaR1 < bestMatchDeltaR1)
776 bestMatchDeltaR1 = deltaR1;
779 if(deltaR2 < bestMatchDeltaR2)
781 bestMatchDeltaR2 = deltaR2;
786 if(bestMatchDeltaR1 > 0.3)
788 if(bestMatchDeltaR2 > 0.3)
807 probeJet = jetLeading;
809 probeJet = jetSubLeading;
821 Double_t deltaEta = (embeddedJet->Eta()-probeJet->
Eta());
822 Double_t deltaPhi = TMath::Min(TMath::Abs(embeddedJet->Phi()-probeJet->
Phi()),TMath::TwoPi() - TMath::Abs(embeddedJet->Phi()-probeJet->
Phi()));
823 Double_t deltaR = TMath::Sqrt(deltaEta*deltaEta + deltaPhi*deltaPhi);
830 if(deltaR < bestMatchDeltaR)
832 bestMatchDeltaR = deltaR;
833 matchedJet = embeddedJet;
834 matchedJetReference = probeJet;
838 if(matchedJet && matchedJetReference)
850 Int_t tracksFromMC = 0;
851 Int_t tracksTotal = 0;
859 AliVParticle* constituent =
static_cast<AliVParticle*
>(jet->
TrackAt(j,
fTracksCont->GetArray()));
864 Bool_t foundInMC = kFALSE;
867 AliVParticle* mcConstituent =
static_cast<AliVParticle*
>(mcJet->
TrackAt(k, mcArray));
870 if(mcConstituent->GetLabel() == constituent->GetLabel())
880 ptFromMC += constituent->Pt();
883 ptTotal += constituent->Pt();
891 AliVParticle* constituent =
static_cast<AliVParticle*
>(jet->
TrackAt(j,
fTracksCont->GetArray()));
896 if(constituent->GetLabel() > 10000)
899 ptFromMC += constituent->Pt();
902 ptTotal += constituent->Pt();
909 trackRatio = tracksFromMC/((
Double_t)tracksTotal);
916 ptRatio = ptFromMC/ptTotal;
939 Double_t deltaPhi = TMath::Min(TMath::Abs(jet->
Phi()-vetoJet->
Phi()),TMath::TwoPi() - TMath::Abs(jet->
Phi()-vetoJet->
Phi()));
940 Double_t deltaR = TMath::Sqrt(deltaEta*deltaEta + deltaPhi*deltaPhi);
944 leadingVetoJetPt = vetoPt;
945 leadingVetoJet = vetoJet;
950 return leadingVetoJet;
971 if (vetoPt > leadingVetoJetPt)
973 leadingVetoJetPt = vetoPt;
974 leadingVetoJet = vetoJet;
978 return leadingVetoJet;
986 if (track->Phi() > (TMath::TwoPi() - (radius-phi)))
987 trackPhi = track->Phi() - TMath::TwoPi();
988 else if (track->Phi() < (phi+radius - TMath::TwoPi()))
989 trackPhi = track->Phi() + TMath::TwoPi();
991 trackPhi = track->Phi();
993 if ( TMath::Abs(trackPhi-phi)*TMath::Abs(trackPhi-phi) + TMath::Abs(track->Eta()-eta)*TMath::Abs(track->Eta()-eta) <= radius*radius)
1027 if (option.Contains(
"rho")) {
1031 jetSubLeading = jetLeading;
1033 tmpSubleadingPt = tmpLeadingPt;
1038 jetSubLeading = jet;
1045 if ( (jet->Pt()) > tmpLeadingPt )
1047 jetSubLeading = jetLeading;
1049 tmpSubleadingPt = tmpLeadingPt;
1050 tmpLeadingPt = jet->
Pt();
1052 else if ( (jet->Pt()) > tmpSubleadingPt )
1054 jetSubLeading = jet;
1055 tmpSubleadingPt = jet->
Pt();
1075 for(
Int_t i=0; i<arr->GetEntries(); i++)
1083 if (option.Contains(
"rho"))
1086 if ( jetPt > tmpLeadingPt )
1088 jetSubLeading = jetLeading;
1090 tmpSubleadingPt = tmpLeadingPt;
1091 tmpLeadingPt = jetPt;
1093 else if ( jetPt > tmpSubleadingPt )
1095 jetSubLeading = jet;
1096 tmpSubleadingPt = jetPt;
1107 TAxis *axis = h->GetAxis(axisNumber);
1108 int bins = axis->GetNbins();
1115 Double_t factor = pow(to/from, 1./bins);
1117 for (
int i = 1; i <= bins; i++) {
1118 newBins[i] = factor * newBins[i-1];
1120 axis->Set(bins, newBins);
1127 std::vector<AliEmcalJet*>::iterator matchedJetFindResult = std::find(
fMatchedJets.begin(),
fMatchedJets.end(), jet);
1130 AliError(
"Checked for a reference jet but it was not found. Check code.");
1145 AliError(Form(
"Cannot find histogram <%s> ",key)) ;
1158 AliError(Form(
"Cannot find histogram <%s> ",key));
1162 if (tmpHist->IsA()->GetBaseClass(
"TH1"))
1163 static_cast<TH1*>(tmpHist)->Fill(x,y);
1164 else if (tmpHist->IsA()->GetBaseClass(
"TH2"))
1165 static_cast<TH2*>(tmpHist)->Fill(x,y);
1174 AliError(Form(
"Cannot find histogram <%s> ",key));
1178 tmpHist->Fill(x,y,add);
1187 AliError(Form(
"Cannot find histogram <%s> ",key));
1192 tmpHist->Fill(x,y,z,add);
1194 tmpHist->Fill(x,y,z);
1201 T* tmpHist =
new T(name, title, xBins, xMin, xMax);
1203 tmpHist->GetXaxis()->SetTitle(xTitle);
1204 tmpHist->GetYaxis()->SetTitle(yTitle);
1205 tmpHist->SetOption(options);
1206 tmpHist->SetMarkerStyle(kFullCircle);
1215 template <
class T>
T*
AliAnalysisTaskChargedJetsHadronCF::AddHistogram2D(
const char* name,
const char*
title,
const char* options,
Int_t xBins,
Double_t xMin,
Double_t xMax,
Int_t yBins,
Double_t yMin,
Double_t yMax,
const char* xTitle,
const char* yTitle,
const char* zTitle)
1217 T* tmpHist =
new T(name, title, xBins, xMin, xMax, yBins, yMin, yMax);
1218 tmpHist->GetXaxis()->SetTitle(xTitle);
1219 tmpHist->GetYaxis()->SetTitle(yTitle);
1220 tmpHist->GetZaxis()->SetTitle(zTitle);
1221 tmpHist->SetOption(options);
1222 tmpHist->SetMarkerStyle(kFullCircle);
1231 template <
class T>
T*
AliAnalysisTaskChargedJetsHadronCF::AddHistogram3D(
const char* name,
const char*
title,
const char* options,
Int_t xBins,
Double_t xMin,
Double_t xMax,
Int_t yBins,
Double_t yMin,
Double_t yMax,
Int_t zBins,
Double_t zMin,
Double_t zMax,
const char* xTitle,
const char* yTitle,
const char* zTitle)
1233 T* tmpHist =
new T(name, title, xBins, xMin, xMax, yBins, yMin, yMax, zBins, zMin, zMax);
1234 tmpHist->GetXaxis()->SetTitle(xTitle);
1235 tmpHist->GetYaxis()->SetTitle(yTitle);
1236 tmpHist->GetZaxis()->SetTitle(zTitle);
1237 tmpHist->SetOption(options);
1238 tmpHist->SetMarkerStyle(kFullCircle);
Int_t fArrayIndex
array index that holds the output array index
virtual ~AliAnalysisTaskChargedJetsHadronCF()
Double_t fEventExtractionMaxJetPt
maximum jet pt of recorded events
Double_t GetRhoVal() const
void AddTrackToOutputArray(AliVTrack *track)
TString fCutName
name of this cut
Bool_t fJetVetoJetByJet
If true, the jet veto will be applied on a jet-by-jet basis.
Double_t GetJetEtaMin() const
T * AddHistogram1D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis")
void GetLeadingJets(const char *opt, AliEmcalJet *&jetLeading, AliEmcalJet *&jetSubLeading)
Float_t GetPartonEta6() const
AliEmcalPythiaInfo * fPythiaInfo
!event parton info
AliJetContainer * GetJetContainer(Int_t i=0) const
Float_t GetPartonEta7() const
std::vector< AliChargedJetsHadronCFCuts > fJetEmbeddingCuts
Cuts used in jet embedding.
void UserCreateOutputObjects()
AliEmcalJet * GetVetoJet(AliEmcalJet *jet)
Container with name, TClonesArray and cuts for particles.
Support task for (charged) jet-hadron correlations.
Double_t GetJetEtaMax() const
Float_t GetPartonPhi7() const
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
void BinLogAxis(const THn *h, Int_t axisNumber)
Int_t fJetOutputMode
mode which jets are written to array (0: all accepted, 1: leading, 2: subleading, 3: leading+subleadi...
Double_t fEventExtractionMinJetPt
minimum jet pt of recorded events
std::vector< AliEmcalJet * > fMatchedJetsReference
Jets matched in an event (reference)
Double_t fEventExtractionPercentage
percentage of events that is recorded
std::vector< TClonesArray * > fJetsOutput
! vector of arrays of basic correlation particles attached to the event (jets)
AliEmcalJet * fSubleadingJet
! subleading jet (calculated event-by-event)
void FillHistogram3D(const char *key, Double_t x, Double_t y, Double_t z, Double_t add=0)
Float_t GetPartonPhi6() const
Container class of cuts for AliAnalysisTaskChargedJetsHadronCF.
UShort_t GetNumberOfTracks() const
UShort_t T(UShort_t m, UShort_t t)
void CalculateEventProperties()
void GetLeadingJetsInArray(TClonesArray *arr, const char *opt, AliEmcalJet *&jetLeading, AliEmcalJet *&jetSubLeading)
TClonesArray * fJetEmbeddingArray
! Array of generated jets imported into task (for embedding)
AliParticleContainer * GetParticleContainer(Int_t i=0) const
void GetTrackMCRatios(AliEmcalJet *jet, AliEmcalJet *mcJet, Double_t &trackRatio, Double_t &ptRatio)
AliParticleContainer * GetParticleContainer() const
void FillHistogram(const char *key, Double_t x)
AliAnalysisTaskChargedJetsHadronCF()
Bool_t fJetEmbeddingCreatePtPlotPerCut
create TH3 per cut or only once
TString fJetParticleArrayName
Name of fJetsOutput array (if one uses only one)
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
T * AddHistogram3D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, Int_t yBins=100, Double_t yMin=0.0, Double_t yMax=20.0, Int_t zBins=100, Double_t zMin=0.0, Double_t zMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis", const char *zTitle="z axis")
TString fJetEmbeddingArrayName
Name of array used to match jets.
Int_t fNumberOfCentralityBins
Number of centrality bins.
virtual AliVParticle * GetLeadingParticle(const char *opt="")
std::vector< AliEmcalJet * > fMatchedJets
Jets matched in an event (embedded)
TString fJetEmbeddingTrackArrayName
Name of array used to match tracks of jets.
~AliChargedJetsHadronCFCuts()
Double_t fCent
!event centrality
TString fTrackParticleArrayName
Name of fTracksOutput array.
void Terminate(Option_t *option)
TClonesArray * fTracksOutput
! Array of basic correlation particles attached to the event (tracks)
AliEmcalJet * fLeadingJet
! leading jet (calculated event-by-event)
AliEmcalJet * GetNextAcceptJet()
void AddJetToOutputArray(AliEmcalJet *jet, Int_t arrayIndex, Int_t &jetsAlreadyInArray)
Bool_t IsTrackInCone(AliVParticle *track, Double_t eta, Double_t phi, Double_t radius)
Bool_t fJetEmbeddingUsePerTrackMCPercentage
When cutting on MC percentage, calculate it per track and not for all MC tracks.
Int_t fAcceptedJets
temporary var that holds how many jets passed
TString fJetVetoArrayName
Name of array used for veto jets.
Float_t GetJetRadius() const
AliEmcalList * fOutput
!output list
Int_t fJetEmbeddingNumMatchedJets
Number of matched leading jets that will be used.
Short_t TrackAt(Int_t idx) const
AliEmcalJet * fInitialPartonMatchedJet1
! On PYTHIA data and fJetOutputMode=6, this holds the PDG code of the initial collisions that was mat...
AliEmcalJet * fInitialPartonMatchedJet2
! On PYTHIA data and fJetOutputMode=6, this holds the PDG code of the initial collisions that was mat...
AliEmcalJet * GetReferenceJet(AliEmcalJet *jet)
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
TRandom3 * fRandom
random number generator
TH1 * fHistEventRejection
!book keep reasons for rejecting event
void SetMakeGeneralHistograms(Bool_t g)
Base task in the EMCAL jet framework.
Bool_t IsCutFulfilled(Double_t pt, Double_t mcPt, Double_t cent, Double_t ptRatio, Double_t vetoPt)
Represent a jet reconstructed using the EMCal jet framework.
Bool_t fJetEmbeddingUseBgrdForMCPercentage
When cutting on MC percentage, use bgrd. corr to calculate MC percentage.
Declaration of class AliEmcalPythiaInfo.
AliTrackContainer * fTracksCont
! Tracks
void UserCreateOutputObjects()
virtual AliVParticle * GetNextAcceptParticle()
Double_t fJetEmbeddingMaxDistance
Max distance allowed to accept an embedded jet.
void FillHistogramsJets(AliEmcalJet *jet, const char *cutName)
void GetInitialCollisionJets()
void FillHistogramsTracks(AliVTrack *track)
AliEmcalJet * GetLeadingVetoJet()
Int_t fAcceptedJets
! number accepted jets (calculated event-by-event)
AliJetContainer * fJetsCont
! Jets
T * AddHistogram2D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, Int_t yBins=100, Double_t yMin=0.0, Double_t yMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis", const char *zTitle="z axis")
TClonesArray * fJetVetoArray
! Array of jets imported into task used for veto a matching/embedding
Bool_t IsJetSelected(AliEmcalJet *jet)
Int_t fAcceptedTracks
! number accepted tracks (calculated event-by-event)
Int_t fConstPtFilterBit
For const pt plot, filter bit.