]>
Commit | Line | Data |
---|---|---|
12eb4ac1 | 1 | #ifndef ALIANALYSISTASKSE_H |
2 | #include <Riostream.h> | |
3 | #include <TROOT.h> | |
4 | #include <TFile.h> | |
271cbc5d | 5 | #include <TCint.h> |
12eb4ac1 | 6 | #include <TChain.h> |
7 | #include <TTree.h> | |
8 | #include <TKey.h> | |
9 | #include <TProfile.h> | |
b95d0245 | 10 | #include <TProfile2D.h> |
12eb4ac1 | 11 | #include <TH1F.h> |
12 | #include <TH2F.h> | |
13 | #include <TCanvas.h> | |
14 | #include <TList.h> | |
15 | #include <TClonesArray.h> | |
16 | #include <TObject.h> | |
17 | #include <TMath.h> | |
18 | #include <TSystem.h> | |
19 | #include <TInterpreter.h> | |
20 | #include <TH1.h> | |
21 | #include "AliAnalysisTask.h" | |
22 | #include "AliCentrality.h" | |
23 | #include "AliStack.h" | |
24 | #include "AliESDEvent.h" | |
25 | #include "AliESDInputHandler.h" | |
26 | #include "AliAODEvent.h" | |
27 | #include "AliAODHandler.h" | |
28 | #include "AliAnalysisManager.h" | |
29 | #include "AliAnalysisTaskSE.h" | |
30 | #endif | |
31 | ||
0cb49d99 | 32 | #include <time.h> |
12eb4ac1 | 33 | #include <TRandom3.h> |
34 | #include "AliGenPythiaEventHeader.h" | |
b95d0245 | 35 | #include "AliAODMCHeader.h" |
12eb4ac1 | 36 | #include "AliMCEvent.h" |
37 | #include "AliLog.h" | |
38 | #include <AliEmcalJet.h> | |
b95d0245 | 39 | #include <AliPicoTrack.h> |
12eb4ac1 | 40 | #include "AliVEventHandler.h" |
41 | #include "AliVParticle.h" | |
c2b0976c | 42 | #include "AliAODMCParticle.h" |
12eb4ac1 | 43 | #include "AliAnalysisUtils.h" |
06b41974 | 44 | #include "AliRhoParameter.h" |
ac9c07e9 | 45 | #include "TVector3.h" |
12eb4ac1 | 46 | |
8628b70c | 47 | #include "AliAnalysisTaskChargedJetsPA.h" |
dc3becdd | 48 | using std::min; |
c154ba90 | 49 | |
3fa9cde0 | 50 | //TODO: Not accessing the particles when using MC |
8628b70c | 51 | //TODO: FillHistogram can be done better with virtual TH1(?) |
52 | ClassImp(AliAnalysisTaskChargedJetsPA) | |
53 | ||
54 | // ######################################################################################## DEFINE HISTOGRAMS | |
55 | void AliAnalysisTaskChargedJetsPA::Init() | |
56 | { | |
57 | #ifdef DEBUGMODE | |
efb9b161 | 58 | AliInfo("Creating histograms."); |
8628b70c | 59 | #endif |
8628b70c | 60 | |
0cb49d99 | 61 | TH1D* tmpHisto = AddHistogram1D<TH1D>("hNumberEvents", "Number of events (0 = before cuts, 1 = after cuts)", "", 2, 0, 2, "stage","N^{Events}/cut"); |
62 | tmpHisto->GetXaxis()->SetBinLabel(1, "Before cuts"); | |
63 | tmpHisto->GetXaxis()->SetBinLabel(2, "After cuts"); | |
64 | ||
65 | tmpHisto = AddHistogram1D<TH1D>("hEventAcceptance", "Accepted events (0 = before cuts, 1 = after pile up, 2 = after vertex)", "", 3, 0, 3, "stage","N^{Events}/cut"); | |
66 | tmpHisto->GetXaxis()->SetBinLabel(1, "Before cuts"); | |
67 | tmpHisto->GetXaxis()->SetBinLabel(2, "After pile up"); | |
68 | tmpHisto->GetXaxis()->SetBinLabel(3, "After vertex"); | |
69 | ||
70 | tmpHisto = AddHistogram1D<TH1D>("hTrackAcceptance", "Accepted tracks (0 = before cuts, 1 = after eta, 2 = after pT)", "", 3, 0, 3, "stage","N^{Tracks}/cut"); | |
71 | tmpHisto->GetXaxis()->SetBinLabel(1, "Before cuts"); | |
72 | tmpHisto->GetXaxis()->SetBinLabel(2, "After eta"); | |
7e413f22 | 73 | tmpHisto->GetXaxis()->SetBinLabel(3, "After p_{T}"); |
0cb49d99 | 74 | |
75 | tmpHisto = AddHistogram1D<TH1D>("hJetAcceptance", "Accepted jets (0 = before cuts, 1 = after eta, 2 = after pT, 3 = after area)", "", 4, 0, 4, "stage","N^{Jets}/cut"); | |
76 | tmpHisto->GetXaxis()->SetBinLabel(1, "Before cuts"); | |
77 | tmpHisto->GetXaxis()->SetBinLabel(2, "After eta"); | |
7e413f22 | 78 | tmpHisto->GetXaxis()->SetBinLabel(3, "After p_{T}"); |
0cb49d99 | 79 | tmpHisto->GetXaxis()->SetBinLabel(4, "After area"); |
8628b70c | 80 | |
81 | // NOTE: Jet histograms | |
82 | if (fAnalyzeJets) | |
83 | { | |
84 | // ######## Jet spectra | |
c2b0976c | 85 | AddHistogram1D<TH1D>("hRawJetPt", "Raw jets p_{T} distribution (before cuts)", "", 500, 0., 250., "p_{T} (GeV/c)", "dN^{Jets}/dp_{T}"); |
b95d0245 | 86 | AddHistogram2D<TH2D>("hJetPt", "Jets p_{T} distribution", "", 500, -50., 200., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)","Centrality","dN^{Jets}/dp_{T}"); |
87 | AddHistogram2D<TH2D>("hJetPtBgrdSubtractedKTImprovedCMS", "Jets p_{T} distribution, KT background (Improved CMS) subtracted", "", 500, -50., 200., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)","Centrality","dN^{Jets}/dp_{T}"); | |
ac9c07e9 | 88 | AddHistogram2D<TH2D>("hJetPtBgrdSubtractedPP", "Jets p_{T} distribution, pp background subtracted", "", 500, -50., 200., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)","Centrality","dN^{Jets}/dp_{T}"); |
271cbc5d | 89 | AddHistogram2D<TH2D>("hJetPtBgrdSubtractedExternal", "Jets p_{T} distribution, external bgrd. subtracted", "", 500, -50., 200., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)","Centrality","dN^{Jets}/dp_{T}"); |
ac9c07e9 CL |
90 | |
91 | ||
088fbc16 | 92 | |
c2b0976c | 93 | AddHistogram2D<TProfile2D>("hJetPtSubtractedRhoKTImprovedCMS", "Mean subtracted KT (CMS w/o signal) background from jets", "COLZ", 600, 0, 150, fNumberOfCentralityBins, 0, 100, "Jet p_{T}", "Centrality", "#rho mean"); |
c2b0976c | 94 | |
b95d0245 | 95 | if(fAnalyzeDeprecatedBackgrounds) |
96 | { | |
97 | AddHistogram2D<TH2D>("hJetPtBgrdSubtractedTR", "Jets p_{T} distribution, TR background (Cone R=0.6 around jets excluded) subtracted", "", 500, -50., 200., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)","Centrality","dN^{Jets}/dp_{T}"); | |
b95d0245 | 98 | AddHistogram2D<TH2D>("hJetPtBgrdSubtractedKTPbPb", "Jets p_{T} distribution, KT background (PbPb w/o ghosts) subtracted", "", 500, -50., 200., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)","Centrality","dN^{Jets}/dp_{T}"); |
99 | AddHistogram2D<TH2D>("hJetPtBgrdSubtractedKTPbPbWithGhosts", "Jets p_{T} distribution, KT background (PbPb w/ ghosts) subtracted", "", 500, -50., 200., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)","Centrality","dN^{Jets}/dp_{T}"); | |
100 | AddHistogram2D<TH2D>("hJetPtBgrdSubtractedKTCMS", "Jets p_{T} distribution, KT background (CMS) subtracted", "", 500, -50., 200., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)","Centrality","dN^{Jets}/dp_{T}"); | |
101 | AddHistogram2D<TH2D>("hJetPtBgrdSubtractedKTMean", "Jets p_{T} distribution, KT background (Mean) subtracted", "", 500, -50., 200., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)","Centrality","dN^{Jets}/dp_{T}"); | |
102 | AddHistogram2D<TH2D>("hJetPtBgrdSubtractedKTTrackLike", "Jets p_{T} distribution, KT background (track-like) subtracted", "", 500, -50., 200., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)","Centrality","dN^{Jets}/dp_{T}"); | |
103 | } | |
088fbc16 | 104 | |
2a82f637 | 105 | // ######## Jet profiles |
106 | if(fAnalyzeJetProfile) | |
107 | { | |
108 | AddHistogram2D<TH2D>("hJetProfile10GeV", "Jet profile, cone p_{T}/jet p_{T} vs. jet radius, jet p_{T} > 10 GeV", "", 12, 0, 0.6,200, 0., 2., "Cone radius","dN^{Jets}/dR", "Ratio"); | |
109 | AddHistogram2D<TH2D>("hJetProfile20GeV", "Jet profile, cone p_{T}/jet p_{T} vs. jet radius, jet p_{T} > 20 GeV", "", 12, 0, 0.6,200, 0., 2., "Cone radius","dN^{Jets}/dR", "Ratio"); | |
110 | AddHistogram2D<TH2D>("hJetProfile30GeV", "Jet profile, cone p_{T}/jet p_{T} vs. jet radius, jet p_{T} > 30 GeV", "", 12, 0, 0.6,200, 0., 2., "Cone radius","dN^{Jets}/dR", "Ratio"); | |
111 | AddHistogram2D<TH2D>("hJetProfile40GeV", "Jet profile, cone p_{T}/jet p_{T} vs. jet radius, jet p_{T} > 40 GeV", "", 12, 0, 0.6,200, 0., 2., "Cone radius","dN^{Jets}/dR", "Ratio"); | |
112 | AddHistogram2D<TH2D>("hJetProfile50GeV", "Jet profile, cone p_{T}/jet p_{T} vs. jet radius, jet p_{T} > 50 GeV", "", 12, 0, 0.6,200, 0., 2., "Cone radius","dN^{Jets}/dR", "Ratio"); | |
113 | AddHistogram2D<TH2D>("hJetProfile60GeV", "Jet profile, cone p_{T}/jet p_{T} vs. jet radius, jet p_{T} > 60 GeV", "", 12, 0, 0.6,200, 0., 2., "Cone radius","dN^{Jets}/dR", "Ratio"); | |
114 | AddHistogram2D<TH2D>("hJetProfile70GeV", "Jet profile, cone p_{T}/jet p_{T} vs. jet radius, jet p_{T} > 70 GeV", "", 12, 0, 0.6,200, 0., 2., "Cone radius","dN^{Jets}/dR", "Ratio"); | |
115 | } | |
12eb4ac1 | 116 | // ######## Jet stuff |
392aa819 | 117 | AddHistogram2D<TH2D>("hJetConstituentPt", "Jet constituents p_{T} distribution", "", 500, -50., 200., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)","Centrality","dN^{Tracks}/dp_{T}"); |
8628b70c | 118 | AddHistogram1D<TH1D>("hJetCountAll", "Number of Jets", "", 200, 0., 200., "N jets","dN^{Events}/dN^{Jets}"); |
119 | AddHistogram1D<TH1D>("hJetCountAccepted", "Number of accepted Jets", "", 200, 0., 200., "N jets","dN^{Events}/dN^{Jets}"); | |
0cb49d99 | 120 | AddHistogram2D<TH2D>("hJetCount", "Correlation jets/accepted jets", "", 200, 0., 200., 200, 0., 200., "N jets","N jets accepted", "d^{2}N^{Events}/dN^{Jets dN^{Jets, acc}}"); |
121 | AddHistogram1D<TH1D>("hLeadingJetPt", "Leading jet p_{T}", "", 500, -50., 200., "p_{T} (GeV/c)","dN^{Jets}/dp_{T}"); | |
122 | AddHistogram1D<TH1D>("hSecondLeadingJetPt", "Second leading jet p_{T}", "", 500, -50., 200., "p_{T} (GeV/c)","dN^{Jets}/dp_{T}"); | |
123 | AddHistogram1D<TH1D>("hCorrectedLeadingJetPt", "Corrected leading jet p_{T}", "", 500, -50., 200., "p_{T} (GeV/c)","dN^{Jets}/dp_{T}"); | |
124 | AddHistogram1D<TH1D>("hCorrectedSecondLeadingJetPt", "Corrected second leading jet p_{T}", "", 500, -50., 200., "p_{T} (GeV/c)","dN^{Jets}/dp_{T}"); | |
12eb4ac1 | 125 | AddHistogram1D<TH1D>("hJetDeltaPhi", "Jets combinatorial #Delta #phi", "", 250, 0., TMath::Pi(), "#Delta #phi","dN^{Jets}/d(#Delta #phi)"); |
126 | AddHistogram1D<TH1D>("hLeadingJetDeltaPhi", "1st and 2nd leading jet #Delta #phi", "", 250, 0., TMath::Pi(), "#Delta #phi","dN^{Jets}/d(#Delta #phi)"); | |
088fbc16 | 127 | |
128 | // ########## Dijet stuff | |
129 | AddHistogram1D<TH1D>("hDijetLeadingJetPt", "Dijet leading jet p_{T} distribution", "", 500, 0., 100., "p_{T} (GeV/c)","dN^{Jets}/dp_{T}"); | |
130 | AddHistogram1D<TH1D>("hDijetConstituentsPt", "Dijet constituents p_{T} distribution", "", 500, 0., 100., "p_{T} (GeV/c)","dN^{Jets}/dp_{T}"); | |
131 | AddHistogram2D<TH2D>("hDijetPtCorrelation", "Dijet constituents p_{T} correlation", "COLZ", 500, 5., 100., 500, 5., 100., "1st leading jet p_{T} (GeV/c)","2nd leading jet p_{T} (GeV/c)","dN^{Dijets}/d^{2}p_{T}"); | |
8628b70c | 132 | } |
12eb4ac1 | 133 | |
8628b70c | 134 | // NOTE: Jet background histograms |
135 | if (fAnalyzeBackground) | |
136 | { | |
b95d0245 | 137 | // ########## Default background estimates |
138 | AddHistogram2D<TH2D>("hKTBackgroundImprovedCMS", "KT background density (Improved CMS approach)", "LEGO2", 400, 0., 40., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); | |
06b41974 | 139 | AddHistogram2D<TH2D>("hKTBackgroundImprovedCMSExternal", "KT background density (Improved CMS approach from external task)", "LEGO2", 400, 0., 40., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); |
8bb0422a | 140 | AddHistogram2D<TH2D>("hDeltaPtExternalBgrd", "Background fluctuations #delta p_{T} (KT, External)", "", 1201, -40.0, 40.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); |
b95d0245 | 141 | AddHistogram2D<TH2D>("hDeltaPtKTImprovedCMS", "Background fluctuations #delta p_{T} (KT, Improved CMS-like)", "", 1201, -40.0, 40.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); |
392aa819 | 142 | AddHistogram2D<TH2D>("hDeltaPtKTImprovedCMSPartialExclusion", "Background fluctuations #delta p_{T} (KT, Improved CMS-like, partial jet exclusion)", "", 1201, -40.0, 40.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); |
c2b0976c | 143 | AddHistogram2D<TH2D>("hDeltaPtKTImprovedCMSPartialExclusion_Signal", "Background fluctuations #delta p_{T} (KT, Improved CMS-like, partial jet exclusion w/ 1/N_{sig} probability)", "", 1201, -40.0, 40.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); |
144 | AddHistogram2D<TH2D>("hDeltaPtKTImprovedCMSFullExclusion", "Background fluctuations #delta p_{T} (KT, Improved CMS-like, full leading jet exclusion)", "", 1201, -40.0, 40.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); | |
0cb49d99 | 145 | AddHistogram2D<TH2D>("hDeltaPtNoBackground", "Background fluctuations #delta p_{T} (No background)", "", 1201, -40.0, 40.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); |
146 | AddHistogram2D<TH2D>("hDeltaPtNoBackgroundNoEmptyCones", "Background fluctuations #delta p_{T} (No background, no empty cones)", "", 1201, -40.0, 40.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); | |
b95d0245 | 147 | |
b95d0245 | 148 | AddHistogram1D<TProfile>("hKTMeanBackgroundImprovedCMS", "KT background mean (Improved CMS approach)", "", 100, 0, 100, "Centrality", "#rho mean"); |
149 | ||
150 | AddHistogram2D<TH2D>("hDijetBackground", "Background density (dijets excluded)", "", 200, 0., 20., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); | |
151 | AddHistogram2D<TH2D>("hDijetBackgroundPerpendicular", "Background density (dijets excluded)", "", 200, 0., 20., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); | |
ac9c07e9 | 152 | AddHistogram2D<TH2D>("hDijetBackgroundPerpendicularDeltaPt", "Background fluctuations #delta p_{T} (dijets excluded)", "", 1201, -80.0, 80.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); |
b95d0245 | 153 | |
154 | if(fAnalyzeDeprecatedBackgrounds) | |
155 | { | |
156 | // ########## Different background estimates | |
b95d0245 | 157 | AddHistogram2D<TH2D>("hKTBackgroundPbPb", "KT background density (PbPb approach, no ghosts)", "LEGO2", 400, 0., 40., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); |
158 | AddHistogram2D<TH2D>("hKTBackgroundPbPbWithGhosts", "KT background density (PbPb approach w/ ghosts)", "LEGO2", 400, 0., 40., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); | |
159 | AddHistogram2D<TH2D>("hKTBackgroundCMS", "KT background density (CMS approach)", "LEGO2", 400, 0., 40., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); | |
160 | AddHistogram2D<TH2D>("hKTBackgroundMean", "KT background density (Mean approach)", "LEGO2", 400, 0., 40., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); | |
161 | AddHistogram2D<TH2D>("hKTBackgroundTrackLike", "KT background density (Track-like approach)", "LEGO2", 400, 0., 40., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); | |
162 | ||
163 | AddHistogram2D<TH2D>("hTRBackgroundNoExcl", "TR background density (No signal excluded)", "LEGO2", 400, 0., 40., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); | |
164 | AddHistogram2D<TH2D>("hTRBackgroundCone02", "TR background density (Cones R=0.2 around signal jets excluded)", "LEGO2", 400, 0., 40., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); | |
165 | AddHistogram2D<TH2D>("hTRBackgroundCone04", "TR background density (Cones R=0.4 around signal jets excluded)", "LEGO2", 400, 0., 40., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); | |
166 | AddHistogram2D<TH2D>("hTRBackgroundCone06", "TR background density (Cones R=0.6 around signal jets excluded)", "LEGO2", 400, 0., 40., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); | |
167 | AddHistogram2D<TH2D>("hTRBackgroundCone08", "TR background density (Cones R=0.8 around signal jets excluded)", "LEGO2", 400, 0., 40., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); | |
168 | AddHistogram2D<TH2D>("hTRBackgroundExact", "TR background density (signal jets exactly excluded)", "LEGO2", 400, 0., 40., fNumberOfCentralityBins, 0, 100, "#rho (GeV/c)","Centrality", "dN^{Events}/d#rho"); | |
169 | ||
170 | // ########## Delta Pt | |
171 | AddHistogram2D<TH2D>("hDeltaPtKTPbPb", "Background fluctuations #delta p_{T} (KT, PbPb w/o ghosts)", "", 1201, -40.0, 40.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); | |
172 | AddHistogram2D<TH2D>("hDeltaPtKTPbPbWithGhosts", "Background fluctuations #delta p_{T} (KT, PbPb w/ ghosts)", "", 1201, -40.0, 40.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); | |
173 | AddHistogram2D<TH2D>("hDeltaPtKTCMS", "Background fluctuations #delta p_{T} (KT, CMS-like)", "", 1201, -40.0, 40.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); | |
174 | AddHistogram2D<TH2D>("hDeltaPtKTMean", "Background fluctuations #delta p_{T} (KT, Mean)", "", 1201, -40.0, 40.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); | |
175 | AddHistogram2D<TH2D>("hDeltaPtKTTrackLike", "Background fluctuations #delta p_{T} (KT, track-like)", "", 1201, -40.0, 40.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); | |
176 | AddHistogram2D<TH2D>("hDeltaPtTR", "Background fluctuations #delta p_{T} (TR, cone R=0.6)", "", 1201, -40.0, 40.0, fNumberOfCentralityBins, 0, 100, "#delta p_{T} (GeV/c)","Centrality","dN^{Jets}/d#delta p_{T}"); | |
b95d0245 | 177 | |
178 | // ########## Profiles for background means vs. centrality | |
392aa819 | 179 | AddHistogram1D<TProfile>("hKTMeanBackgroundPbPb", "KT background mean (PbPb approach w/o ghosts)", "", fNumberOfCentralityBins, 0, 100, "Centrality", "#rho mean"); |
180 | AddHistogram1D<TProfile>("hKTMeanBackgroundPbPbWithGhosts", "KT background mean (PbPb approach)", "", fNumberOfCentralityBins, 0, 100, "Centrality", "#rho mean"); | |
181 | AddHistogram1D<TProfile>("hKTMeanBackgroundCMS", "KT background mean (CMS approach)", "", fNumberOfCentralityBins, 0, 100, "Centrality", "#rho mean"); | |
182 | AddHistogram1D<TProfile>("hKTMeanBackgroundMean", "KT background mean (Mean approach)", "", fNumberOfCentralityBins, 0, 100, "Centrality", "#rho mean"); | |
183 | AddHistogram1D<TProfile>("hKTMeanBackgroundTPC", "KT background mean (Track-like approach)", "", fNumberOfCentralityBins, 0, 100, "Centrality", "#rho mean"); | |
184 | AddHistogram1D<TProfile>("hTRMeanBackground", "TR background mean", "", fNumberOfCentralityBins, 0, 100, "Centrality", "#rho mean"); | |
b95d0245 | 185 | } |
12eb4ac1 | 186 | } |
2a82f637 | 187 | // NOTE: Jet constituent correlations |
188 | if(fAnalyzeMassCorrelation) | |
189 | { | |
190 | AddHistogram1D<TH1D>("hJetMassFromConstituents", "Jet mass by mass of charged constituents", "", 200, 0., 200., "N jets","dN^{Jets}/dN^{mass}"); | |
191 | AddHistogram1D<TH1D>("hJetMass", "Jet mass from fastjet", "", 200, 0., 200., "N jets","dN^{Jets}/dN^{mass}"); | |
192 | ||
193 | AddHistogram2D<TH2D>("hJetPtVsMass", "Correlation jet pt/summed constituent jet", "", 400, 0., 100., 400, 0., 100., "p_{T}","Mass", "d^{2}N}/dN^{p_{T}dM"); | |
194 | AddHistogram2D<TH2D>("hJetPtVsJetMass", "Correlation jet pt/summed jet", "", 400, 0., 100., 400, 0., 100., "p_{T}","Mass", "d^{2}N}/dN^{p_{T}dM"); | |
195 | ||
196 | AddHistogram2D<TH2D>("hJetPtVsProtonCount", "Correlation jet pt/amount of proton in jet", "", 400, 0., 100., 20, 0., 1., "p_{T}","Proton percentage", "d^{2}N}/dN^{p_{T}dPercentage"); | |
197 | AddHistogram2D<TH2D>("hJetPtVsPionCount", "Correlation jet pt/amount of pion in jet", "", 400, 0., 100., 20, 0., 1., "p_{T}","Pion percentage", "d^{2}N}/dN^{p_{T}dPercentage"); | |
198 | AddHistogram2D<TH2D>("hJetPtVsKaonCount", "Correlation jet pt/amount of kaon in jet", "", 400, 0., 100., 20, 0., 1., "p_{T}","Kaon percentage", "d^{2}N}/dN^{p_{T}dPercentage"); | |
199 | AddHistogram2D<TH2D>("hJetPtVsElectronCount", "Correlation jet pt/amount of proton in jet", "", 400, 0., 100., 20, 0., 1., "p_{T}","Electron percentage", "d^{2}N}/dN^{p_{T}dPercentage"); | |
200 | AddHistogram2D<TH2D>("hJetPtVsOthersCount", "Correlation jet pt/amount of other particles in jet", "", 400, 0., 100., 20, 0., 1., "p_{T}","Others percentage", "d^{2}N}/dN^{p_{T}dPercentage"); | |
201 | AddHistogram1D<TH1D>("hJetConstituentProtonCount", "Proton count in jets", "", 100, 0., 100., "N protons","dN^{Jets}/dN^{protons}"); | |
202 | AddHistogram1D<TH1D>("hJetConstituentPionCount", "Pion count in jets", "", 100, 0., 100., "N pions","dN^{Jets}/dN^{pions}"); | |
203 | AddHistogram1D<TH1D>("hJetConstituentKaonCount", "Kaon count in jets", "", 100, 0., 100., "N kaons","dN^{Jets}/dN^{kaons}"); | |
204 | AddHistogram1D<TH1D>("hJetConstituentElectronCount", "Electron count in jets", "", 100, 0., 100., "N electrons","dN^{Jets}/dN^{electrons}"); | |
205 | AddHistogram1D<TH1D>("hJetConstituentOthersCount", "Others count in jets", "", 100, 0., 100., "N others","dN^{Jets}/dN^{others}"); | |
206 | ||
207 | AddHistogram2D<TH2D>("hJetPtVsMass_6_14", "Correlation jet pt/summed constituent jet", "", 400, 0., 100., 400, 0., 100., "p_{T}","Mass", "d^{2}N}/dN^{p_{T}dM"); | |
208 | AddHistogram2D<TH2D>("hJetPtVsJetMass_6_14", "Correlation jet pt/summed jet", "", 400, 0., 100., 400, 0., 100., "p_{T}","Mass", "d^{2}N}/dN^{p_{T}dM"); | |
209 | AddHistogram2D<TH2D>("hJetPtVsProtonCount_6_14", "Correlation jet pt/amount of proton in jet", "", 400, 0., 100., 8, 6., 14., "p_{T}","Proton count", "d^{2}N}/dN^{p_{T}dN"); | |
210 | AddHistogram2D<TH2D>("hJetPtVsPionCount_6_14", "Correlation jet pt/amount of pion in jet", "", 400, 0., 100., 8, 6., 14., "p_{T}","Pion count", "d^{2}N}/dN^{p_{T}dN"); | |
211 | AddHistogram2D<TH2D>("hJetPtVsKaonCount_6_14", "Correlation jet pt/amount of kaon in jet", "", 400, 0., 100., 8, 6., 14., "p_{T}","Kaon count", "d^{2}N}/dN^{p_{T}dN"); | |
212 | AddHistogram2D<TH2D>("hJetPtVsElectronCount_6_14", "Correlation jet pt/amount of proton in jet", "", 400, 0., 100., 8, 6., 14., "p_{T}","Electron count", "d^{2}N}/dN^{p_{T}dN"); | |
213 | AddHistogram2D<TH2D>("hJetPtVsOthersCount_6_14", "Correlation jet pt/amount of other particles in jet", "", 400, 0., 100., 8, 6., 14., "p_{T}","Others count", "d^{2}N}/dN^{p_{T}dN"); | |
214 | AddHistogram1D<TH1D>("hJetConstituentProtonCount_6_14", "Proton count in jets", "", 100, 0., 100., "N protons","dN^{Jets}/dN^{protons}"); | |
215 | AddHistogram1D<TH1D>("hJetConstituentPionCount_6_14", "Pion count in jets", "", 100, 0., 100., "N pions","dN^{Jets}/dN^{pions}"); | |
216 | AddHistogram1D<TH1D>("hJetConstituentKaonCount_6_14", "Kaon count in jets", "", 100, 0., 100., "N kaons","dN^{Jets}/dN^{kaons}"); | |
217 | AddHistogram1D<TH1D>("hJetConstituentElectronCount_6_14", "Electron count in jets", "", 100, 0., 100., "N electrons","dN^{Jets}/dN^{electrons}"); | |
218 | AddHistogram1D<TH1D>("hJetConstituentOthersCount_6_14", "Others count in jets", "", 100, 0., 100., "N others","dN^{Jets}/dN^{others}"); | |
219 | ||
220 | AddHistogram2D<TH2D>("hJetPtVsMass_2_X", "Correlation jet pt/summed constituent jet", "", 400, 0., 100., 400, 0., 100., "p_{T}","Mass", "d^{2}N}/dN^{p_{T}dM"); | |
221 | AddHistogram2D<TH2D>("hJetPtVsJetMass_2_X", "Correlation jet pt/summed jet", "", 400, 0., 100., 400, 0., 100., "p_{T}","Mass", "d^{2}N}/dN^{p_{T}dM"); | |
222 | AddHistogram2D<TH2D>("hJetPtVsProtonCount_2_X", "Correlation jet pt/amount of proton in jet", "", 400, 0., 100., 68, 2., 70., "p_{T}","Proton count", "d^{2}N}/dN^{p_{T}dN"); | |
223 | AddHistogram2D<TH2D>("hJetPtVsPionCount_2_X", "Correlation jet pt/amount of pion in jet", "", 400, 0., 100., 68, 2., 70., "p_{T}","Pion count", "d^{2}N}/dN^{p_{T}dN"); | |
224 | AddHistogram2D<TH2D>("hJetPtVsKaonCount_2_X", "Correlation jet pt/amount of kaon in jet", "", 400, 0., 100., 68, 2., 70., "p_{T}","Kaon count", "d^{2}N}/dN^{p_{T}dN"); | |
225 | AddHistogram2D<TH2D>("hJetPtVsElectronCount_2_X", "Correlation jet pt/amount of proton in jet", "", 400, 0., 100., 68, 2., 70., "p_{T}","Electron count", "d^{2}N}/dN^{p_{T}dN"); | |
226 | AddHistogram2D<TH2D>("hJetPtVsOthersCount_2_X", "Correlation jet pt/amount of other particles in jet", "", 400, 0., 100., 68, 2., 70., "p_{T}","Others count", "d^{2}N}/dN^{p_{T}dN"); | |
227 | AddHistogram1D<TH1D>("hJetConstituentProtonCount_2_X", "Proton count in jets", "", 100, 0., 100., "N protons","dN^{Jets}/dN^{protons}"); | |
228 | AddHistogram1D<TH1D>("hJetConstituentPionCount_2_X", "Pion count in jets", "", 100, 0., 100., "N pions","dN^{Jets}/dN^{pions}"); | |
229 | AddHistogram1D<TH1D>("hJetConstituentKaonCount_2_X", "Kaon count in jets", "", 100, 0., 100., "N kaons","dN^{Jets}/dN^{kaons}"); | |
230 | AddHistogram1D<TH1D>("hJetConstituentElectronCount_2_X", "Electron count in jets", "", 100, 0., 100., "N electrons","dN^{Jets}/dN^{electrons}"); | |
231 | AddHistogram1D<TH1D>("hJetConstituentOthersCount_2_X", "Others count in jets", "", 100, 0., 100., "N others","dN^{Jets}/dN^{others}"); | |
232 | ||
233 | AddHistogram2D<TH2D>("hJetPtVsMass_2_7", "Correlation jet pt/summed constituent jet", "", 400, 0., 100., 400, 0., 100., "p_{T}","Mass", "d^{2}N}/dN^{p_{T}dM"); | |
234 | AddHistogram2D<TH2D>("hJetPtVsJetMass_2_7", "Correlation jet pt/summed jet", "", 400, 0., 100., 400, 0., 100., "p_{T}","Mass", "d^{2}N}/dN^{p_{T}dM"); | |
235 | AddHistogram2D<TH2D>("hJetPtVsProtonCount_2_7", "Correlation jet pt/amount of proton in jet", "", 400, 0., 100., 6, 2., 8., "p_{T}","Proton count", "d^{2}N}/dN^{p_{T}dN"); | |
236 | AddHistogram2D<TH2D>("hJetPtVsPionCount_2_7", "Correlation jet pt/amount of pion in jet", "", 400, 0., 100., 6, 2., 8., "p_{T}","Pion count", "d^{2}N}/dN^{p_{T}dN"); | |
237 | AddHistogram2D<TH2D>("hJetPtVsKaonCount_2_7", "Correlation jet pt/amount of kaon in jet", "", 400, 0., 100., 6, 2., 8., "p_{T}","Kaon count", "d^{2}N}/dN^{p_{T}dN"); | |
238 | AddHistogram2D<TH2D>("hJetPtVsElectronCount_2_7", "Correlation jet pt/amount of proton in jet", "", 400, 0., 100., 6, 2., 8., "p_{T}","Electron count", "d^{2}N}/dN^{p_{T}dN"); | |
239 | AddHistogram2D<TH2D>("hJetPtVsOthersCount_2_7", "Correlation jet pt/amount of other particles in jet", "", 400, 0., 100., 6, 2., 8., "p_{T}","Others count", "d^{2}N}/dN^{p_{T}dN"); | |
240 | AddHistogram1D<TH1D>("hJetConstituentProtonCount_2_7", "Proton count in jets", "", 100, 0., 100., "N protons","dN^{Jets}/dN^{protons}"); | |
241 | AddHistogram1D<TH1D>("hJetConstituentPionCount_2_7", "Pion count in jets", "", 100, 0., 100., "N pions","dN^{Jets}/dN^{pions}"); | |
242 | AddHistogram1D<TH1D>("hJetConstituentKaonCount_2_7", "Kaon count in jets", "", 100, 0., 100., "N kaons","dN^{Jets}/dN^{kaons}"); | |
243 | AddHistogram1D<TH1D>("hJetConstituentElectronCount_2_7", "Electron count in jets", "", 100, 0., 100., "N electrons","dN^{Jets}/dN^{electrons}"); | |
244 | AddHistogram1D<TH1D>("hJetConstituentOthersCount_2_7", "Others count in jets", "", 100, 0., 100., "N others","dN^{Jets}/dN^{others}"); | |
8628b70c | 245 | |
2a82f637 | 246 | } |
b95d0245 | 247 | |
248 | // NOTE: Track & Cluster & QA histograms | |
249 | if (fAnalyzeQA) | |
250 | { | |
b95d0245 | 251 | AddHistogram1D<TH1D>("hVertexX", "X distribution of the vertex", "", 2000, -1., 1., "#Delta x(cm)","dN^{Events}/dx"); |
252 | AddHistogram1D<TH1D>("hVertexY", "Y distribution of the vertex", "", 2000, -1., 1., "#Delta y(cm)","dN^{Events}/dy"); | |
253 | AddHistogram2D<TH2D>("hVertexXY", "XY distribution of the vertex", "COLZ", 500, -1., 1., 500, -1., 1.,"#Delta x(cm)", "#Delta y(cm)","dN^{Events}/dxdy"); | |
2a82f637 | 254 | AddHistogram1D<TH1D>("hVertexZBeforeVertexCut", "Z distribution of the vertex (before std. vertex cut)", "", 200, -20., 20., "#Delta z(cm)","dN^{Events}/dz"); |
255 | AddHistogram1D<TH1D>("hVertexZAfterVertexCut", "Z distribution of the vertex (after std. vertex cut)", "", 200, -20., 20., "#Delta z(cm)","dN^{Events}/dz"); | |
b95d0245 | 256 | AddHistogram1D<TH1D>("hVertexR", "R distribution of the vertex", "", 100, 0., 1., "#Delta r(cm)","dN^{Events}/dr"); |
392aa819 | 257 | AddHistogram1D<TH1D>("hCentralityV0M", "Centrality distribution V0M", "", fNumberOfCentralityBins, 0., 100., "Centrality","dN^{Events}"); |
258 | AddHistogram1D<TH1D>("hCentralityV0A", "Centrality distribution V0A", "", fNumberOfCentralityBins, 0., 100., "Centrality","dN^{Events}"); | |
259 | AddHistogram1D<TH1D>("hCentralityV0C", "Centrality distribution V0C", "", fNumberOfCentralityBins, 0., 100., "Centrality","dN^{Events}"); | |
271cbc5d | 260 | AddHistogram1D<TH1D>("hCentralityZNA", "Centrality distribution ZNA", "", fNumberOfCentralityBins, 0., 100., "Centrality","dN^{Events}"); |
7e413f22 | 261 | AddHistogram1D<TH1D>("hCentrality", Form("Centrality distribution %s", fCentralityType.Data()), "", fNumberOfCentralityBins, 0., 100., "Centrality","dN^{Events}"); |
262 | ||
392aa819 | 263 | |
264 | AddHistogram2D<TH2D>("hTrackCountAcc", "Number of tracks in acceptance vs. centrality", "LEGO2", 750, 0., 750., fNumberOfCentralityBins, 0, 100, "N tracks","Centrality", "dN^{Events}/dN^{Tracks}"); | |
265 | AddHistogram2D<TH2D>("hTrackPt", "Tracks p_{T} distribution", "", 1000, 0., 250., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)", "Centrality", "dN^{Tracks}/dp_{T}"); | |
266 | AddHistogram2D<TH2D>("hTrackPtNegEta", "Tracks p_{T} distribution (negative #eta)", "", 1000, 0., 250., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)","Centrality","dN^{Tracks}/dp_{T}"); | |
267 | AddHistogram2D<TH2D>("hTrackPtPosEta", "Tracks p_{T} distribution (positive #eta)", "", 1000, 0., 250., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)","Centrality","dN^{Tracks}/dp_{T}"); | |
b95d0245 | 268 | AddHistogram1D<TH1D>("hTrackCharge", "Charge", "", 11, -5, 5, "Charge (e)","dN^{Tracks}/dq"); |
269 | AddHistogram1D<TH1D>("hTrackPhi", "Track #phi distribution", "", 360, 0, TMath::TwoPi(), "#phi","dN^{Tracks}/d#phi"); | |
270 | AddHistogram2D<TH2D>("hTrackPhiEta", "Track angular distribution", "LEGO2", 100, 0., 2*TMath::Pi(),100, -2.5, 2.5, "#phi","#eta","dN^{Tracks}/(d#phi d#eta)"); | |
271 | ||
392aa819 | 272 | AddHistogram2D<TH2D>("hTrackPhiPtCut", "Track #phi distribution for different pT cuts", "LEGO2", 360, 0, TMath::TwoPi(), 20, 0, 20, "#phi", "p_{T} lower cut", "dN^{Tracks}/d#phi dp_{T}"); |
0cb49d99 | 273 | AddHistogram2D<TH2D>("hTrackPhiTrackType", "Track #phi distribution for different track types", "LEGO2", 360, 0, TMath::TwoPi(), 3, 0, 3, "#phi", "Label", "dN^{Tracks}/d#phi"); |
7e413f22 | 274 | AddHistogram2D<TH2D>("hTrackEta", "Track #eta distribution", "COLZ", 180, -fTrackEtaWindow, +fTrackEtaWindow, fNumberOfCentralityBins, 0., 100., "#eta", "Centrality", "dN^{Tracks}/d#eta"); |
b95d0245 | 275 | if (fAnalyzeJets) |
276 | { | |
277 | // ######## Jet QA | |
0cb49d99 | 278 | AddHistogram1D<TH1D>("hRawJetArea", "Jets area distribution w/o area cut", "", 200, 0., 2., "Area","dN^{Jets}/dA"); |
b95d0245 | 279 | AddHistogram1D<TH1D>("hJetArea", "Jets area distribution", "", 200, 0., 2., "Area","dN^{Jets}/dA"); |
0cb49d99 | 280 | AddHistogram2D<TH2D>("hRawJetPhiEta", "Raw Jets angular distribution w/o #eta cut", "LEGO2", 360, 0., 2*TMath::Pi(),100, -1.0, 1.0, "#phi","#eta","dN^{Jets}/(d#phi d#eta)"); |
7e413f22 | 281 | AddHistogram2D<TH2D>("hJetEta", "Jets #eta distribution", "COLZ", 180, -fTrackEtaWindow, +fTrackEtaWindow, fNumberOfCentralityBins, 0., 100., "#eta", "Centrality", "dN^{Jets}/d#eta"); |
2a82f637 | 282 | AddHistogram2D<TH2D>("hJetEta2GeVTracks", "Jets #eta distribution, track p_{T} > 2 GeV", "COLZ", 180, -fTrackEtaWindow, +fTrackEtaWindow, fNumberOfCentralityBins, 0., 100., "#eta", "Centrality", "dN^{Jets}/d#eta"); |
283 | AddHistogram2D<TH2D>("hJetEta4GeVTracks", "Jets #eta distribution, track p_{T} > 4 GeV", "COLZ", 180, -fTrackEtaWindow, +fTrackEtaWindow, fNumberOfCentralityBins, 0., 100., "#eta", "Centrality", "dN^{Jets}/d#eta"); | |
0cb49d99 | 284 | AddHistogram2D<TH2D>("hJetPhiEta", "Jets angular distribution", "LEGO2", 360, 0., 2*TMath::Pi(),100, -1.0, 1.0, "#phi","#eta","dN^{Jets}/(d#phi d#eta)"); |
b95d0245 | 285 | AddHistogram2D<TH2D>("hJetPtVsConstituentCount", "Jets number of constituents vs. jet p_{T}", "COLZ", 400, 0., 200., 100, 0., 100., "p_{T}","N^{Tracks}","dN^{Jets}/(dp_{T} dN^{tracks})"); |
286 | } | |
287 | } | |
288 | ||
12eb4ac1 | 289 | // NOTE: Pythia histograms |
290 | if (fAnalyzePythia) | |
291 | { | |
292 | AddHistogram1D<TH1D>("hPythiaPtHard", "Pythia p_{T} hard distribution", "", 2000, 0, 400, "p_{T} hard","dN^{Events}/dp_{T,hard}"); | |
8628b70c | 293 | } |
294 | ||
8628b70c | 295 | // register Histograms |
296 | for (Int_t i = 0; i < fHistCount; i++) | |
297 | { | |
298 | fOutputList->Add(fHistList->At(i)); | |
299 | } | |
300 | ||
301 | PostData(1,fOutputList); // important for merging | |
302 | ||
303 | } | |
304 | ||
12eb4ac1 | 305 | //________________________________________________________________________ |
4bb1bca6 | 306 | AliAnalysisTaskChargedJetsPA::AliAnalysisTaskChargedJetsPA(const char *name, const char* trackArrayName, const char* jetArrayName, const char* backgroundJetArrayName) : AliAnalysisTaskSE(name), fOutputList(0), fAnalyzeJets(1), fAnalyzeJetProfile(1), fAnalyzeQA(1), fAnalyzeBackground(1), fAnalyzeDeprecatedBackgrounds(1), fAnalyzePythia(0), fAnalyzeMassCorrelation(0), fHasTracks(0), fHasJets(0), fHasBackgroundJets(0), fIsKinematics(0), fUseDefaultVertexCut(1), fUsePileUpCut(1), fSetCentralityToOne(0), fNoExternalBackground(0), fPartialAnalysisNParts(1), fPartialAnalysisIndex(0), fJetArray(0), fTrackArray(0), fBackgroundJetArray(0), fJetArrayName(0), fTrackArrayName(0), fBackgroundJetArrayName(0), fNumPtHardBins(11), fUsePtHardBin(-1), fRhoTaskName(), fNcoll(6.88348), fRandConeRadius(0.4), fSignalJetRadius(0.4), fBackgroundJetRadius(0.4), fTRBackgroundConeRadius(0.6), fNumberRandCones(8), fNumberExcludedJets(-1), fDijetMaxAngleDeviation(10.0), fPhysicalJetRadius(0.6), fSignalJetEtaWindow(0.5), fBackgroundJetEtaWindow(0.5), fTrackEtaWindow(0.9), fMinTrackPt(0.150), fMinJetPt(0.15), fMinJetArea(0.5), fMinBackgroundJetPt(0.0), fMinDijetLeadingPt(10.0), fNumberOfCentralityBins(20), fCentralityType("V0A"), fFirstLeadingJet(0), fSecondLeadingJet(0), fNumberSignalJets(0), fCrossSection(0.0), fTrials(0.0), fRandom(0), fHelperClass(0), fInitialized(0), fTaskInstanceCounter(0), fHistList(0), fHistCount(0), fIsDEBUG(0), fEventCounter(0) |
8628b70c | 307 | { |
308 | #ifdef DEBUGMODE | |
efb9b161 | 309 | AliInfo("Calling constructor."); |
8628b70c | 310 | #endif |
311 | ||
8628b70c | 312 | // Every instance of this task gets his own number |
313 | static Int_t instance = 0; | |
314 | fTaskInstanceCounter = instance; | |
315 | instance++; | |
316 | ||
317 | fTrackArrayName = new TString(trackArrayName); | |
4856f9c9 | 318 | if (fTrackArrayName->Contains("MCParticles") || fTrackArrayName->Contains("mcparticles")) |
06b41974 | 319 | fIsKinematics = kTRUE; |
8628b70c | 320 | |
321 | fJetArrayName = new TString(jetArrayName); | |
322 | if (strcmp(fJetArrayName->Data(),"") == 0) | |
2a82f637 | 323 | { |
8628b70c | 324 | fAnalyzeJets = kFALSE; |
2a82f637 | 325 | fAnalyzeJetProfile = kFALSE; |
326 | } | |
8628b70c | 327 | else |
328 | fAnalyzeJets = kTRUE; | |
329 | ||
330 | fBackgroundJetArrayName = new TString(backgroundJetArrayName); | |
331 | if (strcmp(fBackgroundJetArrayName->Data(),"") == 0) | |
332 | fAnalyzeBackground = kFALSE; | |
333 | else | |
334 | fAnalyzeBackground = kTRUE; | |
335 | ||
336 | DefineOutput(1, TList::Class()); | |
337 | ||
338 | fHistList = new TList(); | |
339 | ||
b95d0245 | 340 | for(Int_t i=0;i<1024;i++) |
341 | fSignalJets[i] = NULL; | |
342 | ||
392aa819 | 343 | |
8628b70c | 344 | #ifdef DEBUGMODE |
efb9b161 | 345 | AliInfo("Constructor done."); |
8628b70c | 346 | #endif |
347 | ||
348 | } | |
349 | ||
350 | //________________________________________________________________________ | |
351 | inline Double_t AliAnalysisTaskChargedJetsPA::GetConePt(Double_t eta, Double_t phi, Double_t radius) | |
352 | { | |
353 | Double_t tmpConePt = 0.0; | |
354 | ||
355 | for (Int_t i = 0; i < fTrackArray->GetEntries(); i++) | |
356 | { | |
357 | AliVTrack* tmpTrack = static_cast<AliVTrack*>(fTrackArray->At(i)); | |
358 | if (IsTrackInAcceptance(tmpTrack)) | |
359 | if(IsTrackInCone(tmpTrack, eta, phi, radius)) | |
360 | tmpConePt = tmpConePt + tmpTrack->Pt(); | |
361 | } | |
362 | return tmpConePt; | |
363 | } | |
364 | ||
271cbc5d | 365 | //________________________________________________________________________ |
366 | inline Double_t AliAnalysisTaskChargedJetsPA::GetCorrectedConePt(Double_t eta, Double_t phi, Double_t radius, Double_t background) | |
367 | { | |
368 | Double_t tmpConePt = 0.0; | |
369 | ||
370 | for (Int_t i = 0; i < fTrackArray->GetEntries(); i++) | |
371 | { | |
372 | AliVTrack* tmpTrack = static_cast<AliVTrack*>(fTrackArray->At(i)); | |
373 | if (IsTrackInAcceptance(tmpTrack)) | |
374 | if(IsTrackInCone(tmpTrack, eta, phi, radius)) | |
375 | tmpConePt = tmpConePt + tmpTrack->Pt(); | |
376 | } | |
377 | tmpConePt -= background*radius*radius*TMath::Pi(); // subtract background | |
378 | return tmpConePt; | |
379 | } | |
380 | ||
12eb4ac1 | 381 | |
8628b70c | 382 | //________________________________________________________________________ |
383 | inline Double_t AliAnalysisTaskChargedJetsPA::GetPtHard() | |
384 | { | |
392aa819 | 385 | #ifdef DEBUGMODE |
386 | AliInfo("Starting GetPtHard."); | |
387 | #endif | |
388 | AliGenPythiaEventHeader* pythiaHeader = dynamic_cast<AliGenPythiaEventHeader*>(MCEvent()->GenEventHeader()); | |
389 | if (MCEvent()) | |
390 | if (!pythiaHeader) | |
391 | { | |
392 | // Check if AOD | |
393 | AliAODMCHeader* aodMCH = dynamic_cast<AliAODMCHeader*>(InputEvent()->FindListObject(AliAODMCHeader::StdBranchName())); | |
8628b70c | 394 | |
392aa819 | 395 | if (aodMCH) |
396 | { | |
397 | for(UInt_t i = 0;i<aodMCH->GetNCocktailHeaders();i++) | |
398 | { | |
399 | pythiaHeader = dynamic_cast<AliGenPythiaEventHeader*>(aodMCH->GetCocktailHeader(i)); | |
400 | if (pythiaHeader) break; | |
401 | } | |
402 | } | |
403 | } | |
404 | ||
405 | #ifdef DEBUGMODE | |
406 | AliInfo("Ending GetPtHard."); | |
407 | #endif | |
408 | if (pythiaHeader) | |
409 | return pythiaHeader->GetPtHard(); | |
410 | ||
411 | AliWarning(Form("In task %s: GetPtHard() failed!", GetName())); | |
412 | return -1.0; | |
413 | } | |
414 | ||
415 | ||
416 | //________________________________________________________________________ | |
417 | inline Double_t AliAnalysisTaskChargedJetsPA::GetPythiaTrials() | |
418 | { | |
419 | #ifdef DEBUGMODE | |
420 | AliInfo("Starting GetPythiaTrials."); | |
421 | #endif | |
422 | AliGenPythiaEventHeader* pythiaHeader = dynamic_cast<AliGenPythiaEventHeader*>(MCEvent()->GenEventHeader()); | |
423 | if (MCEvent()) | |
8628b70c | 424 | if (!pythiaHeader) |
b95d0245 | 425 | { |
426 | // Check if AOD | |
427 | AliAODMCHeader* aodMCH = dynamic_cast<AliAODMCHeader*>(InputEvent()->FindListObject(AliAODMCHeader::StdBranchName())); | |
428 | ||
392aa819 | 429 | if (aodMCH) |
b95d0245 | 430 | { |
392aa819 | 431 | for(UInt_t i = 0;i<aodMCH->GetNCocktailHeaders();i++) |
432 | { | |
433 | pythiaHeader = dynamic_cast<AliGenPythiaEventHeader*>(aodMCH->GetCocktailHeader(i)); | |
434 | if (pythiaHeader) break; | |
435 | } | |
b95d0245 | 436 | } |
b95d0245 | 437 | } |
392aa819 | 438 | |
439 | #ifdef DEBUGMODE | |
440 | AliInfo("Ending GetPythiaTrials."); | |
441 | #endif | |
442 | if (pythiaHeader) | |
443 | return pythiaHeader->Trials(); | |
444 | ||
445 | AliWarning(Form("In task %s: GetPythiaTrials() failed!", GetName())); | |
446 | return -1.0; | |
8628b70c | 447 | } |
448 | ||
12eb4ac1 | 449 | |
392aa819 | 450 | |
8628b70c | 451 | //________________________________________________________________________ |
452 | inline Int_t AliAnalysisTaskChargedJetsPA::GetPtHardBin() | |
453 | { | |
392aa819 | 454 | #ifdef DEBUGMODE |
455 | AliInfo("Starting GetPtHardBin."); | |
456 | #endif | |
8628b70c | 457 | // ########## PT HARD BIN EDGES |
12eb4ac1 | 458 | const Int_t kPtHardLowerEdges[] = { 0, 5,11,21,36,57, 84,117,152,191,234}; |
459 | const Int_t kPtHardHigherEdges[] = { 5,11,21,36,57,84,117,152,191,234,1000000}; | |
8628b70c | 460 | |
461 | Int_t tmpPtHardBin = 0; | |
462 | Double_t tmpPtHard = GetPtHard(); | |
463 | ||
464 | for (tmpPtHardBin = 0; tmpPtHardBin <= fNumPtHardBins; tmpPtHardBin++) | |
12eb4ac1 | 465 | if (tmpPtHard >= kPtHardLowerEdges[tmpPtHardBin] && tmpPtHard < kPtHardHigherEdges[tmpPtHardBin]) |
8628b70c | 466 | break; |
467 | ||
392aa819 | 468 | #ifdef DEBUGMODE |
469 | AliInfo("Ending GetPtHardBin."); | |
470 | #endif | |
8628b70c | 471 | return tmpPtHardBin; |
472 | } | |
473 | ||
06b41974 | 474 | //________________________________________________________________________ |
475 | Double_t AliAnalysisTaskChargedJetsPA::GetExternalRho() | |
476 | { | |
477 | // Get rho from event. | |
478 | AliRhoParameter *rho = 0; | |
479 | if (!fRhoTaskName.IsNull()) { | |
480 | rho = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(fRhoTaskName.Data())); | |
481 | if (!rho) { | |
482 | AliWarning(Form("%s: Could not retrieve rho with name %s!", GetName(), fRhoTaskName.Data())); | |
483 | return 0; | |
484 | } | |
485 | } | |
486 | else | |
487 | return 0; | |
488 | ||
489 | return (rho->GetVal()); | |
490 | } | |
491 | ||
8628b70c | 492 | |
493 | //________________________________________________________________________ | |
494 | inline Bool_t AliAnalysisTaskChargedJetsPA::IsTrackInCone(AliVTrack* track, Double_t eta, Double_t phi, Double_t radius) | |
495 | { | |
496 | // This is to use a full cone in phi even at the edges of phi (2pi -> 0) (0 -> 2pi) | |
497 | Double_t trackPhi = 0.0; | |
498 | if (track->Phi() > (TMath::TwoPi() - (radius-phi))) | |
499 | trackPhi = track->Phi() - TMath::TwoPi(); | |
500 | else if (track->Phi() < (phi+radius - TMath::TwoPi())) | |
501 | trackPhi = track->Phi() + TMath::TwoPi(); | |
502 | else | |
503 | trackPhi = track->Phi(); | |
504 | ||
505 | if ( TMath::Abs(trackPhi-phi)*TMath::Abs(trackPhi-phi) + TMath::Abs(track->Eta()-eta)*TMath::Abs(track->Eta()-eta) <= radius*radius) | |
506 | return kTRUE; | |
507 | ||
508 | return kFALSE; | |
509 | } | |
510 | ||
b95d0245 | 511 | //________________________________________________________________________ |
512 | inline Bool_t AliAnalysisTaskChargedJetsPA::IsTrackInJet(AliEmcalJet* jet, Int_t trackIndex) | |
513 | { | |
514 | for (Int_t i = 0; i < jet->GetNumberOfTracks(); ++i) | |
515 | { | |
516 | Int_t jetTrack = jet->TrackAt(i); | |
517 | if (jetTrack == trackIndex) | |
518 | return kTRUE; | |
519 | } | |
520 | return kFALSE; | |
521 | } | |
522 | ||
523 | //________________________________________________________________________ | |
524 | inline Bool_t AliAnalysisTaskChargedJetsPA::IsJetOverlapping(AliEmcalJet* jet1, AliEmcalJet* jet2) | |
525 | { | |
526 | for (Int_t i = 0; i < jet1->GetNumberOfTracks(); ++i) | |
527 | { | |
528 | Int_t jet1Track = jet1->TrackAt(i); | |
529 | for (Int_t j = 0; j < jet2->GetNumberOfTracks(); ++j) | |
530 | { | |
531 | Int_t jet2Track = jet2->TrackAt(j); | |
532 | if (jet1Track == jet2Track) | |
533 | return kTRUE; | |
534 | } | |
535 | } | |
536 | return kFALSE; | |
537 | } | |
538 | ||
0cb49d99 | 539 | //________________________________________________________________________ |
540 | inline Bool_t AliAnalysisTaskChargedJetsPA::IsEventInAcceptance(AliVEvent* event) | |
541 | { | |
542 | if (!event) | |
543 | return kFALSE; | |
544 | ||
545 | FillHistogram("hEventAcceptance", 0.5); // number of events before manual cuts | |
c2b0976c | 546 | if(fUsePileUpCut) |
547 | if(fHelperClass->IsPileUpEvent(event)) | |
548 | return kFALSE; | |
0cb49d99 | 549 | |
c2b0976c | 550 | FillHistogram("hEventAcceptance", 1.5); // number of events after pileup cuts |
0cb49d99 | 551 | |
c2b0976c | 552 | if(fAnalyzeQA) |
2a82f637 | 553 | FillHistogram("hVertexZBeforeVertexCut",event->GetPrimaryVertex()->GetZ()); |
0cb49d99 | 554 | |
2a82f637 | 555 | if(fUseDefaultVertexCut) |
556 | { | |
c2b0976c | 557 | if(!fHelperClass->IsVertexSelected2013pA(event)) |
558 | return kFALSE; | |
2a82f637 | 559 | } |
560 | else // Failsafe vertex cut | |
561 | { | |
562 | if(TMath::Abs(event->GetPrimaryVertex()->GetZ()) > 10.0) | |
563 | return kFALSE; | |
564 | } | |
565 | ||
566 | if(fAnalyzeQA) | |
567 | FillHistogram("hVertexZAfterVertexCut",event->GetPrimaryVertex()->GetZ()); | |
568 | ||
c2b0976c | 569 | FillHistogram("hEventAcceptance", 2.5); // number of events after vertex cut |
0cb49d99 | 570 | |
571 | return kTRUE; | |
572 | } | |
573 | ||
574 | //________________________________________________________________________ | |
575 | inline Bool_t AliAnalysisTaskChargedJetsPA::IsTrackInAcceptance(AliVParticle* track) | |
576 | { | |
577 | FillHistogram("hTrackAcceptance", 0.5); | |
578 | if (track != 0) | |
c2b0976c | 579 | { |
580 | if(fIsKinematics) | |
581 | { | |
582 | // TODO: Only working for AOD MC | |
583 | if((!track->Charge()) || (!(static_cast<AliAODMCParticle*>(track))->IsPhysicalPrimary()) ) | |
584 | return kFALSE; | |
585 | } | |
0cb49d99 | 586 | if (TMath::Abs(track->Eta()) <= fTrackEtaWindow) |
587 | { | |
588 | FillHistogram("hTrackAcceptance", 1.5); | |
589 | if (track->Pt() >= fMinTrackPt) | |
590 | { | |
591 | FillHistogram("hTrackAcceptance", 2.5); | |
592 | return kTRUE; | |
593 | } | |
594 | } | |
c2b0976c | 595 | } |
0cb49d99 | 596 | return kFALSE; |
597 | } | |
b95d0245 | 598 | |
8628b70c | 599 | //________________________________________________________________________ |
600 | inline Bool_t AliAnalysisTaskChargedJetsPA::IsBackgroundJetInAcceptance(AliEmcalJet *jet) | |
601 | { | |
602 | if (jet != 0) | |
603 | if (TMath::Abs(jet->Eta()) <= fBackgroundJetEtaWindow) | |
604 | if (jet->Pt() >= fMinBackgroundJetPt) | |
605 | return kTRUE; | |
606 | ||
607 | return kFALSE; | |
608 | } | |
609 | ||
610 | //________________________________________________________________________ | |
611 | inline Bool_t AliAnalysisTaskChargedJetsPA::IsSignalJetInAcceptance(AliEmcalJet *jet) | |
612 | { | |
0cb49d99 | 613 | FillHistogram("hJetAcceptance", 0.5); |
8628b70c | 614 | if (jet != 0) |
615 | if (TMath::Abs(jet->Eta()) <= fSignalJetEtaWindow) | |
0cb49d99 | 616 | { |
617 | FillHistogram("hJetAcceptance", 1.5); | |
8628b70c | 618 | if (jet->Pt() >= fMinJetPt) |
0cb49d99 | 619 | { |
620 | FillHistogram("hJetAcceptance", 2.5); | |
8628b70c | 621 | if (jet->Area() >= fMinJetArea) |
0cb49d99 | 622 | { |
623 | FillHistogram("hJetAcceptance", 3.5); | |
8628b70c | 624 | return kTRUE; |
0cb49d99 | 625 | } |
626 | } | |
627 | } | |
8628b70c | 628 | return kFALSE; |
629 | } | |
630 | ||
631 | //________________________________________________________________________ | |
632 | inline Bool_t AliAnalysisTaskChargedJetsPA::IsDijet(AliEmcalJet *jet1, AliEmcalJet *jet2) | |
633 | { | |
634 | // Output from GetDeltaPhi is < pi in any case | |
635 | if ((jet1 != 0) && (jet2 != 0)) | |
636 | if((TMath::Pi() - GetDeltaPhi(jet1->Phi(),jet2->Phi())) < fDijetMaxAngleDeviation) | |
637 | if ((jet1->Pt() > fMinDijetLeadingPt) && (jet2->Pt() > fMinDijetLeadingPt)) //TODO: Introduce recoil jet? | |
638 | return kTRUE; | |
639 | ||
640 | return kFALSE; | |
641 | } | |
642 | ||
643 | //________________________________________________________________________ | |
644 | void AliAnalysisTaskChargedJetsPA::ExecOnce() | |
645 | { | |
646 | #ifdef DEBUGMODE | |
efb9b161 | 647 | AliInfo("Starting ExecOnce."); |
8628b70c | 648 | #endif |
649 | fInitialized = kTRUE; | |
650 | ||
651 | // Check for track array | |
652 | if (strcmp(fTrackArrayName->Data(), "") != 0) | |
653 | { | |
654 | fTrackArray = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject(fTrackArrayName->Data())); | |
655 | fHasTracks = kTRUE; | |
656 | if (!fTrackArray) | |
657 | { | |
0983dd5b | 658 | AliWarning(Form("%s: Could not retrieve tracks %s! This is OK, if tracks are not demanded.", GetName(), fTrackArrayName->Data())); |
8628b70c | 659 | fHasTracks = kFALSE; |
660 | } | |
661 | else | |
662 | { | |
663 | TClass *cl = fTrackArray->GetClass(); | |
664 | if (!cl->GetBaseClass("AliVParticle")) | |
665 | { | |
666 | AliError(Form("%s: Collection %s does not contain AliVParticle objects!", GetName(), fTrackArrayName->Data())); | |
667 | fTrackArray = 0; | |
668 | fHasTracks = kFALSE; | |
669 | } | |
670 | } | |
671 | } | |
8628b70c | 672 | |
673 | // Check for jet array | |
674 | if (strcmp(fJetArrayName->Data(), "") != 0) | |
675 | { | |
676 | fJetArray = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject(fJetArrayName->Data())); | |
677 | fHasJets = kTRUE; | |
678 | ||
679 | if (!fJetArray) | |
680 | { | |
0983dd5b | 681 | AliWarning(Form("%s: Could not retrieve jets %s! This is OK, if jets are not demanded.", GetName(), fJetArrayName->Data())); |
8628b70c | 682 | fHasJets = kFALSE; |
683 | } | |
684 | else | |
685 | { | |
686 | if (!fJetArray->GetClass()->GetBaseClass("AliEmcalJet")) | |
687 | { | |
688 | AliError(Form("%s: Collection %s does not contain AliEmcalJet objects!", GetName(), fJetArrayName->Data())); | |
689 | fJetArray = 0; | |
690 | fHasJets = kFALSE; | |
691 | } | |
692 | } | |
693 | } | |
694 | ||
695 | // Check for background object | |
696 | if (strcmp(fBackgroundJetArrayName->Data(), "") != 0) | |
697 | { | |
698 | fBackgroundJetArray = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject(fBackgroundJetArrayName->Data())); | |
699 | fHasBackgroundJets = kTRUE; | |
700 | if (!fBackgroundJetArray) | |
701 | { | |
702 | AliInfo(Form("%s: Could not retrieve background jets %s! This is OK, if background is not demanded.", GetName(), fBackgroundJetArrayName->Data())); | |
703 | fHasBackgroundJets = kFALSE; | |
704 | } | |
705 | } | |
706 | ||
707 | // Look, if initialization is OK | |
12eb4ac1 | 708 | if (!fHasTracks && fAnalyzeBackground) |
8628b70c | 709 | { |
12eb4ac1 | 710 | AliError(Form("%s: Tracks NOT successfully casted although demanded! Deactivating background analysis",GetName())); |
8628b70c | 711 | fAnalyzeBackground = kFALSE; |
712 | } | |
713 | if ((!fHasJets && fAnalyzeJets) || (!fHasJets && fAnalyzeBackground)) | |
714 | { | |
715 | AliError(Form("%s: Jets NOT successfully casted although demanded! Deactivating jet- and background analysis",GetName())); | |
716 | fAnalyzeJets = kFALSE; | |
717 | fAnalyzeBackground = kFALSE; | |
718 | } | |
719 | if (!fHasBackgroundJets && fAnalyzeBackground) | |
720 | { | |
721 | AliError(Form("%s: Background NOT successfully casted although demanded! Deactivating background analysis",GetName())); | |
722 | fAnalyzeBackground = kFALSE; | |
723 | } | |
724 | ||
06b41974 | 725 | // Initialize helper class (for vertex selection & pile up correction) |
3fa9cde0 | 726 | fHelperClass = new AliAnalysisUtils(); |
06b41974 | 727 | fHelperClass->SetCutOnZVertexSPD(kFALSE); |
8628b70c | 728 | // Histogram init |
729 | Init(); | |
730 | ||
731 | #ifdef DEBUGMODE | |
efb9b161 | 732 | AliInfo("ExecOnce done."); |
8628b70c | 733 | #endif |
734 | ||
735 | } | |
736 | ||
737 | //________________________________________________________________________ | |
738 | void AliAnalysisTaskChargedJetsPA::GetSignalJets() | |
739 | { | |
740 | // Reset vars | |
741 | fFirstLeadingJet = NULL; | |
742 | fSecondLeadingJet = NULL; | |
743 | fNumberSignalJets = 0; | |
744 | ||
b95d0245 | 745 | TList tmpJets; |
746 | for (Int_t i = 0; i < fJetArray->GetEntries(); i++) | |
8628b70c | 747 | { |
748 | AliEmcalJet* jet = static_cast<AliEmcalJet*>(fJetArray->At(i)); | |
749 | if (!jet) | |
750 | { | |
751 | AliError(Form("%s: Could not receive jet %d", GetName(), i)); | |
752 | continue; | |
753 | } | |
b95d0245 | 754 | if (!IsSignalJetInAcceptance(jet)) |
755 | continue; | |
8628b70c | 756 | |
b95d0245 | 757 | for (Int_t j = 0; j <= tmpJets.GetEntries(); j++) |
8628b70c | 758 | { |
b95d0245 | 759 | if (j>tmpJets.GetEntries()-1) // When passed last item add the jet at the end |
760 | { | |
761 | tmpJets.Add(jet); | |
762 | break; | |
763 | } | |
764 | ||
765 | AliEmcalJet* listJet = static_cast<AliEmcalJet*>(tmpJets.At(j)); | |
766 | ||
767 | if(jet->Pt() < listJet->Pt()) // Insert jet before that one in list if pt smaller | |
768 | { | |
769 | tmpJets.AddAt(jet, j); | |
770 | break; | |
771 | } | |
8628b70c | 772 | } |
b95d0245 | 773 | } |
774 | ||
775 | for (Int_t i = 0; i < tmpJets.GetEntries(); i++) | |
776 | { | |
777 | AliEmcalJet* jet = static_cast<AliEmcalJet*>(tmpJets.At(i)); | |
8628b70c | 778 | fSignalJets[fNumberSignalJets] = jet; |
779 | fNumberSignalJets++; | |
780 | } | |
781 | ||
782 | if (fNumberSignalJets > 0) | |
b95d0245 | 783 | fFirstLeadingJet = static_cast<AliEmcalJet*>(tmpJets.At(0)); |
8628b70c | 784 | if (fNumberSignalJets > 1) |
b95d0245 | 785 | fSecondLeadingJet = static_cast<AliEmcalJet*>(tmpJets.At(1)); |
8628b70c | 786 | |
787 | } | |
788 | ||
789 | //________________________________________________________________________ | |
790 | Int_t AliAnalysisTaskChargedJetsPA::GetLeadingJets(TClonesArray* jetArray, Int_t* jetIDArray, Bool_t isSignalJets) | |
791 | { | |
792 | // Writes first two leading jets into already registered array jetIDArray | |
793 | ||
794 | if (!jetArray) | |
795 | { | |
796 | AliError("Could not get the jet array to get leading jets from it!"); | |
797 | return 0; | |
798 | } | |
799 | ||
800 | Float_t maxJetPts[] = {0, 0}; | |
801 | jetIDArray[0] = -1; | |
802 | jetIDArray[1] = -1; | |
803 | ||
804 | Int_t jetCount = jetArray->GetEntries(); | |
805 | Int_t jetCountAccepted = 0; | |
806 | ||
807 | for (Int_t i = 0; i < jetCount; i++) | |
808 | { | |
809 | AliEmcalJet* jet = static_cast<AliEmcalJet*>(jetArray->At(i)); | |
810 | if (!jet) | |
811 | { | |
812 | AliError(Form("%s: Could not receive jet %d", GetName(), i)); | |
813 | continue; | |
814 | } | |
815 | ||
816 | if(isSignalJets) | |
817 | { | |
818 | if (!IsSignalJetInAcceptance(jet)) continue; | |
819 | } | |
820 | else | |
821 | { | |
822 | if (!IsBackgroundJetInAcceptance(jet)) continue; | |
823 | } | |
824 | ||
825 | if (jet->Pt() > maxJetPts[0]) | |
826 | { | |
827 | maxJetPts[1] = maxJetPts[0]; | |
828 | jetIDArray[1] = jetIDArray[0]; | |
829 | maxJetPts[0] = jet->Pt(); | |
830 | jetIDArray[0] = i; | |
831 | } | |
832 | else if (jet->Pt() > maxJetPts[1]) | |
833 | { | |
834 | maxJetPts[1] = jet->Pt(); | |
835 | jetIDArray[1] = i; | |
836 | } | |
837 | jetCountAccepted++; | |
838 | } | |
839 | return jetCountAccepted; | |
840 | } | |
12eb4ac1 | 841 | |
12eb4ac1 | 842 | |
843 | //________________________________________________________________________ | |
e8df4140 | 844 | Double_t AliAnalysisTaskChargedJetsPA::GetCorrectedJetPt(AliEmcalJet* jet, Double_t background) |
8628b70c | 845 | { |
846 | #ifdef DEBUGMODE | |
efb9b161 | 847 | AliInfo("Getting corrected jet spectra."); |
8628b70c | 848 | #endif |
849 | ||
850 | if(!jet) | |
851 | { | |
392aa819 | 852 | AliError("Jet pointer passed to GetCorrectedJetPt() not valid!"); |
8628b70c | 853 | return -1.0; |
854 | } | |
855 | ||
856 | Double_t correctedPt = -1.0; | |
857 | ||
0983dd5b | 858 | // if the passed background is not valid, do not subtract it |
859 | if(background < 0) | |
860 | background = 0; | |
8628b70c | 861 | |
8628b70c | 862 | // Subtract background |
e8df4140 | 863 | correctedPt = jet->Pt() - background * jet->Area(); |
8628b70c | 864 | |
865 | #ifdef DEBUGMODE | |
efb9b161 | 866 | AliInfo("Got corrected jet spectra."); |
8628b70c | 867 | #endif |
868 | ||
869 | return correctedPt; | |
870 | } | |
871 | ||
872 | ||
12eb4ac1 | 873 | |
8628b70c | 874 | //________________________________________________________________________ |
c2b0976c | 875 | Double_t AliAnalysisTaskChargedJetsPA::GetDeltaPt(Double_t rho, Double_t leadingJetExclusionProbability) |
8628b70c | 876 | { |
877 | #ifdef DEBUGMODE | |
efb9b161 | 878 | AliInfo("Getting Delta Pt."); |
8628b70c | 879 | #endif |
880 | ||
12eb4ac1 | 881 | // Define an invalid delta pt |
0cb49d99 | 882 | Double_t deltaPt = -10000.0; |
8628b70c | 883 | |
12eb4ac1 | 884 | // Define eta range |
8628b70c | 885 | Double_t etaMin, etaMax; |
12eb4ac1 | 886 | etaMin = -(fTrackEtaWindow-fRandConeRadius); |
887 | etaMax = +(fTrackEtaWindow-fRandConeRadius); | |
8628b70c | 888 | |
12eb4ac1 | 889 | // Define random cone |
890 | Bool_t coneValid = kTRUE; | |
0983dd5b | 891 | Double_t tmpRandConeEta = etaMin + fRandom->Rndm()*(etaMax-etaMin); |
892 | Double_t tmpRandConePhi = fRandom->Rndm()*TMath::TwoPi(); | |
8628b70c | 893 | |
12eb4ac1 | 894 | // if there is a jet, check for overlap if demanded |
c2b0976c | 895 | if(leadingJetExclusionProbability) |
8628b70c | 896 | { |
392aa819 | 897 | AliEmcalJet* tmpLeading = dynamic_cast<AliEmcalJet*>(fJetArray->At(0)); |
898 | // Get leading jet (regardless of pT) | |
899 | for (Int_t i = 1; i<fJetArray->GetEntries(); i++) | |
8628b70c | 900 | { |
392aa819 | 901 | AliEmcalJet* tmpJet = static_cast<AliEmcalJet*>(fJetArray->At(i)); |
902 | // if jet is in acceptance and higher, take as new leading | |
903 | if (tmpJet) | |
904 | if ((TMath::Abs(tmpJet->Eta()) <= fSignalJetEtaWindow) && (tmpJet->Area() >= fMinJetArea)) | |
905 | if((!tmpLeading) || (tmpJet->Pt() > tmpLeading->Pt())) | |
906 | tmpLeading = tmpJet; | |
907 | } | |
0cb49d99 | 908 | if(tmpLeading) |
392aa819 | 909 | { |
0cb49d99 | 910 | Double_t excludedJetPhi = tmpLeading->Phi(); |
911 | Double_t excludedJetEta = tmpLeading->Eta(); | |
912 | Double_t tmpDeltaPhi = GetDeltaPhi(tmpRandConePhi, excludedJetPhi); | |
e8df4140 | 913 | |
0cb49d99 | 914 | // Check, if cone has overlap with jet |
915 | if ( tmpDeltaPhi*tmpDeltaPhi + TMath::Abs(tmpRandConeEta-excludedJetEta)*TMath::Abs(tmpRandConeEta-excludedJetEta) <= fRandConeRadius*fRandConeRadius) | |
916 | { | |
917 | // Define probability to exclude the RC | |
c2b0976c | 918 | Double_t probability = leadingJetExclusionProbability; |
0cb49d99 | 919 | |
920 | // Only exclude cone with a given probability | |
921 | if (fRandom->Rndm()<=probability) | |
922 | coneValid = kFALSE; | |
923 | } | |
8628b70c | 924 | } |
925 | } | |
926 | ||
392aa819 | 927 | |
8628b70c | 928 | // Get the cones' pt and calculate delta pt |
929 | if (coneValid) | |
930 | deltaPt = GetConePt(tmpRandConeEta,tmpRandConePhi,fRandConeRadius) - (rho*fRandConeRadius*fRandConeRadius*TMath::Pi()); | |
12eb4ac1 | 931 | |
0cb49d99 | 932 | return deltaPt; |
8628b70c | 933 | #ifdef DEBUGMODE |
efb9b161 | 934 | AliInfo("Got Delta Pt."); |
8628b70c | 935 | #endif |
936 | } | |
937 | ||
938 | //________________________________________________________________________ | |
0cb49d99 | 939 | void AliAnalysisTaskChargedJetsPA::GetKTBackgroundDensityAll(Int_t numberExcludeLeadingJets, Double_t& rhoPbPb, Double_t& rhoPbPbWithGhosts, Double_t& rhoCMS, Double_t& rhoImprovedCMS, Double_t& rhoMean, Double_t& rhoTrackLike) |
8628b70c | 940 | { |
941 | #ifdef DEBUGMODE | |
0cb49d99 | 942 | AliInfo("Getting ALL KT background density."); |
8628b70c | 943 | #endif |
944 | ||
b95d0245 | 945 | static Double_t tmpRhoPbPb[1024]; |
946 | static Double_t tmpRhoPbPbWithGhosts[1024]; | |
947 | static Double_t tmpRhoMean[1024]; | |
948 | static Double_t tmpRhoCMS[1024]; | |
949 | static Double_t tmpRhoImprovedCMS[1024]; | |
950 | Double_t tmpCoveredArea = 0.0; | |
951 | Double_t tmpSummedArea = 0.0; | |
952 | Double_t tmpPtTrackLike = 0.0; | |
953 | Double_t tmpAreaTrackLike = 0.0; | |
8628b70c | 954 | |
955 | // Setting invalid values | |
b95d0245 | 956 | rhoPbPb = 0.0; |
957 | rhoPbPbWithGhosts = 0.0; | |
958 | rhoCMS = 0.0; | |
959 | rhoImprovedCMS = 0.0; | |
960 | rhoMean = 0.0; | |
961 | rhoTrackLike = 0.0; | |
8628b70c | 962 | |
b95d0245 | 963 | Int_t rhoPbPbJetCount = 0; |
964 | Int_t rhoPbPbWithGhostsJetCount = 0; | |
965 | Int_t rhoCMSJetCount = 0; | |
966 | Int_t rhoImprovedCMSJetCount = 0; | |
967 | Int_t rhoMeanJetCount = 0; | |
e8df4140 | 968 | |
e8df4140 | 969 | |
b95d0245 | 970 | // Find 2 leading KT jets for the original PbPb approach |
971 | Int_t leadingKTJets[] = {-1, -1}; | |
972 | GetLeadingJets(fBackgroundJetArray, &leadingKTJets[0], kFALSE); | |
973 | ||
974 | // Exclude UP TO numberExcludeLeadingJets | |
975 | if(numberExcludeLeadingJets==-1) | |
976 | numberExcludeLeadingJets = fNumberSignalJets; | |
977 | if (fNumberSignalJets < numberExcludeLeadingJets) | |
978 | numberExcludeLeadingJets = fNumberSignalJets; | |
8628b70c | 979 | |
e8df4140 | 980 | for (Int_t i = 0; i < fBackgroundJetArray->GetEntries(); i++) |
8628b70c | 981 | { |
e8df4140 | 982 | AliEmcalJet* backgroundJet = static_cast<AliEmcalJet*>(fBackgroundJetArray->At(i)); |
b95d0245 | 983 | |
e8df4140 | 984 | if (!backgroundJet) |
8628b70c | 985 | { |
986 | AliError(Form("%s: Could not receive jet %d", GetName(), i)); | |
987 | continue; | |
988 | } | |
989 | ||
271cbc5d | 990 | tmpSummedArea += backgroundJet->Area(); |
991 | if(backgroundJet->Pt() > 0.150) | |
992 | tmpCoveredArea += backgroundJet->Area(); | |
993 | ||
2a82f637 | 994 | if (!IsBackgroundJetInAcceptance(backgroundJet)) |
995 | continue; | |
996 | ||
b95d0245 | 997 | // Search for overlap with signal jets |
998 | Bool_t isOverlapping = kFALSE; | |
999 | for(Int_t j=0;j<numberExcludeLeadingJets;j++) | |
e8df4140 | 1000 | { |
b95d0245 | 1001 | AliEmcalJet* signalJet = fSignalJets[j]; |
1002 | ||
f800ea4e CL |
1003 | if(signalJet->Pt() >= 5.0) |
1004 | if(IsJetOverlapping(signalJet, backgroundJet)) | |
1005 | { | |
1006 | isOverlapping = kTRUE; | |
1007 | break; | |
1008 | } | |
b95d0245 | 1009 | } |
e8df4140 | 1010 | |
c2b0976c | 1011 | Double_t tmpRho = 0.0; |
1012 | if(backgroundJet->Area()) | |
1013 | tmpRho = backgroundJet->Pt() / backgroundJet->Area(); | |
1014 | ||
b95d0245 | 1015 | // PbPb approach (take ghosts into account) |
1016 | if ((i != leadingKTJets[0]) && (i != leadingKTJets[1])) | |
1017 | { | |
0cb49d99 | 1018 | tmpRhoPbPbWithGhosts[rhoPbPbWithGhostsJetCount] = tmpRho; |
b95d0245 | 1019 | rhoPbPbWithGhostsJetCount++; |
e8df4140 | 1020 | } |
b95d0245 | 1021 | |
1022 | if(backgroundJet->Pt() > 0.150) | |
e8df4140 | 1023 | { |
b95d0245 | 1024 | // CMS approach: don't take ghosts into acount |
0cb49d99 | 1025 | tmpRhoCMS[rhoCMSJetCount] = tmpRho; |
b95d0245 | 1026 | rhoCMSJetCount++; |
e8df4140 | 1027 | |
b95d0245 | 1028 | // Improved CMS approach: like CMS but excluding signal |
1029 | if(!isOverlapping) | |
1030 | { | |
0cb49d99 | 1031 | tmpRhoImprovedCMS[rhoImprovedCMSJetCount] = tmpRho; |
b95d0245 | 1032 | rhoImprovedCMSJetCount++; |
1033 | } | |
8628b70c | 1034 | |
b95d0245 | 1035 | // PbPb w/o ghosts approach (just neglect ghosts) |
1036 | if ((i != leadingKTJets[0]) && (i != leadingKTJets[1])) | |
1037 | { | |
0cb49d99 | 1038 | tmpRhoPbPb[rhoPbPbJetCount] = tmpRho; |
b95d0245 | 1039 | rhoPbPbJetCount++; |
1040 | } | |
1041 | } | |
1042 | ||
1043 | // (no overlap with signal jets) | |
1044 | if(!isOverlapping) | |
1045 | { | |
1046 | // Mean approach | |
0cb49d99 | 1047 | tmpRhoMean[rhoMeanJetCount] = tmpRho; |
b95d0245 | 1048 | rhoMeanJetCount++; |
1049 | ||
1050 | // Track like approach approach | |
1051 | tmpPtTrackLike += backgroundJet->Pt(); | |
1052 | tmpAreaTrackLike += backgroundJet->Area(); | |
1053 | } | |
8628b70c | 1054 | |
8628b70c | 1055 | } |
b95d0245 | 1056 | |
1057 | if (tmpAreaTrackLike > 0) | |
1058 | rhoTrackLike = tmpPtTrackLike/tmpAreaTrackLike; | |
1059 | if (rhoPbPbJetCount > 0) | |
1060 | rhoPbPb = TMath::Median(rhoPbPbJetCount, tmpRhoPbPb); | |
1061 | if (rhoPbPbWithGhostsJetCount > 0) | |
1062 | rhoPbPbWithGhosts = TMath::Median(rhoPbPbWithGhostsJetCount, tmpRhoPbPbWithGhosts); | |
1063 | if (rhoCMSJetCount > 0) | |
1064 | rhoCMS = TMath::Median(rhoCMSJetCount, tmpRhoCMS) * tmpCoveredArea/tmpSummedArea; | |
1065 | if (rhoImprovedCMSJetCount > 0) | |
c154ba90 | 1066 | { |
b95d0245 | 1067 | rhoImprovedCMS = TMath::Median(rhoImprovedCMSJetCount, tmpRhoImprovedCMS) * tmpCoveredArea/tmpSummedArea; |
c154ba90 | 1068 | } |
b95d0245 | 1069 | if (rhoMeanJetCount > 0) |
1070 | rhoMean = TMath::Mean(rhoMeanJetCount, tmpRhoMean); | |
1071 | ||
0cb49d99 | 1072 | #ifdef DEBUGMODE |
1073 | AliInfo("Got ALL KT background density."); | |
1074 | #endif | |
1075 | } | |
1076 | ||
1077 | //________________________________________________________________________ | |
1078 | void AliAnalysisTaskChargedJetsPA::GetKTBackgroundDensity(Int_t numberExcludeLeadingJets, Double_t& rhoImprovedCMS) | |
1079 | { | |
1080 | #ifdef DEBUGMODE | |
1081 | AliInfo("Getting KT background density."); | |
1082 | #endif | |
1083 | ||
1084 | static Double_t tmpRhoImprovedCMS[1024]; | |
1085 | Double_t tmpCoveredArea = 0.0; | |
1086 | Double_t tmpSummedArea = 0.0; | |
1087 | ||
1088 | // Setting invalid values | |
1089 | rhoImprovedCMS = 0.0; | |
1090 | ||
1091 | Int_t rhoImprovedCMSJetCount = 0; | |
1092 | ||
1093 | // Exclude UP TO numberExcludeLeadingJets | |
1094 | if(numberExcludeLeadingJets==-1) | |
1095 | numberExcludeLeadingJets = fNumberSignalJets; | |
1096 | if (fNumberSignalJets < numberExcludeLeadingJets) | |
1097 | numberExcludeLeadingJets = fNumberSignalJets; | |
1098 | ||
1099 | for (Int_t i = 0; i < fBackgroundJetArray->GetEntries(); i++) | |
1100 | { | |
1101 | AliEmcalJet* backgroundJet = static_cast<AliEmcalJet*>(fBackgroundJetArray->At(i)); | |
1102 | ||
1103 | if (!backgroundJet) | |
1104 | { | |
1105 | AliError(Form("%s: Could not receive jet %d", GetName(), i)); | |
1106 | continue; | |
1107 | } | |
1108 | ||
1109 | // Search for overlap with signal jets | |
1110 | Bool_t isOverlapping = kFALSE; | |
1111 | for(Int_t j=0;j<numberExcludeLeadingJets;j++) | |
1112 | { | |
1113 | AliEmcalJet* signalJet = fSignalJets[j]; | |
f800ea4e CL |
1114 | if(signalJet->Pt() >= 5.0) |
1115 | if(IsJetOverlapping(signalJet, backgroundJet)) | |
1116 | { | |
1117 | isOverlapping = kTRUE; | |
1118 | break; | |
1119 | } | |
0cb49d99 | 1120 | } |
1121 | ||
1122 | tmpSummedArea += backgroundJet->Area(); | |
1123 | if(backgroundJet->Pt() > 0.150) | |
1124 | tmpCoveredArea += backgroundJet->Area(); | |
1125 | ||
1126 | if (!IsBackgroundJetInAcceptance(backgroundJet)) | |
1127 | continue; | |
1128 | ||
1129 | Double_t tmpRho = backgroundJet->Pt() / backgroundJet->Area(); | |
1130 | ||
1131 | if(backgroundJet->Pt() > 0.150) | |
1132 | if(!isOverlapping) | |
1133 | { | |
1134 | tmpRhoImprovedCMS[rhoImprovedCMSJetCount] = tmpRho; | |
1135 | rhoImprovedCMSJetCount++; | |
1136 | } | |
1137 | } | |
1138 | ||
1139 | if (rhoImprovedCMSJetCount > 0) | |
1140 | { | |
c154ba90 | 1141 | rhoImprovedCMS = TMath::Median(rhoImprovedCMSJetCount, tmpRhoImprovedCMS) * tmpCoveredArea/tmpSummedArea; |
0cb49d99 | 1142 | } |
8628b70c | 1143 | #ifdef DEBUGMODE |
efb9b161 | 1144 | AliInfo("Got KT background density."); |
8628b70c | 1145 | #endif |
1146 | } | |
1147 | ||
8628b70c | 1148 | |
8628b70c | 1149 | //________________________________________________________________________ |
b95d0245 | 1150 | void AliAnalysisTaskChargedJetsPA::GetTRBackgroundDensity(Int_t numberExcludeLeadingJets, Double_t& rhoNoExclusion, Double_t& rhoConeExclusion02, Double_t& rhoConeExclusion04, Double_t& rhoConeExclusion06, Double_t& rhoConeExclusion08, Double_t& rhoExactExclusion) |
8628b70c | 1151 | { |
1152 | #ifdef DEBUGMODE | |
12eb4ac1 | 1153 | AliInfo("Getting TR background density."); |
8628b70c | 1154 | #endif |
1155 | ||
b95d0245 | 1156 | Double_t summedTracksPtCone04 = 0.0; |
4856f9c9 | 1157 | Double_t summedTracksPtCone02 = 0.0; |
b95d0245 | 1158 | Double_t summedTracksPtCone06 = 0.0; |
1159 | Double_t summedTracksPtCone08 = 0.0; | |
1160 | Double_t summedTracksPtWithinJets = 0.0; | |
8628b70c | 1161 | Double_t summedTracksPt = 0.0; |
b95d0245 | 1162 | |
8628b70c | 1163 | // Setting invalid values |
b95d0245 | 1164 | rhoNoExclusion = 0.0; |
1165 | rhoConeExclusion02 = 0.0; | |
1166 | rhoConeExclusion04 = 0.0; | |
1167 | rhoConeExclusion06 = 0.0; | |
1168 | rhoConeExclusion08 = 0.0; | |
1169 | rhoExactExclusion = 0.0; | |
1170 | ||
8628b70c | 1171 | // Exclude UP TO numberExcludeLeadingJets |
b95d0245 | 1172 | if(numberExcludeLeadingJets==-1) |
1173 | numberExcludeLeadingJets = fNumberSignalJets; | |
1174 | if (fNumberSignalJets < numberExcludeLeadingJets) | |
8628b70c | 1175 | numberExcludeLeadingJets = fNumberSignalJets; |
1176 | ||
f800ea4e CL |
1177 | Int_t fSignalJetCount5GeV = 0; |
1178 | for(Int_t j=0;j<numberExcludeLeadingJets;j++) | |
1179 | { | |
1180 | AliEmcalJet* signalJet = fSignalJets[j]; | |
1181 | if(signalJet->Pt() < 5.0) | |
1182 | continue; | |
1183 | fSignalJetCount5GeV++; | |
1184 | } | |
1185 | ||
b95d0245 | 1186 | for (Int_t i = 0; i < fTrackArray->GetEntries(); i++) |
8628b70c | 1187 | { |
8628b70c | 1188 | AliVTrack* tmpTrack = static_cast<AliVTrack*>(fTrackArray->At(i)); |
b95d0245 | 1189 | Bool_t trackWithinJet = kFALSE; Bool_t trackWithin02Cone = kFALSE; Bool_t trackWithin04Cone = kFALSE; Bool_t trackWithin06Cone = kFALSE; Bool_t trackWithin08Cone = kFALSE; |
1190 | ||
8628b70c | 1191 | if (IsTrackInAcceptance(tmpTrack)) |
b95d0245 | 1192 | { |
1193 | // Check if tracks overlaps with jet | |
1194 | for(Int_t j=0;j<numberExcludeLeadingJets;j++) | |
8628b70c | 1195 | { |
b95d0245 | 1196 | AliEmcalJet* signalJet = fSignalJets[j]; |
1197 | ||
f800ea4e CL |
1198 | if(signalJet->Pt() < 5.0) |
1199 | continue; | |
1200 | ||
b95d0245 | 1201 | // Exact jet exclusion |
1202 | if (IsTrackInJet(signalJet, i)) | |
1203 | trackWithinJet = kTRUE; | |
1204 | ||
1205 | // Cone exclusions | |
1206 | if (IsTrackInCone(tmpTrack, signalJet->Eta(), signalJet->Phi(), 0.2)) | |
8628b70c | 1207 | { |
b95d0245 | 1208 | trackWithin02Cone = kTRUE; |
1209 | trackWithin04Cone = kTRUE; | |
1210 | trackWithin06Cone = kTRUE; | |
1211 | trackWithin08Cone = kTRUE; | |
1212 | break; | |
1213 | } | |
1214 | else if (IsTrackInCone(tmpTrack, signalJet->Eta(), signalJet->Phi(), 0.4)) | |
1215 | { | |
1216 | trackWithin04Cone = kTRUE; | |
1217 | trackWithin06Cone = kTRUE; | |
1218 | trackWithin08Cone = kTRUE; | |
8628b70c | 1219 | } |
b95d0245 | 1220 | else if (IsTrackInCone(tmpTrack, signalJet->Eta(), signalJet->Phi(), 0.6)) |
8628b70c | 1221 | { |
b95d0245 | 1222 | trackWithin06Cone = kTRUE; |
1223 | trackWithin08Cone = kTRUE; | |
1224 | } | |
1225 | else if (IsTrackInCone(tmpTrack, signalJet->Eta(), signalJet->Phi(), 0.8)) | |
1226 | { | |
1227 | trackWithin08Cone = kTRUE; | |
8628b70c | 1228 | } |
1229 | } | |
b95d0245 | 1230 | |
1231 | if(!trackWithin08Cone) | |
1232 | { | |
1233 | summedTracksPtCone08 += tmpTrack->Pt(); | |
1234 | } | |
1235 | if(!trackWithin06Cone) | |
1236 | { | |
1237 | summedTracksPtCone06 += tmpTrack->Pt(); | |
1238 | } | |
1239 | if(!trackWithin04Cone) | |
1240 | { | |
1241 | summedTracksPtCone04 += tmpTrack->Pt(); | |
1242 | } | |
1243 | if(!trackWithin02Cone) | |
1244 | { | |
1245 | summedTracksPtCone02 += tmpTrack->Pt(); | |
1246 | } | |
1247 | if(!trackWithinJet) | |
1248 | { | |
1249 | summedTracksPtWithinJets += tmpTrack->Pt(); | |
1250 | } | |
1251 | summedTracksPt += tmpTrack->Pt(); | |
1252 | ||
1253 | } | |
8628b70c | 1254 | } |
1255 | ||
b95d0245 | 1256 | // Calculate the correct area where the tracks were taking from |
8628b70c | 1257 | |
b95d0245 | 1258 | Double_t tmpFullTPCArea = (2.0*fTrackEtaWindow) * TMath::TwoPi(); |
1259 | Double_t tmpAreaCone02 = tmpFullTPCArea; | |
1260 | Double_t tmpAreaCone04 = tmpFullTPCArea; | |
1261 | Double_t tmpAreaCone06 = tmpFullTPCArea; | |
1262 | Double_t tmpAreaCone08 = tmpFullTPCArea; | |
1263 | Double_t tmpAreaWithinJets = tmpFullTPCArea; | |
f800ea4e CL |
1264 | std::vector<Double_t> tmpEtas(fSignalJetCount5GeV); |
1265 | std::vector<Double_t> tmpPhis(fSignalJetCount5GeV); | |
b95d0245 | 1266 | |
f800ea4e | 1267 | Int_t iSignal = 0; |
b95d0245 | 1268 | for(Int_t i=0;i<numberExcludeLeadingJets;i++) |
1269 | { | |
1270 | AliEmcalJet* tmpJet = fSignalJets[i]; | |
f800ea4e CL |
1271 | |
1272 | if(tmpJet->Pt() < 5.0) | |
1273 | continue; | |
1274 | ||
1275 | tmpEtas[iSignal] = tmpJet->Eta(); | |
1276 | tmpPhis[iSignal] = tmpJet->Phi(); | |
b95d0245 | 1277 | tmpAreaWithinJets -= tmpJet->Area(); |
f800ea4e CL |
1278 | |
1279 | iSignal++; | |
8628b70c | 1280 | } |
1281 | ||
f800ea4e CL |
1282 | tmpAreaCone02 -= tmpFullTPCArea * MCGetOverlapMultipleCirclesRectancle(fSignalJetCount5GeV, tmpEtas, tmpPhis, 0.2, -fTrackEtaWindow, +fTrackEtaWindow, 0., TMath::TwoPi()); |
1283 | tmpAreaCone04 -= tmpFullTPCArea * MCGetOverlapMultipleCirclesRectancle(fSignalJetCount5GeV, tmpEtas, tmpPhis, 0.4, -fTrackEtaWindow, +fTrackEtaWindow, 0., TMath::TwoPi()); | |
1284 | tmpAreaCone06 -= tmpFullTPCArea * MCGetOverlapMultipleCirclesRectancle(fSignalJetCount5GeV, tmpEtas, tmpPhis, 0.6, -fTrackEtaWindow, +fTrackEtaWindow, 0., TMath::TwoPi()); | |
1285 | tmpAreaCone08 -= tmpFullTPCArea * MCGetOverlapMultipleCirclesRectancle(fSignalJetCount5GeV, tmpEtas, tmpPhis, 0.8, -fTrackEtaWindow, +fTrackEtaWindow, 0., TMath::TwoPi()); | |
b95d0245 | 1286 | |
1287 | rhoConeExclusion02 = summedTracksPtCone02/tmpAreaCone02; | |
1288 | rhoConeExclusion04 = summedTracksPtCone04/tmpAreaCone04; | |
1289 | rhoConeExclusion06 = summedTracksPtCone06/tmpAreaCone06; | |
1290 | rhoConeExclusion08 = summedTracksPtCone08/tmpAreaCone08; | |
1291 | rhoExactExclusion = summedTracksPtWithinJets/tmpAreaWithinJets; | |
1292 | rhoNoExclusion = summedTracksPt/tmpFullTPCArea; | |
1293 | ||
1294 | ||
8628b70c | 1295 | #ifdef DEBUGMODE |
12eb4ac1 | 1296 | AliInfo("Got TR background density."); |
8628b70c | 1297 | #endif |
1298 | } | |
1299 | ||
1300 | //________________________________________________________________________ | |
12eb4ac1 | 1301 | void AliAnalysisTaskChargedJetsPA::GetTRBackgroundDensity(Int_t numberExcludeLeadingJets, Double_t& rhoMean, Double_t& area, AliEmcalJet* excludeJet1, AliEmcalJet* excludeJet2, Bool_t doSearchPerpendicular) |
8628b70c | 1302 | { |
1303 | #ifdef DEBUGMODE | |
12eb4ac1 | 1304 | AliInfo("Getting TR background density."); |
8628b70c | 1305 | #endif |
1306 | ||
1307 | // Setting invalid values | |
1308 | Double_t summedTracksPt = 0.0; | |
b95d0245 | 1309 | rhoMean = 0.0; |
8628b70c | 1310 | area = -1.0; |
1311 | ||
1312 | Double_t tmpRadius = 0.0; | |
1313 | if (doSearchPerpendicular) | |
b95d0245 | 1314 | tmpRadius = 0.4*TMath::Pi(); // exclude 90 degrees around jets |
8628b70c | 1315 | else |
b95d0245 | 1316 | tmpRadius = 0.8; |
8628b70c | 1317 | |
1318 | numberExcludeLeadingJets = 2; // dijet is excluded here in any case | |
1319 | ||
1320 | ||
1321 | ||
1322 | if (!fTrackArray || !fJetArray) | |
1323 | { | |
1324 | AliError("Could not get the track/jet array to calculate track rho!"); | |
1325 | return; | |
1326 | } | |
1327 | ||
1328 | Int_t trackCount = fTrackArray->GetEntries(); | |
1329 | Int_t trackCountAccepted = 0; | |
1330 | for (Int_t i = 0; i < trackCount; i++) | |
1331 | { | |
1332 | AliVTrack* tmpTrack = static_cast<AliVTrack*>(fTrackArray->At(i)); | |
1333 | if (IsTrackInAcceptance(tmpTrack)) | |
1334 | { | |
1335 | if (IsTrackInCone(tmpTrack, excludeJet1->Eta(), excludeJet1->Phi(), tmpRadius)) | |
1336 | continue; | |
1337 | ||
1338 | if (numberExcludeLeadingJets > 1) | |
1339 | if (IsTrackInCone(tmpTrack, excludeJet2->Eta(), excludeJet2->Phi(), tmpRadius)) | |
1340 | continue; | |
1341 | ||
1342 | // Add track pt to array | |
1343 | summedTracksPt = summedTracksPt + tmpTrack->Pt(); | |
1344 | trackCountAccepted++; | |
1345 | } | |
1346 | } | |
1347 | ||
1348 | if (trackCountAccepted > 0) | |
1349 | { | |
1350 | Double_t tmpArea = 2.0*fTrackEtaWindow*TMath::TwoPi() - 2*(tmpRadius*tmpRadius * TMath::Pi()); //TPC area - excluding jet area | |
1351 | rhoMean = summedTracksPt/tmpArea; | |
1352 | area = tmpArea; | |
1353 | } | |
1354 | ||
1355 | #ifdef DEBUGMODE | |
12eb4ac1 | 1356 | AliInfo("Got TR background density."); |
8628b70c | 1357 | #endif |
1358 | } | |
1359 | ||
ac9c07e9 CL |
1360 | //________________________________________________________________________ |
1361 | void AliAnalysisTaskChargedJetsPA::GetPPBackgroundDensity(Double_t& background, AliEmcalJet* jet) | |
1362 | { | |
1363 | // This is the background that was used for the pp 7 TeV ALICE paper | |
1364 | Double_t jetMom[3] = { jet->Px(), jet->Py(), jet->Pz() }; | |
1365 | TVector3 jet3mom1(jetMom); | |
1366 | TVector3 jet3mom2(jetMom); | |
1367 | background = 0; | |
1368 | ||
1369 | jet3mom1.RotateZ(TMath::Pi()); | |
1370 | jet3mom2.RotateZ(-TMath::Pi()); | |
1371 | ||
1372 | for (int i = 0; i < fTrackArray->GetEntries(); i++) | |
1373 | { | |
1374 | AliVTrack* track = static_cast<AliVTrack*>(fTrackArray->At(i)); | |
1375 | ||
1376 | Double_t trackMom[3] = { track->Px(), track->Py(), track->Pz() }; | |
1377 | TVector3 track3mom(trackMom); | |
1378 | ||
1379 | Double_t dR1 = jet3mom1.DeltaR(track3mom); | |
1380 | Double_t dR2 = jet3mom2.DeltaR(track3mom); | |
1381 | ||
1382 | if (dR1 <= fSignalJetRadius || dR2 <= fSignalJetRadius) | |
1383 | background += track3mom.Pt(); | |
1384 | } | |
1385 | ||
1386 | background /= (2 * TMath::Pi() * fSignalJetRadius * fSignalJetRadius); | |
1387 | } | |
1388 | ||
8628b70c | 1389 | //________________________________________________________________________ |
1390 | void AliAnalysisTaskChargedJetsPA::Calculate(AliVEvent* event) | |
1391 | { | |
1392 | #ifdef DEBUGMODE | |
efb9b161 | 1393 | AliInfo("Starting Calculate()."); |
8628b70c | 1394 | #endif |
1395 | ////////////////////// NOTE: initialization & casting | |
1396 | ||
c2b0976c | 1397 | fEventCounter++; |
1398 | ||
b95d0245 | 1399 | // Check, if analysis should be done in pt hard bins |
1400 | if(fUsePtHardBin != -1) | |
1401 | if(GetPtHardBin() != fUsePtHardBin) | |
1402 | return; | |
1403 | ||
c2b0976c | 1404 | // This is to take only every Nth event |
1405 | if((fEventCounter+fPartialAnalysisIndex) % fPartialAnalysisNParts != 0) | |
1406 | return; | |
1407 | ||
0cb49d99 | 1408 | FillHistogram("hNumberEvents",0.5); |
b95d0245 | 1409 | |
0cb49d99 | 1410 | if(!IsEventInAcceptance(event)) |
1411 | return; | |
8628b70c | 1412 | |
0cb49d99 | 1413 | FillHistogram("hNumberEvents",1.5); |
8628b70c | 1414 | |
1415 | #ifdef DEBUGMODE | |
efb9b161 | 1416 | AliInfo("Calculate()::Init done."); |
8628b70c | 1417 | #endif |
1418 | ||
1419 | ////////////////////// NOTE: Get Centrality, (Leading)Signal jets and Background | |
1420 | ||
12eb4ac1 | 1421 | // Get centrality |
8628b70c | 1422 | AliCentrality* tmpCentrality = NULL; |
1423 | tmpCentrality = event->GetCentrality(); | |
4856f9c9 | 1424 | Double_t centralityPercentile = -1.0; |
b95d0245 | 1425 | Double_t centralityPercentileV0A = 0.0; |
1426 | Double_t centralityPercentileV0C = 0.0; | |
1427 | Double_t centralityPercentileV0M = 0.0; | |
271cbc5d | 1428 | Double_t centralityPercentileZNA = 0.0; |
8628b70c | 1429 | if (tmpCentrality != NULL) |
b95d0245 | 1430 | { |
12eb4ac1 | 1431 | centralityPercentile = tmpCentrality->GetCentralityPercentile(fCentralityType.Data()); |
b95d0245 | 1432 | centralityPercentileV0A = tmpCentrality->GetCentralityPercentile("V0A"); |
1433 | centralityPercentileV0C = tmpCentrality->GetCentralityPercentile("V0C"); | |
1434 | centralityPercentileV0M = tmpCentrality->GetCentralityPercentile("V0M"); | |
271cbc5d | 1435 | centralityPercentileZNA = tmpCentrality->GetCentralityPercentile("ZNA"); |
b95d0245 | 1436 | } |
8628b70c | 1437 | |
b95d0245 | 1438 | if((centralityPercentile < 0.0) || (centralityPercentile > 100.0)) |
9f1e4f53 | 1439 | AliWarning(Form("Centrality value not valid (c=%E)",centralityPercentile)); |
1440 | ||
1441 | if(fSetCentralityToOne) | |
b95d0245 | 1442 | centralityPercentile = 1.0; |
9f1e4f53 | 1443 | |
8628b70c | 1444 | // Get jets |
1445 | if (fAnalyzeBackground || fAnalyzeJets) | |
1446 | GetSignalJets(); | |
1447 | ||
12eb4ac1 | 1448 | // Get background estimates |
b95d0245 | 1449 | Double_t backgroundKTImprovedCMS = -1.0; |
06b41974 | 1450 | Double_t backgroundKTImprovedCMSExternal = -1.0; |
b95d0245 | 1451 | Double_t backgroundDijet = -1.0; |
1452 | Double_t backgroundDijetPerpendicular = -1.0; | |
ac9c07e9 | 1453 | Double_t deltaPtDijetPerpendicular = -10000.0; |
b95d0245 | 1454 | Double_t backgroundKTPbPb = -1.0; |
1455 | Double_t backgroundKTPbPbWithGhosts = -1.0; | |
1456 | Double_t backgroundKTCMS = -1.0; | |
1457 | Double_t backgroundKTMean = -1.0; | |
1458 | Double_t backgroundKTTrackLike = -1.0; | |
1459 | Double_t backgroundTRNoExcl = -1.0; | |
1460 | Double_t backgroundTRCone02 = -1.0; | |
1461 | Double_t backgroundTRCone04 = -1.0; | |
1462 | Double_t backgroundTRCone06 = -1.0; | |
1463 | Double_t backgroundTRCone08 = -1.0; | |
1464 | Double_t backgroundTRExact = -1.0; | |
ac9c07e9 | 1465 | Double_t backgroundPP = -1.0; |
088fbc16 | 1466 | // Calculate background for different jet exclusions |
12eb4ac1 | 1467 | |
8628b70c | 1468 | if (fAnalyzeBackground) |
1469 | { | |
b95d0245 | 1470 | |
0cb49d99 | 1471 | if(fAnalyzeDeprecatedBackgrounds) |
1472 | GetKTBackgroundDensityAll (fNumberExcludedJets, backgroundKTPbPb, backgroundKTPbPbWithGhosts, backgroundKTCMS, backgroundKTImprovedCMS, backgroundKTMean, backgroundKTTrackLike); | |
1473 | else | |
1474 | GetKTBackgroundDensity (fNumberExcludedJets, backgroundKTImprovedCMS); | |
1475 | ||
1476 | if(fAnalyzeDeprecatedBackgrounds) | |
1477 | GetTRBackgroundDensity (fNumberExcludedJets, backgroundTRNoExcl, backgroundTRCone02, backgroundTRCone04, backgroundTRCone06, backgroundTRCone08, backgroundTRExact); | |
06b41974 | 1478 | |
1479 | backgroundKTImprovedCMSExternal = GetExternalRho(); | |
4bb1bca6 | 1480 | if(fNoExternalBackground) |
1481 | backgroundKTImprovedCMSExternal = 0; | |
1482 | ||
8628b70c | 1483 | } |
1484 | ||
1485 | #ifdef DEBUGMODE | |
efb9b161 | 1486 | AliInfo("Calculate()::Centrality&SignalJets&Background-Calculation done."); |
8628b70c | 1487 | #endif |
8628b70c | 1488 | |
b95d0245 | 1489 | if (fAnalyzeQA) |
1490 | { | |
1491 | FillHistogram("hVertexX",event->GetPrimaryVertex()->GetX()); | |
1492 | FillHistogram("hVertexY",event->GetPrimaryVertex()->GetY()); | |
1493 | FillHistogram("hVertexXY",event->GetPrimaryVertex()->GetX(), event->GetPrimaryVertex()->GetY()); | |
b95d0245 | 1494 | FillHistogram("hVertexR",TMath::Sqrt(event->GetPrimaryVertex()->GetX()*event->GetPrimaryVertex()->GetX() + event->GetPrimaryVertex()->GetY()*event->GetPrimaryVertex()->GetY())); |
1495 | FillHistogram("hCentralityV0M",centralityPercentileV0M); | |
1496 | FillHistogram("hCentralityV0A",centralityPercentileV0A); | |
1497 | FillHistogram("hCentralityV0C",centralityPercentileV0C); | |
271cbc5d | 1498 | FillHistogram("hCentralityZNA",centralityPercentileZNA); |
7e413f22 | 1499 | FillHistogram("hCentrality",centralityPercentile); |
b95d0245 | 1500 | |
1501 | Int_t trackCountAcc = 0; | |
1502 | Int_t nTracks = fTrackArray->GetEntries(); | |
1503 | for (Int_t i = 0; i < nTracks; i++) | |
1504 | { | |
1505 | AliVTrack* track = static_cast<AliVTrack*>(fTrackArray->At(i)); | |
0cb49d99 | 1506 | |
1507 | if (track != 0) | |
1508 | if (track->Pt() >= fMinTrackPt) | |
1509 | FillHistogram("hTrackPhiEta", track->Phi(),track->Eta(), 1); | |
1510 | ||
b95d0245 | 1511 | if (IsTrackInAcceptance(track)) |
1512 | { | |
392aa819 | 1513 | FillHistogram("hTrackPt", track->Pt(), centralityPercentile); |
b95d0245 | 1514 | if(track->Eta() >= 0) |
392aa819 | 1515 | FillHistogram("hTrackPtPosEta", track->Pt(), centralityPercentile); |
b95d0245 | 1516 | else |
392aa819 | 1517 | FillHistogram("hTrackPtNegEta", track->Pt(), centralityPercentile); |
b95d0245 | 1518 | |
7e413f22 | 1519 | FillHistogram("hTrackEta", track->Eta(), centralityPercentile); |
b95d0245 | 1520 | FillHistogram("hTrackPhi", track->Phi()); |
c2b0976c | 1521 | |
4856f9c9 | 1522 | if(static_cast<AliPicoTrack*>(track)) |
0cb49d99 | 1523 | FillHistogram("hTrackPhiTrackType", track->Phi(), (static_cast<AliPicoTrack*>(track))->GetTrackType()); |
271cbc5d | 1524 | |
b95d0245 | 1525 | for(Int_t j=0;j<20;j++) |
1526 | if(track->Pt() > j) | |
1527 | FillHistogram("hTrackPhiPtCut", track->Phi(), track->Pt()); | |
1528 | ||
1529 | FillHistogram("hTrackCharge", track->Charge()); | |
1530 | trackCountAcc++; | |
1531 | } | |
1532 | } | |
4856f9c9 | 1533 | FillHistogram("hTrackCountAcc", trackCountAcc, centralityPercentile); |
b95d0245 | 1534 | |
2a82f637 | 1535 | |
1536 | /* | |
1537 | // This is code that is run locally to get some special events | |
1538 | TFile* fileOutput = new TFile("SpecialEvents.root", "UPDATE"); | |
1539 | if(fSecondLeadingJet&&(fSecondLeadingJet->Pt()>10.)) | |
1540 | { | |
1541 | cout << "Event found\n"; | |
1542 | TH2D* tmpEvent = new TH2D(Form("Event%lu", fEventCounter), "", 40, -0.9, 0.9, 40, 0., TMath::TwoPi()); | |
1543 | tmpEvent->GetXaxis()->SetTitle("#eta"); | |
1544 | tmpEvent->GetYaxis()->SetTitle("#phi"); | |
1545 | tmpEvent->SetOption("LEGO2"); | |
1546 | tmpEvent->Sumw2(); | |
1547 | ||
1548 | for (Int_t i = 0; i < nTracks; i++) | |
1549 | { | |
1550 | AliVTrack* track = static_cast<AliVTrack*>(fTrackArray->At(i)); | |
1551 | ||
1552 | if (IsTrackInAcceptance(track)) | |
1553 | { | |
1554 | tmpEvent->Fill(track->Eta(), track->Phi(), track->Pt()); | |
1555 | } | |
1556 | } | |
1557 | tmpEvent->Write(0, kOverwrite); | |
1558 | } | |
1559 | fileOutput->Close(); | |
1560 | */ | |
b95d0245 | 1561 | } |
1562 | #ifdef DEBUGMODE | |
1563 | AliInfo("Calculate()::QA done."); | |
1564 | #endif | |
1565 | ||
12eb4ac1 | 1566 | ////////////////////// NOTE: Jet analysis and calculations |
8628b70c | 1567 | |
12eb4ac1 | 1568 | if (fAnalyzeJets) |
8628b70c | 1569 | { |
0cb49d99 | 1570 | for (Int_t i = 0; i<fJetArray->GetEntries(); i++) |
8628b70c | 1571 | { |
0cb49d99 | 1572 | AliEmcalJet* tmpJet = static_cast<AliEmcalJet*>(fJetArray->At(i)); |
1573 | if (!tmpJet) | |
1574 | continue; | |
1575 | ||
c2b0976c | 1576 | FillHistogram("hRawJetPt", tmpJet->Pt()); |
2a82f637 | 1577 | if (tmpJet->Pt() >= 5.0) |
e8df4140 | 1578 | { |
0cb49d99 | 1579 | // ### RAW JET ANALYSIS |
1580 | if (tmpJet->Area() >= fMinJetArea) | |
1581 | FillHistogram("hRawJetPhiEta", tmpJet->Phi(), tmpJet->Eta()); | |
1582 | if (TMath::Abs(tmpJet->Eta()) <= fSignalJetEtaWindow) | |
1583 | FillHistogram("hRawJetArea", tmpJet->Area()); | |
e8df4140 | 1584 | } |
c2b0976c | 1585 | |
0cb49d99 | 1586 | if(IsSignalJetInAcceptance(tmpJet)) |
1587 | { | |
1588 | // ### SIGNAL JET ANALYSIS | |
1589 | // Jet spectra | |
1590 | FillHistogram("hJetPt", tmpJet->Pt(), centralityPercentile); | |
1591 | FillHistogram("hJetPtBgrdSubtractedKTImprovedCMS", GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMS), centralityPercentile); | |
271cbc5d | 1592 | FillHistogram("hJetPtBgrdSubtractedExternal", GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal), centralityPercentile); |
0cb49d99 | 1593 | FillHistogram("hJetPtSubtractedRhoKTImprovedCMS", tmpJet->Pt(), centralityPercentile, backgroundKTImprovedCMS); |
271cbc5d | 1594 | |
ac9c07e9 CL |
1595 | // pp background |
1596 | GetPPBackgroundDensity(backgroundPP, tmpJet); | |
1597 | FillHistogram("hJetPtBgrdSubtractedPP", GetCorrectedJetPt(tmpJet, backgroundPP), centralityPercentile); | |
1598 | ||
0cb49d99 | 1599 | if(fAnalyzeDeprecatedBackgrounds) |
1600 | { | |
1601 | FillHistogram("hJetPtBgrdSubtractedTR", GetCorrectedJetPt(tmpJet, backgroundTRCone06), centralityPercentile); | |
1602 | FillHistogram("hJetPtBgrdSubtractedKTPbPb", GetCorrectedJetPt(tmpJet, backgroundKTPbPb), centralityPercentile); | |
1603 | FillHistogram("hJetPtBgrdSubtractedKTPbPbWithGhosts", GetCorrectedJetPt(tmpJet, backgroundKTPbPbWithGhosts), centralityPercentile); | |
1604 | FillHistogram("hJetPtBgrdSubtractedKTCMS", GetCorrectedJetPt(tmpJet, backgroundKTCMS), centralityPercentile); | |
1605 | FillHistogram("hJetPtBgrdSubtractedKTMean", GetCorrectedJetPt(tmpJet, backgroundKTMean), centralityPercentile); | |
1606 | FillHistogram("hJetPtBgrdSubtractedKTTrackLike", GetCorrectedJetPt(tmpJet, backgroundKTTrackLike), centralityPercentile); | |
1607 | } | |
e8df4140 | 1608 | |
2a82f637 | 1609 | // Jet profile analysis |
1610 | if(TMath::Abs(tmpJet->Eta()) <= 0.3) | |
1611 | { | |
1612 | if(tmpJet->Pt()>=70.0) | |
1613 | { | |
271cbc5d | 1614 | FillHistogram("hJetProfile70GeV", 0.05-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.05, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); |
1615 | FillHistogram("hJetProfile70GeV", 0.10-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.10, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1616 | FillHistogram("hJetProfile70GeV", 0.15-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.15, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1617 | FillHistogram("hJetProfile70GeV", 0.20-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.20, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1618 | FillHistogram("hJetProfile70GeV", 0.25-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.25, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1619 | FillHistogram("hJetProfile70GeV", 0.30-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.30, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1620 | FillHistogram("hJetProfile70GeV", 0.35-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.35, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1621 | FillHistogram("hJetProfile70GeV", 0.40-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.40, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1622 | FillHistogram("hJetProfile70GeV", 0.45-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.45, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1623 | FillHistogram("hJetProfile70GeV", 0.50-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.50, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1624 | FillHistogram("hJetProfile70GeV", 0.55-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.55, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1625 | FillHistogram("hJetProfile70GeV", 0.60-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.60, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
2a82f637 | 1626 | } |
271cbc5d | 1627 | else if(GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)>=60.0) |
2a82f637 | 1628 | { |
271cbc5d | 1629 | FillHistogram("hJetProfile60GeV", 0.05-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.05, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); |
1630 | FillHistogram("hJetProfile60GeV", 0.10-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.10, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1631 | FillHistogram("hJetProfile60GeV", 0.15-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.15, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1632 | FillHistogram("hJetProfile60GeV", 0.20-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.20, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1633 | FillHistogram("hJetProfile60GeV", 0.25-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.25, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1634 | FillHistogram("hJetProfile60GeV", 0.30-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.30, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1635 | FillHistogram("hJetProfile60GeV", 0.35-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.35, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1636 | FillHistogram("hJetProfile60GeV", 0.40-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.40, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1637 | FillHistogram("hJetProfile60GeV", 0.45-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.45, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1638 | FillHistogram("hJetProfile60GeV", 0.50-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.50, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1639 | FillHistogram("hJetProfile60GeV", 0.55-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.55, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1640 | FillHistogram("hJetProfile60GeV", 0.60-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.60, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
2a82f637 | 1641 | } |
271cbc5d | 1642 | else if(GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)>=50.0) |
2a82f637 | 1643 | { |
271cbc5d | 1644 | FillHistogram("hJetProfile50GeV", 0.05-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.05, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); |
1645 | FillHistogram("hJetProfile50GeV", 0.10-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.10, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1646 | FillHistogram("hJetProfile50GeV", 0.15-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.15, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1647 | FillHistogram("hJetProfile50GeV", 0.20-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.20, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1648 | FillHistogram("hJetProfile50GeV", 0.25-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.25, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1649 | FillHistogram("hJetProfile50GeV", 0.30-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.30, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1650 | FillHistogram("hJetProfile50GeV", 0.35-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.35, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1651 | FillHistogram("hJetProfile50GeV", 0.40-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.40, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1652 | FillHistogram("hJetProfile50GeV", 0.45-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.45, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1653 | FillHistogram("hJetProfile50GeV", 0.50-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.50, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1654 | FillHistogram("hJetProfile50GeV", 0.55-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.55, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1655 | FillHistogram("hJetProfile50GeV", 0.60-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.60, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
2a82f637 | 1656 | } |
271cbc5d | 1657 | else if(GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)>=40.0) |
2a82f637 | 1658 | { |
271cbc5d | 1659 | FillHistogram("hJetProfile40GeV", 0.05-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.05, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); |
1660 | FillHistogram("hJetProfile40GeV", 0.10-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.10, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1661 | FillHistogram("hJetProfile40GeV", 0.15-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.15, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1662 | FillHistogram("hJetProfile40GeV", 0.20-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.20, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1663 | FillHistogram("hJetProfile40GeV", 0.25-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.25, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1664 | FillHistogram("hJetProfile40GeV", 0.30-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.30, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1665 | FillHistogram("hJetProfile40GeV", 0.35-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.35, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1666 | FillHistogram("hJetProfile40GeV", 0.40-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.40, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1667 | FillHistogram("hJetProfile40GeV", 0.45-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.45, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1668 | FillHistogram("hJetProfile40GeV", 0.50-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.50, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1669 | FillHistogram("hJetProfile40GeV", 0.55-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.55, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1670 | FillHistogram("hJetProfile40GeV", 0.60-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.60, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
2a82f637 | 1671 | } |
271cbc5d | 1672 | else if(GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)>=30.0) |
2a82f637 | 1673 | { |
271cbc5d | 1674 | FillHistogram("hJetProfile30GeV", 0.05-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.05, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); |
1675 | FillHistogram("hJetProfile30GeV", 0.10-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.10, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1676 | FillHistogram("hJetProfile30GeV", 0.15-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.15, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1677 | FillHistogram("hJetProfile30GeV", 0.20-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.20, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1678 | FillHistogram("hJetProfile30GeV", 0.25-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.25, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1679 | FillHistogram("hJetProfile30GeV", 0.30-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.30, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1680 | FillHistogram("hJetProfile30GeV", 0.35-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.35, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1681 | FillHistogram("hJetProfile30GeV", 0.40-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.40, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1682 | FillHistogram("hJetProfile30GeV", 0.45-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.45, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1683 | FillHistogram("hJetProfile30GeV", 0.50-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.50, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1684 | FillHistogram("hJetProfile30GeV", 0.55-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.55, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1685 | FillHistogram("hJetProfile30GeV", 0.60-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.60, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
2a82f637 | 1686 | } |
271cbc5d | 1687 | else if(GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)>=20.0) |
2a82f637 | 1688 | { |
271cbc5d | 1689 | FillHistogram("hJetProfile20GeV", 0.05-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.05, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); |
1690 | FillHistogram("hJetProfile20GeV", 0.10-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.10, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1691 | FillHistogram("hJetProfile20GeV", 0.15-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.15, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1692 | FillHistogram("hJetProfile20GeV", 0.20-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.20, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1693 | FillHistogram("hJetProfile20GeV", 0.25-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.25, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1694 | FillHistogram("hJetProfile20GeV", 0.30-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.30, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1695 | FillHistogram("hJetProfile20GeV", 0.35-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.35, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1696 | FillHistogram("hJetProfile20GeV", 0.40-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.40, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1697 | FillHistogram("hJetProfile20GeV", 0.45-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.45, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1698 | FillHistogram("hJetProfile20GeV", 0.50-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.50, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1699 | FillHistogram("hJetProfile20GeV", 0.55-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.55, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1700 | FillHistogram("hJetProfile20GeV", 0.60-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.60, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
2a82f637 | 1701 | } |
271cbc5d | 1702 | else if(GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)>=10.0) |
2a82f637 | 1703 | { |
271cbc5d | 1704 | FillHistogram("hJetProfile10GeV", 0.05-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.05, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); |
1705 | FillHistogram("hJetProfile10GeV", 0.10-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.10, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1706 | FillHistogram("hJetProfile10GeV", 0.15-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.15, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1707 | FillHistogram("hJetProfile10GeV", 0.20-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.20, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1708 | FillHistogram("hJetProfile10GeV", 0.25-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.25, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1709 | FillHistogram("hJetProfile10GeV", 0.30-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.30, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1710 | FillHistogram("hJetProfile10GeV", 0.35-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.35, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1711 | FillHistogram("hJetProfile10GeV", 0.40-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.40, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1712 | FillHistogram("hJetProfile10GeV", 0.45-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.45, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1713 | FillHistogram("hJetProfile10GeV", 0.50-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.50, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1714 | FillHistogram("hJetProfile10GeV", 0.55-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.55, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
1715 | FillHistogram("hJetProfile10GeV", 0.60-0.05/2, (GetCorrectedConePt(tmpJet->Eta(), tmpJet->Phi(), 0.60, backgroundKTImprovedCMSExternal))/GetCorrectedJetPt(tmpJet, backgroundKTImprovedCMSExternal)); | |
2a82f637 | 1716 | } |
1717 | } | |
f800ea4e | 1718 | FillHistogram("hJetPtVsConstituentCount", tmpJet->Pt(),tmpJet->GetNumberOfTracks()); |
392aa819 | 1719 | |
2a82f637 | 1720 | if((fAnalyzeQA) && (tmpJet->Pt() >= 5.0)) |
0cb49d99 | 1721 | { |
2a82f637 | 1722 | Double_t lowestTrackPt = 1e99; |
1723 | Double_t highestTrackPt = 0.0; | |
1724 | for(Int_t j=0; j<tmpJet->GetNumberOfTracks(); j++) | |
1725 | { | |
1726 | FillHistogram("hJetConstituentPt", tmpJet->TrackAt(j, fTrackArray)->Pt(), centralityPercentile); | |
1727 | // Find the lowest pT of a track in the jet | |
1728 | if (tmpJet->TrackAt(j, fTrackArray)->Pt() < lowestTrackPt) | |
1729 | lowestTrackPt = tmpJet->TrackAt(j, fTrackArray)->Pt(); | |
1730 | if (tmpJet->TrackAt(j, fTrackArray)->Pt() > highestTrackPt) | |
1731 | highestTrackPt = tmpJet->TrackAt(j, fTrackArray)->Pt(); | |
1732 | } | |
0cb49d99 | 1733 | FillHistogram("hJetArea", tmpJet->Area()); |
2a82f637 | 1734 | // Signal jet vs. signal jet - "Combinatorial" |
1735 | for (Int_t j = i+1; j<fNumberSignalJets; j++) | |
1736 | FillHistogram("hJetDeltaPhi", GetDeltaPhi(tmpJet->Phi(), fSignalJets[j]->Phi())); | |
1737 | ||
0cb49d99 | 1738 | FillHistogram("hJetPhiEta", tmpJet->Phi(),tmpJet->Eta()); |
7e413f22 | 1739 | FillHistogram("hJetEta", tmpJet->Eta(), centralityPercentile); |
2a82f637 | 1740 | |
1741 | if(lowestTrackPt>=2.0) | |
1742 | FillHistogram("hJetEta2GeVTracks", tmpJet->Eta(), centralityPercentile); | |
1743 | if(lowestTrackPt>=4.0) | |
1744 | FillHistogram("hJetEta4GeVTracks", tmpJet->Eta(), centralityPercentile); | |
1745 | } | |
1746 | ||
1747 | ||
1748 | // Jet constituent mass analyses (for PYTHIA) | |
1749 | if (fAnalyzeMassCorrelation) | |
1750 | { | |
1751 | Double_t jetMass = 0.0; | |
1752 | Int_t constituentCount = tmpJet->GetNumberOfTracks(); | |
1753 | Int_t electronCount = 0; | |
1754 | Int_t pionCount = 0; | |
1755 | Int_t protonCount = 0; | |
1756 | Int_t kaonCount = 0; | |
1757 | Int_t othersCount = 0; | |
1758 | ||
1759 | for(Int_t j=0; j<tmpJet->GetNumberOfTracks(); j++) | |
1760 | { | |
1761 | AliVParticle* tmpParticle = tmpJet->TrackAt(j, fTrackArray); | |
1762 | ||
1763 | jetMass += tmpParticle->M(); | |
1764 | if(TMath::Abs(tmpParticle->PdgCode()) == 11) // electron, positron | |
1765 | electronCount++; | |
1766 | else if(TMath::Abs(tmpParticle->PdgCode()) == 211) // p-, p+ | |
1767 | pionCount++; | |
1768 | else if(TMath::Abs(tmpParticle->PdgCode()) == 2212) // p, pbar | |
1769 | protonCount++; | |
1770 | else if(TMath::Abs(tmpParticle->PdgCode()) == 321) // kaon+,kaon- | |
1771 | kaonCount++; | |
1772 | else | |
1773 | othersCount++; | |
1774 | } | |
1775 | ||
1776 | FillHistogram("hJetMassFromConstituents", jetMass); | |
1777 | FillHistogram("hJetMass", tmpJet->M()); | |
1778 | ||
1779 | FillHistogram("hJetPtVsMass", tmpJet->Pt(), jetMass); | |
1780 | FillHistogram("hJetPtVsJetMass", tmpJet->Pt(), tmpJet->M()); | |
1781 | ||
1782 | FillHistogram("hJetPtVsProtonCount", tmpJet->Pt(), protonCount/(static_cast<Double_t>(constituentCount))); | |
1783 | FillHistogram("hJetPtVsPionCount", tmpJet->Pt(), pionCount/(static_cast<Double_t>(constituentCount))); | |
1784 | FillHistogram("hJetPtVsKaonCount", tmpJet->Pt(), kaonCount/(static_cast<Double_t>(constituentCount))); | |
1785 | FillHistogram("hJetPtVsElectronCount", tmpJet->Pt(), electronCount/(static_cast<Double_t>(constituentCount))); | |
1786 | FillHistogram("hJetPtVsOthersCount", tmpJet->Pt(), othersCount/(static_cast<Double_t>(constituentCount))); | |
1787 | FillHistogram("hJetConstituentProtonCount", protonCount); | |
1788 | FillHistogram("hJetConstituentPionCount", pionCount); | |
1789 | FillHistogram("hJetConstituentKaonCount", kaonCount); | |
1790 | FillHistogram("hJetConstituentElectronCount", electronCount); | |
1791 | FillHistogram("hJetConstituentOthersCount", othersCount); | |
1792 | ||
1793 | // Results for the "normal" jet (avoiding single particle jets) | |
1794 | if((constituentCount>=6) && (constituentCount<=14)) | |
1795 | { | |
1796 | FillHistogram("hJetPtVsMass_6_14", tmpJet->Pt(), jetMass); | |
1797 | FillHistogram("hJetPtVsJetMass_6_14", tmpJet->Pt(), tmpJet->M()); | |
1798 | ||
1799 | FillHistogram("hJetPtVsProtonCount_6_14", tmpJet->Pt(), protonCount); | |
1800 | FillHistogram("hJetPtVsPionCount_6_14", tmpJet->Pt(), pionCount); | |
1801 | FillHistogram("hJetPtVsKaonCount_6_14", tmpJet->Pt(), kaonCount); | |
1802 | FillHistogram("hJetPtVsElectronCount_6_14", tmpJet->Pt(), electronCount); | |
1803 | FillHistogram("hJetPtVsOthersCount_6_14", tmpJet->Pt(), othersCount); | |
1804 | FillHistogram("hJetConstituentProtonCount_6_14", protonCount); | |
1805 | FillHistogram("hJetConstituentPionCount_6_14", pionCount); | |
1806 | FillHistogram("hJetConstituentKaonCount_6_14", kaonCount); | |
1807 | FillHistogram("hJetConstituentElectronCount_6_14", electronCount); | |
1808 | FillHistogram("hJetConstituentOthersCount_6_14", othersCount); | |
1809 | } | |
1810 | if((constituentCount>=2)) | |
1811 | { | |
1812 | FillHistogram("hJetPtVsMass_2_X", tmpJet->Pt(), jetMass); | |
1813 | FillHistogram("hJetPtVsJetMass_2_X", tmpJet->Pt(), tmpJet->M()); | |
1814 | ||
1815 | FillHistogram("hJetPtVsProtonCount_2_X", tmpJet->Pt(), protonCount); | |
1816 | FillHistogram("hJetPtVsPionCount_2_X", tmpJet->Pt(), pionCount); | |
1817 | FillHistogram("hJetPtVsKaonCount_2_X", tmpJet->Pt(), kaonCount); | |
1818 | FillHistogram("hJetPtVsElectronCount_2_X", tmpJet->Pt(), electronCount); | |
1819 | FillHistogram("hJetPtVsOthersCount_2_X", tmpJet->Pt(), othersCount); | |
1820 | FillHistogram("hJetConstituentProtonCount_2_X", protonCount); | |
1821 | FillHistogram("hJetConstituentPionCount_2_X", pionCount); | |
1822 | FillHistogram("hJetConstituentKaonCount_2_X", kaonCount); | |
1823 | FillHistogram("hJetConstituentElectronCount_2_X", electronCount); | |
1824 | FillHistogram("hJetConstituentOthersCount_2_X", othersCount); | |
1825 | } | |
1826 | if((constituentCount>=2) && (constituentCount<=7)) | |
1827 | { | |
1828 | FillHistogram("hJetPtVsMass_2_7", tmpJet->Pt(), jetMass); | |
1829 | FillHistogram("hJetPtVsJetMass_2_7", tmpJet->Pt(), tmpJet->M()); | |
1830 | ||
1831 | FillHistogram("hJetPtVsProtonCount_2_7", tmpJet->Pt(), protonCount); | |
1832 | FillHistogram("hJetPtVsPionCount_2_7", tmpJet->Pt(), pionCount); | |
1833 | FillHistogram("hJetPtVsKaonCount_2_7", tmpJet->Pt(), kaonCount); | |
1834 | FillHistogram("hJetPtVsElectronCount_2_7", tmpJet->Pt(), electronCount); | |
1835 | FillHistogram("hJetPtVsOthersCount_2_7", tmpJet->Pt(), othersCount); | |
1836 | FillHistogram("hJetConstituentProtonCount_2_7", protonCount); | |
1837 | FillHistogram("hJetConstituentPionCount_2_7", pionCount); | |
1838 | FillHistogram("hJetConstituentKaonCount_2_7", kaonCount); | |
1839 | FillHistogram("hJetConstituentElectronCount_2_7", electronCount); | |
1840 | FillHistogram("hJetConstituentOthersCount_2_7", othersCount); | |
1841 | } | |
0cb49d99 | 1842 | } |
088fbc16 | 1843 | } |
12eb4ac1 | 1844 | } |
8628b70c | 1845 | |
12eb4ac1 | 1846 | // ### DIJETS |
8628b70c | 1847 | if(fNumberSignalJets >= 2) |
1848 | { | |
1849 | FillHistogram("hLeadingJetDeltaPhi", GetDeltaPhi(fFirstLeadingJet->Phi(), fSecondLeadingJet->Phi())); | |
8628b70c | 1850 | |
12eb4ac1 | 1851 | if (IsDijet(fFirstLeadingJet, fSecondLeadingJet)) |
8628b70c | 1852 | { |
12eb4ac1 | 1853 | FillHistogram("hDijetConstituentsPt", fFirstLeadingJet->Pt()); |
1854 | FillHistogram("hDijetConstituentsPt", fSecondLeadingJet->Pt()); | |
1855 | ||
8628b70c | 1856 | FillHistogram("hDijetLeadingJetPt", fFirstLeadingJet->Pt()); |
1857 | FillHistogram("hDijetPtCorrelation", fFirstLeadingJet->Pt(), fSecondLeadingJet->Pt()); | |
1858 | Double_t dummyArea = 0; | |
b95d0245 | 1859 | GetTRBackgroundDensity (2, backgroundDijet, dummyArea, fFirstLeadingJet, fSecondLeadingJet, kFALSE); |
1860 | GetTRBackgroundDensity (2, backgroundDijetPerpendicular, dummyArea, fFirstLeadingJet, fSecondLeadingJet, kTRUE); | |
ac9c07e9 | 1861 | deltaPtDijetPerpendicular = GetDeltaPt(backgroundDijetPerpendicular); |
8628b70c | 1862 | } |
1863 | } | |
1864 | ||
12eb4ac1 | 1865 | // ### SOME JET PLOTS |
1866 | FillHistogram("hJetCountAll", fJetArray->GetEntries()); | |
1867 | FillHistogram("hJetCountAccepted", fNumberSignalJets); | |
0cb49d99 | 1868 | FillHistogram("hJetCount", fJetArray->GetEntries(), fNumberSignalJets); |
12eb4ac1 | 1869 | if (fFirstLeadingJet) |
0cb49d99 | 1870 | { |
12eb4ac1 | 1871 | FillHistogram("hLeadingJetPt", fFirstLeadingJet->Pt()); |
0cb49d99 | 1872 | FillHistogram("hCorrectedLeadingJetPt", GetCorrectedJetPt(fFirstLeadingJet,backgroundKTImprovedCMS)); |
1873 | } | |
12eb4ac1 | 1874 | if (fSecondLeadingJet) |
0cb49d99 | 1875 | { |
12eb4ac1 | 1876 | FillHistogram("hSecondLeadingJetPt", fSecondLeadingJet->Pt()); |
0cb49d99 | 1877 | FillHistogram("hCorrectedSecondLeadingJetPt", GetCorrectedJetPt(fSecondLeadingJet,backgroundKTImprovedCMS)); |
1878 | } | |
8628b70c | 1879 | } //endif AnalyzeJets |
1880 | ||
1881 | #ifdef DEBUGMODE | |
efb9b161 | 1882 | AliInfo("Calculate()::Jets done."); |
8628b70c | 1883 | #endif |
1884 | ////////////////////// NOTE: Background analysis | |
1885 | ||
1886 | if (fAnalyzeBackground) | |
1887 | { | |
088fbc16 | 1888 | // Calculate background in centrality classes |
b95d0245 | 1889 | FillHistogram("hKTBackgroundImprovedCMS", backgroundKTImprovedCMS, centralityPercentile); |
06b41974 | 1890 | |
1891 | FillHistogram("hKTBackgroundImprovedCMSExternal", backgroundKTImprovedCMSExternal, centralityPercentile); | |
1892 | ||
b95d0245 | 1893 | FillHistogram("hKTMeanBackgroundImprovedCMS", centralityPercentile, backgroundKTImprovedCMS); |
8628b70c | 1894 | |
12eb4ac1 | 1895 | // In case of dijets -> look at the background |
b95d0245 | 1896 | if (backgroundDijet >= 0) |
1897 | FillHistogram("hDijetBackground", backgroundDijet, centralityPercentile); | |
1898 | if (backgroundDijetPerpendicular >= 0) | |
1899 | FillHistogram("hDijetBackgroundPerpendicular", backgroundDijetPerpendicular, centralityPercentile); | |
ac9c07e9 CL |
1900 | if (deltaPtDijetPerpendicular > -10000.) |
1901 | FillHistogram("hDijetBackgroundPerpendicularDeltaPt", deltaPtDijetPerpendicular, centralityPercentile); | |
1902 | ||
1903 | ||
b95d0245 | 1904 | if(fAnalyzeDeprecatedBackgrounds) |
1905 | { | |
1906 | FillHistogram("hKTBackgroundPbPb", backgroundKTPbPb, centralityPercentile); | |
1907 | FillHistogram("hKTBackgroundPbPbWithGhosts", backgroundKTPbPbWithGhosts, centralityPercentile); | |
1908 | FillHistogram("hKTBackgroundCMS", backgroundKTCMS, centralityPercentile); | |
1909 | FillHistogram("hKTBackgroundMean", backgroundKTMean, centralityPercentile); | |
1910 | FillHistogram("hKTBackgroundTrackLike", backgroundKTTrackLike, centralityPercentile); | |
1911 | ||
1912 | FillHistogram("hTRBackgroundNoExcl", backgroundTRNoExcl, centralityPercentile); | |
1913 | FillHistogram("hTRBackgroundCone02", backgroundTRCone02, centralityPercentile); | |
1914 | FillHistogram("hTRBackgroundCone04", backgroundTRCone04, centralityPercentile); | |
1915 | FillHistogram("hTRBackgroundCone06", backgroundTRCone06, centralityPercentile); | |
1916 | FillHistogram("hTRBackgroundCone08", backgroundTRCone08, centralityPercentile); | |
1917 | FillHistogram("hTRBackgroundExact", backgroundTRExact, centralityPercentile); | |
1918 | ||
b95d0245 | 1919 | // Calculate background profiles in terms of centrality |
1920 | FillHistogram("hKTMeanBackgroundPbPb", centralityPercentile, backgroundKTPbPb); | |
1921 | FillHistogram("hKTMeanBackgroundPbPbWithGhosts", centralityPercentile, backgroundKTPbPbWithGhosts); | |
1922 | FillHistogram("hKTMeanBackgroundCMS", centralityPercentile, backgroundKTCMS); | |
1923 | FillHistogram("hKTMeanBackgroundMean", centralityPercentile, backgroundKTMean); | |
1924 | FillHistogram("hKTMeanBackgroundTPC", centralityPercentile, backgroundKTTrackLike); | |
1925 | FillHistogram("hTRMeanBackground", centralityPercentile, backgroundTRCone06); | |
1926 | } | |
12eb4ac1 | 1927 | |
1928 | ||
1929 | // Calculate the delta pt | |
0cb49d99 | 1930 | Double_t tmpDeltaPtNoBackground = GetDeltaPt(0.0); |
1931 | Double_t tmpDeltaPtKTImprovedCMS = GetDeltaPt(backgroundKTImprovedCMS); | |
8bb0422a | 1932 | Double_t tmpDeltaPtExternalBgrd = GetDeltaPt(backgroundKTImprovedCMSExternal); |
1933 | ||
c2b0976c | 1934 | |
1935 | Double_t tmpDeltaPtKTImprovedCMSPartialExclusion = 0.0; | |
1936 | if(fNcoll) | |
1937 | tmpDeltaPtKTImprovedCMSPartialExclusion = GetDeltaPt(backgroundKTImprovedCMS, 1.0/fNcoll); | |
1938 | else | |
1939 | tmpDeltaPtKTImprovedCMSPartialExclusion = GetDeltaPt(backgroundKTImprovedCMS, 1.0); | |
1940 | ||
1941 | Double_t tmpDeltaPtKTImprovedCMSPartialExclusion_Signal = 0.0; | |
1942 | if(fNumberSignalJets) | |
1943 | tmpDeltaPtKTImprovedCMSPartialExclusion_Signal = GetDeltaPt(backgroundKTImprovedCMS, 1.0/fNumberSignalJets); | |
1944 | else | |
1945 | tmpDeltaPtKTImprovedCMSPartialExclusion_Signal = GetDeltaPt(backgroundKTImprovedCMS, 1.0); | |
1946 | ||
1947 | Double_t tmpDeltaPtKTImprovedCMSFullExclusion = GetDeltaPt(backgroundKTImprovedCMS, 1.0); | |
1948 | ||
0cb49d99 | 1949 | Double_t tmpDeltaPtKTPbPb = 0; |
1950 | Double_t tmpDeltaPtKTPbPbWithGhosts = 0; | |
1951 | Double_t tmpDeltaPtKTCMS = 0; | |
1952 | Double_t tmpDeltaPtKTMean = 0; | |
1953 | Double_t tmpDeltaPtKTTrackLike = 0; | |
1954 | Double_t tmpDeltaPtTR = 0; | |
088fbc16 | 1955 | |
0cb49d99 | 1956 | if(fAnalyzeDeprecatedBackgrounds) |
1957 | { | |
1958 | tmpDeltaPtKTPbPb = GetDeltaPt(backgroundKTPbPb); | |
1959 | tmpDeltaPtKTPbPbWithGhosts = GetDeltaPt(backgroundKTPbPbWithGhosts); | |
1960 | tmpDeltaPtKTCMS = GetDeltaPt(backgroundKTCMS); | |
1961 | tmpDeltaPtKTMean = GetDeltaPt(backgroundKTMean); | |
1962 | tmpDeltaPtKTTrackLike = GetDeltaPt(backgroundKTTrackLike); | |
1963 | tmpDeltaPtTR = GetDeltaPt(backgroundTRCone06); | |
1964 | } | |
12eb4ac1 | 1965 | |
1966 | // If valid, fill the delta pt histograms | |
b95d0245 | 1967 | |
8bb0422a | 1968 | if(tmpDeltaPtExternalBgrd > -10000.0) |
1969 | FillHistogram("hDeltaPtExternalBgrd", tmpDeltaPtExternalBgrd, centralityPercentile); | |
b95d0245 | 1970 | if(tmpDeltaPtKTImprovedCMS > -10000.0) |
1971 | FillHistogram("hDeltaPtKTImprovedCMS", tmpDeltaPtKTImprovedCMS, centralityPercentile); | |
392aa819 | 1972 | if(tmpDeltaPtKTImprovedCMSPartialExclusion > -10000.0) |
1973 | FillHistogram("hDeltaPtKTImprovedCMSPartialExclusion", tmpDeltaPtKTImprovedCMSPartialExclusion, centralityPercentile); | |
c2b0976c | 1974 | if(tmpDeltaPtKTImprovedCMSPartialExclusion_Signal > -10000.0) |
1975 | FillHistogram("hDeltaPtKTImprovedCMSPartialExclusion_Signal", tmpDeltaPtKTImprovedCMSPartialExclusion_Signal, centralityPercentile); | |
1976 | if(tmpDeltaPtKTImprovedCMSFullExclusion > -10000.0) | |
1977 | FillHistogram("hDeltaPtKTImprovedCMSFullExclusion", tmpDeltaPtKTImprovedCMSFullExclusion, centralityPercentile); | |
392aa819 | 1978 | |
0cb49d99 | 1979 | if(tmpDeltaPtNoBackground > 0.000001) |
1980 | FillHistogram("hDeltaPtNoBackgroundNoEmptyCones", tmpDeltaPtNoBackground, centralityPercentile); | |
1981 | else if(tmpDeltaPtNoBackground > -10000.0) | |
1982 | FillHistogram("hDeltaPtNoBackground", tmpDeltaPtNoBackground, centralityPercentile); | |
1983 | ||
8628b70c | 1984 | |
b95d0245 | 1985 | if(fAnalyzeDeprecatedBackgrounds) |
1986 | { | |
1987 | if(tmpDeltaPtKTPbPb > -10000.0) | |
1988 | FillHistogram("hDeltaPtKTPbPb", tmpDeltaPtKTPbPb, centralityPercentile); | |
1989 | if(tmpDeltaPtKTPbPbWithGhosts > -10000.0) | |
1990 | FillHistogram("hDeltaPtKTPbPbWithGhosts", tmpDeltaPtKTPbPbWithGhosts, centralityPercentile); | |
1991 | if(tmpDeltaPtKTCMS > -10000.0) | |
1992 | FillHistogram("hDeltaPtKTCMS", tmpDeltaPtKTCMS, centralityPercentile); | |
1993 | if(tmpDeltaPtKTMean > -10000.0) | |
1994 | FillHistogram("hDeltaPtKTMean", tmpDeltaPtKTMean, centralityPercentile); | |
1995 | if(tmpDeltaPtKTTrackLike > -10000.0) | |
1996 | FillHistogram("hDeltaPtKTTrackLike", tmpDeltaPtKTTrackLike, centralityPercentile); | |
1997 | ||
b95d0245 | 1998 | if(tmpDeltaPtTR > -10000.0) |
1999 | FillHistogram("hDeltaPtTR", tmpDeltaPtTR, centralityPercentile); | |
2000 | } | |
8628b70c | 2001 | } |
2002 | ||
2003 | #ifdef DEBUGMODE | |
efb9b161 | 2004 | AliInfo("Calculate()::Background done."); |
8628b70c | 2005 | #endif |
12eb4ac1 | 2006 | |
2007 | ////////////////////// NOTE: Pythia histograms | |
2008 | if(fAnalyzePythia) | |
2009 | { | |
2010 | FillHistogram("hPythiaPtHard", GetPtHard()); | |
392aa819 | 2011 | FillHistogram("hPythiaNTrials", GetPtHardBin()+0.1, GetPythiaTrials()); |
4856f9c9 | 2012 | FillHistogram("hPythiaXSection", GetPtHardBin()+0.1, fCrossSection); |
12eb4ac1 | 2013 | |
392aa819 | 2014 | #ifdef DEBUGMODE |
12eb4ac1 | 2015 | AliInfo("Calculate()::Pythia done."); |
2016 | #endif | |
2017 | } | |
0983dd5b | 2018 | #ifdef DEBUGMODE |
2019 | AliInfo("Calculate() done."); | |
2020 | #endif | |
12eb4ac1 | 2021 | } |
8628b70c | 2022 | |
2023 | //________________________________________________________________________ | |
392aa819 | 2024 | Bool_t AliAnalysisTaskChargedJetsPA::UserNotify() |
8628b70c | 2025 | { |
2026 | // Implemented Notify() to read the cross sections | |
2027 | // and number of trials from pyxsec.root | |
2028 | // | |
2029 | #ifdef DEBUGMODE | |
392aa819 | 2030 | AliInfo("UserNotify started."); |
8628b70c | 2031 | #endif |
2032 | ||
2033 | if(fAnalyzePythia) | |
2034 | { | |
2035 | TTree *tree = AliAnalysisManager::GetAnalysisManager()->GetTree(); | |
2036 | TFile *currFile = tree->GetCurrentFile(); | |
2037 | ||
2038 | TString file(currFile->GetName()); | |
2039 | ||
2040 | if(file.Contains("root_archive.zip#")){ | |
2041 | Ssiz_t pos1 = file.Index("root_archive",12,TString::kExact); | |
2042 | Ssiz_t pos = file.Index("#",1,pos1,TString::kExact); | |
2043 | file.Replace(pos+1,20,""); | |
2044 | } | |
2045 | else { | |
2046 | // not an archive take the basename.... | |
2047 | file.ReplaceAll(gSystem->BaseName(file.Data()),""); | |
2048 | } | |
8628b70c | 2049 | |
2050 | TFile *fxsec = TFile::Open(Form("%s%s",file.Data(),"pyxsec.root")); // problem that we cannot really test the existance of a file in a archive so we have to lvie with open error message from root | |
2051 | if(!fxsec){ | |
2052 | // next trial fetch the histgram file | |
2053 | fxsec = TFile::Open(Form("%s%s",file.Data(),"pyxsec_hists.root")); | |
2054 | if(!fxsec){ | |
2055 | // not a severe condition but inciate that we have no information | |
2056 | return kFALSE; | |
2057 | } | |
2058 | else{ | |
2059 | // find the tlist we want to be independtent of the name so use the Tkey | |
2060 | TKey* key = (TKey*)fxsec->GetListOfKeys()->At(0); | |
2061 | if(!key){ | |
2062 | fxsec->Close(); | |
2063 | return kFALSE; | |
2064 | } | |
2065 | TList *list = dynamic_cast<TList*>(key->ReadObj()); | |
2066 | if(!list){ | |
2067 | fxsec->Close(); | |
2068 | return kFALSE; | |
2069 | } | |
2070 | fCrossSection = ((TProfile*)list->FindObject("h1Xsec"))->GetBinContent(1); | |
2071 | fTrials = ((TH1F*)list->FindObject("h1Trials"))->GetBinContent(1); | |
2072 | fxsec->Close(); | |
2073 | } | |
2074 | } // no tree pyxsec.root | |
2075 | else { | |
2076 | TTree *xtree = (TTree*)fxsec->Get("Xsection"); | |
2077 | if(!xtree){ | |
2078 | fxsec->Close(); | |
2079 | return kFALSE; | |
2080 | } | |
2081 | UInt_t ntrials = 0; | |
2082 | Double_t xsection = 0; | |
2083 | xtree->SetBranchAddress("xsection",&xsection); | |
2084 | xtree->SetBranchAddress("ntrials",&ntrials); | |
2085 | xtree->GetEntry(0); | |
2086 | fTrials = ntrials; | |
2087 | fCrossSection = xsection; | |
2088 | fxsec->Close(); | |
2089 | } | |
8628b70c | 2090 | } |
0cb49d99 | 2091 | #ifdef DEBUGMODE |
2092 | AliInfo("UserNotify ended."); | |
2093 | #endif | |
8628b70c | 2094 | return kTRUE; |
2095 | } | |
2096 | ||
392aa819 | 2097 | |
12eb4ac1 | 2098 | //________________________________________________________________________ |
2099 | inline Double_t AliAnalysisTaskChargedJetsPA::EtaToTheta(Double_t arg) | |
2100 | {return 2.*atan(exp(-arg));} | |
2101 | //________________________________________________________________________ | |
2102 | inline Double_t AliAnalysisTaskChargedJetsPA::ThetaToEta(Double_t arg) | |
2103 | { | |
2104 | if ((arg > TMath::Pi()) || (arg < 0.0)) | |
2105 | { | |
2106 | AliError(Form("ThetaToEta got wrong input! (%f)", arg)); | |
2107 | return 0.0; | |
2108 | } | |
2109 | return -log(tan(arg/2.)); | |
2110 | } | |
2111 | //________________________________________________________________________ | |
2112 | inline Double_t AliAnalysisTaskChargedJetsPA::GetDeltaPhi(Double_t phi1, Double_t phi2) | |
2113 | {return min(TMath::Abs(phi1-phi2),TMath::TwoPi() - TMath::Abs(phi1-phi2));} | |
2114 | ||
2115 | //________________________________________________________________________ | |
2116 | Double_t AliAnalysisTaskChargedJetsPA::MCGetOverlapCircleRectancle(Double_t cPosX, Double_t cPosY, Double_t cRadius, Double_t rPosXmin, Double_t rPosXmax, Double_t rPosYmin, Double_t rPosYmax) | |
2117 | { | |
2118 | const Int_t kTests = 1000; | |
2119 | Int_t hits = 0; | |
2120 | TRandom3 randomGen(0); | |
2121 | ||
2122 | // Loop over kTests-many tests | |
2123 | for (Int_t i=0; i<kTests; i++) | |
2124 | { | |
2125 | //Choose random position in rectangle for the tester | |
2126 | Double_t tmpTestX = randomGen.Uniform(rPosXmin, rPosXmax); | |
2127 | Double_t tmpTestY = randomGen.Uniform(rPosYmin, rPosYmax); | |
2128 | ||
2129 | //Check, if tester is in circle. If yes, increment circle counter. | |
2130 | Double_t tmpDistance = TMath::Sqrt( (tmpTestX - cPosX)*(tmpTestX - cPosX) + (tmpTestY - cPosY)*(tmpTestY - cPosY) ); | |
2131 | if(tmpDistance < cRadius) | |
2132 | hits++; | |
2133 | } | |
2134 | ||
2135 | // return ratio | |
2136 | return (static_cast<Double_t>(hits)/static_cast<Double_t>(kTests)); | |
2137 | } | |
2138 | ||
b95d0245 | 2139 | //________________________________________________________________________ |
2140 | Double_t AliAnalysisTaskChargedJetsPA::MCGetOverlapMultipleCirclesRectancle(Int_t numCircles, std::vector<Double_t> cPosX, std::vector<Double_t> cPosY, Double_t cRadius, Double_t rPosXmin, Double_t rPosXmax, Double_t rPosYmin, Double_t rPosYmax) | |
2141 | { | |
2142 | ||
2143 | const Int_t kTests = 1000; | |
2144 | Int_t hits = 0; | |
2145 | TRandom3 randomGen(0); | |
2146 | ||
2147 | // Loop over kTests-many tests | |
2148 | for (Int_t i=0; i<kTests; i++) | |
2149 | { | |
2150 | //Choose random position in rectangle for the tester | |
2151 | Double_t tmpTestX = randomGen.Uniform(rPosXmin, rPosXmax); | |
2152 | Double_t tmpTestY = randomGen.Uniform(rPosYmin, rPosYmax); | |
2153 | ||
2154 | //Check, if tester is in one of the circles. If yes, increment circle counter. | |
2155 | for(Int_t j=0; j<numCircles; j++) | |
2156 | { | |
2157 | Double_t tmpDistance = TMath::Sqrt( (tmpTestX - cPosX[j])*(tmpTestX - cPosX[j]) + (tmpTestY - cPosY[j])*(tmpTestY - cPosY[j]) ); | |
2158 | if(tmpDistance < cRadius) | |
2159 | { | |
2160 | hits++; | |
2161 | break; | |
2162 | } | |
2163 | } | |
2164 | } | |
2165 | ||
2166 | // return ratio | |
2167 | return (static_cast<Double_t>(hits)/static_cast<Double_t>(kTests)); | |
2168 | ||
2169 | } | |
2170 | ||
8628b70c | 2171 | //________________________________________________________________________ |
2172 | inline void AliAnalysisTaskChargedJetsPA::FillHistogram(const char * key, Double_t x) | |
2173 | { | |
2174 | TH1* tmpHist = static_cast<TH1*>(fOutputList->FindObject(GetHistoName(key))); | |
2175 | if(!tmpHist) | |
2176 | { | |
392aa819 | 2177 | AliError(Form("Cannot find histogram <%s> ",key)) ; |
8628b70c | 2178 | return; |
2179 | } | |
2180 | ||
2181 | tmpHist->Fill(x); | |
2182 | } | |
2183 | ||
2184 | //________________________________________________________________________ | |
2185 | inline void AliAnalysisTaskChargedJetsPA::FillHistogram(const char * key, Double_t x, Double_t y) | |
2186 | { | |
2187 | TH1* tmpHist = static_cast<TH1*>(fOutputList->FindObject(GetHistoName(key))); | |
2188 | if(!tmpHist) | |
2189 | { | |
392aa819 | 2190 | AliError(Form("Cannot find histogram <%s> ",key)); |
8628b70c | 2191 | return; |
2192 | } | |
2193 | ||
2194 | if (tmpHist->IsA()->GetBaseClass("TH1")) | |
2195 | static_cast<TH1*>(tmpHist)->Fill(x,y); // Fill x with y | |
2196 | else if (tmpHist->IsA()->GetBaseClass("TH2")) | |
2197 | static_cast<TH2*>(tmpHist)->Fill(x,y); // Fill x,y with 1 | |
2198 | } | |
2199 | ||
2200 | //________________________________________________________________________ | |
2201 | inline void AliAnalysisTaskChargedJetsPA::FillHistogram(const char * key, Double_t x, Double_t y, Double_t add) | |
2202 | { | |
2203 | TH2* tmpHist = static_cast<TH2*>(fOutputList->FindObject(GetHistoName(key))); | |
2204 | if(!tmpHist) | |
2205 | { | |
392aa819 | 2206 | AliError(Form("Cannot find histogram <%s> ",key)); |
8628b70c | 2207 | return; |
2208 | } | |
2209 | ||
2210 | tmpHist->Fill(x,y,add); | |
2211 | } | |
2212 | //________________________________________________________________________ | |
2213 | template <class T> T* AliAnalysisTaskChargedJetsPA::AddHistogram1D(const char* name, const char* title, const char* options, Int_t xBins, Double_t xMin, Double_t xMax, const char* xTitle, const char* yTitle) | |
2214 | { | |
2215 | T* tmpHist = new T(GetHistoName(name), GetHistoName(title), xBins, xMin, xMax); | |
2216 | ||
2217 | tmpHist->GetXaxis()->SetTitle(xTitle); | |
2218 | tmpHist->GetYaxis()->SetTitle(yTitle); | |
2219 | tmpHist->SetOption(options); | |
2220 | tmpHist->SetMarkerStyle(kFullCircle); | |
2221 | tmpHist->Sumw2(); | |
2222 | ||
2223 | fHistList->Add(tmpHist); | |
2224 | fHistCount++; | |
2225 | ||
2226 | return tmpHist; | |
2227 | } | |
2228 | ||
2229 | //________________________________________________________________________ | |
2230 | template <class T> T* AliAnalysisTaskChargedJetsPA::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) | |
2231 | { | |
2232 | T* tmpHist = new T(GetHistoName(name), GetHistoName(title), xBins, xMin, xMax, yBins, yMin, yMax); | |
2233 | tmpHist->GetXaxis()->SetTitle(xTitle); | |
2234 | tmpHist->GetYaxis()->SetTitle(yTitle); | |
2235 | tmpHist->GetZaxis()->SetTitle(zTitle); | |
2236 | tmpHist->SetOption(options); | |
2237 | tmpHist->SetMarkerStyle(kFullCircle); | |
2238 | tmpHist->Sumw2(); | |
2239 | ||
2240 | fHistList->Add(tmpHist); | |
2241 | fHistCount++; | |
2242 | ||
2243 | return tmpHist; | |
2244 | } | |
2245 | ||
2246 | //________________________________________________________________________ | |
2247 | void AliAnalysisTaskChargedJetsPA::Terminate(Option_t *) | |
2248 | { | |
2249 | PostData(1, fOutputList); | |
2250 | ||
2251 | // Mandatory | |
2252 | fOutputList = dynamic_cast<TList*> (GetOutputData(1)); // '1' refers to the output slot | |
2253 | if (!fOutputList) { | |
2254 | printf("ERROR: Output list not available\n"); | |
2255 | return; | |
2256 | } | |
2257 | } | |
2258 | ||
2259 | //________________________________________________________________________ | |
2260 | AliAnalysisTaskChargedJetsPA::~AliAnalysisTaskChargedJetsPA() | |
2261 | { | |
2262 | // Destructor. Clean-up the output list, but not the histograms that are put inside | |
2263 | // (the list is owner and will clean-up these histograms). Protect in PROOF case. | |
2264 | if (fOutputList && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) { | |
2265 | delete fOutputList; | |
2266 | } | |
2267 | } | |
2268 | ||
2269 | //________________________________________________________________________ | |
2270 | void AliAnalysisTaskChargedJetsPA::UserCreateOutputObjects() | |
2271 | { | |
2272 | // called once to create user defined output objects like histograms, plots etc. | |
2273 | // and to put it on the output list. | |
2274 | // Note: Saving to file with e.g. OpenFile(0) is must be before creating other objects. | |
2275 | ||
2276 | fRandom = new TRandom3(0); | |
392aa819 | 2277 | |
2278 | ||
8628b70c | 2279 | fOutputList = new TList(); |
2280 | fOutputList->SetOwner(); // otherwise it produces leaks in merging | |
2281 | ||
392aa819 | 2282 | // NOTE: Pythia histograms |
2283 | AddHistogram1D<TProfile>("hPythiaXSection", "Pythia cross section distribution", "", fNumPtHardBins+1, 0, fNumPtHardBins+1, "p_{T} hard bin","dN^{Events}/dp_{T,hard}"); | |
2284 | AddHistogram1D<TH1D>("hPythiaNTrials", "Pythia trials (no correction for manual cuts)", "", fNumPtHardBins+1, 0, fNumPtHardBins+1, "p_{T} hard bin", "Trials"); | |
2285 | ||
2286 | ||
8628b70c | 2287 | PostData(1, fOutputList); |
2288 | } | |
2289 | ||
2290 | //________________________________________________________________________ | |
2291 | void AliAnalysisTaskChargedJetsPA::UserExec(Option_t *) | |
2292 | { | |
2293 | #ifdef DEBUGMODE | |
efb9b161 | 2294 | AliInfo("UserExec() started."); |
8628b70c | 2295 | #endif |
2296 | ||
12eb4ac1 | 2297 | if (!InputEvent()) |
2298 | { | |
2299 | AliError("??? Event pointer == 0 ???"); | |
2300 | return; | |
2301 | } | |
2302 | ||
2303 | if (!fInitialized) | |
2304 | ExecOnce(); // Get tracks, jets, background from arrays if not already given + Init Histos | |
2305 | ||
8628b70c | 2306 | Calculate(InputEvent()); |
2307 | ||
2308 | PostData(1, fOutputList); | |
2309 | } |