AliPhysics  e6c8d43 (e6c8d43)
AliAnalysisTaskDijetHadron.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 //
16 // Analysis task for Dijet-hadron correlations
17 //
18 // Author: T.Kobayashi
19 #include <TH1F.h>
20 #include <TH2F.h>
21 #include <TH3F.h>
22 #include <TCanvas.h>
23 #include <TChain.h>
24 #include <TFormula.h>
25 #include <TH1.h>
26 #include <TH2.h>
27 #include <TH3.h>
28 #include <TProfile2D.h>
29 #include <THnSparse.h>
30 #include <TROOT.h>
31 #include <TTree.h>
32 #include <TArrayI.h>
33 #include <TClonesArray.h>
34 #include <TRandom3.h>
35 #include <TFile.h>
36 #include <TF1.h>
37 #include <TLorentzVector.h>
38 #include <TParameter.h>
39 #include <TList.h>
40 
41 #include "AliAODEvent.h"
42 #include "AliAODInputHandler.h"
43 #include "AliAnalysisManager.h"
44 #include "AliAnalysisTask.h"
45 #include "AliCentrality.h"
46 #include "AliESDEvent.h"
47 #include "AliESDInputHandler.h"
48 #include "AliVParticle.h"
49 #include "AliVCluster.h"
50 #include "AliVTrack.h"
51 #include "AliEmcalJet.h"
52 #include "AliInputEventHandler.h"
53 #include "AliMCEvent.h"
54 #include "AliStack.h"
55 #include "AliGenEventHeader.h"
56 #include "AliGenPythiaEventHeader.h"
57 #include "AliLog.h"
58 #include "AliRhoParameter.h"
59 #include "AliNamedArrayI.h"
60 #include "AliNamedString.h"
61 #include "AliJetContainer.h"
62 #include "AliParticleContainer.h"
63 #include "AliClusterContainer.h"
64 
65 #include "AliEmcalJet.h"
66 
67 #include <iostream>
68 using std::cout;
69 using std::cerr;
70 using std::endl;
71 
72 const Double_t pi = TMath::Pi();
73 //const Double_t areaCut[4] = {0.1, 0.23, 0.4, 0.63};
74 
76 
78 
79 //________________________________________________________________________
81  fMCJetPtThreshold(1), fleadingHadronPtcut1(0.0), fleadingHadronPtcut2(3.0), fleadingHadronPtcut3(5.0), fJet1Ptcut1(10.0), fJet1Ptcut2(20.0), fJet1Ptcut3(30.0), fJet2Ptcut1(10.0), fJet2Ptcut2(20.0), fJet2Ptcut3(30.0), fConeRadius(0.2), fConeMinEta(-0.9), fConeMaxEta(0.9), fConeMinPhi(0), fConeMaxPhi(TMath::Pi()*2), fJetsCont(0), fTracksCont(0), fCaloClustersCont(0), fMCJetsCont(0), fMCTracksCont(0), fMCCaloClustersCont(0), fEmbJetsCont(0), fEmbTracksCont(0), fEmbCaloClustersCont(0), fCent_V0(0), fVertex_z_cut(0), fEP2(0), fJetBG_rho(0), fJetBG_rho_Cent(0), fTrackPt_PbPb(0), fTrackPhi_PbPb(0), fTrackEta_PbPb(0), fTrack_Phi_Eta_PbPb(0), fTrackPt_MC(0), fTrackPhi_MC(0), fTrackEta_MC(0), fTrack_Phi_Eta_MC(0), fTrackPt_EMB(0), fTrackPhi_EMB(0), fTrackEta_EMB(0), fTrack_Phi_Eta_EMB(0), fJetPt_PbPb(), fJetPhi_PbPb(), fJetEta_PbPb(), fJet_Phi_Eta_PbPb(), fJetPt_BG_PbPb(), fJetDeltaEP_PbPb(), fJet1Pt_PbPb(), fJet2Pt_PbPb(), fJet1Pt_BG_PbPb(), fJet2Pt_BG_PbPb(), fJetDeltaPhi_PbPb(), fJetDeltaEta_PbPb(), fJet1SelectPt_BG_PbPb(), fJet2SelectPt_BG_PbPb(), fJet1EP_PbPb(), fAj_PbPb(), fJetPt_MC(), fJetPhi_MC(), fJetEta_MC(), fJet_Phi_Eta_MC(), fJetDeltaEP_MC(), fJet1Pt_MC(), fJet2Pt_MC(), fJetDeltaPhi_MC(), fJetDeltaEta_MC(), fJet1EP_MC(), fAj_MC(), fJetPt_EMB(), fJetPhi_EMB(), fJetEta_EMB(), fJet_Phi_Eta_EMB(), fJetPt_BG_EMB(), fJetDeltaPt(), fJetDeltaEP_EMB(), fJet1Pt_EMB(), fJet2Pt_EMB(), fJet1Pt_BG_EMB(), fJet2Pt_BG_EMB(), fJet1DeltaPt(), fJet2DeltaPt(), fJetDeltaPhi_EMB(), fJetDeltaEta_EMB(), fJet1SelectPt_BG_EMB(), fJet2SelectPt_BG_EMB(), fJet1SelectDeltaPt(), fJet2SelectDeltaPt(), fJet1EP_EMB(), fAj_EMB(), fHJetDeltaPhi_Aj0_PbPb(), fHJetDeltaPhi_Aj1_PbPb(), fHJetDeltaPhi_Aj2_PbPb(), fHJetDeltaPhi_Aj3_PbPb(), fHJetDeltaPhi_Aj4_PbPb(), fHJet_EP_Aj0_PbPb(), fHJet_EP_Aj1_PbPb(), fHJet_EP_Aj2_PbPb(), fHJet_EP_Aj3_PbPb(), fHJet_EP_Aj4_PbPb(), fHJetDeltaPhi_Aj0_MC(), fHJetDeltaPhi_Aj1_MC(), fHJetDeltaPhi_Aj2_MC(), fHJetDeltaPhi_Aj3_MC(), fHJetDeltaPhi_Aj4_MC(), fHJet_EP_Aj0_MC(), fHJet_EP_Aj1_MC(), fHJet_EP_Aj2_MC(), fHJet_EP_Aj3_MC(), fHJet_EP_Aj4_MC(), fHJetDeltaPhi_Aj0_EMB(), fHJetDeltaPhi_Aj1_EMB(), fHJetDeltaPhi_Aj2_EMB(), fHJetDeltaPhi_Aj3_EMB(), fHJetDeltaPhi_Aj4_EMB(), fHJet_EP_Aj0_EMB(), fHJet_EP_Aj1_EMB(), fHJet_EP_Aj2_EMB(), fHJet_EP_Aj3_EMB(), fHJet_EP_Aj4_EMB(), fEvent(0), fCentrality(0) {
82 
83  // Default constructor.
84  SetMakeGeneralHistograms(kTRUE);
85 }
86 
87 //________________________________________________________________________
89  fMCJetPtThreshold(1), fleadingHadronPtcut1(0.0), fleadingHadronPtcut2(3.0), fleadingHadronPtcut3(5.0), fJet1Ptcut1(10.0), fJet1Ptcut2(20.0), fJet1Ptcut3(30.0), fJet2Ptcut1(10.0), fJet2Ptcut2(20.0), fJet2Ptcut3(30.0), fConeRadius(0.2), fConeMinEta(-0.9), fConeMaxEta(0.9), fConeMinPhi(0), fConeMaxPhi(TMath::Pi()*2), fJetsCont(0), fTracksCont(0), fCaloClustersCont(0), fMCJetsCont(0), fMCTracksCont(0), fMCCaloClustersCont(0), fEmbJetsCont(0), fEmbTracksCont(0), fEmbCaloClustersCont(0), fCent_V0(0), fVertex_z_cut(0), fEP2(0), fJetBG_rho(0), fJetBG_rho_Cent(0), fTrackPt_PbPb(0), fTrackPhi_PbPb(0), fTrackEta_PbPb(0), fTrack_Phi_Eta_PbPb(0), fTrackPt_MC(0), fTrackPhi_MC(0), fTrackEta_MC(0), fTrack_Phi_Eta_MC(0), fTrackPt_EMB(0), fTrackPhi_EMB(0), fTrackEta_EMB(0), fTrack_Phi_Eta_EMB(0), fJetPt_PbPb(), fJetPhi_PbPb(), fJetEta_PbPb(), fJet_Phi_Eta_PbPb(), fJetPt_BG_PbPb(), fJetDeltaEP_PbPb(), fJet1Pt_PbPb(), fJet2Pt_PbPb(), fJet1Pt_BG_PbPb(), fJet2Pt_BG_PbPb(), fJetDeltaPhi_PbPb(), fJetDeltaEta_PbPb(), fJet1SelectPt_BG_PbPb(), fJet2SelectPt_BG_PbPb(), fJet1EP_PbPb(), fAj_PbPb(), fJetPt_MC(), fJetPhi_MC(), fJetEta_MC(), fJet_Phi_Eta_MC(), fJetDeltaEP_MC(), fJet1Pt_MC(), fJet2Pt_MC(), fJetDeltaPhi_MC(), fJetDeltaEta_MC(), fJet1EP_MC(), fAj_MC(), fJetPt_EMB(), fJetPhi_EMB(), fJetEta_EMB(), fJet_Phi_Eta_EMB(), fJetPt_BG_EMB(), fJetDeltaPt(), fJetDeltaEP_EMB(), fJet1Pt_EMB(), fJet2Pt_EMB(), fJet1Pt_BG_EMB(), fJet2Pt_BG_EMB(), fJet1DeltaPt(), fJet2DeltaPt(), fJetDeltaPhi_EMB(), fJetDeltaEta_EMB(), fJet1SelectPt_BG_EMB(), fJet2SelectPt_BG_EMB(), fJet1SelectDeltaPt(), fJet2SelectDeltaPt(), fJet1EP_EMB(), fAj_EMB(), fHJetDeltaPhi_Aj0_PbPb(), fHJetDeltaPhi_Aj1_PbPb(), fHJetDeltaPhi_Aj2_PbPb(), fHJetDeltaPhi_Aj3_PbPb(), fHJetDeltaPhi_Aj4_PbPb(), fHJet_EP_Aj0_PbPb(), fHJet_EP_Aj1_PbPb(), fHJet_EP_Aj2_PbPb(), fHJet_EP_Aj3_PbPb(), fHJet_EP_Aj4_PbPb(), fHJetDeltaPhi_Aj0_MC(), fHJetDeltaPhi_Aj1_MC(), fHJetDeltaPhi_Aj2_MC(), fHJetDeltaPhi_Aj3_MC(), fHJetDeltaPhi_Aj4_MC(), fHJet_EP_Aj0_MC(), fHJet_EP_Aj1_MC(), fHJet_EP_Aj2_MC(), fHJet_EP_Aj3_MC(), fHJet_EP_Aj4_MC(), fHJetDeltaPhi_Aj0_EMB(), fHJetDeltaPhi_Aj1_EMB(), fHJetDeltaPhi_Aj2_EMB(), fHJetDeltaPhi_Aj3_EMB(), fHJetDeltaPhi_Aj4_EMB(), fHJet_EP_Aj0_EMB(), fHJet_EP_Aj1_EMB(), fHJet_EP_Aj2_EMB(), fHJet_EP_Aj3_EMB(), fHJet_EP_Aj4_EMB(), fEvent(0), fCentrality(0) {
90 
91  // Standard constructor.
93 }
94 
95 //________________________________________________________________________
97 {
101 
102  for (Int_t i = 0; i < fNcentBins; i++) {
103  fTrackPt_PbPb[i] = 0; fTrackPhi_PbPb[i] = 0; fTrackEta_PbPb[i] = 0; fTrack_Phi_Eta_PbPb[i] = 0;
104 
105  fTrackPt_MC[i] = 0; fTrackPhi_MC[i] = 0; fTrackEta_MC[i] = 0; fTrack_Phi_Eta_MC[i] = 0;
106 
107  fTrackPt_EMB[i] = 0; fTrackPhi_EMB[i] = 0; fTrackEta_EMB[i] = 0; fTrack_Phi_Eta_EMB[i] = 0;
108  }
109 
110  for (Int_t i = 0; i < fNcentBins; i++) {
111  for (Int_t j = 0; j < 3; j++) {
112  fJetPt_PbPb[i][j] = 0; fJetPhi_PbPb[i][j] = 0; fJetEta_PbPb[i][j] = 0; fJet_Phi_Eta_PbPb[i][j] = 0; fJetPt_BG_PbPb[i][j] = 0; fJetDeltaEP_PbPb[i][j] = 0;
113 
114  fJetPt_MC[i][j] = 0; fJetPhi_MC[i][j] = 0; fJetEta_MC[i][j] = 0; fJet_Phi_Eta_MC[i][j] = 0; fJetDeltaEP_MC[i][j] = 0;
115 
116  fJetPt_EMB[i][j] = 0; fJetPhi_EMB[i][j] = 0; fJetEta_EMB[i][j] = 0; fJet_Phi_Eta_EMB[i][j] = 0; fJetPt_BG_EMB[i][j] = 0; fJetDeltaEP_EMB[i][j] = 0;
117  }
118  }
119 
120  for (Int_t i = 0; i < fNcentBins; i++) {
121  for (Int_t j = 0; j < 3; j++) {
122  for (Int_t k = 0; k < 4; k++) {
123  for (Int_t l = 0; l < k+1; l++) {
124  fJet1Pt_PbPb[i][j][k][l] = 0; fJet2Pt_PbPb[i][j][k][l] = 0; fJet1Pt_BG_PbPb[i][j][k][l] = 0; fJet2Pt_BG_PbPb[i][j][k][l] = 0; fJetDeltaPhi_PbPb[i][j][k][l] = 0; fJetDeltaEta_PbPb[i][j][k][l] = 0; fJet1SelectPt_BG_PbPb[i][j][k][l] = 0; fJet2SelectPt_BG_PbPb[i][j][k][l] = 0; fJet1EP_PbPb[i][j][k][l] = 0; fAj_PbPb[i][j][k][l] = 0;
125 
126  fJet1Pt_MC[i][j][k][l] = 0; fJet2Pt_MC[i][j][k][l] = 0; fJetDeltaPhi_MC[i][j][k][l] = 0; fJetDeltaEta_MC[i][j][k][l] = 0; fJet1EP_MC[i][j][k][l] = 0; fAj_MC[i][j][k][l] = 0;
127 
128  fJet1Pt_EMB[i][j][k][l] = 0; fJet2Pt_EMB[i][j][k][l] = 0; fJet1Pt_BG_EMB[i][j][k][l] = 0; fJet2Pt_BG_EMB[i][j][k][l] = 0; fJet1DeltaPt[i][j][k][l] = 0; fJet2DeltaPt[i][j][k][l] = 0; fJetDeltaPhi_EMB[i][j][k][l] = 0; fJetDeltaEta_EMB[i][j][k][l] = 0; fJet1SelectPt_BG_EMB[i][j][k][l] = 0; fJet2SelectPt_BG_EMB[i][j][k][l] = 0; fJet1SelectDeltaPt[i][j][k][l] = 0; fJet2SelectDeltaPt[i][j][k][l] = 0; fJet1EP_EMB[i][j][k][l] = 0; fAj_EMB[i][j][k][l] = 0;
129  }
130  }
131  }
132  }
133 
134  for (Int_t i = 0; i < fNcentBins; i++) {
135  for (Int_t j = 0; j < 3; j++) {
136  for (Int_t k = 0; k < 4; k++) {
137  for (Int_t l = 0; l < 4; l++) {
138  for (Int_t m = 0; m < l+1; m++) {
139  fHJetDeltaPhi_Aj0_PbPb[i][j][k][l][m] = 0; fHJetDeltaPhi_Aj1_PbPb[i][j][k][l][m] = 0; fHJetDeltaPhi_Aj2_PbPb[i][j][k][l][m] = 0; fHJetDeltaPhi_Aj3_PbPb[i][j][k][l][m] = 0; fHJetDeltaPhi_Aj4_PbPb[i][j][k][l][m] = 0; fHJet_EP_Aj0_PbPb[i][j][k][l][m] = 0; fHJet_EP_Aj1_PbPb[i][j][k][l][m] = 0; fHJet_EP_Aj2_PbPb[i][j][k][l][m] = 0; fHJet_EP_Aj3_PbPb[i][j][k][l][m] = 0; fHJet_EP_Aj4_PbPb[i][j][k][l][m] = 0;
140 
141  fHJetDeltaPhi_Aj0_MC[i][j][k][l][m] = 0; fHJetDeltaPhi_Aj1_MC[i][j][k][l][m] = 0; fHJetDeltaPhi_Aj2_MC[i][j][k][l][m] = 0; fHJetDeltaPhi_Aj3_MC[i][j][k][l][m] = 0; fHJetDeltaPhi_Aj4_MC[i][j][k][l][m] = 0; fHJet_EP_Aj0_MC[i][j][k][l][m] = 0; fHJet_EP_Aj1_MC[i][j][k][l][m] = 0; fHJet_EP_Aj2_MC[i][j][k][l][m] = 0; fHJet_EP_Aj3_MC[i][j][k][l][m] = 0; fHJet_EP_Aj4_MC[i][j][k][l][m] = 0;
142 
143  fHJetDeltaPhi_Aj0_EMB[i][j][k][l][m] = 0; fHJetDeltaPhi_Aj1_EMB[i][j][k][l][m] = 0; fHJetDeltaPhi_Aj2_EMB[i][j][k][l][m] = 0; fHJetDeltaPhi_Aj3_EMB[i][j][k][l][m] = 0; fHJetDeltaPhi_Aj4_EMB[i][j][k][l][m] = 0; fHJet_EP_Aj0_EMB[i][j][k][l][m] = 0; fHJet_EP_Aj1_EMB[i][j][k][l][m] = 0; fHJet_EP_Aj2_EMB[i][j][k][l][m] = 0; fHJet_EP_Aj3_EMB[i][j][k][l][m] = 0; fHJet_EP_Aj4_EMB[i][j][k][l][m] = 0;
144  }
145  }
146  }
147  }
148  }
149 
150 }
151 
152 //________________________________________________________________________
154 {
155  // Create user output.
156 
158 
160 
161  fJetsCont = GetJetContainer("Jets");
162  fTracksCont = GetParticleContainer("Tracks");
163  fCaloClustersCont = GetClusterContainer("CaloClusters");
164  fMCJetsCont = GetJetContainer("MCJets");
165  fMCTracksCont = GetParticleContainer("MCTracks");
166  fMCCaloClustersCont = GetClusterContainer("MCCaloClusters");
167  fEmbJetsCont = GetJetContainer("EmbJets");
168  fEmbTracksCont = GetParticleContainer("EmbTracks");
169  fEmbCaloClustersCont = GetClusterContainer("EmbCaloClusters");
170 
171  //User Task
172  fCent_V0 = new TH1F("fCent_V0", "Centrality (all) by V0M", 103,-2,101);
173  fOutput->Add(fCent_V0);
174  fVertex_z_cut = new TH1F("fVertex_z_cut", "SPD vertex z (cut)", 120,-30,30);
175  fOutput->Add(fVertex_z_cut);
176  fEP2 = new TH1F("fEP2", "fEP2", 80,-pi,pi);
177  fOutput->Add(fEP2);
178  fJetBG_rho = new TH1F("fJetBG_rho","fJetBG_rho",300,0,300);
179  fOutput->Add(fJetBG_rho);
180  fJetBG_rho_Cent = new TH2F("fJetBG_rho_Cent","fJetBG_rho_Cent",100,0,100,300,0,300);
181  fOutput->Add(fJetBG_rho_Cent);
182 
183  // Track histograms...
184  for (Int_t i = 0; i < fNcentBins; i++) {
185  //PbPb
186  fTrackPt_PbPb[i] = new TH1F(Form("fTrackPt_PbPb[%d]",i),Form("fTrackPt_PbPb[%d]",i),100,-80,120);
187  fOutput->Add(fTrackPt_PbPb[i]);
188  fTrackPhi_PbPb[i] = new TH1F(Form("fTrackPhi_PbPb[%d]",i),Form("fTrackPhi_PbPb[%d]",i),40,0.0,2.*pi);
189  fOutput->Add(fTrackPhi_PbPb[i]);
190  fTrackEta_PbPb[i] = new TH1F(Form("fTrackEta_PbPb[%d]",i),Form("fTrackEta_PbPb[%d]",i),40,-1.,1.);
191  fOutput->Add(fTrackEta_PbPb[i]);
192  fTrack_Phi_Eta_PbPb[i] = new TH2F(Form("fTrack_Phi_Eta_PbPb[%d]",i),Form("fTrack_Phi_Eta_PbPb[%d]",i),40,0.0,2.*pi,40,-1.,1.);
193  fOutput->Add(fTrack_Phi_Eta_PbPb[i]);
194 
195  //MC
196  fTrackPt_MC[i] = new TH1F(Form("fTrackPt_MC[%d]",i),Form("fTrackPt_MC[%d]",i),100,-80,120);
197  fOutput->Add(fTrackPt_MC[i]);
198  fTrackPhi_MC[i] = new TH1F(Form("fTrackPhi_MC[%d]",i),Form("fTrackPhi_MC[%d]",i),40,0.0,2.*pi);
199  fOutput->Add(fTrackPhi_MC[i]);
200  fTrackEta_MC[i] = new TH1F(Form("fTrackEta_MC[%d]",i),Form("fTrackEta_MC[%d]",i),40,-1.,1.);
201  fOutput->Add(fTrackEta_MC[i]);
202  fTrack_Phi_Eta_MC[i] = new TH2F(Form("fTrack_Phi_Eta_MC[%d]",i),Form("fTrack_Phi_Eta_MC[%d]",i),40,0.0,2.*pi,40,-1.,1.);
203  fOutput->Add(fTrack_Phi_Eta_MC[i]);
204 
205  //EMB
206  fTrackPt_EMB[i] = new TH1F(Form("fTrackPt_EMB[%d]",i),Form("fTrackPt_EMB[%d]",i),100,-80,120);
207  fOutput->Add(fTrackPt_EMB[i]);
208  fTrackPhi_EMB[i] = new TH1F(Form("fTrackPhi_EMB[%d]",i),Form("fTrackPhi_EMB[%d]",i),40,0.0,2.*pi);
209  fOutput->Add(fTrackPhi_EMB[i]);
210  fTrackEta_EMB[i] = new TH1F(Form("fTrackEta_EMB[%d]",i),Form("fTrackEta_EMB[%d]",i),40,-1.,1.);
211  fOutput->Add(fTrackEta_EMB[i]);
212  fTrack_Phi_Eta_EMB[i] = new TH2F(Form("fTrack_Phi_Eta_EMB[%d]",i),Form("fTrack_Phi_Eta_EMB[%d]",i),40,0.0,2.*pi,40,-1.,1.);
213  fOutput->Add(fTrack_Phi_Eta_EMB[i]);
214  }
215 
216  for (Int_t i = 0; i < fNcentBins; i++) {
217  for (Int_t j = 0; j < 3; j++) {
218 //Jet Histgrams...
219  //PbPb
220  fJetPt_PbPb[i][j] = new TH1F(Form("fJetPt_PbPb[%d][%d]",i,j),Form("fJetPt_PbPb[%d][%d]",i,j),100,-80,120);
221  fOutput->Add(fJetPt_PbPb[i][j]);
222  fJetPhi_PbPb[i][j] = new TH1F(Form("fJetPhi_PbPb[%d][%d]",i,j),Form("fJetPhi_PbPb[%d][%d]",i,j),40,0.0, 2*pi);
223  fOutput->Add(fJetPhi_PbPb[i][j]);
224  fJetEta_PbPb[i][j] = new TH1F(Form("fJetEta_PbPb[%d][%d]",i,j),Form("fJetEta_PbPb[%d][%d]",i,j),40,-1.,1.);
225  fOutput->Add(fJetEta_PbPb[i][j]);
226  fJet_Phi_Eta_PbPb[i][j] = new TH2F(Form("fJet_Phi_Eta_PbPb[%d][%d]",i,j),Form("fJet_Phi_Eta_PbPb[%d][%d]",i,j),40,0.0, 2*pi,40,-1.,1.);
227  fOutput->Add(fJet_Phi_Eta_PbPb[i][j]);
228  fJetPt_BG_PbPb[i][j] = new TH1F(Form("fJetPt_BG_PbPb[%d][%d]",i,j),Form("fJetPt_BG_PbPb[%d][%d]",i,j),100,-80,120);
229  fOutput->Add(fJetPt_BG_PbPb[i][j]);
230  fJetDeltaEP_PbPb[i][j] = new TH2F(Form("fJetDeltaEP_PbPb[%d][%d]",i,j),Form("fJetDeltaEP_PbPb[%d][%d]",i,j),40,-1./2.*pi,3./2.*pi,100,-80,120);
231  fOutput->Add(fJetDeltaEP_PbPb[i][j]);
232 
233  //MC
234  fJetPt_MC[i][j] = new TH1F(Form("fJetPt_MC[%d][%d]",i,j),Form("fJetPt_MC[%d][%d]",i,j),100,-80,120);
235  fOutput->Add(fJetPt_MC[i][j]);
236  fJetPhi_MC[i][j] = new TH1F(Form("fJetPhi_MC[%d][%d]",i,j),Form("fJetPhi_MC[%d][%d]",i,j),40,0.0, 2*pi);
237  fOutput->Add(fJetPhi_MC[i][j]);
238  fJetEta_MC[i][j] = new TH1F(Form("fJetEta_MC[%d][%d]",i,j),Form("fJetEta_MC[%d][%d]",i,j),40,-1.,1.);
239  fOutput->Add(fJetEta_MC[i][j]);
240  fJet_Phi_Eta_MC[i][j] = new TH2F(Form("fJet_Phi_Eta_MC[%d][%d]",i,j),Form("fJet_Phi_Eta_MC[%d][%d]",i,j),40,0.0, 2*pi,40,-1.,1.);
241  fOutput->Add(fJet_Phi_Eta_MC[i][j]);
242  fJetDeltaEP_MC[i][j] = new TH2F(Form("fJetDeltaEP_MC[%d][%d]",i,j),Form("fJetDeltaEP_MC[%d][%d]",i,j),40,-1./2.*pi,3./2.*pi,100,-80,120);
243  fOutput->Add(fJetDeltaEP_MC[i][j]);
244 
245  //EMB
246  fJetPt_EMB[i][j] = new TH1F(Form("fJetPt_EMB[%d][%d]",i,j),Form("fJetPt_EMB[%d][%d]",i,j),100,-80,120);
247  fOutput->Add(fJetPt_EMB[i][j]);
248  fJetPhi_EMB[i][j] = new TH1F(Form("fJetPhi_EMB[%d][%d]",i,j),Form("fJetPhi_EMB[%d][%d]",i,j),40,0.0, 2*pi);
249  fOutput->Add(fJetPhi_EMB[i][j]);
250  fJetEta_EMB[i][j] = new TH1F(Form("fJetEta_EMB[%d][%d]",i,j),Form("fJetEta_EMB[%d][%d]",i,j),40,-1.,1.);
251  fOutput->Add(fJetEta_EMB[i][j]);
252  fJet_Phi_Eta_EMB[i][j] = new TH2F(Form("fJet_Phi_Eta_EMB[%d][%d]",i,j),Form("fJet_Phi_Eta_EMB[%d][%d]",i,j),40,0.0, 2*pi,40,-1.,1.);
253  fOutput->Add(fJet_Phi_Eta_EMB[i][j]);
254  fJetPt_BG_EMB[i][j] = new TH1F(Form("fJetPt_BG_EMB[%d][%d]",i,j),Form("fJetPt_BG_EMB[%d][%d]",i,j),100,-80,120);
255  fOutput->Add(fJetPt_BG_EMB[i][j]);
256  fJetDeltaPt[i][j] = new TH1F(Form("fJetDeltaPt[%d][%d]",i,j),Form("fJetDeltaPt[%d][%d]",i,j),100,-80,120);
257  fOutput->Add(fJetDeltaPt[i][j]);
258  fJetDeltaEP_EMB[i][j] = new TH2F(Form("fJetDeltaEP_EMB[%d][%d]",i,j),Form("fJetDeltaEP_EMB[%d][%d]",i,j),40,-1./2.*pi,3./2.*pi,100,-80,120);
259  fOutput->Add(fJetDeltaEP_EMB[i][j]);
260 
261  }
262  }
263 
264  for (Int_t i = 0; i < fNcentBins; i++) {
265  for (Int_t j = 0; j < 3; j++) {
266  for (Int_t k = 0; k < 4; k++) {
267  for (Int_t l = 0; l < k+1; l++) {
268 // Jet Histgrams...
269  //PbPb
270  fJet1Pt_PbPb[i][j][k][l] = new TH1F(Form("fJet1Pt_PbPb[%d][%d][%d][%d]",i,j,k,l),Form("fJet1Pt_PbPb[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
271  fOutput->Add(fJet1Pt_PbPb[i][j][k][l]);
272  fJet2Pt_PbPb[i][j][k][l] = new TH1F(Form("fJet2Pt_PbPb[%d][%d][%d][%d]",i,j,k,l),Form("fJet2Pt_PbPb[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
273  fOutput->Add(fJet2Pt_PbPb[i][j][k][l]);
274  fJet1Pt_BG_PbPb[i][j][k][l] = new TH1F(Form("fJet1Pt_BG_PbPb[%d][%d][%d][%d]",i,j,k,l),Form("fJet1Pt_BG_PbPb[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
275  fOutput->Add(fJet1Pt_BG_PbPb[i][j][k][l]);
276  fJet2Pt_BG_PbPb[i][j][k][l] = new TH1F(Form("fJet2Pt_BG_PbPb[%d][%d][%d][%d]",i,j,k,l),Form("fJet2Pt_BG_PbPb[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
277  fOutput->Add(fJet2Pt_BG_PbPb[i][j][k][l]);
278  fJetDeltaPhi_PbPb[i][j][k][l] = new TH1F(Form("fJetDeltaPhi_PbPb[%d][%d][%d][%d]",i,j,k,l),Form("fJetDeltaPhi_PbPb[%d][%d][%d][%d]",i,j,k,l),40,-1./2.*pi,3./2.*pi);
279  fOutput->Add(fJetDeltaPhi_PbPb[i][j][k][l]);
280  fJetDeltaEta_PbPb[i][j][k][l] = new TH1F(Form("fJetDeltaEta_PbPb[%d][%d][%d][%d]",i,j,k,l),Form("fJetDeltaEta_PbPb[%d][%d][%d][%d]",i,j,k,l),40,-1.0,1.0);
281  fOutput->Add(fJetDeltaEta_PbPb[i][j][k][l]);
282  fJet1SelectPt_BG_PbPb[i][j][k][l] = new TH1F(Form("fJet1SelectPt_BG_PbPb[%d][%d][%d][%d]",i,j,k,l),Form("fJet1SelectPt_BG_PbPb[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
283  fOutput->Add(fJet1SelectPt_BG_PbPb[i][j][k][l]);
284  fJet2SelectPt_BG_PbPb[i][j][k][l] = new TH1F(Form("fJet2SelectPt_BG_PbPb[%d][%d][%d][%d]",i,j,k,l),Form("fJet2SelectPt_BG_PbPb[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
285  fOutput->Add(fJet2SelectPt_BG_PbPb[i][j][k][l]);
286  fJet1EP_PbPb[i][j][k][l] = new TH2F(Form("fJet1EP_PbPb[%d][%d][%d][%d]",i,j,k,l),Form("fJet1EP_PbPb[%d][%d][%d][%d]",i,j,k,l),40,-1./2.*pi,3./2.*pi,100,-80,120);
287  fOutput->Add(fJet1EP_PbPb[i][j][k][l]);
288  fAj_PbPb[i][j][k][l] = new TH1F(Form("fAj_PbPb[%d][%d][%d][%d]",i,j,k,l),Form("fAj_PbPb[%d][%d][%d][%d]",i,j,k,l),20,0.,1.);
289  fOutput->Add(fAj_PbPb[i][j][k][l]);
290 
291  //MC
292  fJet1Pt_MC[i][j][k][l] = new TH1F(Form("fJet1Pt_MC[%d][%d][%d][%d]",i,j,k,l),Form("fJet1Pt_MC[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
293  fOutput->Add(fJet1Pt_MC[i][j][k][l]);
294  fJet2Pt_MC[i][j][k][l] = new TH1F(Form("fJet2Pt_MC[%d][%d][%d][%d]",i,j,k,l),Form("fJet2Pt_MC[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
295  fOutput->Add(fJet2Pt_MC[i][j][k][l]);
296  fJetDeltaPhi_MC[i][j][k][l] = new TH1F(Form("fJetDeltaPhi_MC[%d][%d][%d][%d]",i,j,k,l),Form("fJetDeltaPhi_MC[%d][%d][%d][%d]",i,j,k,l),40,-1./2.*pi,3./2.*pi);
297  fOutput->Add(fJetDeltaPhi_MC[i][j][k][l]);
298  fJetDeltaEta_MC[i][j][k][l] = new TH1F(Form("fJetDeltaEta_MC[%d][%d][%d][%d]",i,j,k,l),Form("fJetDeltaEta_MC[%d][%d][%d][%d]",i,j,k,l),40,-1.0,1.0);
299  fOutput->Add(fJetDeltaEta_MC[i][j][k][l]);
300  fJet1EP_MC[i][j][k][l] = new TH2F(Form("fJet1EP_MC[%d][%d][%d][%d]",i,j,k,l),Form("fJet1EP_MC[%d][%d][%d][%d]",i,j,k,l),40,-1./2.*pi,3./2.*pi,100,-80,120);
301  fOutput->Add(fJet1EP_MC[i][j][k][l]);
302  fAj_MC[i][j][k][l] = new TH1F(Form("fAj_MC[%d][%d][%d][%d]",i,j,k,l),Form("fAj_MC[%d][%d][%d][%d]",i,j,k,l),20,0.,1.);
303  fOutput->Add(fAj_MC[i][j][k][l]);
304 
305  //EMB
306  fJet1Pt_EMB[i][j][k][l] = new TH1F(Form("fJet1Pt_EMB[%d][%d][%d][%d]",i,j,k,l),Form("fJet1Pt_EMB[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
307  fOutput->Add(fJet1Pt_EMB[i][j][k][l]);
308  fJet2Pt_EMB[i][j][k][l] = new TH1F(Form("fJet2Pt_EMB[%d][%d][%d][%d]",i,j,k,l),Form("fJet2Pt_EMB[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
309  fOutput->Add(fJet2Pt_EMB[i][j][k][l]);
310  fJet1Pt_BG_EMB[i][j][k][l] = new TH1F(Form("fJet1Pt_BG_EMB[%d][%d][%d][%d]",i,j,k,l),Form("fJet1Pt_BG_EMB[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
311  fOutput->Add(fJet1Pt_BG_EMB[i][j][k][l]);
312  fJet2Pt_BG_EMB[i][j][k][l] = new TH1F(Form("fJet2Pt_BG_EMB[%d][%d][%d][%d]",i,j,k,l),Form("fJet2Pt_BG_EMB[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
313  fOutput->Add(fJet2Pt_BG_EMB[i][j][k][l]);
314  fJet1DeltaPt[i][j][k][l] = new TH1F(Form("fJet1DeltaPt[%d][%d][%d][%d]",i,j,k,l),Form("fJet1DeltaPt[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
315  fOutput->Add(fJet1DeltaPt[i][j][k][l]);
316  fJet2DeltaPt[i][j][k][l] = new TH1F(Form("fJet2DeltaPt[%d][%d][%d][%d]",i,j,k,l),Form("fJet2DeltaPt[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
317  fOutput->Add(fJet2DeltaPt[i][j][k][l]);
318  fJetDeltaPhi_EMB[i][j][k][l] = new TH1F(Form("fJetDeltaPhi_EMB[%d][%d][%d][%d]",i,j,k,l),Form("fJetDeltaPhi_EMB[%d][%d][%d][%d]",i,j,k,l),40,-1./2.*pi,3./2.*pi);
319  fOutput->Add(fJetDeltaPhi_EMB[i][j][k][l]);
320  fJetDeltaEta_EMB[i][j][k][l] = new TH1F(Form("fJetDeltaEta_EMB[%d][%d][%d][%d]",i,j,k,l),Form("fJetDeltaEta_EMB[%d][%d][%d][%d]",i,j,k,l),40,-1.0,1.0);
321  fOutput->Add(fJetDeltaEta_EMB[i][j][k][l]);
322  fJet1SelectPt_BG_EMB[i][j][k][l] = new TH1F(Form("fJet1SelectPt_BG_EMB[%d][%d][%d][%d]",i,j,k,l),Form("fJet1SelectPt_BG_EMB[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
323  fOutput->Add(fJet1SelectPt_BG_EMB[i][j][k][l]);
324  fJet2SelectPt_BG_EMB[i][j][k][l] = new TH1F(Form("fJet2SelectPt_BG_EMB[%d][%d][%d][%d]",i,j,k,l),Form("fJet2SelectPt_BG_EMB[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
325  fOutput->Add(fJet2SelectPt_BG_EMB[i][j][k][l]);
326  fJet1SelectDeltaPt[i][j][k][l] = new TH1F(Form("fJet1SelectDeltaPt[%d][%d][%d][%d]",i,j,k,l),Form("fJet1SelectDeltaPt[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
327  fOutput->Add(fJet1SelectDeltaPt[i][j][k][l]);
328  fJet2SelectDeltaPt[i][j][k][l] = new TH1F(Form("fJet2SelectDeltaPt[%d][%d][%d][%d]",i,j,k,l),Form("fJet2SelectDeltaPt[%d][%d][%d][%d]",i,j,k,l),100,-80,120);
329  fOutput->Add(fJet2SelectDeltaPt[i][j][k][l]);
330  fJet1EP_EMB[i][j][k][l] = new TH2F(Form("fJet1EP_EMB[%d][%d][%d][%d]",i,j,k,l),Form("fJet1EP_EMB[%d][%d][%d][%d]",i,j,k,l),40,-1./2.*pi,3./2.*pi,100,-80,120);
331  fOutput->Add(fJet1EP_EMB[i][j][k][l]);
332  fAj_EMB[i][j][k][l] = new TH1F(Form("fAj_EMB[%d][%d][%d][%d]",i,j,k,l),Form("fAj_EMB[%d][%d][%d][%d]",i,j,k,l),20,0.,1.);
333  fOutput->Add(fAj_EMB[i][j][k][l]);
334 
335 
336  }
337  }
338  }
339  }
340 
341  for (Int_t i = 0; i < fNcentBins; i++) {
342  for (Int_t j = 0; j < 3; j++) {
343  for (Int_t k = 0; k < 4; k++) {
344  for (Int_t l = 0; l < 4; l++) {
345  for (Int_t m = 0; m < l+1; m++) {
346 // Jet-Hadron Histgrams...
347  //PbPb
348  fHJetDeltaPhi_Aj0_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj0_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj0_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
349  fOutput->Add(fHJetDeltaPhi_Aj0_PbPb[i][j][k][l][m]);
350  fHJetDeltaPhi_Aj1_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj1_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj1_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
351  fOutput->Add(fHJetDeltaPhi_Aj1_PbPb[i][j][k][l][m]);
352  fHJetDeltaPhi_Aj2_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj2_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj2_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
353  fOutput->Add(fHJetDeltaPhi_Aj2_PbPb[i][j][k][l][m]);
354  fHJetDeltaPhi_Aj3_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj3_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj3_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
355  fOutput->Add(fHJetDeltaPhi_Aj3_PbPb[i][j][k][l][m]);
356  fHJetDeltaPhi_Aj4_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj4_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj4_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
357  fOutput->Add(fHJetDeltaPhi_Aj4_PbPb[i][j][k][l][m]);
358 
359  fHJet_EP_Aj0_PbPb[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj0_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj0_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
360  fOutput->Add(fHJet_EP_Aj0_PbPb[i][j][k][l][m]);
361  fHJet_EP_Aj1_PbPb[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj1_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj1_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
362  fOutput->Add(fHJet_EP_Aj1_PbPb[i][j][k][l][m]);
363  fHJet_EP_Aj2_PbPb[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj2_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj2_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
364  fOutput->Add(fHJet_EP_Aj2_PbPb[i][j][k][l][m]);
365  fHJet_EP_Aj3_PbPb[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj3_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj3_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
366  fOutput->Add(fHJet_EP_Aj3_PbPb[i][j][k][l][m]);
367  fHJet_EP_Aj4_PbPb[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj4_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj4_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
368  fOutput->Add(fHJet_EP_Aj4_PbPb[i][j][k][l][m]);
369 
370  //MC
371  fHJetDeltaPhi_Aj0_MC[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj0_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj0_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
372  fOutput->Add(fHJetDeltaPhi_Aj0_MC[i][j][k][l][m]);
373  fHJetDeltaPhi_Aj1_MC[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj1_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj1_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
374  fOutput->Add(fHJetDeltaPhi_Aj1_MC[i][j][k][l][m]);
375  fHJetDeltaPhi_Aj2_MC[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj2_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj2_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
376  fOutput->Add(fHJetDeltaPhi_Aj2_MC[i][j][k][l][m]);
377  fHJetDeltaPhi_Aj3_MC[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj3_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj3_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
378  fOutput->Add(fHJetDeltaPhi_Aj3_MC[i][j][k][l][m]);
379  fHJetDeltaPhi_Aj4_MC[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj4_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj4_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
380  fOutput->Add(fHJetDeltaPhi_Aj4_MC[i][j][k][l][m]);
381 
382  fHJet_EP_Aj0_MC[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj0_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj0_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
383  fOutput->Add(fHJet_EP_Aj0_MC[i][j][k][l][m]);
384  fHJet_EP_Aj1_MC[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj1_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj1_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
385  fOutput->Add(fHJet_EP_Aj1_MC[i][j][k][l][m]);
386  fHJet_EP_Aj2_MC[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj2_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj2_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
387  fOutput->Add(fHJet_EP_Aj2_MC[i][j][k][l][m]);
388  fHJet_EP_Aj3_MC[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj3_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj3_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
389  fOutput->Add(fHJet_EP_Aj3_MC[i][j][k][l][m]);
390  fHJet_EP_Aj4_MC[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj4_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj4_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
391  fOutput->Add(fHJet_EP_Aj4_MC[i][j][k][l][m]);
392 
393  //EMB
394  fHJetDeltaPhi_Aj0_EMB[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj0_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj0_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
395  fOutput->Add(fHJetDeltaPhi_Aj0_EMB[i][j][k][l][m]);
396  fHJetDeltaPhi_Aj1_EMB[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj1_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj1_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
397  fOutput->Add(fHJetDeltaPhi_Aj1_EMB[i][j][k][l][m]);
398  fHJetDeltaPhi_Aj2_EMB[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj2_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj2_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
399  fOutput->Add(fHJetDeltaPhi_Aj2_EMB[i][j][k][l][m]);
400  fHJetDeltaPhi_Aj3_EMB[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj3_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj3_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
401  fOutput->Add(fHJetDeltaPhi_Aj3_EMB[i][j][k][l][m]);
402  fHJetDeltaPhi_Aj4_EMB[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhi_Aj4_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhi_Aj4_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
403  fOutput->Add(fHJetDeltaPhi_Aj4_EMB[i][j][k][l][m]);
404 
405  fHJet_EP_Aj0_EMB[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj0_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj0_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
406  fOutput->Add(fHJet_EP_Aj0_EMB[i][j][k][l][m]);
407  fHJet_EP_Aj1_EMB[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj1_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj1_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
408  fOutput->Add(fHJet_EP_Aj1_EMB[i][j][k][l][m]);
409  fHJet_EP_Aj2_EMB[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj2_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj2_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
410  fOutput->Add(fHJet_EP_Aj2_EMB[i][j][k][l][m]);
411  fHJet_EP_Aj3_EMB[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj3_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj3_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
412  fOutput->Add(fHJet_EP_Aj3_EMB[i][j][k][l][m]);
413  fHJet_EP_Aj4_EMB[i][j][k][l][m] = new TH1F(Form("fHJet_EP_Aj4_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJet_EP_Aj4_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
414  fOutput->Add(fHJet_EP_Aj4_EMB[i][j][k][l][m]);
415  }
416  }
417  }
418  }
419  }
420 
421  PostData(1, fOutput); // Post data for ALL output slots >0 here, to get at least an empty histogram
422 }
423 
424 //________________________________________________________________________
426 {
427 
428  // Fill histograms.
429  // Avoid TPCHole(lhc11h)
430  Int_t runNumber = InputEvent()->GetRunNumber();
431  Int_t fAvoidTpcHole = 0;
432  Int_t runs_iroc[28] = {169975, 169981, 170038, 170040, 170083, 170084, 170085, 170088, 170089, 170091, 170152, 170155, 170159, 170163, 170193, 170195, 170203, 170204, 170205, 170228, 170230, 170264, 170268, 170269, 170270, 170306, 170308, 170309};
433  for(Int_t i=0; i<28; i++)
434  {
435  if(runNumber==runs_iroc[i])
436  {
437  fAvoidTpcHole = 1;
438  break;
439  }
440  }
441 
442  //if(fAvoidTpcHole==1 && !(trigPhi>3.89 && trigPhi<5.53)) trigIndex = -1;
443 
444  //Get Event
445  fEvent = InputEvent();
446  if(fEvent && fAvoidTpcHole == 0){
447 
448  //trigger
449  Int_t fTriggerType =-1;
450  UInt_t trigger = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
451 
452  if (trigger & AliVEvent::kAnyINT) { fTriggerType=0; }
453  else if (trigger & AliVEvent::kCentral) { fTriggerType=0; }
454  else if (trigger & AliVEvent::kSemiCentral) { fTriggerType=0; }
455  else if (trigger & AliVEvent::kEMCEGA) { fTriggerType=1; }
456  else if (trigger & AliVEvent::kEMCEJE) { fTriggerType=2; }
457 
458  // Vertex cut
459  const AliVVertex* vtx = fEvent->GetPrimaryVertex();
460 
461  if(fTriggerType==0){
462  if (vtx && vtx->GetNContributors()>1.){
463  if (TMath::Abs(vtx->GetZ())<10.){
464  fVertex_z_cut->Fill(vtx->GetZ());
465 
466  // GetCentrality
467  AliCentrality *centrality = fEvent->GetCentrality();
468  if (centrality)
469  fCentrality = centrality->GetCentralityPercentile("V0M");
470  else
471  fCentrality = 99;
472  fCent_V0->Fill(fCentrality);
473 
474  // Get EP(2) and Rhovalue
475  Double_t EP_2 = fEPV0;
476  fEP2->Fill(EP_2);
477  fJetBG_rho->Fill(fRhoVal);
479 
480  // Prepare Jet value
481 //PbPb
482  // jet counting value
483  Int_t c_jet1_PbPb[3] ={0,0,0}; Int_t c_jet2_PbPb[3] ={0,0,0};
484  Int_t leading_jet_count0[3]={0,0,0}; Int_t subleading_jet_count0[3]={0,0,0};
485  Double_t dEPJet0[4] ={-999.,-999.,-999.,-999.};
486  // Jet1: Leading jet
487  Double_t jet1_pt0[4] ={-999.,-999.,-999.,-999.}; Double_t jet1_pt_BG0[4] ={-999.,-999.,-999.,-999.};
488  Double_t jet1_phi0[4] ={-999.,-999.,-999.,-999.}; Double_t jet1_eta0[4] ={-999.,-999.,-999.,-999.};
489  // Jet2: Sub Leading jet
490  Double_t jet2_pt0[4] ={-999.,-999.,-999.,-999.}; Double_t jet2_pt_BG0[4] ={-999.,-999.,-999.,-999.};
491  Double_t jet2_phi0[4] ={-999.,-999.,-999.,-999.}; Double_t jet2_eta0[4] ={-999.,-999.,-999.,-999.};
492  // Correlation of jet1 and jet2
493  Double_t Delta_phi0[4] ={-999.,-999.,-999.,-999.}; Double_t Delta_epjet1_0[4] ={-999.,-999.,-999.,-999.}; Double_t Delta_eta0[4] ={-999.,-999.,-999.,-999.}; Double_t Aj0[4] ={-999.,-999.,-999.,-999.};
494 //MC
495  // jet counting value
496  Int_t c_jet1_MC[3] ={0,0,0}; Int_t c_jet2_MC[3] ={0,0,0};
497  Int_t leading_jet_count1[3]={0,0,0}; Int_t subleading_jet_count1[3]={0,0,0};
498  Double_t dEPJet1[4] ={-999.,-999.,-999.,-999.};
499  // Jet1: Leading jet
500  Double_t jet1_pt1[4] ={-999.,-999.,-999.,-999.};
501  Double_t jet1_phi1[4] ={-999.,-999.,-999.,-999.}; Double_t jet1_eta1[4] ={-999.,-999.,-999.,-999.};
502  // Jet2: Sub Leading jet
503  Double_t jet2_pt1[4] ={-999.,-999.,-999.,-999.};
504  Double_t jet2_phi1[4] ={-999.,-999.,-999.,-999.}; Double_t jet2_eta1[4] ={-999.,-999.,-999.,-999.};
505  // Correlation of jet1 and jet2
506  Double_t Delta_phi1[4] ={-999.,-999.,-999.,-999.}; Double_t Delta_epjet1_1[4] ={-999.,-999.,-999.,-999.}; Double_t Delta_eta1[4] ={-999.,-999.,-999.,-999.}; Double_t Aj1[4] ={-999.,-999.,-999.,-999.};
507 //EMB
508  // jet counting value
509  Int_t c_jet1_EMB[3] ={0,0,0}; Int_t c_jet2_EMB[3] ={0,0,0};
510  Int_t leading_jet_count2[3]={0,0,0}; Int_t subleading_jet_count2[3]={0,0,0};
511  Double_t dEPJet2[4] ={-999.,-999.,-999.,-999.};
512  // Jet1: Leading jet
513  Double_t jet1_pt2[4] ={-999.,-999.,-999.,-999.}; Double_t jet1_pt_BG2[4] ={-999.,-999.,-999.,-999.}; Double_t jet1_Deltapt[4] ={-999.,-999.,-999.,-999.};
514  Double_t jet1_phi2[4] ={-999.,-999.,-999.,-999.}; Double_t jet1_eta2[4] ={-999.,-999.,-999.,-999.};
515  // Jet2: Sub Leading jet
516  Double_t jet2_pt2[4] ={-999.,-999.,-999.,-999.}; Double_t jet2_pt_BG2[4] ={-999.,-999.,-999.,-999.}; Double_t jet2_Deltapt[4] ={-999.,-999.,-999.,-999.};
517  Double_t jet2_phi2[4] ={-999.,-999.,-999.,-999.}; Double_t jet2_eta2[4] ={-999.,-999.,-999.,-999.};
518  // Correlation of jet1 and jet2
519  Double_t Delta_phi2[4] ={-999.,-999.,-999.,-999.}; Double_t Delta_epjet1_2[4] ={-999.,-999.,-999.,-999.}; Double_t Delta_eta2[4] ={-999.,-999.,-999.,-999.}; Double_t Aj2[4] ={-999.,-999.,-999.,-999.};
520 
521 
522  //threshold
523  double Jet1_threshold[4]; double Jet2_threshold[4];
524  Jet1_threshold[0]=0.0; Jet2_threshold[0]=0.0;
525  Jet1_threshold[1]=fJet1Ptcut1; Jet2_threshold[1]=fJet2Ptcut1;
526  Jet1_threshold[2]=fJet1Ptcut2; Jet2_threshold[2]=fJet2Ptcut2;
527  Jet1_threshold[3]=fJet1Ptcut3; Jet2_threshold[3]=fJet2Ptcut3;
528 
529  // ************
530  // PbPb
531  // _________________________________
532 
533  //Track histogram
534  if (fTracksCont) {
535  fTracksCont->ResetCurrentID();
536  AliVTrack *track = static_cast<AliVTrack*>(fTracksCont->GetNextAcceptParticle());
537  while(track) {
538  if(track->GetLabel()==0){
539  fTrackPt_PbPb[fCentBin]->Fill(track->Pt());
540  fTrackPhi_PbPb[fCentBin]->Fill(track->Phi());
541  fTrackEta_PbPb[fCentBin]->Fill(track->Eta());
542  fTrack_Phi_Eta_PbPb[fCentBin]->Fill(track->Phi(),track->Eta());
543  }
544  track = static_cast<AliVTrack*>(fTracksCont->GetNextAcceptParticle());
545  }
546  }
547 
548  // Jet and Jet-HadronHistgram
549  if (fJetsCont) {
550  fJetsCont->ResetCurrentID();
552  while(Jet) {
553 
554  //leading track cut
555  Int_t leading_track_count[3]={0,0,0};
556  if(fJetsCont->GetLeadingHadronPt(Jet) > fleadingHadronPtcut1) leading_track_count[0] += 1;
557  if(fJetsCont->GetLeadingHadronPt(Jet) > fleadingHadronPtcut2) leading_track_count[1] += 1;
558  if(fJetsCont->GetLeadingHadronPt(Jet) > fleadingHadronPtcut3) leading_track_count[2] += 1;
559 
560  for(int m=0;m<3;m++){
561  c_jet1_PbPb[m]++; // jet count in acceptance.
562  if(leading_track_count[m] > 0){
563  dEPJet0[m] = GetDPhi(Jet->Phi(),EP_2);
564  fJetPt_PbPb[fCentBin][m]->Fill(Jet->Pt());
565  fJetPhi_PbPb[fCentBin][m]->Fill(Jet->Phi());
566  fJetEta_PbPb[fCentBin][m]->Fill(Jet->Eta());
567  fJet_Phi_Eta_PbPb[fCentBin][m]->Fill(Jet->Phi(),Jet->Eta());
568  fJetPt_BG_PbPb[fCentBin][m]->Fill(Jet->Pt() - Jet->Area() * fJetsCont->GetRhoVal());
569  fJetDeltaEP_PbPb[fCentBin][m]->Fill(dEPJet0[m],Jet->Pt());
570  }
571  }
572 
573 for(int m=0;m<3;m++){
574  if(c_jet1_PbPb[m] == 1)
575  {
576  if(leading_track_count[m] > 0){
577  jet1_pt0[m] = Jet->Pt(); jet1_pt_BG0[m] = Jet->Pt() - Jet->Area() * fJetsCont->GetRhoVal(); jet1_phi0[m] = Jet->Phi(); jet1_eta0[m] = Jet->Eta(); //Get Leading Jet(Jet1) value
578  leading_jet_count0[m] += 1;
579  }
580  }
581 
582  else if(c_jet1_PbPb[m] > 1 && c_jet2_PbPb[m] == 0 && leading_jet_count0[m] > 0 && leading_track_count[m] > 0)// sub leading
583  {
584  jet2_pt0[m] = Jet->Pt(); jet2_pt_BG0[m] = Jet->Pt() - Jet->Area() * fJetsCont->GetRhoVal(); jet2_phi0[m] = Jet->Phi(); jet2_eta0[m] = Jet->Eta(); //Get Sub Leading Jet(Jet2) value
585  Delta_phi0[m] = GetDPhi(jet1_phi0[m],jet2_phi0[m]); Aj0[m] = (jet1_pt_BG0[m] - jet2_pt_BG0[m]) / (jet1_pt_BG0[m] + jet2_pt_BG0[m]);
586  Delta_epjet1_0[m] = GetDPhi(jet1_phi0[m],EP_2);
587  Delta_eta0[m] = jet1_eta0[m] - jet2_eta0[m]; //Get Correlations of jet1, jet2
588 
589  // Correlations of jet1, jet2
590  for(int count1=0;count1<4;count1++){
591  for(int count2=0;count2<count1+1;count2++){
592  if(jet1_pt_BG0[m] > Jet1_threshold[count1] && jet2_pt_BG0[m] > Jet2_threshold[count2]){
593  fJet1Pt_PbPb[fCentBin][m][count1][count2]->Fill(jet1_pt0[m]);
594  fJet2Pt_PbPb[fCentBin][m][count1][count2]->Fill(jet2_pt0[m]);
595  fJet1Pt_BG_PbPb[fCentBin][m][count1][count2]->Fill(jet1_pt_BG0[m]);
596  fJet2Pt_BG_PbPb[fCentBin][m][count1][count2]->Fill(jet2_pt_BG0[m]);
597  fJetDeltaPhi_PbPb[fCentBin][m][count1][count2]->Fill(Delta_phi0[m]);
598  fJetDeltaEta_PbPb[fCentBin][m][count1][count2]->Fill(Delta_eta0[m]);
599  }
600  }//count2
601  }//count1
602 
603 
604  // Find delta_phi
605  if(Delta_phi0[m] > (2./3.)* TMath::Pi() && Delta_phi0[m] < (4./3.)* TMath::Pi()){
606  for(int count1=0;count1<4;count1++){
607  for(int count2=0;count2<count1+1;count2++){
608  if(jet1_pt_BG0[m] > Jet1_threshold[count1] && jet2_pt_BG0[m] > Jet2_threshold[count2]){
609  fJet1SelectPt_BG_PbPb[fCentBin][m][count1][count2]->Fill(jet1_pt_BG0[m]);
610  fJet2SelectPt_BG_PbPb[fCentBin][m][count1][count2]->Fill(jet2_pt_BG0[m]);
611  fJet1EP_PbPb[fCentBin][m][count1][count2]->Fill(Delta_epjet1_0[m],jet1_pt_BG0[m]);
612  fAj_PbPb[fCentBin][m][count1][count2]->Fill((jet1_pt_BG0[m] - jet2_pt_BG0[m]) / (jet1_pt_BG0[m] + jet2_pt_BG0[m]));
613  }
614  }//count2
615  }//count1
616  }// Find delta_phi
617 
618  c_jet2_PbPb[m]++;
619  subleading_jet_count0[m] += 1;
620  }// sub leading
621 
622  }
623 
624  Jet = fJetsCont->GetNextAcceptJet();
625  }// jet while
626 
627 //jet-hadron
628 for(int m=0;m<3;m++){//leading track cut
629  if (fTracksCont) {//track cont
630  int c_subleading_jet = 0;
631  c_subleading_jet = subleading_jet_count0[m];
632  if(c_subleading_jet > 0){//if find sub leading
633 
634  fTracksCont->ResetCurrentID();
635  AliVTrack *track = static_cast<AliVTrack*>(fTracksCont->GetNextAcceptParticle());
636  while(track) {
637  if(track->GetLabel()==0){
638 
639  Double_t pt,phi,dphi,dep;
640  pt = -999.0; phi = -999.0; dphi = -999.0; dep = -999.0;
641  pt = track->Pt(); phi = track->Phi();
642  dphi = GetDPhi(jet1_phi0[m],phi);
643  dep = GetDPhi(EP_2,phi);
644 
645  //dphi cut
646  Bool_t dphi_cut[4];
647  //devide(jet side)
648  dphi_cut[0]= ((-1./3.*TMath::Pi()) <= dphi && dphi <= (1./3.*TMath::Pi()));
649  dphi_cut[1]= ((2./3.*TMath::Pi()) <= dphi && dphi <= (4./3.*TMath::Pi()));
650  //devide(out jet side)
651  dphi_cut[2]= (((1./3.*TMath::Pi()) <= dphi && dphi <= (1./2.*TMath::Pi())) || ((-1./2.*TMath::Pi()) < dphi && dphi < (-1./3.*TMath::Pi())));//leadingjet
652  dphi_cut[3]= (((1./2.*TMath::Pi()) <= dphi && dphi <= (2./3.*TMath::Pi())) || ((4./3.*TMath::Pi()) < dphi && dphi < (3./2.*TMath::Pi())));//subleadingjet
653 
654  //pt switch
655  Bool_t pt_switch[4];
656  pt_switch[0]= (pt > 0.15);
657  pt_switch[1]= (pt > 0.15 && pt <= 2.0);
658  pt_switch[2]= (pt > 2.0 && pt <= 4.0);
659  pt_switch[3]= (pt > 4.0);
660 
661  //jetdphi switch
662  Double_t jet_dphi = -999.0;
663  jet_dphi = Delta_phi0[m];
664  Bool_t jet_dphi_switch[3];
665  jet_dphi_switch[0]= (jet_dphi > (2./3.)* TMath::Pi() && jet_dphi < (4./3.)* TMath::Pi());
666  jet_dphi_switch[1]= (jet_dphi > (5./6.)* TMath::Pi() && jet_dphi < (7./12.)* TMath::Pi());
667  jet_dphi_switch[2]= (jet_dphi > (11./12.)* TMath::Pi() && jet_dphi < (13./12.)* TMath::Pi());
668 
669 //hadron-dphi
670 for(int pt_cut=0;pt_cut<4;pt_cut++){
671 if(pt_switch[pt_cut]){
672  for(int count1=0;count1<4;count1++){
673  if(jet_dphi_switch[0]){
674  for(int count2=0;count2<count1+1;count2++){
675  if(jet1_pt_BG0[m] > Jet1_threshold[count1] && jet2_pt_BG0[m] > Jet2_threshold[count2]){
676  fHJetDeltaPhi_Aj0_PbPb[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
677  fHJet_EP_Aj0_PbPb[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
678 
679  if(Aj0[m] >= 0.0 && Aj0[m] < 0.2){
680  fHJetDeltaPhi_Aj1_PbPb[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
681  fHJet_EP_Aj1_PbPb[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
682  }
683 
684  if(Aj0[m] >= 0.2 && Aj0[m] < 0.4){
685  fHJetDeltaPhi_Aj2_PbPb[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
686  fHJet_EP_Aj2_PbPb[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
687  }
688 
689  if(Aj0[m] >= 0.4 && Aj0[m] < 0.6){
690  fHJetDeltaPhi_Aj3_PbPb[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
691  fHJet_EP_Aj3_PbPb[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
692  }
693 
694  if(Aj0[m] >= 0.6 && Aj0[m] <= 0.8){
695  fHJetDeltaPhi_Aj4_PbPb[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
696  fHJet_EP_Aj4_PbPb[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
697  }
698  }
699 
700 
701  }//count2
702  }
703  }//count1
704 }//pt cut
705 }//pt for
706 
707  }// if label
708  track = static_cast<AliVTrack*>(fTracksCont->GetNextAcceptParticle());
709  }// track while
710 
711 }// if sub leading jet
712 }// tracks Cont
713 }// jet leading track cut
714 
715  }// jetCont
716 
717  // ************
718  // MC
719  // _________________________________
720 
721  //Track histogram
722  if (fMCTracksCont) {
723  fMCTracksCont->ResetCurrentID();
724  AliVTrack *MCtrack = static_cast<AliVTrack*>(fMCTracksCont->GetNextAcceptParticle());
725  while(MCtrack) {
726  if(MCtrack->GetLabel()!=0){
727  fTrackPt_MC[fCentBin]->Fill(MCtrack->Pt());
728  fTrackPhi_MC[fCentBin]->Fill(MCtrack->Phi());
729  fTrackEta_MC[fCentBin]->Fill(MCtrack->Eta());
730  fTrack_Phi_Eta_MC[fCentBin]->Fill(MCtrack->Phi(),MCtrack->Eta());
731  }
732  MCtrack = static_cast<AliVTrack*>(fMCTracksCont->GetNextAcceptParticle());
733  }
734  }
735 
736  // Jet and Jet-HadronHistgram
737  if (fMCJetsCont) {
738  fMCJetsCont->ResetCurrentID();
740  while(MCJet) {
741 
742  //leading track cut
743  Int_t leading_track_count[3]={0,0,0};
744  if(fMCJetsCont->GetLeadingHadronPt(MCJet) > fleadingHadronPtcut1) leading_track_count[0] += 1;
745  if(fMCJetsCont->GetLeadingHadronPt(MCJet) > fleadingHadronPtcut2) leading_track_count[1] += 1;
746  if(fMCJetsCont->GetLeadingHadronPt(MCJet) > fleadingHadronPtcut3) leading_track_count[2] += 1;
747 
748  for(int m=0;m<3;m++){
749  c_jet1_MC[m]++; // jet count in acceptance.
750  if(leading_track_count[m] > 0){
751  dEPJet1[m] = GetDPhi(MCJet->Phi(),EP_2);
752  fJetPt_MC[fCentBin][m]->Fill(MCJet->Pt());
753  fJetPhi_MC[fCentBin][m]->Fill(MCJet->Phi());
754  fJetEta_MC[fCentBin][m]->Fill(MCJet->Eta());
755  fJet_Phi_Eta_MC[fCentBin][m]->Fill(MCJet->Phi(),MCJet->Eta());
756  fJetDeltaEP_MC[fCentBin][m]->Fill(dEPJet1[m],MCJet->Pt());
757  }
758  }
759 
760 for(int m=0;m<3;m++){
761  if(c_jet1_MC[m] == 1)
762  {
763  if(leading_track_count[m] > 0){
764  jet1_pt1[m] = MCJet->Pt(); jet1_phi1[m] = MCJet->Phi(); jet1_eta1[m] = MCJet->Eta(); //Get Leading Jet(Jet1) value
765 
766  leading_jet_count1[m] += 1;
767  }
768  }
769 
770  else if(c_jet1_MC[m] > 1 && c_jet2_MC[m] == 0 && leading_jet_count1[m] > 0 && leading_track_count[m] > 0)// sub leading
771  {
772  jet2_pt1[m] = MCJet->Pt(); jet2_phi1[m] = MCJet->Phi(); jet2_eta1[m] = MCJet->Eta(); //Get Sub Leading Jet(Jet2) value
773  Delta_phi1[m] = GetDPhi(jet1_phi1[m],jet2_phi1[m]); Aj1[m] = (jet1_pt1[m] - jet2_pt1[m]) / (jet1_pt1[m] + jet2_pt1[m]);
774  Delta_epjet1_1[m] = GetDPhi(jet1_phi1[m],EP_2);
775  Delta_eta1[m] = jet1_eta1[m] - jet2_eta1[m]; //Get Correlations of jet1, jet2
776 
777  // Correlations of jet1, jet2
778  for(int count1=0;count1<4;count1++){
779  for(int count2=0;count2<count1+1;count2++){
780  if(jet1_pt1[m] > Jet1_threshold[count1] && jet2_pt1[m] > Jet2_threshold[count2]){
781  fJet1Pt_MC[fCentBin][m][count1][count2]->Fill(jet1_pt1[m]);
782  fJet2Pt_MC[fCentBin][m][count1][count2]->Fill(jet2_pt1[m]);
783  fJetDeltaPhi_MC[fCentBin][m][count1][count2]->Fill(Delta_phi1[m]);
784  fJetDeltaEta_MC[fCentBin][m][count1][count2]->Fill(Delta_eta1[m]);
785  }
786  }//count2
787  }//count1
788 
789 
790  // Find delta_phi
791  if(Delta_phi1[m] > (2./3.)* TMath::Pi() && Delta_phi1[m] < (4./3.)* TMath::Pi()){
792  for(int count1=0;count1<4;count1++){
793  for(int count2=0;count2<count1+1;count2++){
794  if(jet1_pt1[m] > Jet1_threshold[count1] && jet2_pt1[m] > Jet2_threshold[count2]){
795  fJet1EP_MC[fCentBin][m][count1][count2]->Fill(Delta_epjet1_1[m],jet1_pt1[m]);
796  fAj_MC[fCentBin][m][count1][count2]->Fill((jet1_pt1[m] - jet2_pt1[m]) / (jet1_pt1[m] + jet2_pt1[m]));
797  }
798  }//count2
799  }//count1
800  }// Find delta_phi
801 
802  c_jet2_MC[m]++;
803  subleading_jet_count1[m] += 1;
804  }// sub leading
805 
806  }
807 
808 MCJet = fMCJetsCont->GetNextAcceptJet();
809 }//while jet
810 
811 //jet-hadron
812 for(int m=0;m<3;m++){
813  if (fMCTracksCont) {//track cont
814  int c_subleading_jet = 0;
815  c_subleading_jet = subleading_jet_count1[m];
816  if(c_subleading_jet > 0){//if find sub leading
817 
818  fMCTracksCont->ResetCurrentID();
819  AliVTrack *MCtrack = static_cast<AliVTrack*>(fMCTracksCont->GetNextAcceptParticle());
820  while(MCtrack) {
821  if(MCtrack->GetLabel()!=0){
822 
823  Double_t pt,phi,dphi,dep;
824  pt = -999.0; phi = -999.0; dphi = -999.0; dep = -999.0;
825  pt = MCtrack->Pt(); phi = MCtrack->Phi();
826  dphi = GetDPhi(jet1_phi1[m],phi);
827  dep = GetDPhi(EP_2,phi);
828 
829  //dphi cut
830  Bool_t dphi_cut[4];
831  //devide(jet side)
832  dphi_cut[0]= ((-1./3.*TMath::Pi()) <= dphi && dphi <= (1./3.*TMath::Pi()));
833  dphi_cut[1]= ((2./3.*TMath::Pi()) <= dphi && dphi <= (4./3.*TMath::Pi()));
834  //devide(out jet side)
835  dphi_cut[2]= (((1./3.*TMath::Pi()) <= dphi && dphi <= (1./2.*TMath::Pi())) || ((-1./2.*TMath::Pi()) < dphi && dphi < (-1./3.*TMath::Pi())));//leadingjet
836  dphi_cut[3]= (((1./2.*TMath::Pi()) <= dphi && dphi <= (2./3.*TMath::Pi())) || ((4./3.*TMath::Pi()) < dphi && dphi < (3./2.*TMath::Pi())));//subleadingjet
837 
838  //pt switch
839  Bool_t pt_switch[4];
840  pt_switch[0]= (pt > 0.15);
841  pt_switch[1]= (pt > 0.15 && pt <= 2.0);
842  pt_switch[2]= (pt > 2.0 && pt <= 4.0);
843  pt_switch[3]= (pt > 4.0);
844 
845  //jetdphi switch
846  Double_t jet_dphi = -999.0;
847  jet_dphi = Delta_phi1[m];
848  Bool_t jet_dphi_switch[3];
849  jet_dphi_switch[0]= (jet_dphi > (2./3.)* TMath::Pi() && jet_dphi < (4./3.)* TMath::Pi());
850  jet_dphi_switch[1]= (jet_dphi > (5./6.)* TMath::Pi() && jet_dphi < (7./12.)* TMath::Pi());
851  jet_dphi_switch[2]= (jet_dphi > (11./12.)* TMath::Pi() && jet_dphi < (13./12.)* TMath::Pi());
852 
853 //hadron-dphi
854 for(int pt_cut=0;pt_cut<4;pt_cut++){
855 if(pt_switch[pt_cut]){
856  for(int count1=0;count1<4;count1++){
857  if(jet_dphi_switch[0]){
858  for(int count2=0;count2<count1+1;count2++){
859  if(jet1_pt1[m] > Jet1_threshold[count1] && jet2_pt1[m] > Jet2_threshold[count2]){
860  fHJetDeltaPhi_Aj0_MC[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
861  fHJet_EP_Aj0_MC[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
862 
863  if(Aj1[m] >= 0.0 && Aj1[m] < 0.2){
864  fHJetDeltaPhi_Aj1_MC[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
865  fHJet_EP_Aj1_MC[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
866  }
867 
868  if(Aj1[m] >= 0.2 && Aj1[m] < 0.4){
869  fHJetDeltaPhi_Aj2_MC[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
870  fHJet_EP_Aj2_MC[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
871  }
872 
873  if(Aj1[m] >= 0.4 && Aj1[m] < 0.6){
874  fHJetDeltaPhi_Aj3_MC[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
875  fHJet_EP_Aj3_MC[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
876  }
877 
878  if(Aj1[m] >= 0.6 && Aj1[m] <= 0.8){
879  fHJetDeltaPhi_Aj4_MC[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
880  fHJet_EP_Aj4_MC[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
881  }
882  }
883 
884 
885  }//count2
886  }
887  }//count1
888 }//pt cut
889 }//pt for
890 
891  }// if label
892  MCtrack = static_cast<AliVTrack*>(fMCTracksCont->GetNextAcceptParticle());
893  }// track while
894 
895 }// if sub leading jet
896 }// tracks Cont
897 }// jet leading track cut
898 
899 }//jet Cont
900 
901  // ************
902  // Embedding
903  // _________________________________
904 
905  //Track histogram
906  if (fEmbTracksCont) {
907  fEmbTracksCont->ResetCurrentID();
908  AliVTrack *EMBtrack = static_cast<AliVTrack*>(fEmbTracksCont->GetNextAcceptParticle());
909  while(EMBtrack) {
910  fTrackPt_EMB[fCentBin]->Fill(EMBtrack->Pt());
911  fTrackPhi_EMB[fCentBin]->Fill(EMBtrack->Phi());
912  fTrackEta_EMB[fCentBin]->Fill(EMBtrack->Eta());
913  fTrack_Phi_Eta_EMB[fCentBin]->Fill(EMBtrack->Phi(),EMBtrack->Eta());
914  EMBtrack = static_cast<AliVTrack*>(fEmbTracksCont->GetNextAcceptParticle());
915  }
916  }
917 
918  if (fEmbJetsCont) {
919 
920  AliEmcalJet *embJet = NextEmbeddedJet(kTRUE);
921 
922  while (embJet != 0) {
923 
924  //leading track cut
925  Int_t leading_track_count[3]={0,0,0};
926  if(fEmbJetsCont->GetLeadingHadronPt(embJet) > fleadingHadronPtcut1) leading_track_count[0] += 1;
927  if(fEmbJetsCont->GetLeadingHadronPt(embJet) > fleadingHadronPtcut2) leading_track_count[1] += 1;
928  if(fEmbJetsCont->GetLeadingHadronPt(embJet) > fleadingHadronPtcut3) leading_track_count[2] += 1;
929 
930  for(int m=0;m<3;m++){
931  c_jet1_EMB[m]++; // jet count in acceptance.
932  if(leading_track_count[m] > 0){
933  dEPJet2[m] = GetDPhi(embJet->Phi(),EP_2);
934  fJetPt_EMB[fCentBin][m]->Fill(embJet->Pt());
935  fJetPhi_EMB[fCentBin][m]->Fill(embJet->Phi());
936  fJetEta_EMB[fCentBin][m]->Fill(embJet->Eta());
937  fJet_Phi_Eta_EMB[fCentBin][m]->Fill(embJet->Phi(),embJet->Eta());
938  fJetPt_BG_EMB[fCentBin][m]->Fill(embJet->Pt() - embJet->Area() * fEmbJetsCont->GetRhoVal());
939  fJetDeltaPt[fCentBin][m]->Fill(embJet->Pt() - embJet->Area() * fEmbJetsCont->GetRhoVal() - embJet->MCPt());
940  fJetDeltaEP_EMB[fCentBin][m]->Fill(dEPJet2[m],embJet->Pt());
941  }
942  }
943 
944 for(int m=0;m<3;m++){
945  if(c_jet1_EMB[m] == 1)
946  {
947  if(leading_track_count[m] > 0){
948  jet1_pt2[m] = embJet->Pt(); jet1_pt_BG2[m] = embJet->Pt() - embJet->Area() * fEmbJetsCont->GetRhoVal(); jet1_Deltapt[m] = embJet->Pt() - embJet->Area() * fEmbJetsCont->GetRhoVal() - embJet->MCPt(); jet1_phi2[m] = embJet->Phi(); jet1_eta2[m] = embJet->Eta(); //Get Leading Jet(Jet1) value
949 
950  leading_jet_count2[m] += 1;
951  }
952  }
953 
954  else if(c_jet1_EMB[m] > 1 && c_jet2_EMB[m] == 0 && leading_jet_count2[m] > 0 && leading_track_count[m] > 0)// sub leading
955  {
956  jet2_pt2[m] = embJet->Pt(); jet2_pt_BG2[m] = embJet->Pt() - embJet->Area() * fEmbJetsCont->GetRhoVal(); jet2_Deltapt[m] = embJet->Pt() - embJet->Area() * fEmbJetsCont->GetRhoVal() - embJet->MCPt(); jet2_phi2[m] = embJet->Phi(); jet2_eta2[m] = embJet->Eta(); //Get Sub Leading Jet(Jet2) value
957  Delta_phi2[m] = GetDPhi(jet1_phi2[m],jet2_phi2[m]); Aj2[m] = (jet1_pt_BG2[m] - jet2_pt_BG2[m]) / (jet1_pt_BG2[m] + jet2_pt_BG2[m]);
958  Delta_epjet1_2[m] = GetDPhi(jet1_phi2[m],EP_2);
959  Delta_eta2[m] = jet1_eta2[m] - jet2_eta2[m]; //Get Correlations of jet1, jet2
960 
961  // Correlations of jet1, jet2
962  for(int count1=0;count1<4;count1++){
963  for(int count2=0;count2<count1+1;count2++){
964  if(jet1_pt_BG2[m] > Jet1_threshold[count1] && jet2_pt_BG2[m] > Jet2_threshold[count2]){
965  fJet1Pt_EMB[fCentBin][m][count1][count2]->Fill(jet1_pt2[m]);
966  fJet2Pt_EMB[fCentBin][m][count1][count2]->Fill(jet2_pt2[m]);
967  fJet1Pt_BG_EMB[fCentBin][m][count1][count2]->Fill(jet1_pt_BG2[m]);
968  fJet2Pt_BG_EMB[fCentBin][m][count1][count2]->Fill(jet2_pt_BG2[m]);
969  fJet1DeltaPt[fCentBin][m][count1][count2]->Fill(jet1_Deltapt[m]);
970  fJet2DeltaPt[fCentBin][m][count1][count2]->Fill(jet2_Deltapt[m]);
971  fJetDeltaPhi_EMB[fCentBin][m][count1][count2]->Fill(Delta_phi2[m]);
972  fJetDeltaEta_EMB[fCentBin][m][count1][count2]->Fill(Delta_eta2[m]);
973  }
974  }//count2
975  }//count1
976 
977 
978  // Find delta_phi
979  if(Delta_phi2[m] > (2./3.)* TMath::Pi() && Delta_phi2[m] < (4./3.)* TMath::Pi()){
980  for(int count1=0;count1<4;count1++){
981  for(int count2=0;count2<count1+1;count2++){
982  if(jet1_pt_BG2[m] > Jet1_threshold[count1] && jet2_pt_BG2[m] > Jet2_threshold[count2]){
983  fJet1SelectPt_BG_EMB[fCentBin][m][count1][count2]->Fill(jet1_pt_BG2[m]);
984  fJet2SelectPt_BG_EMB[fCentBin][m][count1][count2]->Fill(jet2_pt_BG2[m]);
985  fJet1SelectDeltaPt[fCentBin][m][count1][count2]->Fill(jet1_Deltapt[m]);
986  fJet2SelectDeltaPt[fCentBin][m][count1][count2]->Fill(jet2_Deltapt[m]);
987  fJet1EP_EMB[fCentBin][m][count1][count2]->Fill(Delta_epjet1_2[m],jet1_pt_BG2[m]);
988  fAj_EMB[fCentBin][m][count1][count2]->Fill((jet1_pt_BG2[m] - jet2_pt_BG2[m]) / (jet1_pt_BG2[m] + jet2_pt_BG2[m]));
989  }
990  }//count2
991  }//count1
992  }// Find delta_phi
993 
994  c_jet2_EMB[m]++;
995  subleading_jet_count2[m] += 1;
996  }// sub leading
997 
998  }
999 
1000  embJet = NextEmbeddedJet();
1001  }// jet while
1002 
1003 
1004 //jet-hadron
1005 for(int m=0;m<3;m++){
1006  if (fEmbTracksCont) {//track cont
1007  int c_subleading_jet = 0;
1008  c_subleading_jet = subleading_jet_count2[m];
1009  if(c_subleading_jet > 0){//if find sub leading
1010 
1011  fEmbTracksCont->ResetCurrentID();
1012  AliVTrack *EMBtrack = static_cast<AliVTrack*>(fEmbTracksCont->GetNextAcceptParticle());
1013  while(EMBtrack) {
1014 
1015  Double_t pt,phi,dphi,dep;
1016  pt = -999.0; phi = -999.0; dphi = -999.0; dep = -999.0;
1017  pt = EMBtrack->Pt(); phi = EMBtrack->Phi();
1018  dphi = GetDPhi(jet1_phi2[m],phi);
1019  dep = GetDPhi(EP_2,phi);
1020 
1021  //dphi cut
1022  Bool_t dphi_cut[4];
1023  //devide(jet side)
1024  dphi_cut[0]= ((-1./3.*TMath::Pi()) <= dphi && dphi <= (1./3.*TMath::Pi()));
1025  dphi_cut[1]= ((2./3.*TMath::Pi()) <= dphi && dphi <= (4./3.*TMath::Pi()));
1026  //devide(out jet side)
1027  dphi_cut[2]= (((1./3.*TMath::Pi()) <= dphi && dphi <= (1./2.*TMath::Pi())) || ((-1./2.*TMath::Pi()) < dphi && dphi < (-1./3.*TMath::Pi())));//leadingjet
1028  dphi_cut[3]= (((1./2.*TMath::Pi()) <= dphi && dphi <= (2./3.*TMath::Pi())) || ((4./3.*TMath::Pi()) < dphi && dphi < (3./2.*TMath::Pi())));//subleadingjet
1029 
1030  //pt switch
1031  Bool_t pt_switch[4];
1032  pt_switch[0]= (pt > 0.15);
1033  pt_switch[1]= (pt > 0.15 && pt <= 2.0);
1034  pt_switch[2]= (pt > 2.0 && pt <= 4.0);
1035  pt_switch[3]= (pt > 4.0);
1036 
1037  //jetdphi switch
1038  Double_t jet_dphi = -999.0;
1039  jet_dphi = Delta_phi2[m];
1040  Bool_t jet_dphi_switch[3];
1041  jet_dphi_switch[0]= (jet_dphi > (2./3.)* TMath::Pi() && jet_dphi < (4./3.)* TMath::Pi());
1042  jet_dphi_switch[1]= (jet_dphi > (5./6.)* TMath::Pi() && jet_dphi < (7./12.)* TMath::Pi());
1043  jet_dphi_switch[2]= (jet_dphi > (11./12.)* TMath::Pi() && jet_dphi < (13./12.)* TMath::Pi());
1044 
1045 //hadron-dphi
1046 for(int pt_cut=0;pt_cut<4;pt_cut++){
1047 if(pt_switch[pt_cut]){
1048  for(int count1=0;count1<4;count1++){
1049  if(jet_dphi_switch[0]){
1050  for(int count2=0;count2<count1+1;count2++){
1051  if(jet1_pt_BG2[m] > Jet1_threshold[count1] && jet2_pt_BG2[m] > Jet2_threshold[count2]){
1052  fHJetDeltaPhi_Aj0_EMB[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
1053  fHJet_EP_Aj0_EMB[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
1054 
1055  if(Aj2[m] >= 0.0 && Aj2[m] < 0.2){
1056  fHJetDeltaPhi_Aj1_EMB[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
1057  fHJet_EP_Aj1_EMB[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
1058  }
1059 
1060  if(Aj2[m] >= 0.2 && Aj2[m] < 0.4){
1061  fHJetDeltaPhi_Aj2_EMB[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
1062  fHJet_EP_Aj2_EMB[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
1063  }
1064 
1065  if(Aj2[m] >= 0.4 && Aj2[m] < 0.6){
1066  fHJetDeltaPhi_Aj3_EMB[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
1067  fHJet_EP_Aj3_EMB[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
1068  }
1069 
1070  if(Aj2[m] >= 0.6 && Aj2[m] <= 0.8){
1071  fHJetDeltaPhi_Aj4_EMB[fCentBin][m][pt_cut][count1][count2]->Fill(dphi);
1072  fHJet_EP_Aj4_EMB[fCentBin][m][pt_cut][count1][count2]->Fill(dep);
1073  }
1074  }
1075 
1076 
1077  }//count2
1078  }
1079  }//count1
1080 }//pt cut
1081 }//pt for
1082 
1083  EMBtrack = static_cast<AliVTrack*>(fEmbTracksCont->GetNextAcceptParticle());
1084  }// track while
1085 
1086 }// if sub leading jet
1087 }// tracks Cont
1088 }// jet leading track cut
1089 
1090  }// jet Cont
1091 
1092 
1093 }//vertex
1094 }//vertex
1095 }//trigger
1096 
1097 }//event
1098  return kTRUE;
1099 }
1100 
1101 //________________________________________________________________________
1103 {
1104  // Get the next accepted embedded jet.
1105 
1106  if(reset)
1107  fEmbJetsCont->ResetCurrentID();
1108 
1110  while (jet && jet->MCPt() < fMCJetPtThreshold) jet = fEmbJetsCont->GetNextAcceptJet();
1111 
1112  return jet;
1113 }
1114 
1115 //________________________________________________________________________
1117 {
1118  // Set default cuts for full cones
1119 
1121  SetConePhiLimits(1.4+fConeRadius,TMath::Pi()-fConeRadius);
1122 }
1123 
1124 //________________________________________________________________________
1126 {
1127  // Set default cuts for charged cones
1128 
1130  SetConePhiLimits(-10, 10);
1131 }
1132 
1133 //________________________________________________________________________
1135 {
1136  // Initialize the analysis.
1137 
1139 
1140  if (fTracksCont && fTracksCont->GetArray() == 0) fTracksCont = 0;
1141  if (fCaloClustersCont && fCaloClustersCont->GetArray() == 0) fCaloClustersCont = 0;
1142  if (fEmbTracksCont && fEmbTracksCont->GetArray() == 0) fEmbTracksCont = 0;
1143  if (fEmbCaloClustersCont && fEmbCaloClustersCont->GetArray() == 0) fEmbCaloClustersCont = 0;
1144  if (fJetsCont && fJetsCont->GetArray() == 0) fJetsCont = 0;
1145  if (fMCJetsCont && fMCJetsCont->GetArray() == 0) fMCJetsCont = 0;
1146  if (fEmbJetsCont && fEmbJetsCont->GetArray() == 0) fEmbJetsCont = 0;
1147 }
1148 
1149 //________________________________________________________________________
1150 Double_t AliAnalysisTaskDijetHadron::GetZ(const Double_t trkPx, const Double_t trkPy, const Double_t trkPz, const Double_t jetPx, const Double_t jetPy, const Double_t jetPz)
1151 {
1152  return (trkPx*jetPx+trkPy*jetPy+trkPz*jetPz)/(jetPx*jetPx+jetPy*jetPy+jetPz*jetPz);
1153 }
1154 
1155 //________________________________________________________________________
1157 {
1158  if (mphi < -1*TMath::Pi()) mphi += (2*TMath::Pi());
1159  else if (mphi > TMath::Pi()) mphi -= (2*TMath::Pi());
1160  if (vphi < -1*TMath::Pi()) vphi += (2*TMath::Pi());
1161  else if (vphi > TMath::Pi()) vphi -= (2*TMath::Pi());
1162  double delta_phi = mphi-vphi;
1163  if (delta_phi < (-1./2*TMath::Pi())) delta_phi += (2*TMath::Pi());
1164  else if (delta_phi > (3./2*TMath::Pi())) delta_phi -= (2*TMath::Pi());
1165 
1166  return delta_phi;//delta_phi in [-1/2*Pi, 3/2*Pi]
1167 }
1168 
TH1 * fHJet_EP_Aj3_PbPb[4][3][4][4][4]
PbPb, HjetEP, Aj2.
Double_t Area() const
Definition: AliEmcalJet.h:130
virtual AliVParticle * GetNextAcceptParticle()
TH1 * fHJet_EP_Aj2_PbPb[4][3][4][4][4]
PbPb, HjetEP, Aj1.
Double_t GetRhoVal() const
TH1 * fHJet_EP_Aj3_MC[4][3][4][4][4]
MC, HjetEP, Aj2.
double Double_t
Definition: External.C:58
TH1 * fJet1SelectPt_BG_PbPb[4][3][4][4]
PbPb, jetDeltaEta.
TH2 ** fTrack_Phi_Eta_PbPb
PbPb, trackEta.
Definition: External.C:236
TH1 * fJet1Pt_PbPb[4][3][4][4]
PbPb, jetDeltaEP.
Double_t MCPt() const
Definition: AliEmcalJet.h:153
AliClusterContainer * fEmbCaloClustersCont
EMB tracks.
AliJetContainer * GetJetContainer(Int_t i=0) const
TH1 * fJet2DeltaPt[4][3][4][4]
EMB, pT - rho * area - pT(embtrack), jet1.
AliJetContainer * fMCJetsCont
PbPb Clusters.
Double_t Eta() const
Definition: AliEmcalJet.h:121
TH1 ** fTrackPt_EMB
MC, trackPhi vs. trackEta.
TH1 * fJetEta_EMB[4][3]
EMB, jetPhi.
TH1 * fJetDeltaEta_PbPb[4][3][4][4]
PbPb, jetDeltaPhi.
Double_t Phi() const
Definition: AliEmcalJet.h:117
TH1 * fJet1Pt_BG_PbPb[4][3][4][4]
PbPb, subleadingjetPt.
centrality
TH1 * fJetPt_MC[4][3]
PbPb, Aj(energy balance) -> Aj = (jet1-jet2)/(jet1+jet2)
Bool_t FillHistograms()
Function filling histograms.
TH1 * fJetDeltaPt[4][3]
EMB, pT - rho * area.
TH1 * fHJetDeltaPhi_Aj3_PbPb[4][3][4][4][4]
PbPb, HjetDeltaPhi, Aj2(0.2 to 0.4)
Double_t fEPV0
!event plane V0
TH1 * fHJetDeltaPhi_Aj0_PbPb[4][3][4][4][4]
EMB, Aj(energy balance) -> Aj = (jet1-jet2)/(jet1+jet2)
TH1 * fHJetDeltaPhi_Aj2_MC[4][3][4][4][4]
MC, HjetDeltaPhi, Aj1(0.0 to 0.2)
TH1 * fJet1Pt_MC[4][3][4][4]
MC, jetDeltaEP.
Double_t GetDPhi(Double_t mphi, Double_t vphi)
TH1 * fJetDeltaPhi_PbPb[4][3][4][4]
PbPb, pT - rho * area, jet2.
Int_t fCentBin
!event centrality bin
TH1 * fHJet_EP_Aj1_MC[4][3][4][4][4]
MC, HjetEP, no Aj cut.
TH1 * fHJetDeltaPhi_Aj2_PbPb[4][3][4][4][4]
PbPb, HjetDeltaPhi, Aj1(0.0 to 0.2)
TH1 * fJet2Pt_BG_PbPb[4][3][4][4]
PbPb, pT - rho * area, jet1.
TH1 * fAj_EMB[4][3][4][4]
EMB, jet1DeltaEP.
TH1 * fHJetDeltaPhi_Aj1_MC[4][3][4][4][4]
MC, HjetDeltaPhi, no Aj cut.
AliParticleContainer * fTracksCont
PbPb Jets.
TH1 * fHJet_EP_Aj2_MC[4][3][4][4][4]
MC, HjetEP, Aj1.
AliEmcalJet * NextEmbeddedJet(Bool_t reset=kFALSE)
TH1 * fJetDeltaPhi_EMB[4][3][4][4]
EMB, pT - rho * area - pT(embtrack), jet2.
TH1 * fJet1Pt_BG_EMB[4][3][4][4]
EMB, subleadingjetPt.
Double_t GetZ(const Double_t trkPx, const Double_t trkPy, const Double_t trkPz, const Double_t jetPx, const Double_t jetPy, const Double_t jetPz)
TH1 * fHJet_EP_Aj0_PbPb[4][3][4][4][4]
PbPb, HjetDeltaPhi, Aj4(0.6 to 0.8)
TH1 * fJetDeltaEta_MC[4][3][4][4]
MC, jetDeltaPhi.
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
TH1 * fHJetDeltaPhi_Aj3_EMB[4][3][4][4][4]
EMB, HjetDeltaPhi, Aj2(0.2 to 0.4)
TH2 * fJet1EP_PbPb[4][3][4][4]
PbPb, selectsubleadingjetPt.
TH1 * fJetPt_EMB[4][3]
MC, Aj(energy balance) -> Aj = (jet1-jet2)/(jet1+jet2)
TH1 * fHJetDeltaPhi_Aj0_MC[4][3][4][4][4]
PbPb, HjetEP, Aj4.
TH2 * fJet_Phi_Eta_PbPb[4][3]
PbPb, jetEta.
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
TH1 ** fTrackPt_PbPb
rho vs. Centrality
TH1 * fHJet_EP_Aj0_EMB[4][3][4][4][4]
EMB, HjetDeltaPhi, Aj4(0.6 to 0.8)
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
TH1 * fJet2Pt_BG_EMB[4][3][4][4]
EMB, pT - rho * area, jet1.
TH1 * fJetDeltaPhi_MC[4][3][4][4]
MC, subleadingjetPt.
TH1 * fHJetDeltaPhi_Aj1_EMB[4][3][4][4][4]
EMB, HjetDeltaPhi, no Aj cut.
TH1 * fJetPt_BG_EMB[4][3]
EMB, jetPhi vs. jetEta.
TH2 * fJet1EP_EMB[4][3][4][4]
EMB, selectsubleadingjetPt.
TH1 * fJet1SelectDeltaPt[4][3][4][4]
EMB, selectsubleadingjetPt.
TH1 * fHJet_EP_Aj2_EMB[4][3][4][4][4]
EMB, HjetEP, Aj1.
TH1 * fHJetDeltaPhi_Aj4_EMB[4][3][4][4][4]
EMB, HjetDeltaPhi, Aj3(0.4 to 0.6)
Int_t fNcentBins
how many centrality bins
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
void SetConeEtaLimits(Float_t min, Float_t max)
TH1 * fHJet_EP_Aj4_PbPb[4][3][4][4][4]
PbPb, HjetEP, Aj3.
TH2 * fJet_Phi_Eta_MC[4][3]
MC, jetEta.
AliVEvent * fEvent
EMB, HjetEP, Aj4.
TH1 * fHJet_EP_Aj3_EMB[4][3][4][4][4]
EMB, HjetEP, Aj2.
TH1 * fJetPt_PbPb[4][3]
EMB, trackPhi vs. trackEta.
TH1 * fHJet_EP_Aj0_MC[4][3][4][4][4]
MC, HjetDeltaPhi, Aj4(0.6 to 0.8)
TH1 * fJet2Pt_MC[4][3][4][4]
MC, leadingjetPt.
TH2 * fJetDeltaEP_PbPb[4][3]
PbPb, pT - rho * area.
TH1 * fHJetDeltaPhi_Aj2_EMB[4][3][4][4][4]
EMB, HjetDeltaPhi, Aj1(0.0 to 0.2)
AliEmcalJet * GetNextAcceptJet()
TH1 * fHJet_EP_Aj1_PbPb[4][3][4][4][4]
PbPb, HjetEP, no Aj cut.
TH1 * fJet2Pt_PbPb[4][3][4][4]
PbPb, leadingjetPt.
TH1 * fJet2SelectPt_BG_PbPb[4][3][4][4]
PbPb, selectleadingjetPt.
TH1 * fJet2SelectPt_BG_EMB[4][3][4][4]
EMB, selectleadingjetPt.
AliParticleContainer * fMCTracksCont
MC jets.
Double_t Pt() const
Definition: AliEmcalJet.h:109
TH1 * fHJet_EP_Aj1_EMB[4][3][4][4][4]
EMB, HjetEP, no Aj cut.
TH1 * fHJetDeltaPhi_Aj3_MC[4][3][4][4][4]
MC, HjetDeltaPhi, Aj2(0.2 to 0.4)
AliEmcalList * fOutput
!output list
TH1 * fJetDeltaEta_EMB[4][3][4][4]
EMB, jetDeltaPhi.
AliClusterContainer * fCaloClustersCont
PbPb Tracks.
TH1 * fJet1Pt_EMB[4][3][4][4]
EMB, jetDeltaEP.
void ExecOnce()
Perform steps needed to initialize the analysis.
Definition: External.C:220
TH1 * fJetPhi_PbPb[4][3]
PbPb, jetPt.
void SetMakeGeneralHistograms(Bool_t g)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
AliClusterContainer * fMCCaloClustersCont
MC tracks.
TH2 * fJetDeltaEP_MC[4][3]
MC, jetPhi vs. jetEta.
TH1 * fHJetDeltaPhi_Aj4_PbPb[4][3][4][4][4]
PbPb, HjetDeltaPhi, Aj3(0.4 to 0.6)
void SetConePhiLimits(Float_t min, Float_t max)
TH1 * fJetPt_BG_PbPb[4][3]
PbPb, jetPhi vs. jetEta.
TH1 * fJet1SelectPt_BG_EMB[4][3][4][4]
EMB, jetDeltaEta.
TH1 * fJetEta_PbPb[4][3]
PbPb, jetPhi.
void UserCreateOutputObjects()
Main initialization function on the worker.
const Double_t pi
TH1 * fJet2Pt_EMB[4][3][4][4]
EMB, leadingjetPt.
TH2 * fJetDeltaEP_EMB[4][3]
EMB, pT - rho * area - pT(embtrack)
bool Bool_t
Definition: External.C:53
TH1 * fAj_MC[4][3][4][4]
MC, jet1DeltaEP.
TH1 * fHJet_EP_Aj4_MC[4][3][4][4][4]
MC, HjetEP, Aj3.
TH1 * fHJetDeltaPhi_Aj1_PbPb[4][3][4][4][4]
PbPb, HjetDeltaPhi, no Aj cut.
TH1 ** fTrackPt_MC
PbPb, trackPhi vs. trackEta.
Double_t fRhoVal
! event rho value, same for local rho
TH2 * fJet1EP_MC[4][3][4][4]
MC, jetDeltaEta.
TH1 * fHJet_EP_Aj4_EMB[4][3][4][4][4]
EMB, HjetEP, Aj3.
TH1 * fJet1DeltaPt[4][3][4][4]
EMB, pT - rho * area, jet2.
TH2 ** fTrack_Phi_Eta_EMB
EMB, trackEta.
TH1 * fHJetDeltaPhi_Aj4_MC[4][3][4][4][4]
MC, HjetDeltaPhi, Aj3(0.4 to 0.6)
AliJetContainer * fEmbJetsCont
MC clusters.
TH1 * fAj_PbPb[4][3][4][4]
PbPb, jet1DeltaEP.
Definition: External.C:196
TH1 * fHJetDeltaPhi_Aj0_EMB[4][3][4][4][4]
MC, HjetEP, Aj4.
TH2 * fJet_Phi_Eta_EMB[4][3]
EMB, jetEta.
AliParticleContainer * fEmbTracksCont
EMB jets.
TH1 * fJet2SelectDeltaPt[4][3][4][4]
EMB, selectleadingjetPt.