Updates from Taiyo
authormvl <marco.van.leeuwen@cern.ch>
Sat, 18 Oct 2014 19:20:53 +0000 (21:20 +0200)
committermvl <marco.van.leeuwen@cern.ch>
Sat, 18 Oct 2014 19:20:53 +0000 (21:20 +0200)
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskDijetHadron.cxx
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskDijetHadron.h
PWGJE/EMCALJetTasks/macros/AddTaskDijetHadron.C

index 511e31e..719c33d 100644 (file)
@@ -16,7 +16,6 @@
 // Analysis task for Dijet-hadron correlations
 //
 // Author: T.Kobayashi
-// I refer to macro written by S.Aiola.
 #include <TH1F.h>
 #include <TH2F.h>
 #include <TH3F.h>
@@ -78,200 +77,128 @@ const Double_t pi = TMath::Pi();
 ClassImp(AliAnalysisTaskDijetHadron)
 
 //________________________________________________________________________
-  AliAnalysisTaskDijetHadron::AliAnalysisTaskDijetHadron() : 
-    AliAnalysisTaskEmcalJet("AliAnalysisTaskDijetHadron", kTRUE),
-    fMCJetPtThreshold(1),
-    fMinRC2LJ(-1),
-    fRCperEvent(-1),
-    //fPtHardBinName(0x0),
-    //fPtHardBin(-1),
-    //fhPtHardBins(0x0),
-    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),
-    //fRandTracksCont(0),
-    //fRandCaloClustersCont(0),
-    fHistRCPhiEta(0), 
-    fHistRCPt(0),
-    fHistRCPtExLJ(0),
-    fHistRCPtExPartialLJ(0), 
-    //fHistRCPtRand(0),
-    fHistRhoVSRCPt(0),
-    fHistDeltaPtRCvsEP(0),
-    fHistDeltaPtRCExLJ(0),
-    fHistDeltaPtRCExPartialLJ(0),
-    //fHistDeltaPtRCRand(0),
-    fHistEmbJetsPtArea(0),
-    fHistEmbJetsCorrPtArea(0),
-    fHistEmbPartPtvsJetPt(0),
-    fHistEmbPartPtvsJetCorrPt(0),
-    fHistJetPtvsJetCorrPt(0),
-    fHistDistLeadPart2JetAxis(0),
-    fHistEmbBkgArea(0),
-    fHistRhoVSEmbBkg(0),
-    fHistDeltaPtEmbArea(0),
-    fHistDeltaPtEmbvsEP(0),
-    fHistRCPtExLJVSDPhiLJ(0),
-    fHistRCPtExPartialLJVSDPhiLJ(0),
-    fHistEmbJetsPhiEta(0),
-    fHistLeadPartPhiEta(0),
-    fCent_V0(0),
-    fVertex_z_cut(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(),
-    fJet1Pt_PbPb(),
-    fJet2Pt_PbPb(),
-    fJet1Pt_BG_PbPb(),
-    fJet2Pt_BG_PbPb(),
-    fJetDeltaPhi_PbPb(),
-    fJetDeltaEta_PbPb(),
-    fJetDeltaEP_PbPb(),
-    fJet1SelectPt_BG_PbPb(),
-    fJet2SelectPt_BG_PbPb(),
-    fAj_PbPb(),
-    fJetPt_MC(),
-    fJetPhi_MC(),
-    fJetEta_MC(),
-    fJet_Phi_Eta_MC(),
-    fJet1Pt_MC(),
-    fJet2Pt_MC(),
-    fJetDeltaPhi_MC(),
-    fJetDeltaEta_MC(),
-    fJetDeltaEP_MC(),
-    fAj_MC(),
-    fJetPt_EMB(),
-    fJetPhi_EMB(),
-    fJetEta_EMB(),
-    fJet_Phi_Eta_EMB(),
-    fJetPt_BG_EMB(),
-    fJetDeltaPt(),
-    fJet1Pt_EMB(),
-    fJet2Pt_EMB(),
-    fJet1Pt_BG_EMB(),
-    fJet2Pt_BG_EMB(),
-    fJet1DeltaPt(),
-    fJet2DeltaPt(),
-    fJetDeltaPhi_EMB(),
-    fJetDeltaEta_EMB(),
-    fJetDeltaEP_EMB(),
-    fJet1SelectPt_BG_EMB(),
-    fJet2SelectPt_BG_EMB(),
-    fJet1SelectDeltaPt(),
-    fJet2SelectDeltaPt(),
-    fAj_EMB(),
-    fHJetDeltaPhi_Aj0_PbPb(),
-    fHJetDeltaPhi_Aj1_PbPb(),
-    fHJetDeltaPhi_Aj2_PbPb(),
-    fHJetDeltaPhi_Aj3_PbPb(),
-    fHJetDeltaPhi_Aj4_PbPb(),
-    fHJetPt_Aj0_PbPb(),
-    fHJetPt_Aj1_PbPb(),
-    fHJetPt_Aj2_PbPb(),
-    fHJetPt_Aj3_PbPb(),
-    fHJetPt_Aj4_PbPb(),
-    fHJetDeltaPhi_Aj0_MC(),
-    fHJetDeltaPhi_Aj1_MC(),
-    fHJetDeltaPhi_Aj2_MC(),
-    fHJetDeltaPhi_Aj3_MC(),
-    fHJetDeltaPhi_Aj4_MC(),
-    fHJetPt_Aj0_MC(),
-    fHJetPt_Aj1_MC(),
-    fHJetPt_Aj2_MC(),
-    fHJetPt_Aj3_MC(),
-    fHJetPt_Aj4_MC(),
-    fHJetDeltaPhi_Aj0_EMB(),
-    fHJetDeltaPhi_Aj1_EMB(),
-    fHJetDeltaPhi_Aj2_EMB(),
-    fHJetDeltaPhi_Aj3_EMB(),
-    fHJetDeltaPhi_Aj4_EMB(),
-    fHJetPt_Aj0_EMB(),
-    fHJetPt_Aj1_EMB(),
-    fHJetPt_Aj2_EMB(),
-    fHJetPt_Aj3_EMB(),
-    fHJetPt_Aj4_EMB(),
-    fHJetDeltaPhiasEP_Aj0_PbPb(),
-    fHJetDeltaPhiasEP_Aj1_PbPb(),
-    fHJetDeltaPhiasEP_Aj2_PbPb(),
-    fHJetDeltaPhiasEP_Aj3_PbPb(),
-    fHJetDeltaPhiasEP_Aj4_PbPb(),
-    fHJetPtasEP_Aj0_PbPb(),
-    fHJetPtasEP_Aj1_PbPb(),
-    fHJetPtasEP_Aj2_PbPb(),
-    fHJetPtasEP_Aj3_PbPb(),
-    fHJetPtasEP_Aj4_PbPb(),
-    fHJetDeltaPhiasEP_Aj0_MC(),
-    fHJetDeltaPhiasEP_Aj1_MC(),
-    fHJetDeltaPhiasEP_Aj2_MC(),
-    fHJetDeltaPhiasEP_Aj3_MC(),
-    fHJetDeltaPhiasEP_Aj4_MC(),
-    fHJetPtasEP_Aj0_MC(),
-    fHJetPtasEP_Aj1_MC(),
-    fHJetPtasEP_Aj2_MC(),
-    fHJetPtasEP_Aj3_MC(),
-    fHJetPtasEP_Aj4_MC(),
-    fHJetDeltaPhiasEP_Aj0_EMB(),
-    fHJetDeltaPhiasEP_Aj1_EMB(),
-    fHJetDeltaPhiasEP_Aj2_EMB(),
-    fHJetDeltaPhiasEP_Aj3_EMB(),
-    fHJetDeltaPhiasEP_Aj4_EMB(),
-    fHJetPtasEP_Aj0_EMB(),
-    fHJetPtasEP_Aj1_EMB(),
-    fHJetPtasEP_Aj2_EMB(),
-    fHJetPtasEP_Aj3_EMB(),
-    fHJetPtasEP_Aj4_EMB(),
-    fEvent(0),
-    fCentrality(0)
-
+AliAnalysisTaskDijetHadron::AliAnalysisTaskDijetHadron() : 
+  AliAnalysisTaskEmcalJet("AliAnalysisTaskDijetHadron", kTRUE),
+  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),
+  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(),
+  fJet1Pt_PbPb(),
+  fJet2Pt_PbPb(),
+  fJet1Pt_BG_PbPb(),
+  fJet2Pt_BG_PbPb(),
+  fJetDeltaPhi_PbPb(),
+  fJetDeltaEta_PbPb(),
+  fJetDeltaEP_PbPb(),
+  fJet1SelectPt_BG_PbPb(),
+  fJet2SelectPt_BG_PbPb(),
+  fAj_PbPb(),
+  fJetPt_MC(),
+  fJetPhi_MC(),
+  fJetEta_MC(),
+  fJet_Phi_Eta_MC(),
+  fJet1Pt_MC(),
+  fJet2Pt_MC(),
+  fJetDeltaPhi_MC(),
+  fJetDeltaEta_MC(),
+  fJetDeltaEP_MC(),
+  fAj_MC(),
+  fJetPt_EMB(),
+  fJetPhi_EMB(),
+  fJetEta_EMB(),
+  fJet_Phi_Eta_EMB(),
+  fJetPt_BG_EMB(),
+  fJetDeltaPt(),
+  fJet1Pt_EMB(),
+  fJet2Pt_EMB(),
+  fJet1Pt_BG_EMB(),
+  fJet2Pt_BG_EMB(),
+  fJet1DeltaPt(),
+  fJet2DeltaPt(),
+  fJetDeltaPhi_EMB(),
+  fJetDeltaEta_EMB(),
+  fJetDeltaEP_EMB(),
+  fJet1SelectPt_BG_EMB(),
+  fJet2SelectPt_BG_EMB(),
+  fJet1SelectDeltaPt(),
+  fJet2SelectDeltaPt(),
+  fAj_EMB(),
+  fHJetDeltaPhi_Aj0_PbPb(),
+  fHJetDeltaPhi_Aj1_PbPb(),
+  fHJetDeltaPhi_Aj2_PbPb(),
+  fHJetDeltaPhi_Aj3_PbPb(),
+  fHJetDeltaPhi_Aj4_PbPb(),
+  fHJetPt_Aj0_PbPb(),
+  fHJetPt_Aj1_PbPb(),
+  fHJetPt_Aj2_PbPb(),
+  fHJetPt_Aj3_PbPb(),
+  fHJetPt_Aj4_PbPb(),
+  fHJetDeltaPhi_Aj0_MC(),
+  fHJetDeltaPhi_Aj1_MC(),
+  fHJetDeltaPhi_Aj2_MC(),
+  fHJetDeltaPhi_Aj3_MC(),
+  fHJetDeltaPhi_Aj4_MC(),
+  fHJetPt_Aj0_MC(),
+  fHJetPt_Aj1_MC(),
+  fHJetPt_Aj2_MC(),
+  fHJetPt_Aj3_MC(),
+  fHJetPt_Aj4_MC(),
+  fHJetDeltaPhi_Aj0_EMB(),
+  fHJetDeltaPhi_Aj1_EMB(),
+  fHJetDeltaPhi_Aj2_EMB(),
+  fHJetDeltaPhi_Aj3_EMB(),
+  fHJetDeltaPhi_Aj4_EMB(),
+  fHJetPt_Aj0_EMB(),
+  fHJetPt_Aj1_EMB(),
+  fHJetPt_Aj2_EMB(),
+  fHJetPt_Aj3_EMB(),
+  fHJetPt_Aj4_EMB(),
+  fEvent(0),
+  fCentrality(99)
 {
   // Default constructor.
 
-  fHistRCPt = 0;
-  fHistRCPtExLJ = 0;
-  fHistRCPtExPartialLJ = 0;
-  //fHistRCPtRand = 0;
-  fHistRhoVSRCPt = 0;
-  fHistDeltaPtRCvsEP = 0;
-  fHistDeltaPtRCExLJ = 0;
-  fHistDeltaPtRCExPartialLJ = 0;
-  //fHistDeltaPtRCRand = 0;
-  fHistEmbJetsPtArea = 0;
-  fHistEmbJetsCorrPtArea = 0;
-  fHistEmbPartPtvsJetPt = 0;
-  fHistEmbPartPtvsJetCorrPt = 0;
-  fHistJetPtvsJetCorrPt = 0;
-  fHistDistLeadPart2JetAxis = 0;
-  fHistEmbBkgArea = 0;
-  fHistRhoVSEmbBkg = 0;
-  fHistDeltaPtEmbArea = 0;
-  fHistDeltaPtEmbvsEP = 0;
   fCent_V0 = 0;
   fVertex_z_cut = 0;
   fJetBG_rho = 0;
@@ -391,55 +318,6 @@ ClassImp(AliAnalysisTaskDijetHadron)
            fHJetPt_Aj2_EMB[i][j][k][l][m] = 0;
            fHJetPt_Aj3_EMB[i][j][k][l][m] = 0;
            fHJetPt_Aj4_EMB[i][j][k][l][m] = 0;
-
-         }
-       }
-      }
-    }
-  }
-
-
-  for (Int_t i = 0; i < fNcentBins; i++) {
-    for (Int_t j = 0; j < 4; j++) {
-      for (Int_t k = 0; k < 4; k++) {
-       for (Int_t l = 0; l < 4; l++) {
-         for (Int_t m = 0; m < l+1; m++) {
-           fHJetDeltaPhiasEP_Aj0_PbPb[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj1_PbPb[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj2_PbPb[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj3_PbPb[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj4_PbPb[i][j][k][l][m] = 0;
-
-           fHJetPtasEP_Aj0_PbPb[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj1_PbPb[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj2_PbPb[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj3_PbPb[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj4_PbPb[i][j][k][l][m] = 0;
-
-           fHJetDeltaPhiasEP_Aj0_MC[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj1_MC[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj2_MC[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj3_MC[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj4_MC[i][j][k][l][m] = 0;
-
-           fHJetPtasEP_Aj0_MC[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj1_MC[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj2_MC[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj3_MC[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj4_MC[i][j][k][l][m] = 0;
-
-           fHJetDeltaPhiasEP_Aj0_EMB[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj1_EMB[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj2_EMB[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj3_EMB[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj4_EMB[i][j][k][l][m] = 0;
-
-           fHJetPtasEP_Aj0_EMB[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj1_EMB[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj2_EMB[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj3_EMB[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj4_EMB[i][j][k][l][m] = 0;
-
          }
        }
       }
@@ -453,11 +331,15 @@ ClassImp(AliAnalysisTaskDijetHadron)
 AliAnalysisTaskDijetHadron::AliAnalysisTaskDijetHadron(const char *name) : 
   AliAnalysisTaskEmcalJet(name, kTRUE),
   fMCJetPtThreshold(1),
-  fMinRC2LJ(-1),
-  fRCperEvent(-1),
-  //fPtHardBinName(0x0),
-  //fPtHardBin(-1),
-  //fhPtHardBins(0x0),
+  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),
@@ -472,32 +354,6 @@ AliAnalysisTaskDijetHadron::AliAnalysisTaskDijetHadron(const char *name) :
   fEmbJetsCont(0),
   fEmbTracksCont(0),
   fEmbCaloClustersCont(0),
-  //fRandTracksCont(0),
-  //fRandCaloClustersCont(0),
-  fHistRCPhiEta(0), 
-  fHistRCPt(0),
-  fHistRCPtExLJ(0),
-  fHistRCPtExPartialLJ(0), 
-  //fHistRCPtRand(0),
-  fHistRhoVSRCPt(0),
-  fHistDeltaPtRCvsEP(0),
-  fHistDeltaPtRCExLJ(0),
-  fHistDeltaPtRCExPartialLJ(0),
-  //fHistDeltaPtRCRand(0),
-  fHistEmbJetsPtArea(0),
-  fHistEmbJetsCorrPtArea(0),
-  fHistEmbPartPtvsJetPt(0),
-  fHistEmbPartPtvsJetCorrPt(0),
-  fHistJetPtvsJetCorrPt(0),
-  fHistDistLeadPart2JetAxis(0),
-  fHistEmbBkgArea(0),
-  fHistRhoVSEmbBkg(0),
-  fHistDeltaPtEmbArea(0),
-  fHistDeltaPtEmbvsEP(0),
-  fHistRCPtExLJVSDPhiLJ(0),
-  fHistRCPtExPartialLJVSDPhiLJ(0),
-  fHistEmbJetsPhiEta(0),
-  fHistLeadPartPhiEta(0),
   fCent_V0(0),
   fVertex_z_cut(0),
   fJetBG_rho(0),
@@ -589,60 +445,11 @@ AliAnalysisTaskDijetHadron::AliAnalysisTaskDijetHadron(const char *name) :
   fHJetPt_Aj2_EMB(),
   fHJetPt_Aj3_EMB(),
   fHJetPt_Aj4_EMB(),
-  fHJetDeltaPhiasEP_Aj0_PbPb(),
-  fHJetDeltaPhiasEP_Aj1_PbPb(),
-  fHJetDeltaPhiasEP_Aj2_PbPb(),
-  fHJetDeltaPhiasEP_Aj3_PbPb(),
-  fHJetDeltaPhiasEP_Aj4_PbPb(),
-  fHJetPtasEP_Aj0_PbPb(),
-  fHJetPtasEP_Aj1_PbPb(),
-  fHJetPtasEP_Aj2_PbPb(),
-  fHJetPtasEP_Aj3_PbPb(),
-  fHJetPtasEP_Aj4_PbPb(),
-  fHJetDeltaPhiasEP_Aj0_MC(),
-  fHJetDeltaPhiasEP_Aj1_MC(),
-  fHJetDeltaPhiasEP_Aj2_MC(),
-  fHJetDeltaPhiasEP_Aj3_MC(),
-  fHJetDeltaPhiasEP_Aj4_MC(),
-  fHJetPtasEP_Aj0_MC(),
-  fHJetPtasEP_Aj1_MC(),
-  fHJetPtasEP_Aj2_MC(),
-  fHJetPtasEP_Aj3_MC(),
-  fHJetPtasEP_Aj4_MC(),
-  fHJetDeltaPhiasEP_Aj0_EMB(),
-  fHJetDeltaPhiasEP_Aj1_EMB(),
-  fHJetDeltaPhiasEP_Aj2_EMB(),
-  fHJetDeltaPhiasEP_Aj3_EMB(),
-  fHJetDeltaPhiasEP_Aj4_EMB(),
-  fHJetPtasEP_Aj0_EMB(),
-  fHJetPtasEP_Aj1_EMB(),
-  fHJetPtasEP_Aj2_EMB(),
-  fHJetPtasEP_Aj3_EMB(),
-  fHJetPtasEP_Aj4_EMB(),
   fEvent(0),
-  fCentrality(0)
+  fCentrality(99)
 {
   // Standard constructor.
 
-  fHistRCPt = 0;
-  fHistRCPtExLJ = 0;
-  fHistRCPtExPartialLJ = 0;
-  //fHistRCPtRand = 0;
-  fHistRhoVSRCPt = 0;
-  fHistDeltaPtRCvsEP = 0;
-  fHistDeltaPtRCExLJ = 0;
-  fHistDeltaPtRCExPartialLJ = 0;
-  //fHistDeltaPtRCRand = 0;
-  fHistEmbJetsPtArea = 0;
-  fHistEmbJetsCorrPtArea = 0;
-  fHistEmbPartPtvsJetPt = 0;
-  fHistEmbPartPtvsJetCorrPt = 0;
-  fHistJetPtvsJetCorrPt = 0;
-  fHistDistLeadPart2JetAxis = 0;
-  fHistEmbBkgArea = 0;
-  fHistRhoVSEmbBkg = 0;
-  fHistDeltaPtEmbArea = 0;
-  fHistDeltaPtEmbvsEP = 0;
   fCent_V0 = 0;
   fVertex_z_cut = 0;
   fJetBG_rho = 0;
@@ -762,54 +569,6 @@ AliAnalysisTaskDijetHadron::AliAnalysisTaskDijetHadron(const char *name) :
            fHJetPt_Aj2_EMB[i][j][k][l][m] = 0;
            fHJetPt_Aj3_EMB[i][j][k][l][m] = 0;
            fHJetPt_Aj4_EMB[i][j][k][l][m] = 0;
-
-         }
-       }
-      }
-    }
-  }
-
-  for (Int_t i = 0; i < fNcentBins; i++) {
-    for (Int_t j = 0; j < 4; j++) {
-      for (Int_t k = 0; k < 4; k++) {
-       for (Int_t l = 0; l < 4; l++) {
-         for (Int_t m = 0; m < l+1; m++) {
-           fHJetDeltaPhiasEP_Aj0_PbPb[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj1_PbPb[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj2_PbPb[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj3_PbPb[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj4_PbPb[i][j][k][l][m] = 0;
-
-           fHJetPtasEP_Aj0_PbPb[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj1_PbPb[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj2_PbPb[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj3_PbPb[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj4_PbPb[i][j][k][l][m] = 0;
-
-           fHJetDeltaPhiasEP_Aj0_MC[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj1_MC[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj2_MC[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj3_MC[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj4_MC[i][j][k][l][m] = 0;
-
-           fHJetPtasEP_Aj0_MC[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj1_MC[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj2_MC[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj3_MC[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj4_MC[i][j][k][l][m] = 0;
-
-           fHJetDeltaPhiasEP_Aj0_EMB[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj1_EMB[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj2_EMB[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj3_EMB[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj4_EMB[i][j][k][l][m] = 0;
-
-           fHJetPtasEP_Aj0_EMB[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj1_EMB[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj2_EMB[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj3_EMB[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj4_EMB[i][j][k][l][m] = 0;
-
          }
        }
       }
@@ -822,25 +581,6 @@ AliAnalysisTaskDijetHadron::AliAnalysisTaskDijetHadron(const char *name) :
 //________________________________________________________________________
 void AliAnalysisTaskDijetHadron::AllocateHistogramArrays()
 {
-  fHistRCPt = new TH1*[fNcentBins];
-  fHistRCPtExLJ = new TH1*[fNcentBins];
-  fHistRCPtExPartialLJ = new TH1*[fNcentBins];
-  //fHistRCPtRand = new TH1*[fNcentBins];
-  fHistRhoVSRCPt = new TH2*[fNcentBins];
-  fHistDeltaPtRCvsEP = new TH2*[fNcentBins];
-  fHistDeltaPtRCExLJ = new TH1*[fNcentBins];
-  fHistDeltaPtRCExPartialLJ = new TH1*[fNcentBins];
-  //fHistDeltaPtRCRand = new TH1*[fNcentBins];
-  fHistEmbJetsPtArea = new TH3*[fNcentBins];
-  fHistEmbJetsCorrPtArea = new TH3*[fNcentBins];
-  fHistEmbPartPtvsJetPt = new TH2*[fNcentBins];
-  fHistEmbPartPtvsJetCorrPt = new TH2*[fNcentBins];
-  fHistJetPtvsJetCorrPt = new TH2*[fNcentBins];
-  fHistDistLeadPart2JetAxis = new TH1*[fNcentBins];
-  fHistEmbBkgArea = new TH2*[fNcentBins];
-  fHistRhoVSEmbBkg = new TH2*[fNcentBins];
-  fHistDeltaPtEmbArea = new TH2*[fNcentBins];
-  fHistDeltaPtEmbvsEP = new TH2*[fNcentBins];
   fTrackPt_PbPb = new TH1*[fNcentBins];
   fTrackPhi_PbPb = new TH1*[fNcentBins];
   fTrackEta_PbPb = new TH1*[fNcentBins];
@@ -855,25 +595,6 @@ void AliAnalysisTaskDijetHadron::AllocateHistogramArrays()
   fTrack_Phi_Eta_EMB = new TH2*[fNcentBins];
 
   for (Int_t i = 0; i < fNcentBins; i++) {
-    fHistRCPt[i] = 0;
-    fHistRCPtExLJ[i] = 0;
-    fHistRCPtExPartialLJ[i] = 0;
-    //fHistRCPtRand[i] = 0;
-    fHistRhoVSRCPt[i] = 0;
-    fHistDeltaPtRCvsEP[i] = 0;
-    fHistDeltaPtRCExLJ[i] = 0;
-    fHistDeltaPtRCExPartialLJ[i] = 0;
-    //fHistDeltaPtRCRand[i] = 0;
-    fHistEmbJetsPtArea[i] = 0;
-    fHistEmbJetsCorrPtArea[i] = 0;
-    fHistEmbPartPtvsJetPt[i] = 0;
-    fHistEmbPartPtvsJetCorrPt[i] = 0;
-    fHistJetPtvsJetCorrPt[i] = 0;
-    fHistDistLeadPart2JetAxis[i] = 0;
-    fHistEmbBkgArea[i] = 0;
-    fHistRhoVSEmbBkg[i] = 0;
-    fHistDeltaPtEmbArea[i] = 0;
-    fHistDeltaPtEmbvsEP[i] = 0;
     fTrackPt_PbPb[i] = 0;
     fTrackPhi_PbPb[i] = 0;
     fTrackEta_PbPb[i] = 0;
@@ -967,7 +688,6 @@ void AliAnalysisTaskDijetHadron::AllocateHistogramArrays()
            fHJetPt_Aj3_PbPb[i][j][k][l][m] = 0;
            fHJetPt_Aj4_PbPb[i][j][k][l][m] = 0;
 
-
            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;
@@ -991,62 +711,12 @@ void AliAnalysisTaskDijetHadron::AllocateHistogramArrays()
            fHJetPt_Aj2_EMB[i][j][k][l][m] = 0;
            fHJetPt_Aj3_EMB[i][j][k][l][m] = 0;
            fHJetPt_Aj4_EMB[i][j][k][l][m] = 0;
-
          }
        }
       }
     }
   }
 
-  for (Int_t i = 0; i < fNcentBins; i++) {
-    for (Int_t j = 0; j < 4; j++) {
-      for (Int_t k = 0; k < 4; k++) {
-       for (Int_t l = 0; l < 4; l++) {
-         for (Int_t m = 0; m < l+1; m++) {
-
-           fHJetDeltaPhiasEP_Aj0_PbPb[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj1_PbPb[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj2_PbPb[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj3_PbPb[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj4_PbPb[i][j][k][l][m] = 0;
-
-           fHJetPtasEP_Aj0_PbPb[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj1_PbPb[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj2_PbPb[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj3_PbPb[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj4_PbPb[i][j][k][l][m] = 0;
-
-           fHJetDeltaPhiasEP_Aj0_MC[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj1_MC[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj2_MC[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj3_MC[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj4_MC[i][j][k][l][m] = 0;
-
-           fHJetPtasEP_Aj0_MC[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj1_MC[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj2_MC[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj3_MC[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj4_MC[i][j][k][l][m] = 0;
-
-           fHJetDeltaPhiasEP_Aj0_EMB[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj1_EMB[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj2_EMB[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj3_EMB[i][j][k][l][m] = 0;
-           fHJetDeltaPhiasEP_Aj4_EMB[i][j][k][l][m] = 0;
-
-           fHJetPtasEP_Aj0_EMB[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj1_EMB[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj2_EMB[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj3_EMB[i][j][k][l][m] = 0;
-           fHJetPtasEP_Aj4_EMB[i][j][k][l][m] = 0;
-
-         }
-       }
-      }
-    }
-  }
-
-
 }
 
 //________________________________________________________________________
@@ -1067,202 +737,8 @@ void AliAnalysisTaskDijetHadron::UserCreateOutputObjects()
   fEmbJetsCont = GetJetContainer("EmbJets");
   fEmbTracksCont = GetParticleContainer("EmbTracks");
   fEmbCaloClustersCont = GetClusterContainer("EmbCaloClusters");
-  //fRandTracksCont = GetParticleContainer("RandTracks");
-  //fRandCaloClustersCont = GetClusterContainer("RandCaloClusters");
-
-  if (fTracksCont || fCaloClustersCont) {
-    fHistRCPhiEta = new TH2F("fHistRCPhiEta","fHistRCPhiEta", 100, -1, 1, 201, 0, TMath::Pi() * 2.01);
-    fHistRCPhiEta->GetXaxis()->SetTitle("#eta");
-    fHistRCPhiEta->GetYaxis()->SetTitle("#phi");
-    fOutput->Add(fHistRCPhiEta);
-
-    if (fJetsCont) {
-      fHistRCPtExLJVSDPhiLJ = new TH2F("fHistRCPtExLJVSDPhiLJ","fHistRCPtExLJVSDPhiLJ", fNbins, fMinBinPt, fMaxBinPt, 128, -1.6, 4.8);
-      fHistRCPtExLJVSDPhiLJ->GetXaxis()->SetTitle("#it{p}_{T} (GeV/#it{c})");
-      fHistRCPtExLJVSDPhiLJ->GetYaxis()->SetTitle("#Delta#phi");
-      fOutput->Add(fHistRCPtExLJVSDPhiLJ);
-
-      fHistRCPtExPartialLJVSDPhiLJ = new TH2F("fHistRCPtExPartialLJVSDPhiLJ","fHistRCPtExPartialLJVSDPhiLJ", fNbins, fMinBinPt, fMaxBinPt, 128, -1.6, 4.8);
-      fHistRCPtExPartialLJVSDPhiLJ->GetXaxis()->SetTitle("#it{p}_{T} (GeV/#it{c})");
-      fHistRCPtExPartialLJVSDPhiLJ->GetYaxis()->SetTitle("#Delta#phi");
-      fOutput->Add(fHistRCPtExPartialLJVSDPhiLJ);
-    }
-  }
-
-  if (fEmbJetsCont) {
-    fHistEmbJetsPhiEta = new TH2F("fHistEmbJetsPhiEta","fHistEmbJetsPhiEta", 100, -1, 1, 201, 0, TMath::Pi() * 2.01);
-    fHistEmbJetsPhiEta->GetXaxis()->SetTitle("#eta");
-    fHistEmbJetsPhiEta->GetYaxis()->SetTitle("#phi");
-    fOutput->Add(fHistEmbJetsPhiEta);
-    
-    fHistLeadPartPhiEta = new TH2F("fHistLeadPartPhiEta","fHistLeadPartPhiEta", 100, -1, 1, 201, 0, TMath::Pi() * 2.01);
-    fHistLeadPartPhiEta->GetXaxis()->SetTitle("#eta");
-    fHistLeadPartPhiEta->GetYaxis()->SetTitle("#phi");
-    fOutput->Add(fHistLeadPartPhiEta);
-  }
 
-  TString histname;
-
-  const Int_t nbinsZ = 12;
-  Double_t binsZ[nbinsZ+1] = {0,1,2,3,4,5,6,7,8,9,10,20,1000};
-
-  Double_t *binsPt       = GenerateFixedBinArray(fNbins, fMinBinPt, fMaxBinPt);
-  Double_t *binsCorrPt   = GenerateFixedBinArray(fNbins*2, -fMaxBinPt, fMaxBinPt);
-  Double_t *binsArea     = GenerateFixedBinArray(50, 0, 2);
-
-  for (Int_t i = 0; i < fNcentBins; i++) {
-    if (fTracksCont || fCaloClustersCont) {
-      histname = "fHistRCPt_";
-      histname += i;
-      fHistRCPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt * 2);
-      fHistRCPt[i]->GetXaxis()->SetTitle("#it{p}_{T} (GeV/#it{c})");
-      fHistRCPt[i]->GetYaxis()->SetTitle("counts");
-      fOutput->Add(fHistRCPt[i]);
-
-      histname = "fHistRhoVSRCPt_";
-      histname += i;
-      fHistRhoVSRCPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt, fNbins, fMinBinPt, fMaxBinPt);
-      fHistRhoVSRCPt[i]->GetXaxis()->SetTitle("A#rho (GeV/#it{c})");
-      fHistRhoVSRCPt[i]->GetYaxis()->SetTitle("#it{p}_{T} (GeV/#it{c})");
-      fOutput->Add(fHistRhoVSRCPt[i]);
-
-      histname = "fHistDeltaPtRCvsEP_";
-      histname += i;
-      fHistDeltaPtRCvsEP[i] = new TH2F(histname.Data(), histname.Data(), 101, 0, TMath::Pi()*1.01, fNbins * 2, -fMaxBinPt, fMaxBinPt);
-      fHistDeltaPtRCvsEP[i]->GetXaxis()->SetTitle("#phi_{RC} - #psi_{RP}");
-      fHistDeltaPtRCvsEP[i]->GetYaxis()->SetTitle("#delta#it{p}_{T}^{RC} (GeV/#it{c})");
-      fHistDeltaPtRCvsEP[i]->GetZaxis()->SetTitle("counts");
-      fOutput->Add(fHistDeltaPtRCvsEP[i]);
-      
-      if (fJetsCont) {
-       histname = "fHistRCPtExLJ_";
-       histname += i;
-       fHistRCPtExLJ[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt * 2);
-       fHistRCPtExLJ[i]->GetXaxis()->SetTitle("#it{p}_{T}^{RC} (GeV/#it{c})");
-       fHistRCPtExLJ[i]->GetYaxis()->SetTitle("counts");
-       fOutput->Add(fHistRCPtExLJ[i]);
-
-       histname = "fHistDeltaPtRCExLJ_";
-       histname += i;
-       fHistDeltaPtRCExLJ[i] = new TH1F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt);
-       fHistDeltaPtRCExLJ[i]->GetXaxis()->SetTitle("#delta#it{p}_{T}^{RC} (GeV/#it{c})");
-       fHistDeltaPtRCExLJ[i]->GetYaxis()->SetTitle("counts");
-       fOutput->Add(fHistDeltaPtRCExLJ[i]);
-
-        histname = "fHistRCPtExPartialLJ_";
-        histname += i;
-        fHistRCPtExPartialLJ[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt * 2);
-        fHistRCPtExPartialLJ[i]->GetXaxis()->SetTitle("#it{p}_{T}^{RC} (GeV/#it{c})");
-        fHistRCPtExPartialLJ[i]->GetYaxis()->SetTitle("counts");
-        fOutput->Add(fHistRCPtExPartialLJ[i]);
-
-        histname = "fHistDeltaPtRCExPartialLJ_";
-        histname += i;
-        fHistDeltaPtRCExPartialLJ[i] = new TH1F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt);
-        fHistDeltaPtRCExPartialLJ[i]->GetXaxis()->SetTitle("#delta#it{p}_{T}^{RC} (GeV/#it{c})");
-        fHistDeltaPtRCExPartialLJ[i]->GetYaxis()->SetTitle("counts");
-        fOutput->Add(fHistDeltaPtRCExPartialLJ[i]);
-      }
-    }
-
-    /*if (fRandTracksCont || fRandCaloClustersCont) {
-      histname = "fHistRCPtRand_";
-      histname += i;
-      fHistRCPtRand[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt * 2);
-      fHistRCPtRand[i]->GetXaxis()->SetTitle("#it{p}_{T}^{RC} (GeV/#it{c})");
-      fHistRCPtRand[i]->GetYaxis()->SetTitle("counts");
-      fOutput->Add(fHistRCPtRand[i]);
-
-      histname = "fHistDeltaPtRCRand_";
-      histname += i;
-      fHistDeltaPtRCRand[i] = new TH1F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt);
-      fHistDeltaPtRCRand[i]->GetXaxis()->SetTitle("#delta#it{p}_{T}^{RC} (GeV/#it{c})");
-      fHistDeltaPtRCRand[i]->GetYaxis()->SetTitle("counts");
-      fOutput->Add(fHistDeltaPtRCRand[i]);
-      }*/
-
-    if (fEmbJetsCont) {
-      histname = "fHistEmbJetsPtArea_";
-      histname += i;
-      fHistEmbJetsPtArea[i] = new TH3F(histname.Data(), histname.Data(), 50, binsArea, fNbins, binsPt, nbinsZ, binsZ);
-      fHistEmbJetsPtArea[i]->GetXaxis()->SetTitle("area");
-      fHistEmbJetsPtArea[i]->GetYaxis()->SetTitle("#it{p}_{T,jet}^{emb,raw} (GeV/#it{c})");
-      fOutput->Add(fHistEmbJetsPtArea[i]);
-
-      histname = "fHistEmbJetsCorrPtArea_";
-      histname += i;
-      fHistEmbJetsCorrPtArea[i] = new TH3F(histname.Data(), histname.Data(), 50, binsArea, fNbins * 2, binsCorrPt, nbinsZ, binsZ);
-      fHistEmbJetsCorrPtArea[i]->GetXaxis()->SetTitle("area");
-      fHistEmbJetsCorrPtArea[i]->GetYaxis()->SetTitle("#it{p}_{T,jet}^{emb,corr} (GeV/#it{c})");
-      fOutput->Add(fHistEmbJetsCorrPtArea[i]);
-
-      histname = "fHistEmbPartPtvsJetPt_";
-      histname += i;
-      fHistEmbPartPtvsJetPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt, fNbins, fMinBinPt, fMaxBinPt);
-      fHistEmbPartPtvsJetPt[i]->GetXaxis()->SetTitle("#sum#it{p}_{T,const}^{emb} (GeV/#it{c})");
-      fHistEmbPartPtvsJetPt[i]->GetYaxis()->SetTitle("#it{p}_{T,jet}^{emb} (GeV/#it{c})");
-      fHistEmbPartPtvsJetPt[i]->GetZaxis()->SetTitle("counts");
-      fOutput->Add(fHistEmbPartPtvsJetPt[i]);
-
-      histname = "fHistEmbPartPtvsJetCorrPt_";
-      histname += i;
-      fHistEmbPartPtvsJetCorrPt[i] = new TH2F(histname.Data(), histname.Data(), 
-                                             fNbins, fMinBinPt, fMaxBinPt, fNbins*2, -fMaxBinPt, fMaxBinPt);
-      fHistEmbPartPtvsJetCorrPt[i]->GetXaxis()->SetTitle("#sum#it{p}_{T,const}^{emb} (GeV/#it{c})");
-      fHistEmbPartPtvsJetCorrPt[i]->GetYaxis()->SetTitle("#it{p}_{T,jet}^{emb} - A#rho (GeV/#it{c})");
-      fHistEmbPartPtvsJetCorrPt[i]->GetZaxis()->SetTitle("counts");
-      fOutput->Add(fHistEmbPartPtvsJetCorrPt[i]);
-
-      histname = "fHistJetPtvsJetCorrPt_";
-      histname += i;
-      fHistJetPtvsJetCorrPt[i] = new TH2F(histname.Data(), histname.Data(), 
-                                         fNbins, fMinBinPt, fMaxBinPt, fNbins*2, -fMaxBinPt, fMaxBinPt);
-      fHistJetPtvsJetCorrPt[i]->GetXaxis()->SetTitle("#it{p}_{T,jet}^{emb} (GeV/#it{c})");
-      fHistJetPtvsJetCorrPt[i]->GetYaxis()->SetTitle("#it{p}_{T,jet}^{emb} - A#rho (GeV/#it{c})");
-      fHistJetPtvsJetCorrPt[i]->GetZaxis()->SetTitle("counts");
-      fOutput->Add(fHistJetPtvsJetCorrPt[i]);
-
-      histname = "fHistDistLeadPart2JetAxis_";
-      histname += i;
-      fHistDistLeadPart2JetAxis[i] = new TH1F(histname.Data(), histname.Data(), 50, 0, 0.5);
-      fHistDistLeadPart2JetAxis[i]->GetXaxis()->SetTitle("distance");
-      fHistDistLeadPart2JetAxis[i]->GetYaxis()->SetTitle("counts");
-      fOutput->Add(fHistDistLeadPart2JetAxis[i]);
-
-      histname = "fHistEmbBkgArea_";
-      histname += i;
-      fHistEmbBkgArea[i] = new TH2F(histname.Data(), histname.Data(), 50, 0, 2, fNbins, fMinBinPt, fMaxBinPt);
-      fHistEmbBkgArea[i]->GetXaxis()->SetTitle("area");
-      fHistEmbBkgArea[i]->GetYaxis()->SetTitle("#it{p}_{T,jet}^{emb} - #sum#it{p}_{T,const}^{emb} (GeV/#it{c})");
-      fOutput->Add(fHistEmbBkgArea[i]);
-
-      histname = "fHistRhoVSEmbBkg_";
-      histname += i;
-      fHistRhoVSEmbBkg[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt, fNbins, fMinBinPt, fMaxBinPt);
-      fHistRhoVSEmbBkg[i]->GetXaxis()->SetTitle("A#rho (GeV/#it{c})");
-      fHistRhoVSEmbBkg[i]->GetYaxis()->SetTitle("#it{p}_{T,jet}^{emb} - #sum#it{p}_{T,const}^{emb} (GeV/#it{c})");
-      fOutput->Add(fHistRhoVSEmbBkg[i]);
-      
-      histname = "fHistDeltaPtEmbArea_";
-      histname += i;
-      fHistDeltaPtEmbArea[i] = new TH2F(histname.Data(), histname.Data(), 
-                                       50, 0, 2, fNbins * 2, -fMaxBinPt, fMaxBinPt);
-      fHistDeltaPtEmbArea[i]->GetXaxis()->SetTitle("area");
-      fHistDeltaPtEmbArea[i]->GetYaxis()->SetTitle("#delta#it{p}_{T}^{emb} (GeV/#it{c})");
-      fHistDeltaPtEmbArea[i]->GetZaxis()->SetTitle("counts");
-      fOutput->Add(fHistDeltaPtEmbArea[i]);
-
-      histname = "fHistDeltaPtEmbvsEP_";
-      histname += i;
-      fHistDeltaPtEmbvsEP[i] = new TH2F(histname.Data(), histname.Data(), 101, 0, TMath::Pi()*1.01, fNbins * 2, -fMaxBinPt, fMaxBinPt);
-      fHistDeltaPtEmbvsEP[i]->GetXaxis()->SetTitle("#phi_{jet} - #Psi_{EP}");
-      fHistDeltaPtEmbvsEP[i]->GetYaxis()->SetTitle("#delta#it{p}_{T}^{emb} (GeV/#it{c})");
-      fHistDeltaPtEmbvsEP[i]->GetZaxis()->SetTitle("counts");
-      fOutput->Add(fHistDeltaPtEmbvsEP[i]);
-    }
-  }
-
-  //User Task
+   //User Task
   fCent_V0  = new TH1F("fCent_V0", "Centrality (all) by V0M", 103,-2,101);
   fOutput->Add(fCent_V0);
   fVertex_z_cut = new TH1F("fVertex_z_cut", "SPD vertex z (cut)", 120,-30,30);
@@ -1271,8 +747,6 @@ void AliAnalysisTaskDijetHadron::UserCreateOutputObjects()
   fOutput->Add(fJetBG_rho);
   fJetBG_rho_Cent = new TH2F("fJetBG_rho_Cent","fJetBG_rho_Cent",100,0,100,300,0,300);
   fOutput->Add(fJetBG_rho_Cent);
-  //fhPtHardBins = new TH1F("fhPtHardBins","Number of events in each pT hard bin",11,0,11);
-  //fOutput->Add(fhPtHardBins);
 
   // Track histograms...
   for (Int_t i = 0; i < fNcentBins; i++) {
@@ -1501,98 +975,12 @@ void AliAnalysisTaskDijetHadron::UserCreateOutputObjects()
            fHJetPt_Aj4_EMB[i][j][k][l][m] = new TH1F(Form("fHJetPt_Aj4_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPt_Aj4_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
            fOutput->Add(fHJetPt_Aj4_EMB[i][j][k][l][m]);
 
-
-         }
-       }
-      }
-    }
-  }
-
-  for (Int_t i = 0; i < fNcentBins; i++) {
-    for (Int_t j = 0; j < 4; j++) {
-      for (Int_t k = 0; k < 4; k++) {
-       for (Int_t l = 0; l < 4; l++) {
-         for (Int_t m = 0; m < l+1; m++) {
-           // Jet-Hadron as EP Histgrams...
-           //PbPb
-           fHJetDeltaPhiasEP_Aj0_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj0_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj0_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj0_PbPb[i][j][k][l][m]);
-           fHJetDeltaPhiasEP_Aj1_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj1_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj1_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj1_PbPb[i][j][k][l][m]);
-           fHJetDeltaPhiasEP_Aj2_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj2_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj2_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj2_PbPb[i][j][k][l][m]);
-           fHJetDeltaPhiasEP_Aj3_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj3_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj3_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj3_PbPb[i][j][k][l][m]);
-           fHJetDeltaPhiasEP_Aj4_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj4_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj4_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj4_PbPb[i][j][k][l][m]);
-
-           fHJetPtasEP_Aj0_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj0_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj0_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj0_PbPb[i][j][k][l][m]);
-           fHJetPtasEP_Aj1_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj1_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj1_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj1_PbPb[i][j][k][l][m]);
-           fHJetPtasEP_Aj2_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj2_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj2_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj2_PbPb[i][j][k][l][m]);
-           fHJetPtasEP_Aj3_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj3_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj3_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj3_PbPb[i][j][k][l][m]);
-           fHJetPtasEP_Aj4_PbPb[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj4_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj4_PbPb[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj4_PbPb[i][j][k][l][m]);
-
-           //MC
-           fHJetDeltaPhiasEP_Aj0_MC[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj0_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj0_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj0_MC[i][j][k][l][m]);
-           fHJetDeltaPhiasEP_Aj1_MC[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj1_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj1_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj1_MC[i][j][k][l][m]);
-           fHJetDeltaPhiasEP_Aj2_MC[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj2_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj2_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj2_MC[i][j][k][l][m]);
-           fHJetDeltaPhiasEP_Aj3_MC[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj3_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj3_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj3_MC[i][j][k][l][m]);
-           fHJetDeltaPhiasEP_Aj4_MC[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj4_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj4_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj4_MC[i][j][k][l][m]);
-
-           fHJetPtasEP_Aj0_MC[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj0_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj0_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj0_MC[i][j][k][l][m]);
-           fHJetPtasEP_Aj1_MC[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj1_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj1_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj1_MC[i][j][k][l][m]);
-           fHJetPtasEP_Aj2_MC[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj2_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj2_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj2_MC[i][j][k][l][m]);
-           fHJetPtasEP_Aj3_MC[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj3_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj3_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj3_MC[i][j][k][l][m]);
-           fHJetPtasEP_Aj4_MC[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj4_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj4_MC[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj4_MC[i][j][k][l][m]);
-
-           //EMB
-           fHJetDeltaPhiasEP_Aj0_EMB[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj0_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj0_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj0_EMB[i][j][k][l][m]);
-           fHJetDeltaPhiasEP_Aj1_EMB[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj1_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj1_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj1_EMB[i][j][k][l][m]);
-           fHJetDeltaPhiasEP_Aj2_EMB[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj2_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj2_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj2_EMB[i][j][k][l][m]);
-           fHJetDeltaPhiasEP_Aj3_EMB[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj3_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj3_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj3_EMB[i][j][k][l][m]);
-           fHJetDeltaPhiasEP_Aj4_EMB[i][j][k][l][m] = new TH1F(Form("fHJetDeltaPhiasEP_Aj4_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetDeltaPhiasEP_Aj4_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),40,-1./2.*pi,3./2.*pi);
-           fOutput->Add(fHJetDeltaPhiasEP_Aj4_EMB[i][j][k][l][m]);
-
-           fHJetPtasEP_Aj0_EMB[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj0_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj0_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj0_EMB[i][j][k][l][m]);
-           fHJetPtasEP_Aj1_EMB[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj1_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj1_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj1_EMB[i][j][k][l][m]);
-           fHJetPtasEP_Aj2_EMB[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj2_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj2_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj2_EMB[i][j][k][l][m]);
-           fHJetPtasEP_Aj3_EMB[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj3_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj3_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj3_EMB[i][j][k][l][m]);
-           fHJetPtasEP_Aj4_EMB[i][j][k][l][m] = new TH1F(Form("fHJetPtasEP_Aj4_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),Form("fHJetPtasEP_Aj4_EMB[%d][%d][%d][%d][%d]",i,j,k,l,m),360,0,120);
-           fOutput->Add(fHJetPtasEP_Aj4_EMB[i][j][k][l][m]);
          }
        }
       }
     }
   }
 
-
-  delete[] binsPt;
-  delete[] binsCorrPt;
-  delete[] binsArea;
-
   PostData(1, fOutput); // Post data for ALL output slots >0 here, to get at least an empty histogram
 }
 
@@ -1617,20 +1005,7 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
 
   //Get Event
   fEvent = InputEvent();
-  if(fEvent){
-
-    /*if(!fPtHardBinName)
-      {
-      // Get embedded pt hard bin number
-      fPtHardBinName = static_cast<AliNamedString*>(fEvent->FindListObject("AODEmbeddingFile"));
-      if(!fPtHardBinName) cout << "no embedding file!" << endl;
-      }
-
-      TString fileName = fPtHardBinName->GetString();
-      fileName.Remove(0,50);
-      fileName.Remove(fileName.Index("/"));
-      fPtHardBin = fileName.Atoi();
-      fhPtHardBins->Fill(fPtHardBin);*/
+  if(fEvent && fAvoidTpcHole == 0){
 
     //trigger
     Int_t fTriggerType =-1;
@@ -1705,25 +1080,16 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
 
 
          //threshold
-         double Jet1_threshold[5]; double Jet2_threshold[5];
+         double Jet1_threshold[4]; double Jet2_threshold[4];
          Jet1_threshold[0]=0.0; Jet2_threshold[0]=0.0;
-         for(Int_t k=1;k<5;k++){
-           int dummy = k - 1;
-           Jet1_threshold[k]=Jet1_threshold[dummy]+10.0;       
-           Jet2_threshold[k]=Jet2_threshold[dummy]+10.0;       
-         }
+         Jet1_threshold[1]=fJet1Ptcut1; Jet2_threshold[1]=fJet2Ptcut1;
+         Jet1_threshold[2]=fJet1Ptcut2; Jet2_threshold[2]=fJet2Ptcut2;
+         Jet1_threshold[3]=fJet1Ptcut3; Jet2_threshold[3]=fJet2Ptcut3;
 
-         //Jet check
-         //Double_t jet_track[6][2][200];
-         //for(Int_t m=0;m<6;m++){
-         //for(Int_t i=0;i<2;i++){
-         //for(Int_t j=0;j<200;j++){
-         //jet_track[m][i][j]=-999.0;
-         //}
-         //}
-         //}
+         // ************
+         // PbPb
+         // _________________________________
 
-         //PbPb
          //Track histogram
          if (fTracksCont) {
            AliVTrack *track = static_cast<AliVTrack*>(fTracksCont->GetNextAcceptParticle(0)); 
@@ -1743,19 +1109,11 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
            AliEmcalJet *Jet = fJetsCont->GetNextAcceptJet(0);
            while(Jet) {
 
-             if ((Jet->Eta() >  0.7) ||
-                 (Jet->Eta() < -0.7) ||
-                 (Jet->Phi() >  2*TMath::Pi()) ||
-                 (Jet->Phi() <  0.0)) continue; // acceptance eta range and etmin
-
              //leading track cut
-             Int_t leading_track_count[3]={0,0,0};
-             //Int_t leading_track_limit=0;
-             if(fJetsCont->GetLeadingHadronPt(Jet) > 0.) leading_track_count[0] += 1;
-             if(fJetsCont->GetLeadingHadronPt(Jet) > 5.) leading_track_count[1] += 1;
-             if(fJetsCont->GetLeadingHadronPt(Jet) > 10.) leading_track_count[2] += 1;
-             //if(fJetsCont->GetLeadingHadronPt(Jet) > 100.) leading_track_limit += 1;
-             //if(leading_track_limit > 0) continue;
+             Int_t leading_track_count[3]={0.,0.,0.};
+             if(fJetsCont->GetLeadingHadronPt(Jet) > fleadingHadronPtcut1) leading_track_count[0] += 1;
+             if(fJetsCont->GetLeadingHadronPt(Jet) > fleadingHadronPtcut2) leading_track_count[1] += 1;
+             if(fJetsCont->GetLeadingHadronPt(Jet) > fleadingHadronPtcut3) leading_track_count[2] += 1;
 
              for(int m=0;m<3;m++){
                c_jet1_PbPb[m]++; // jet count in acceptance.
@@ -1764,7 +1122,7 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
                  fJetPhi_PbPb[fCentBin][m]->Fill(Jet->Phi());
                  fJetEta_PbPb[fCentBin][m]->Fill(Jet->Eta());
                  fJet_Phi_Eta_PbPb[fCentBin][m]->Fill(Jet->Phi(),Jet->Eta());
-                 fJetPt_BG_PbPb[fCentBin][m]->Fill(Jet->Pt() - Jet->Area() * fRhoVal);
+                 fJetPt_BG_PbPb[fCentBin][m]->Fill(Jet->Pt() - Jet->Area() * fJetsCont->GetRhoVal());
                }
              }
 
@@ -1772,7 +1130,7 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
                if(c_jet1_PbPb[m] == 1)
                  {
                    if(leading_track_count[m] > 0){
-                     jet1_pt0[m] = Jet->Pt(); jet1_pt_BG0[m] = Jet->Pt() - Jet->Area() * fRhoVal; jet1_phi0[m] = Jet->Phi(); jet1_eta0[m] = Jet->Eta(); //Get Leading Jet(Jet1) value
+                     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
 
                      dEPJet0[m] = jet1_phi0[m] - fEPV0;
                      while (dEPJet0[m] < 0) dEPJet0[m] += TMath::Pi();
@@ -1784,7 +1142,7 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
 
                else if(c_jet1_PbPb[m] > 1 && c_jet2_PbPb[m] == 0  && leading_jet_count0[m] > 0 && leading_track_count[m] > 0)// sub leading
                  {
-                   jet2_pt0[m] = Jet->Pt(); jet2_pt_BG0[m] = Jet->Pt() - Jet->Area() * fRhoVal; jet2_phi0[m] = Jet->Phi(); jet2_eta0[m] = Jet->Eta(); //Get Sub Leading Jet(Jet2) value
+                   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
                    Delta_phi0[m] = jet1_phi0[m] - jet2_phi0[m]; Aj0[m] = (jet1_pt_BG0[m] - jet2_pt_BG0[m]) / (jet1_pt_BG0[m] + jet2_pt_BG0[m]);
                    if     (Delta_phi0[m] < (-1./2*TMath::Pi()))Delta_phi0[m] = Delta_phi0[m] +2*TMath::Pi();
                    else if(Delta_phi0[m] > (3./2*TMath::Pi()))Delta_phi0[m] = Delta_phi0[m] -2*TMath::Pi();
@@ -1829,12 +1187,11 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
            }// jet while
 
            //jet-hadron
-           if (fTracksCont) {
-             for(int m=0;m<3;m++){
-               //if find sub leading
+           for(int m=0;m<3;m++){//leading track cut
+             if (fTracksCont) {//track cont
                int c_subleading_jet = 0;
                c_subleading_jet = subleading_jet_count0[m];
-               if(c_subleading_jet > 0){
+               if(c_subleading_jet > 0){//if find sub leading
 
                  AliVTrack *track = static_cast<AliVTrack*>(fTracksCont->GetNextAcceptParticle(0));
                  while(track) {
@@ -1848,24 +1205,6 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
                      if     (dphi < (-1./2.*TMath::Pi()))dphi = dphi +2*TMath::Pi();
                      else if(dphi > (3./2.*TMath::Pi()))dphi = dphi -2*TMath::Pi();
 
-                     //jet_track check
-                     /*Bool_t jet_switch=false;
-                       for(int i=0;i<200;i++){
-                       Float_t check_track1,check_track2;
-                       check_track1 = -999.0; check_track2 = -999.0;
-                       check_track1 = jet_track[m][0][i]; check_track2 = jet_track[m][1][i];
-                       if(check_track1 == phi){
-                       jet_switch=true;
-                       }
-                       if(check_track2 == phi){
-                       jet_switch=true;
-                       }
-                       }
-
-                       if(jet_switch==true){
-                       continue;
-                       }*/
-
                      //dphi cut
                      Bool_t dphi_cut[4];
                      //devide(jet side)
@@ -1972,93 +1311,20 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
                        }
                      }//count1
 
-                     if(m==1){
-                       //hadron-dphi as dEPJet (jet leading track = 5GeV)
-                       for(int EPtri=0;EPtri<4;EPtri++){
-                         if(jet_dEP_switch[EPtri]){
-                           for(int pt_cut=0;pt_cut<4;pt_cut++){
-                             if(pt_switch[pt_cut]){
-                               for(int count1=0;count1<4;count1++){
-                                 if(jet_dphi_switch[0]){
-                                   for(int count2=0;count2<count1+1;count2++){
-                                     if(jet1_pt_BG0[m] > Jet1_threshold[count1] && jet2_pt_BG0[m] > Jet2_threshold[count2]){
-                                       fHJetDeltaPhiasEP_Aj0_PbPb[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-
-                                       if(Aj0[m] >= 0.0 && Aj0[m] < 0.2){
-                                         fHJetDeltaPhiasEP_Aj1_PbPb[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-                                       }
-
-                                       if(Aj0[m] >= 0.2 && Aj0[m] < 0.4){
-                                         fHJetDeltaPhiasEP_Aj2_PbPb[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-                                       }
-
-                                       if(Aj0[m] >= 0.4 && Aj0[m] < 0.6){
-                                         fHJetDeltaPhiasEP_Aj3_PbPb[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-                                       }
-
-                                       if(Aj0[m] >= 0.6 && Aj0[m] <= 0.8){
-                                         fHJetDeltaPhiasEP_Aj4_PbPb[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-                                       }
-                                     }
-
-
-                                   }//count2
-                                 }
-                               }//count1
-                             }//pt cut
-                           }//pt for
-                         }//dEP cut
-                       }//dEP for
-
-                       //hadron-pT as dEPJet (jet leading track = 5GeV)
-                       for(int EPtri=0;EPtri<4;EPtri++){
-                         if(jet_dEP_switch[EPtri]){
-                           for(int count1=0;count1<4;count1++){
-                             if(jet_dphi_switch[0]){
-                               for(int count2=0;count2<count1+1;count2++){
-                                 if(jet1_pt_BG0[m] > Jet1_threshold[count1] && jet2_pt_BG0[m] > Jet2_threshold[count2]){
-                                   for(int i=0;i<4;i++){
-                                     if(dphi_cut[i]){
-                                       fHJetPtasEP_Aj0_PbPb[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-
-                                       if(Aj0[m] >= 0.0 && Aj0[m] < 0.2){
-                                         fHJetPtasEP_Aj1_PbPb[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-                                       }
-
-                                       if(Aj0[m] >= 0.2 && Aj0[m] < 0.4){
-                                         fHJetPtasEP_Aj2_PbPb[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-                                       }
-
-                                       if(Aj0[m] >= 0.4 && Aj0[m] < 0.6){
-                                         fHJetPtasEP_Aj3_PbPb[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-                                       }
-
-                                       if(Aj0[m] >= 0.6 && Aj0[m] <= 0.8){
-                                         fHJetPtasEP_Aj4_PbPb[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-                                       }
-                                     }//dphi cut
-                                   }//dphi loop
-                                 }//jet pt cut
-
-                               }//count2
-                             }
-                           }//count1
-
-                         }//dEP cut
-                       }//dEP for
-                     }//jet leading track cut
-
                    }// if label
                    track = static_cast<AliVTrack*>(fTracksCont->GetNextAcceptParticle());
                  }// track while
 
                }// if sub leading jet
-             }
-           }// tracks Cont
+             }// tracks Cont
+           }// jet leading track cut
 
          }// jetCont
 
-         //MC
+         // ************
+         // MC
+         // _________________________________
+
          //Track histogram
          if (fMCTracksCont) {
            AliVTrack *MCtrack = static_cast<AliVTrack*>(fMCTracksCont->GetNextAcceptParticle(0)); 
@@ -2078,19 +1344,11 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
            AliEmcalJet *MCJet = fMCJetsCont->GetNextAcceptJet(0);
            while(MCJet) {
 
-             if ((MCJet->Eta() >  0.7) ||
-                 (MCJet->Eta() < -0.7) ||
-                 (MCJet->Phi() >  2*TMath::Pi()) ||
-                 (MCJet->Phi() <  0.0)) continue; // acceptance eta range and etmin
-
              //leading track cut
-             Int_t leading_track_count[3]={0,0,0};
-             //Int_t leading_track_limit=0;
-             if(fMCJetsCont->GetLeadingHadronPt(MCJet) > 0.) leading_track_count[0] += 1;
-             if(fMCJetsCont->GetLeadingHadronPt(MCJet) > 5.) leading_track_count[1] += 1;
-             if(fMCJetsCont->GetLeadingHadronPt(MCJet) > 10.) leading_track_count[2] += 1;
-             //if(fMCJetsCont->GetLeadingHadronPt(MCJet) > 100.) leading_track_limit += 1;
-             //if(leading_track_limit > 0) continue;
+             Int_t leading_track_count[3]={0.,0.,0.};
+             if(fMCJetsCont->GetLeadingHadronPt(MCJet) > fleadingHadronPtcut1) leading_track_count[0] += 1;
+             if(fMCJetsCont->GetLeadingHadronPt(MCJet) > fleadingHadronPtcut2) leading_track_count[1] += 1;
+             if(fMCJetsCont->GetLeadingHadronPt(MCJet) > fleadingHadronPtcut3) leading_track_count[2] += 1;
 
              for(int m=0;m<3;m++){
                c_jet1_MC[m]++; // jet count in acceptance.
@@ -2160,12 +1418,11 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
            }//while jet
 
            //jet-hadron
-           if (fMCTracksCont) {
-             for(int m=0;m<3;m++){
-               //if find sub leading
+           for(int m=0;m<3;m++){
+             if (fMCTracksCont) {//track cont
                int c_subleading_jet = 0;
                c_subleading_jet = subleading_jet_count1[m];
-               if(c_subleading_jet > 0){
+               if(c_subleading_jet > 0){//if find sub leading
 
                  AliVTrack *MCtrack = static_cast<AliVTrack*>(fMCTracksCont->GetNextAcceptParticle(0));
                  while(MCtrack) {
@@ -2179,24 +1436,6 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
                      if     (dphi < (-1./2.*TMath::Pi()))dphi = dphi +2*TMath::Pi();
                      else if(dphi > (3./2.*TMath::Pi()))dphi = dphi -2*TMath::Pi();
 
-                     //jet_track check
-                     /*Bool_t jet_switch=false;
-                       for(int i=0;i<200;i++){
-                       Float_t check_track1,check_track2;
-                       check_track1 = -999.0; check_track2 = -999.0;
-                       check_track1 = jet_track[m][0][i]; check_track2 = jet_track[m][1][i];
-                       if(check_track1 == phi){
-                       jet_switch=true;
-                       }
-                       if(check_track2 == phi){
-                       jet_switch=true;
-                       }
-                       }
-
-                       if(jet_switch==true){
-                       continue;
-                       }*/
-
                      //dphi cut
                      Bool_t dphi_cut[4];
                      //devide(jet side)
@@ -2303,177 +1542,17 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
                        }
                      }//count1
 
-                     if(m==1){
-                       //hadron-dphi as dEPJet (jet leading track = 5GeV)
-                       for(int EPtri=0;EPtri<4;EPtri++){
-                         if(jet_dEP_switch[EPtri]){
-                           for(int pt_cut=0;pt_cut<4;pt_cut++){
-                             if(pt_switch[pt_cut]){
-                               for(int count1=0;count1<4;count1++){
-                                 if(jet_dphi_switch[0]){
-                                   for(int count2=0;count2<count1+1;count2++){
-                                     if(jet1_pt1[m] > Jet1_threshold[count1] && jet2_pt1[m] > Jet2_threshold[count2]){
-                                       fHJetDeltaPhiasEP_Aj0_MC[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-
-                                       if(Aj1[m] >= 0.0 && Aj1[m] < 0.2){
-                                         fHJetDeltaPhiasEP_Aj1_MC[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-                                       }
-
-                                       if(Aj1[m] >= 0.2 && Aj1[m] < 0.4){
-                                         fHJetDeltaPhiasEP_Aj2_MC[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-                                       }
-
-                                       if(Aj1[m] >= 0.4 && Aj1[m] < 0.6){
-                                         fHJetDeltaPhiasEP_Aj3_MC[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-                                       }
-
-                                       if(Aj1[m] >= 0.6 && Aj1[m] <= 0.8){
-                                         fHJetDeltaPhiasEP_Aj4_MC[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-                                       }
-                                     }
-
-
-                                   }//count2
-                                 }
-                               }//count1
-                             }//pt cut
-                           }//pt for
-                         }//dEP cut
-                       }//dEP for
-
-                       //hadron-pT as dEPJet (jet leading track = 5GeV)
-                       for(int EPtri=0;EPtri<4;EPtri++){
-                         if(jet_dEP_switch[EPtri]){
-                           for(int count1=0;count1<4;count1++){
-                             if(jet_dphi_switch[0]){
-                               for(int count2=0;count2<count1+1;count2++){
-                                 if(jet1_pt1[m] > Jet1_threshold[count1] && jet2_pt1[m] > Jet2_threshold[count2]){
-                                   for(int i=0;i<4;i++){
-                                     if(dphi_cut[i]){
-                                       fHJetPtasEP_Aj0_MC[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-
-                                       if(Aj1[m] >= 0.0 && Aj1[m] < 0.2){
-                                         fHJetPtasEP_Aj1_MC[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-                                       }
-
-                                       if(Aj1[m] >= 0.2 && Aj1[m] < 0.4){
-                                         fHJetPtasEP_Aj2_MC[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-                                       }
-
-                                       if(Aj1[m] >= 0.4 && Aj1[m] < 0.6){
-                                         fHJetPtasEP_Aj3_MC[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-                                       }
-
-                                       if(Aj1[m] >= 0.6 && Aj1[m] <= 0.8){
-                                         fHJetPtasEP_Aj4_MC[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-                                       }
-                                     }//dphi cut
-                                   }//dphi loop
-                                 }//jet pt cut
-
-                               }//count2
-                             }
-                           }//count1
-                         }//dEP cut
-                       }//dEP for
-                     }//jet leading track cut
-
                    }// if label
                    MCtrack = static_cast<AliVTrack*>(fMCTracksCont->GetNextAcceptParticle());
                  }// track while
 
                }// if sub leading jet
-             }
-           }// tracks Cont
+             }// tracks Cont
+           }// jet leading track cut
 
          }//jet Cont
 
          // ************
-         // Random cones
-         // _________________________________
-  
-         const Float_t rcArea = fConeRadius * fConeRadius * TMath::Pi();
-         Float_t RCpt = 0;
-         Float_t RCeta = 0;
-         Float_t RCphi = 0;
-  
-         if (fTracksCont || fCaloClustersCont) {
-    
-           for (Int_t i = 0; i < fRCperEvent; i++) {
-             // Simple random cones
-             RCpt = 0;
-             RCeta = 0;
-             RCphi = 0;
-             GetRandomCone(RCpt, RCeta, RCphi, fTracksCont, fCaloClustersCont, 0);
-             if (RCpt > 0) {
-               fHistRCPhiEta->Fill(RCeta, RCphi);
-               fHistRhoVSRCPt[fCentBin]->Fill(fRhoVal * rcArea, RCpt);
-       
-               fHistRCPt[fCentBin]->Fill(RCpt);
-
-               Double_t ep = RCphi - fEPV0;
-               while (ep < 0) ep += TMath::Pi();
-               while (ep >= TMath::Pi()) ep -= TMath::Pi();
-
-               fHistDeltaPtRCvsEP[fCentBin]->Fill(ep, RCpt - rcArea * fRhoVal);
-             }
-
-             if (fJetsCont) {
-
-               // Random cones far from leading jet
-               AliEmcalJet* jet = fJetsCont->GetLeadingJet("rho");
-       
-               RCpt = 0;
-               RCeta = 0;
-               RCphi = 0;
-               GetRandomCone(RCpt, RCeta, RCphi, fTracksCont, fCaloClustersCont, jet);
-               if (RCpt > 0) {
-                 if (jet) {
-                   Float_t dphi = RCphi - jet->Phi();
-                   if (dphi > 4.8) dphi -= TMath::Pi() * 2;
-                   if (dphi < -1.6) dphi += TMath::Pi() * 2; 
-                   fHistRCPtExLJVSDPhiLJ->Fill(RCpt, dphi);
-                 }
-                 fHistRCPtExLJ[fCentBin]->Fill(RCpt);
-                 fHistDeltaPtRCExLJ[fCentBin]->Fill(RCpt - rcArea * fRhoVal);
-               }
-
-               //partial exclusion
-               if(fBeamType == kpA) {
-
-                 RCpt = 0;
-                 RCeta = 0;
-                 RCphi = 0;
-                 GetRandomCone(RCpt, RCeta, RCphi, fTracksCont, fCaloClustersCont, jet, kTRUE);
-
-                 if (RCpt > 0) {
-                   if (jet) {
-                     Float_t dphi = RCphi - jet->Phi();
-                     if (dphi > 4.8) dphi -= TMath::Pi() * 2;
-                     if (dphi < -1.6) dphi += TMath::Pi() * 2;
-                     fHistRCPtExPartialLJVSDPhiLJ->Fill(RCpt, dphi);
-                   }
-                   fHistRCPtExPartialLJ[fCentBin]->Fill(RCpt);
-                   fHistDeltaPtRCExPartialLJ[fCentBin]->Fill(RCpt - rcArea * fRhoVal);
-                 }
-               }
-             }
-           }
-         }
-  
-         // Random cones with randomized particles
-         /*if (fRandTracksCont || fRandCaloClustersCont) {
-           RCpt = 0;
-           RCeta = 0;
-           RCphi = 0;
-           GetRandomCone(RCpt, RCeta, RCphi, fRandTracksCont, fRandCaloClustersCont, 0);
-           if (RCpt > 0) {
-           fHistRCPtRand[fCentBin]->Fill(RCpt);
-           fHistDeltaPtRCRand[fCentBin]->Fill(RCpt - rcArea * fRhoVal);
-           }  
-           }*/
-
-         // ************
          // Embedding
          // _________________________________
 
@@ -2495,44 +1574,11 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
     
            while (embJet != 0) {
 
-             if ((embJet->Eta() >  0.7) ||
-                 (embJet->Eta() < -0.7) ||
-                 (embJet->Phi() >  2*TMath::Pi()) ||
-                 (embJet->Phi() <  0.0)) continue; // acceptance eta range and etmin
-
-             TLorentzVector mom;
-             fEmbJetsCont->GetLeadingHadronMomentum(mom,embJet);
-      
-             Double_t distLeading2Jet = TMath::Sqrt((embJet->Eta() - mom.Eta()) * (embJet->Eta() - mom.Eta()) + (embJet->Phi() - mom.Phi()) * (embJet->Phi() - mom.Phi()));
-      
-             fHistEmbPartPtvsJetPt[fCentBin]->Fill(embJet->MCPt(), embJet->Pt());
-             fHistEmbPartPtvsJetCorrPt[fCentBin]->Fill(embJet->MCPt(), embJet->Pt() - embJet->Area() * fRhoVal);
-             fHistLeadPartPhiEta->Fill(mom.Eta(), mom.Phi());
-             fHistDistLeadPart2JetAxis[fCentBin]->Fill(distLeading2Jet);
-      
-             fHistEmbJetsPtArea[fCentBin]->Fill(embJet->Area(), embJet->Pt(), mom.Pt());
-             fHistEmbJetsCorrPtArea[fCentBin]->Fill(embJet->Area(), embJet->Pt() - fRhoVal * embJet->Area(), mom.Pt());
-             fHistEmbJetsPhiEta->Fill(embJet->Eta(), embJet->Phi());
-             fHistJetPtvsJetCorrPt[fCentBin]->Fill(embJet->Pt(), embJet->Pt() - fRhoVal * embJet->Area());
-      
-             fHistEmbBkgArea[fCentBin]->Fill(embJet->Area(), embJet->Pt() - embJet->MCPt());
-             fHistRhoVSEmbBkg[fCentBin]->Fill(fRhoVal * embJet->Area(), embJet->Pt() - embJet->MCPt());
-             fHistDeltaPtEmbArea[fCentBin]->Fill(embJet->Area(), embJet->Pt() - embJet->Area() * fRhoVal - embJet->MCPt());
-
-             Double_t ep = embJet->Phi() - fEPV0;
-             while (ep < 0) ep += TMath::Pi();
-             while (ep >= TMath::Pi()) ep -= TMath::Pi();
-
-             fHistDeltaPtEmbvsEP[fCentBin]->Fill(ep, embJet->Pt() - embJet->Area() * fRhoVal - embJet->MCPt());
-
              //leading track cut
-             Int_t leading_track_count[3]={0,0,0};
-             //Int_t leading_track_limit=0;
-             if(fEmbJetsCont->GetLeadingHadronPt(embJet) > 0.) leading_track_count[0] += 1;
-             if(fEmbJetsCont->GetLeadingHadronPt(embJet) > 5.) leading_track_count[1] += 1;
-             if(fEmbJetsCont->GetLeadingHadronPt(embJet) > 10.) leading_track_count[2] += 1;
-             //if(fEmbJetsCont->GetLeadingHadronPt(embJet) > 100.) leading_track_limit += 1;
-             //if(leading_track_limit > 0) continue;
+             Int_t leading_track_count[3]={0.,0.,0.};
+             if(fEmbJetsCont->GetLeadingHadronPt(embJet) > fleadingHadronPtcut1) leading_track_count[0] += 1;
+             if(fEmbJetsCont->GetLeadingHadronPt(embJet) > fleadingHadronPtcut2) leading_track_count[1] += 1;
+             if(fEmbJetsCont->GetLeadingHadronPt(embJet) > fleadingHadronPtcut3) leading_track_count[2] += 1;
 
              for(int m=0;m<3;m++){
                c_jet1_EMB[m]++; // jet count in acceptance.
@@ -2541,8 +1587,8 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
                  fJetPhi_EMB[fCentBin][m]->Fill(embJet->Phi());
                  fJetEta_EMB[fCentBin][m]->Fill(embJet->Eta());
                  fJet_Phi_Eta_EMB[fCentBin][m]->Fill(embJet->Phi(),embJet->Eta());
-                 fJetPt_BG_EMB[fCentBin][m]->Fill(embJet->Pt() - embJet->Area() * fRhoVal);
-                 fJetDeltaPt[fCentBin][m]->Fill(embJet->Pt() - embJet->Area() * fRhoVal - embJet->MCPt());
+                 fJetPt_BG_EMB[fCentBin][m]->Fill(embJet->Pt() - embJet->Area() * fEmbJetsCont->GetRhoVal());
+                 fJetDeltaPt[fCentBin][m]->Fill(embJet->Pt() - embJet->Area() * fEmbJetsCont->GetRhoVal() - embJet->MCPt());
                }
              }
 
@@ -2550,7 +1596,7 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
                if(c_jet1_EMB[m] == 1)
                  {
                    if(leading_track_count[m] > 0){
-                     jet1_pt2[m] = embJet->Pt(); jet1_pt_BG2[m] = embJet->Pt() - embJet->Area() * fRhoVal; jet1_Deltapt[m] = embJet->Pt() - embJet->Area() * fRhoVal - embJet->MCPt(); jet1_phi2[m] = embJet->Phi(); jet1_eta2[m] = embJet->Eta(); //Get Leading Jet(Jet1) value
+                     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
 
                      dEPJet2[m] = jet1_phi2[m] - fEPV0;
                      while (dEPJet2[m] < 0) dEPJet2[m] += TMath::Pi();
@@ -2562,7 +1608,7 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
 
                else if(c_jet1_EMB[m] > 1 && c_jet2_EMB[m] == 0  && leading_jet_count2[m] > 0 && leading_track_count[m] > 0)// sub leading
                  {
-                   jet2_pt2[m] = embJet->Pt(); jet2_pt_BG2[m] = embJet->Pt() - embJet->Area() * fRhoVal; jet2_Deltapt[m] = embJet->Pt() - embJet->Area() * fRhoVal - embJet->MCPt(); jet2_phi2[m] = embJet->Phi(); jet2_eta2[m] = embJet->Eta(); //Get Sub Leading Jet(Jet2) value
+                   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
                    Delta_phi2[m] = jet1_phi2[m] - jet2_phi2[m]; Aj2[m] = (jet1_pt_BG2[m] - jet2_pt_BG2[m]) / (jet1_pt_BG2[m] + jet2_pt_BG2[m]);
                    if     (Delta_phi2[m] < (-1./2*TMath::Pi()))Delta_phi2[m] = Delta_phi2[m] +2*TMath::Pi();
                    else if(Delta_phi2[m] > (3./2*TMath::Pi()))Delta_phi2[m] = Delta_phi2[m] -2*TMath::Pi();
@@ -2612,12 +1658,11 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
 
 
            //jet-hadron
-           if (fEmbTracksCont) {
-             for(int m=0;m<3;m++){
-               //if find sub leading
+           for(int m=0;m<3;m++){
+             if (fEmbTracksCont) {//track cont
                int c_subleading_jet = 0;
                c_subleading_jet = subleading_jet_count2[m];
-               if(c_subleading_jet > 0){
+               if(c_subleading_jet > 0){//if find sub leading
 
                  AliVTrack *EMBtrack = static_cast<AliVTrack*>(fEmbTracksCont->GetNextAcceptParticle(0));
                  while(EMBtrack) {
@@ -2630,24 +1675,6 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
                    if     (dphi < (-1./2.*TMath::Pi()))dphi = dphi +2*TMath::Pi();
                    else if(dphi > (3./2.*TMath::Pi()))dphi = dphi -2*TMath::Pi();
 
-                   //jet_track check
-                   /*Bool_t jet_switch=false;
-                     for(int i=0;i<200;i++){
-                     Float_t check_track1,check_track2;
-                     check_track1 = -999.0; check_track2 = -999.0;
-                     check_track1 = jet_track[m][0][i]; check_track2 = jet_track[m][1][i];
-                     if(check_track1 == phi){
-                     jet_switch=true;
-                     }
-                     if(check_track2 == phi){
-                     jet_switch=true;
-                     }
-                     }
-
-                     if(jet_switch==true){
-                     continue;
-                     }*/
-
                    //dphi cut
                    Bool_t dphi_cut[4];
                    //devide(jet side)
@@ -2754,87 +1781,12 @@ Bool_t AliAnalysisTaskDijetHadron::FillHistograms()
                      }
                    }//count1
 
-                   if(m==1){
-                     //hadron-dphi as dEPJet (jet leading track = 5GeV)
-                     for(int EPtri=0;EPtri<4;EPtri++){
-                       if(jet_dEP_switch[EPtri]){
-                         for(int pt_cut=0;pt_cut<4;pt_cut++){
-                           if(pt_switch[pt_cut]){
-                             for(int count1=0;count1<4;count1++){
-                               if(jet_dphi_switch[0]){
-                                 for(int count2=0;count2<count1+1;count2++){
-                                   if(jet1_pt_BG2[m] > Jet1_threshold[count1] && jet2_pt_BG2[m] > Jet2_threshold[count2]){
-                                     fHJetDeltaPhiasEP_Aj0_EMB[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-
-                                     if(Aj2[m] >= 0.0 && Aj2[m] < 0.2){
-                                       fHJetDeltaPhiasEP_Aj1_EMB[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-                                     }
-
-                                     if(Aj2[m] >= 0.2 && Aj2[m] < 0.4){
-                                       fHJetDeltaPhiasEP_Aj2_EMB[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-                                     }
-
-                                     if(Aj2[m] >= 0.4 && Aj2[m] < 0.6){
-                                       fHJetDeltaPhiasEP_Aj3_EMB[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-                                     }
-
-                                     if(Aj2[m] >= 0.6 && Aj2[m] <= 0.8){
-                                       fHJetDeltaPhiasEP_Aj4_EMB[fCentBin][EPtri][pt_cut][count1][count2]->Fill(dphi);
-                                     }
-                                   }
-
-
-                                 }//count2
-                               }
-                             }//count1
-                           }//pt cut
-                         }//pt for
-                       }//dEP cut
-                     }//dEP for
-
-                     //hadron-pT as dEPJet (jet lenading track = 5GeV)
-                     for(int EPtri=0;EPtri<4;EPtri++){
-                       if(jet_dEP_switch[EPtri]){
-                         for(int count1=0;count1<4;count1++){
-                           if(jet_dphi_switch[0]){
-                             for(int count2=0;count2<count1+1;count2++){
-                               if(jet1_pt_BG2[m] > Jet1_threshold[count1] && jet2_pt_BG2[m] > Jet2_threshold[count2]){
-                                 for(int i=0;i<4;i++){
-                                   if(dphi_cut[i]){
-                                     fHJetPtasEP_Aj0_EMB[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-
-                                     if(Aj2[m] >= 0.0 && Aj2[m] < 0.2){
-                                       fHJetPtasEP_Aj1_EMB[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-                                     }
-
-                                     if(Aj2[m] >= 0.2 && Aj2[m] < 0.4){
-                                       fHJetPtasEP_Aj2_EMB[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-                                     }
-
-                                     if(Aj2[m] >= 0.4 && Aj2[m] < 0.6){
-                                       fHJetPtasEP_Aj3_EMB[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-                                     }
-
-                                     if(Aj2[m] >= 0.6 && Aj2[m] <= 0.8){
-                                       fHJetPtasEP_Aj4_EMB[fCentBin][EPtri][i][count1][count2]->Fill(pt);
-                                     }
-                                   }//dphi cut
-                                 }//dphi loop
-                               }//jet pt cut
-
-                             }//count2
-                           }
-                         }//count1
-                       }//dEP cut
-                     }//dEP for
-                   }//jet leading track cut
-
                    EMBtrack = static_cast<AliVTrack*>(fEmbTracksCont->GetNextAcceptParticle());
                  }// track while
 
                }// if sub leading jet
-             }
-           }// tracks Cont
+             }// tracks Cont
+           }// jet leading track cut
 
          }// jet Cont
 
@@ -2861,109 +1813,6 @@ AliEmcalJet* AliAnalysisTaskDijetHadron::NextEmbeddedJet(Bool_t reset)
 }
 
 //________________________________________________________________________
-void AliAnalysisTaskDijetHadron::GetRandomCone(Float_t &pt, Float_t &eta, Float_t &phi,
-                                           AliParticleContainer* tracks, AliClusterContainer* clusters,
-                                           AliEmcalJet *jet, Bool_t bPartialExclusion) const
-{
-  // Get rigid cone.
-
-  eta = -999;
-  phi = -999;
-  pt = 0;
-
-  if (!tracks && !clusters)
-    return;
-
-  Float_t LJeta = 999;
-  Float_t LJphi = 999;
-
-  if (jet) {
-    LJeta = jet->Eta();
-    LJphi = jet->Phi();
-  }
-
-  Float_t maxEta = fConeMaxEta;
-  Float_t minEta = fConeMinEta;
-  Float_t maxPhi = fConeMaxPhi;
-  Float_t minPhi = fConeMinPhi;
-
-  if (maxPhi > TMath::Pi() * 2) maxPhi = TMath::Pi() * 2;
-  if (minPhi < 0) minPhi = 0;
-  
-  Float_t dLJ = 0;
-  Int_t repeats = 0;
-  Bool_t reject = kTRUE;
-  do {
-    eta = gRandom->Rndm() * (maxEta - minEta) + minEta;
-    phi = gRandom->Rndm() * (maxPhi - minPhi) + minPhi;
-    dLJ = TMath::Sqrt((LJeta - eta) * (LJeta - eta) + (LJphi - phi) * (LJphi - phi));
-
-    if(bPartialExclusion) {
-      reject = kFALSE;
-
-      TRandom3 rnd;
-      rnd.SetSeed(0);
-
-      Double_t ncoll = GetNColl();
-
-      Double_t prob = 0.;
-      if(ncoll>0)
-        prob = 1./ncoll;
-
-      if(rnd.Rndm()<=prob) reject = kTRUE; //reject cone
-    }
-
-    repeats++;
-  } while (dLJ < fMinRC2LJ && repeats < 999 && reject);
-
-  if (repeats == 999) {
-    AliWarning(Form("%s: Could not get random cone!", GetName()));
-    return;
-  }
-
-  if (clusters) {
-    AliVCluster* cluster = clusters->GetNextAcceptCluster(0);
-    while (cluster) {     
-      TLorentzVector nPart;
-      cluster->GetMomentum(nPart, const_cast<Double_t*>(fVertex));
-
-      Float_t cluseta = nPart.Eta();
-      Float_t clusphi = nPart.Phi();
-      
-      if (TMath::Abs(clusphi - phi) > TMath::Abs(clusphi - phi + 2 * TMath::Pi()))
-       clusphi += 2 * TMath::Pi();
-      if (TMath::Abs(clusphi - phi) > TMath::Abs(clusphi - phi - 2 * TMath::Pi()))
-       clusphi -= 2 * TMath::Pi();
-     
-      Float_t d = TMath::Sqrt((cluseta - eta) * (cluseta - eta) + (clusphi - phi) * (clusphi - phi));
-      if (d <= fConeRadius) 
-       pt += nPart.Pt();
-
-      cluster = clusters->GetNextAcceptCluster();
-    }
-  }
-
-  if (tracks) {
-    AliVParticle* track = tracks->GetNextAcceptParticle(0); 
-    while(track) { 
-      Float_t tracketa = track->Eta();
-      Float_t trackphi = track->Phi();
-      
-      if (TMath::Abs(trackphi - phi) > TMath::Abs(trackphi - phi + 2 * TMath::Pi()))
-       trackphi += 2 * TMath::Pi();
-      if (TMath::Abs(trackphi - phi) > TMath::Abs(trackphi - phi - 2 * TMath::Pi()))
-       trackphi -= 2 * TMath::Pi();
-      
-      Float_t d = TMath::Sqrt((tracketa - eta) * (tracketa - eta) + (trackphi - phi) * (trackphi - phi));
-      if (d <= fConeRadius)
-       pt += track->Pt();
-
-      track = tracks->GetNextAcceptParticle(); 
-    }
-  }
-}
-
-//________________________________________________________________________
 void AliAnalysisTaskDijetHadron::SetConeEtaPhiEMCAL()
 {
   // Set default cuts for full cones
@@ -2992,29 +1841,9 @@ void AliAnalysisTaskDijetHadron::ExecOnce()
   if (fCaloClustersCont && fCaloClustersCont->GetArray() == 0) fCaloClustersCont = 0;
   if (fEmbTracksCont && fEmbTracksCont->GetArray() == 0) fEmbTracksCont = 0;
   if (fEmbCaloClustersCont && fEmbCaloClustersCont->GetArray() == 0) fEmbCaloClustersCont = 0;
-  //if (fRandTracksCont && fRandTracksCont->GetArray() == 0) fRandTracksCont = 0;
-  //if (fRandCaloClustersCont && fRandCaloClustersCont->GetArray() == 0) fRandCaloClustersCont = 0;
   if (fJetsCont && fJetsCont->GetArray() == 0) fJetsCont = 0;
   if (fMCJetsCont && fMCJetsCont->GetArray() == 0) fMCJetsCont = 0;
   if (fEmbJetsCont && fEmbJetsCont->GetArray() == 0) fEmbJetsCont = 0;
-
-  if (fRCperEvent < 0) {
-    Double_t area = (fConeMaxEta - fConeMinEta) * (fConeMaxPhi - fConeMinPhi);
-    Double_t rcArea = TMath::Pi() * fConeRadius * fConeRadius;
-    fRCperEvent = TMath::FloorNint(area / rcArea - 0.5);
-    if (fRCperEvent == 0)
-      fRCperEvent = 1;
-  }
-
-  if (fMinRC2LJ < 0)
-    fMinRC2LJ = fConeRadius * 1.5;
-
-  const Float_t maxDist = TMath::Max(fConeMaxPhi - fConeMinPhi, fConeMaxEta - fConeMinEta) / 2;
-  if (fMinRC2LJ > maxDist) {
-    AliWarning(Form("The parameter fMinRC2LJ = %f is too large for the considered acceptance. "
-                    "Will use fMinRC2LJ = %f", fMinRC2LJ, maxDist));
-    fMinRC2LJ = maxDist;
-  }
 }
 
 //________________________________________________________________________
@@ -3023,30 +1852,3 @@ Double_t AliAnalysisTaskDijetHadron::GetZ(const Double_t trkPx, const Double_t t
   return (trkPx*jetPx+trkPy*jetPy+trkPz*jetPz)/(jetPx*jetPx+jetPy*jetPy+jetPz*jetPz);
 }
 
-//________________________________________________________________________
-Double_t AliAnalysisTaskDijetHadron::GetNColl() const {
-  // Get NColl - returns value of corresponding bin
-  // only works for pA
-  // values taken from V0A slicing https://twiki.cern.ch/twiki/bin/viewauth/ALICE/PACentStudies#Tables_with_centrality_bins_from
-
-  if(fBeamType == kpA) {
-
-    const Int_t nNCollBins = 7;
-
-    Double_t centMin[nNCollBins] = {0.,5.,10.,20.,40.,60.,80.};
-    Double_t centMax[nNCollBins] = {5.,10.,20.,40.,60.,80.,100.};
-
-    Double_t nColl[nNCollBins] = {14.7,13.,11.7,9.38,6.49,3.96,1.52};
-
-    for(Int_t i = 0; i<nNCollBins; i++) {
-      if(fCent>=centMin[i] && fCent<centMax[i])
-       return nColl[i];
-    }
-
-    return -1.;
-  }
-  else {
-    AliWarning(Form("%s: Only works for pA analysis. Returning -1",GetName()));
-    return -1.;
-  }
-}
index cab4f85..0381522 100644 (file)
@@ -43,10 +43,17 @@ class AliAnalysisTaskDijetHadron : public AliAnalysisTaskEmcalJet {
 
   void                        UserCreateOutputObjects();
 
-  void                        SetJetMinRC2LJ(Float_t d)                            { fMinRC2LJ                = d          ; }
-  void                        SetRCperEvent(Int_t n)                               { fRCperEvent              = n          ; }
   void                        SetMCJetPtThreshold(Double_t t)                      { fMCJetPtThreshold        = t          ; }
-  void                        SetConeRadius(Double_t r)                            { fConeRadius              = r          ; }
+  void                        SetLeadingHadronPtThreshold1(Double_t u1)            { fleadingHadronPtcut1     = u1         ; }
+  void                        SetLeadingHadronPtThreshold2(Double_t u2)            { fleadingHadronPtcut2     = u2         ; }
+  void                        SetLeadingHadronPtThreshold3(Double_t u3)            { fleadingHadronPtcut3     = u3         ; }
+  void                        SetJet1PtThreshold1(Double_t v1)                     { fJet1Ptcut1     = v1                  ; }
+  void                        SetJet1PtThreshold2(Double_t v2)                     { fJet1Ptcut2     = v2                  ; }
+  void                        SetJet1PtThreshold3(Double_t v3)                     { fJet1Ptcut3     = v3                  ; }
+  void                        SetJet2PtThreshold1(Double_t w1)                     { fJet2Ptcut1     = w1                  ; }
+  void                        SetJet2PtThreshold2(Double_t w2)                     { fJet2Ptcut2     = w2                  ; }
+  void                        SetJet2PtThreshold3(Double_t w3)                     { fJet2Ptcut3     = w3                  ; }
+  void                        SetConeRadius(Double_t r)                            { fConeRadius     = r                   ; }
   void                        SetConeEtaPhiEMCAL() ;
   void                        SetConeEtaPhiTPC()   ;
   void                        SetConeEtaLimits(Float_t min, Float_t max)           { fConeMinEta = min, fConeMaxEta = max  ; }
@@ -60,20 +67,23 @@ class AliAnalysisTaskDijetHadron : public AliAnalysisTaskEmcalJet {
   AliEmcalJet*                NextEmbeddedJet(Bool_t reset=kFALSE)                                                          ;
   void                        DoEmbTrackLoop()                                                                              ;
   void                        DoEmbClusterLoop()                                                                            ;
-  void                        GetRandomCone(Float_t &pt, Float_t &eta, Float_t &phi, AliParticleContainer* tracks, AliClusterContainer* clusters,
-                                           AliEmcalJet *jet = 0, Bool_t bPartialExclusion = 0) const;
   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);
-  Double_t                    GetNColl() const;
-
 
   Double_t                    fMCJetPtThreshold;                               // threshold for MC jets
-  Float_t                     fMinRC2LJ;                                       // Minimum distance random cone to leading jet
-  Int_t                       fRCperEvent;                                     // No. of random cones per event
-  Double_t                    fConeRadius;                                     // Radius of the random cones
-  Float_t                     fConeMinEta;                                     // Minimum eta of the random cones
-  Float_t                     fConeMaxEta;                                     // Maximum eta of the random cones
-  Float_t                     fConeMinPhi;                                     // Minimum phi of the random cones
-  Float_t                     fConeMaxPhi;                                     // Maximum phi of the random cones
+  Double_t                    fleadingHadronPtcut1;                            // threshold for leading hadron pT NO1
+  Double_t                    fleadingHadronPtcut2;                            // threshold for leading hadron pT NO2
+  Double_t                    fleadingHadronPtcut3;                            // threshold for leading hadron pT NO3
+  Double_t                    fJet1Ptcut1;                                     // threshold for leading Jet pT NO1
+  Double_t                    fJet1Ptcut2;                                     // threshold for leading Jet pT NO2
+  Double_t                    fJet1Ptcut3;                                     // threshold for leading Jet pT NO3
+  Double_t                    fJet2Ptcut1;                                     // threshold for subleading Jet pT NO1
+  Double_t                    fJet2Ptcut2;                                     // threshold for subleading Jet pT NO2
+  Double_t                    fJet2Ptcut3;                                     // threshold for subleading Jet pT NO3
+  Double_t                    fConeRadius;                                     // Radius of the jet cones
+  Float_t                     fConeMinEta;                                     // Minimum eta of the jet cones
+  Float_t                     fConeMaxEta;                                     // Maximum eta of the jet cones
+  Float_t                     fConeMinPhi;                                     // Minimum phi of the jet cones
+  Float_t                     fConeMaxPhi;                                     // Maximum phi of the jet cones
 
   AliJetContainer            *fJetsCont;                                       //!PbPb Jets
   AliParticleContainer       *fTracksCont;                                     //!PbPb Tracks
@@ -84,36 +94,6 @@ class AliAnalysisTaskDijetHadron : public AliAnalysisTaskEmcalJet {
   AliJetContainer            *fEmbJetsCont;                                    //!EMB jets
   AliParticleContainer       *fEmbTracksCont;                                  //!EMB tracks
   AliClusterContainer        *fEmbCaloClustersCont;                            //!EMB clusters  
-  //AliParticleContainer       *fRandTracksCont;                               //!Randomized tracks
-  //AliClusterContainer        *fRandCaloClustersCont;                         //!Randomized clusters
-
-  // Random cones
-  TH2                        *fHistRCPhiEta;                                   //!Phi-Eta distribution of random cones
-  TH1                       **fHistRCPt;                                       //!Random cone pt
-  TH1                       **fHistRCPtExLJ;                                   //!Random cone pt, imposing min distance from leading jet
-  TH1                       **fHistRCPtExPartialLJ;                            //!Random cone pt, imposing min distance from leading jet with 1/ncoll probability
-  //TH1                       **fHistRCPtRand;                                 //!Random cone pt, randomized particles
-  TH2                       **fHistRhoVSRCPt;                                  //!Area(RC) * rho vs. Pt(RC)
-  TH2                       **fHistDeltaPtRCvsEP;                              //!deltaPt = Pt(RC) - A * rho vs. event plane
-  TH1                       **fHistDeltaPtRCExLJ;                              //!deltaPt = Pt(RC) - A * rho, imposing min distance from leading jet
-  TH1                       **fHistDeltaPtRCExPartialLJ;                       //!deltaPt = Pt(RC) - A * rho, imposing min distance from leading jet with 1/ncoll probability
-  //TH1                       **fHistDeltaPtRCRand;                            //!deltaPt = Pt(RC) - A * rho, randomzied particles
-
-  // Jet embedding
-  TH3                       **fHistEmbJetsPtArea;                              //!Pt vs. area of EMB jets
-  TH3                       **fHistEmbJetsCorrPtArea;                          //!Pt-rho*A vs. area of EMB jets
-  TH2                       **fHistEmbPartPtvsJetPt;                           //!MC jet pt total jet pt
-  TH2                       **fHistEmbPartPtvsJetCorrPt;                       //!MC jet pt total jet pt - rho*A
-  TH2                       **fHistJetPtvsJetCorrPt;                           //!Pt vs jet pt - rho*A
-  TH1                       **fHistDistLeadPart2JetAxis;                       //!Distance between leading particle and jet axis
-  TH2                       **fHistEmbBkgArea;                                 //!Pt(embjet) - Pt(embtrack) vs. area of EMB jets
-  TH2                       **fHistRhoVSEmbBkg;                                //!Area(embjet) * rho vs. Pt(embjet) - Pt(embtrack)
-  TH2                       **fHistDeltaPtEmbArea;                             //!deltaPt = Pt(embjet) - Area(embjet) * rho - Pt(embtrack) vs. Area(embjet)
-  TH2                       **fHistDeltaPtEmbvsEP;                             //!deltaPt = Pt(embjet) - Area(embjet) * rho - Pt(embtrack) vs. event plane
-  TH2                        *fHistRCPtExLJVSDPhiLJ;                           //!Random cone pt, imposing min distance from leading jet, vs. deltaPhi leading jet
-  TH2                        *fHistRCPtExPartialLJVSDPhiLJ;                    //!Random cone pt, imposing min distance from leading jet, vs. deltaPhi leading jet with 1/ncoll probability
-  TH2                        *fHistEmbJetsPhiEta;                              //!Phi-Eta distribution of EMB jets
-  TH2                        *fHistLeadPartPhiEta;                             //!Phi-Eta distribution of the leading particle of EMB jets
 
   //User Task
   TH1                        *fCent_V0;                                        //!Centrality
@@ -211,44 +191,9 @@ class AliAnalysisTaskDijetHadron : public AliAnalysisTaskEmcalJet {
   TH1                        *fHJetPt_Aj3_EMB[4][3][4][4][4];                  //!EMB, HjetPt, Aj3
   TH1                        *fHJetPt_Aj4_EMB[4][3][4][4][4];                  //!EMB, HjetPt, Aj4
 
-  TH1                        *fHJetDeltaPhiasEP_Aj0_PbPb[4][4][4][4][4];       //!PbPb, HjetDeltaPhi, asEP, no Aj cut
-  TH1                        *fHJetDeltaPhiasEP_Aj1_PbPb[4][4][4][4][4];       //!PbPb, HjetDeltaPhi, asEP, Aj1
-  TH1                        *fHJetDeltaPhiasEP_Aj2_PbPb[4][4][4][4][4];       //!PbPb, HjetDeltaPhi, asEP, Aj2
-  TH1                        *fHJetDeltaPhiasEP_Aj3_PbPb[4][4][4][4][4];       //!PbPb, HjetDeltaPhi, asEP, Aj3
-  TH1                        *fHJetDeltaPhiasEP_Aj4_PbPb[4][4][4][4][4];       //!PbPb, HjetDeltaPhi, asEP, Aj4
-  TH1                        *fHJetPtasEP_Aj0_PbPb[4][4][4][4][4];             //!PbPb, HjetPt, asEP, no Aj cut
-  TH1                        *fHJetPtasEP_Aj1_PbPb[4][4][4][4][4];             //!PbPb, HjetPt, asEP, Aj1
-  TH1                        *fHJetPtasEP_Aj2_PbPb[4][4][4][4][4];             //!PbPb, HjetPt, asEP, Aj2
-  TH1                        *fHJetPtasEP_Aj3_PbPb[4][4][4][4][4];             //!PbPb, HjetPt, asEP, Aj3
-  TH1                        *fHJetPtasEP_Aj4_PbPb[4][4][4][4][4];             //!PbPb, HjetPt, asEP, Aj4
-  TH1                        *fHJetDeltaPhiasEP_Aj0_MC[4][4][4][4][4];         //!MC, HjetDeltaPhi, asEP, no Aj cut
-  TH1                        *fHJetDeltaPhiasEP_Aj1_MC[4][4][4][4][4];         //!MC, HjetDeltaPhi, asEP, Aj1
-  TH1                        *fHJetDeltaPhiasEP_Aj2_MC[4][4][4][4][4];         //!MC, HjetDeltaPhi, asEP, Aj2
-  TH1                        *fHJetDeltaPhiasEP_Aj3_MC[4][4][4][4][4];         //!MC, HjetDeltaPhi, asEP, Aj3
-  TH1                        *fHJetDeltaPhiasEP_Aj4_MC[4][4][4][4][4];         //!MC, HjetDeltaPhi, asEP, Aj4
-  TH1                        *fHJetPtasEP_Aj0_MC[4][4][4][4][4];               //!MC, HjetPt, asEP, no Aj cut
-  TH1                        *fHJetPtasEP_Aj1_MC[4][4][4][4][4];               //!MC, HjetPt, asEP, Aj1
-  TH1                        *fHJetPtasEP_Aj2_MC[4][4][4][4][4];               //!MC, HjetPt, asEP, Aj2
-  TH1                        *fHJetPtasEP_Aj3_MC[4][4][4][4][4];               //!MC, HjetPt, asEP, Aj3
-  TH1                        *fHJetPtasEP_Aj4_MC[4][4][4][4][4];               //!MC, HjetPt, asEP, Aj4
-  TH1                        *fHJetDeltaPhiasEP_Aj0_EMB[4][4][4][4][4];        //!EMB, HjetDeltaPhi, asEP, no Aj cut
-  TH1                        *fHJetDeltaPhiasEP_Aj1_EMB[4][4][4][4][4];        //!EMB, HjetDeltaPhi, asEP, Aj1
-  TH1                        *fHJetDeltaPhiasEP_Aj2_EMB[4][4][4][4][4];        //!EMB, HjetDeltaPhi, asEP, Aj2
-  TH1                        *fHJetDeltaPhiasEP_Aj3_EMB[4][4][4][4][4];        //!EMB, HjetDeltaPhi, asEP, Aj3
-  TH1                        *fHJetDeltaPhiasEP_Aj4_EMB[4][4][4][4][4];        //!EMB, HjetDeltaPhi, asEP, Aj4
-  TH1                        *fHJetPtasEP_Aj0_EMB[4][4][4][4][4];              //!EMB, HjetPt, asEP, no Aj cut
-  TH1                        *fHJetPtasEP_Aj1_EMB[4][4][4][4][4];              //!EMB, HjetPt, asEP, Aj1
-  TH1                        *fHJetPtasEP_Aj2_EMB[4][4][4][4][4];              //!EMB, HjetPt, asEP, Aj2
-  TH1                        *fHJetPtasEP_Aj3_EMB[4][4][4][4][4];              //!EMB, HjetPt, asEP, Aj3
-  TH1                        *fHJetPtasEP_Aj4_EMB[4][4][4][4][4];              //!EMB, HjetPt, asEP, Aj4
-
-
  private:
   AliVEvent                  *fEvent;
   Double_t                    fCentrality;                                     //! V0M for current event
-  //AliNamedString             *fPtHardBinName;                                //!Pt hard bin param
-  //Int_t                       fPtHardBin;                                    //!        
-  //TH1F                        *fhPtHardBins;                                 //!
 
   AliAnalysisTaskDijetHadron(const AliAnalysisTaskDijetHadron&);                     // not implemented
   AliAnalysisTaskDijetHadron &operator=(const AliAnalysisTaskDijetHadron&);          // not implemented
index baf2f75..10568d7 100644 (file)
@@ -1,19 +1,30 @@
+// $Id$
+
 AliAnalysisTaskDijetHadron* AddTaskDijetHadron(
   const char *ntracks            = "Tracks",
   const char *nclusters          = "CaloClusters",
   const char *njets              = "Jets",
-  const char *nMCtracks            = "TracksMC",
-  const char *nMCclusters          = "CaloClustersMC",
-  const char *nMCjets              = "JetsMC",
+  const char *nMCtracks          = "TracksMC",
+  const char *nMCclusters        = "CaloClustersMC",
+  const char *nMCjets            = "JetsMC",
   const char *nembtracks         = "TracksEmbedded",
   const char *nembclusters       = "CaloClustersEmbedded",
   const char *nembjets           = "EmbJets",
   const char *nrandtracks        = "TracksRandomized",
   const char *nrandclusters      = "CaloClustersRandomized",
-  const char *nPbPbrho               = "Rho",
-  const char *nMCrho               = "RhoMC",
-  const char *nEMBrho               = "RhoEMB",
+  const char *nPbPbrho           = "Rho",
+  const char *nMCrho             = "RhoMC",
+  const char *nEMBrho            = "RhoEMB",
   Double_t    jetradius          = 0.2,
+  Double_t    leadinghadron1     = 0.0,
+  Double_t    leadinghadron2     = 3.0,
+  Double_t    leadinghadron3     = 5.0,
+  Double_t    jet1pt1            = 10.0,
+  Double_t    jet1pt2            = 20.0,
+  Double_t    jet1pt3            = 30.0,
+  Double_t    jet2pt1            = 10.0,
+  Double_t    jet2pt2            = 20.0,
+  Double_t    jet2pt3            = 30.0,
   Double_t    jetareacut         = 0.557,
   Double_t    trackptcut         = 0.15,
   Double_t    clusptcut          = 0.30,
@@ -26,7 +37,7 @@ AliAnalysisTaskDijetHadron* AddTaskDijetHadron(
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   if (!mgr)
   {
-    ::Error("AddTaskHJetCorr", "No analysis manager to connect to.");
+    ::Error("AddTaskDijetHadron", "No analysis manager to connect to.");
     return NULL;
   }  
   
@@ -34,7 +45,7 @@ AliAnalysisTaskDijetHadron* AddTaskDijetHadron(
   //==============================================================================
   if (!mgr->GetInputEventHandler())
   {
-    ::Error("AddTaskHJetCorr", "This task requires an input event handler");
+    ::Error("AddTaskDijetHadron", "This task requires an input event handler");
     return NULL;
   }
   
@@ -53,6 +64,15 @@ AliAnalysisTaskDijetHadron* AddTaskDijetHadron(
 
   AliAnalysisTaskDijetHadron* jetTask = new AliAnalysisTaskDijetHadron(name);
   jetTask->SetConeRadius(jetradius);
+  jetTask->SetLeadingHadronPtThreshold1(leadinghadron1);
+  jetTask->SetLeadingHadronPtThreshold2(leadinghadron2);
+  jetTask->SetLeadingHadronPtThreshold3(leadinghadron3);
+  jetTask->SetJet1PtThreshold1(jet1pt1);
+  jetTask->SetJet1PtThreshold2(jet1pt2);
+  jetTask->SetJet1PtThreshold3(jet1pt3);
+  jetTask->SetJet2PtThreshold1(jet2pt1);
+  jetTask->SetJet2PtThreshold2(jet2pt2);
+  jetTask->SetJet2PtThreshold3(jet2pt3);
   jetTask->SetRhoName(nPbPbrho,-1);
   if (strcmp(type,"TPC")==0) 
     jetTask->SetConeEtaPhiTPC();
@@ -122,18 +142,6 @@ AliAnalysisTaskDijetHadron* AddTaskDijetHadron(
     embJetCont->ConnectClusterContainer(embClusCont);
   }
 
-  /*AliParticleContainer *randPartCont = jetTask->AddParticleContainer(nrandtracks);
-  if (randPartCont) {
-    randPartCont->SetName("RandTracks");
-    randPartCont->SetParticlePtCut(trackptcut);
-  }
-
-  AliClusterContainer *randClusCont = jetTask->AddClusterContainer(nrandclusters);    
-  if (randClusCont) {
-    randClusCont->SetName("RandClusters");
-    randClusCont->SetClusPtCut(clusptcut);
-  }*/
-  
   //-------------------------------------------------------
   // Final settings, pass to manager and set the containers
   //-------------------------------------------------------