]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fixes for RP calculation, coverity fixes, reduced histogram binning
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Apr 2011 20:29:06 +0000 (20:29 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Apr 2011 20:29:06 +0000 (20:29 +0000)
PWG4/JetTasks/AliAnalysisTaskFragmentationFunction.cxx
PWG4/JetTasks/AliAnalysisTaskFragmentationFunction.h
PWG4/JetTasks/AliAnalysisTaskJetSpectrum2.cxx
PWG4/JetTasks/AliAnalysisTaskJetSpectrum2.h
PWG4/macros/AddTaskFragmentationFunction.C
PWG4/macros/AddTaskJetSpectrum2.C
PWG4/macros/AnalysisTrainPWG4Jets.C

index 4a327fe2e407f9e444445ce0d37d734f994c55d6..cefc1c5d3467a1433fdc58f47f43b0a9b703e061 100644 (file)
@@ -237,6 +237,8 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction()
    ,fh1VertexZ(0)
    ,fh1EvtMult(0)
    ,fh1EvtCent(0)
+   ,fh2TrackPtVsDCAXY(0)
+   ,fh2TrackPtVsDCAZ(0)
    ,fh1Xsec(0)
    ,fh1Trials(0)
    ,fh1PtHard(0)
@@ -274,6 +276,8 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction()
    ,fQABckgHisto2Gen(0)
    ,fQABckgHisto3RecCuts(0)
    ,fQABckgHisto3Gen(0)
+   ,fQABckgHisto4RecCuts(0)
+   ,fQABckgHisto4Gen(0)
    ,fFFBckgHisto0RecCuts(0)
    ,fFFBckgHisto0RecLeading(0)
    ,fFFBckgHisto0Gen(0)       
@@ -290,6 +294,10 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction()
    ,fFFBckgHisto3RecLeading(0)
    ,fFFBckgHisto3Gen(0)       
    ,fFFBckgHisto3GenLeading(0)
+   ,fFFBckgHisto4RecCuts(0)
+   ,fFFBckgHisto4RecLeading(0)
+   ,fFFBckgHisto4Gen(0)       
+   ,fFFBckgHisto4GenLeading(0)
    ,fIJBckgHisto0RecCuts(0)   
    ,fIJBckgHisto0RecLeading(0)
    ,fIJBckgHisto0Gen(0)       
@@ -306,6 +314,10 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction()
    ,fIJBckgHisto3RecLeading(0)
    ,fIJBckgHisto3Gen(0)       
    ,fIJBckgHisto3GenLeading(0)
+   ,fIJBckgHisto4RecCuts(0)   
+   ,fIJBckgHisto4RecLeading(0)
+   ,fIJBckgHisto4Gen(0)       
+   ,fIJBckgHisto4GenLeading(0)
    ,fRandom(0)
    ,fBckgSubMethod(0)
 {
@@ -314,6 +326,7 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction()
   fBckgType[1] = 0;
   fBckgType[2] = 0;
   fBckgType[3] = 0;
+  fBckgType[4] = 0;
 }
 
 //__________________________________________________________________________________________
@@ -500,6 +513,8 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction(const
   ,fh1VertexZ(0)
   ,fh1EvtMult(0)
   ,fh1EvtCent(0)
+  ,fh2TrackPtVsDCAXY(0)
+  ,fh2TrackPtVsDCAZ(0)
   ,fh1Xsec(0)
   ,fh1Trials(0)
   ,fh1PtHard(0)
@@ -537,6 +552,8 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction(const
   ,fQABckgHisto2Gen(0) 
   ,fQABckgHisto3RecCuts(0)  
   ,fQABckgHisto3Gen(0)
+  ,fQABckgHisto4RecCuts(0)  
+  ,fQABckgHisto4Gen(0)
   ,fFFBckgHisto0RecCuts(0)
   ,fFFBckgHisto0RecLeading(0)
   ,fFFBckgHisto0Gen(0)       
@@ -553,6 +570,10 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction(const
   ,fFFBckgHisto3RecLeading(0)
   ,fFFBckgHisto3Gen(0)       
   ,fFFBckgHisto3GenLeading(0)
+  ,fFFBckgHisto4RecCuts(0)
+  ,fFFBckgHisto4RecLeading(0)
+  ,fFFBckgHisto4Gen(0)       
+  ,fFFBckgHisto4GenLeading(0)
   ,fIJBckgHisto0RecCuts(0)   
   ,fIJBckgHisto0RecLeading(0)
   ,fIJBckgHisto0Gen(0)       
@@ -569,6 +590,10 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction(const
   ,fIJBckgHisto3RecLeading(0)
   ,fIJBckgHisto3Gen(0)       
   ,fIJBckgHisto3GenLeading(0)
+  ,fIJBckgHisto4RecCuts(0)   
+  ,fIJBckgHisto4RecLeading(0)
+  ,fIJBckgHisto4Gen(0)       
+  ,fIJBckgHisto4GenLeading(0)
   ,fRandom(0)
   ,fBckgSubMethod(0)
 {
@@ -577,6 +602,7 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction(const
   fBckgType[1] = 0;
   fBckgType[2] = 0;
   fBckgType[3] = 0;
+  fBckgType[4] = 0;
 
   DefineOutput(1,TList::Class());
   
@@ -767,6 +793,8 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction(const
   ,fh1VertexZ(copy.fh1VertexZ)
   ,fh1EvtMult(copy.fh1EvtMult)
   ,fh1EvtCent(copy.fh1EvtCent)
+  ,fh2TrackPtVsDCAXY(copy.fh2TrackPtVsDCAXY)
+  ,fh2TrackPtVsDCAZ(copy.fh2TrackPtVsDCAXY)
   ,fh1Xsec(copy.fh1Xsec)
   ,fh1Trials(copy.fh1Trials)
   ,fh1PtHard(copy.fh1PtHard)  
@@ -804,6 +832,8 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction(const
   ,fQABckgHisto2Gen(copy.fQABckgHisto2Gen)
   ,fQABckgHisto3RecCuts(copy.fQABckgHisto3RecCuts)  
   ,fQABckgHisto3Gen(copy.fQABckgHisto3Gen)     
+  ,fQABckgHisto4RecCuts(copy.fQABckgHisto4RecCuts)  
+  ,fQABckgHisto4Gen(copy.fQABckgHisto4Gen)     
   ,fFFBckgHisto0RecCuts(copy.fFFBckgHisto0RecCuts)
   ,fFFBckgHisto0RecLeading(copy.fFFBckgHisto0RecLeading)
   ,fFFBckgHisto0Gen(copy.fFFBckgHisto0Gen)       
@@ -820,6 +850,10 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction(const
   ,fFFBckgHisto3RecLeading(copy.fFFBckgHisto3RecLeading)
   ,fFFBckgHisto3Gen(copy.fFFBckgHisto3Gen)       
   ,fFFBckgHisto3GenLeading(copy.fFFBckgHisto3GenLeading)
+  ,fFFBckgHisto4RecCuts(copy.fFFBckgHisto4RecCuts)
+  ,fFFBckgHisto4RecLeading(copy.fFFBckgHisto4RecLeading)
+  ,fFFBckgHisto4Gen(copy.fFFBckgHisto4Gen)       
+  ,fFFBckgHisto4GenLeading(copy.fFFBckgHisto4GenLeading)
   ,fIJBckgHisto0RecCuts(copy.fIJBckgHisto0RecCuts)   
   ,fIJBckgHisto0RecLeading(copy.fIJBckgHisto0RecLeading)
   ,fIJBckgHisto0Gen(copy.fIJBckgHisto0Gen)       
@@ -836,6 +870,10 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction(const
   ,fIJBckgHisto3RecLeading(copy.fIJBckgHisto3RecLeading)
   ,fIJBckgHisto3Gen(copy.fIJBckgHisto3Gen)       
   ,fIJBckgHisto3GenLeading(copy.fIJBckgHisto3GenLeading)
+  ,fIJBckgHisto4RecCuts(copy.fIJBckgHisto4RecCuts)   
+  ,fIJBckgHisto4RecLeading(copy.fIJBckgHisto4RecLeading)
+  ,fIJBckgHisto4Gen(copy.fIJBckgHisto4Gen)       
+  ,fIJBckgHisto4GenLeading(copy.fIJBckgHisto4GenLeading)
   ,fRandom(copy.fRandom)
   ,fBckgSubMethod(copy.fBckgSubMethod)
 {
@@ -844,6 +882,7 @@ AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction(const
   fBckgType[1] = copy.fBckgType[1];
   fBckgType[2] = copy.fBckgType[2];
   fBckgType[3] = copy.fBckgType[3];
+  fBckgType[4] = copy.fBckgType[4];
 }
 
 // _________________________________________________________________________________________________________________________________
@@ -895,6 +934,7 @@ AliAnalysisTaskFragmentationFunction& AliAnalysisTaskFragmentationFunction::oper
     fBckgType[1]                  = o.fBckgType[1];
     fBckgType[2]                  = o.fBckgType[2];
     fBckgType[3]                  = o.fBckgType[3];
+    fBckgType[4]                  = o.fBckgType[4];
     fUseRecEffRecJetPtBins        = o.fUseRecEffRecJetPtBins;
     fUseResponseRecJetPtBins      = o.fUseResponseRecJetPtBins;
     fAvgTrials                    = o.fAvgTrials;
@@ -1039,6 +1079,8 @@ AliAnalysisTaskFragmentationFunction& AliAnalysisTaskFragmentationFunction::oper
     fh1VertexZ                    = o.fh1VertexZ;
     fh1EvtMult                    = o.fh1EvtMult;
     fh1EvtCent                    = o.fh1EvtCent;
+    fh2TrackPtVsDCAXY             = o.fh2TrackPtVsDCAXY;
+    fh2TrackPtVsDCAZ              = o.fh2TrackPtVsDCAXY;
     fh1Xsec                       = o.fh1Xsec;
     fh1Trials                     = o.fh1Trials;
     fh1PtHard                     = o.fh1PtHard;
@@ -1074,6 +1116,8 @@ AliAnalysisTaskFragmentationFunction& AliAnalysisTaskFragmentationFunction::oper
     fQABckgHisto2Gen              = o.fQABckgHisto2Gen;  
     fQABckgHisto3RecCuts          = o.fQABckgHisto3RecCuts;  
     fQABckgHisto3Gen              = o.fQABckgHisto3Gen;  
+    fQABckgHisto4RecCuts          = o.fQABckgHisto4RecCuts;  
+    fQABckgHisto4Gen              = o.fQABckgHisto4Gen;  
     fFFBckgHisto0RecCuts          = o.fFFBckgHisto0RecCuts;
     fFFBckgHisto0RecLeading       = o.fFFBckgHisto0RecLeading;
     fFFBckgHisto0Gen              = o.fFFBckgHisto0Gen;       
@@ -1090,6 +1134,10 @@ AliAnalysisTaskFragmentationFunction& AliAnalysisTaskFragmentationFunction::oper
     fFFBckgHisto3RecLeading       = o.fFFBckgHisto3RecLeading;
     fFFBckgHisto3Gen              = o.fFFBckgHisto3Gen;       
     fFFBckgHisto3GenLeading       = o.fFFBckgHisto3GenLeading;
+    fFFBckgHisto4RecCuts          = o.fFFBckgHisto4RecCuts;
+    fFFBckgHisto4RecLeading       = o.fFFBckgHisto4RecLeading;
+    fFFBckgHisto4Gen              = o.fFFBckgHisto4Gen;       
+    fFFBckgHisto4GenLeading       = o.fFFBckgHisto4GenLeading;
     fIJBckgHisto0RecCuts          = o.fIJBckgHisto0RecCuts;   
     fIJBckgHisto0RecLeading       = o.fIJBckgHisto0RecLeading;
     fIJBckgHisto0Gen              = o.fIJBckgHisto0Gen;       
@@ -1104,6 +1152,8 @@ AliAnalysisTaskFragmentationFunction& AliAnalysisTaskFragmentationFunction::oper
     fIJBckgHisto2GenLeading       = o.fIJBckgHisto2GenLeading;
     fIJBckgHisto3Gen              = o.fIJBckgHisto3Gen;       
     fIJBckgHisto3GenLeading       = o.fIJBckgHisto3GenLeading;
+    fIJBckgHisto4Gen              = o.fIJBckgHisto4Gen;       
+    fIJBckgHisto4GenLeading       = o.fIJBckgHisto4GenLeading;
     fRandom                       = o.fRandom;
     fBckgSubMethod                = o.fBckgSubMethod;
   }
@@ -1126,9 +1176,9 @@ AliAnalysisTaskFragmentationFunction::~AliAnalysisTaskFragmentationFunction()
   if(fJetsGen)              delete fJetsGen;
   if(fJetsRecEff)           delete fJetsRecEff;
   if(fBckgMode && 
-     (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || 
-      fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || 
-      fBckgType[2]==kBckgClustersOutLeading || fBckgType[3]==kBckgClustersOutLeading)){
+     (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || fBckgType[4]==kBckgClusters ||
+      fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading || 
+      fBckgType[3]==kBckgClustersOutLeading || fBckgType[4]==kBckgClustersOutLeading)){
 
     if(fBckgJetsRec)          delete fBckgJetsRec;
     if(fBckgJetsRecCuts)      delete fBckgJetsRecCuts;
@@ -1256,7 +1306,7 @@ void AliAnalysisTaskFragmentationFunction::AliFragFuncHistos::FillFF(Float_t tra
 
  // Added for proper normalization of FF background estimation
   // when zero track are found in the background region
-  if(trackPt==-1.) return;
+  if((int)trackPt==-1) return;
  
   if(norm)fh2TrackPt->Fill(jetPt,trackPt,1/norm);
   else fh2TrackPt->Fill(jetPt,trackPt);
@@ -1486,7 +1536,7 @@ void AliAnalysisTaskFragmentationFunction::AliFragFuncQATrackHistos::DefineHisto
   fh2EtaPhi       = new TH2F(Form("fh2TrackQAEtaPhi%s", fNameQAT.Data()), Form("%s: #eta - #phi distribution", fNameQAT.Data()), fNBinsEta, fEtaMin, fEtaMax, fNBinsPhi, fPhiMin, fPhiMax);
   fh2HighPtEtaPhi = new TH2F(Form("fh2TrackQAHighPtEtaPhi%s", fNameQAT.Data()), Form("%s: #eta - #phi distribution for high-p_{T}", fNameQAT.Data()), fNBinsEta, fEtaMin, fEtaMax, fNBinsPhi, fPhiMin, fPhiMax);
   fh1Pt           = new TH1F(Form("fh1TrackQAPt%s", fNameQAT.Data()), Form("%s: p_{T} distribution", fNameQAT.Data()), fNBinsPt, fPtMin, fPtMax);
-    fh2PhiPt        = new TH2F(Form("fh2TrackQAPhiPt%s", fNameQAT.Data()), Form("%s: #phi - #p_{T} distribution", fNameQAT.Data()), fNBinsPhi, fPhiMin, fPhiMax, fNBinsPt, fPtMin, fPtMax);
+    fh2PhiPt        = new TH2F(Form("fh2TrackQAPhiPt%s", fNameQAT.Data()), Form("%s: #phi - p_{T} distribution", fNameQAT.Data()), fNBinsPhi, fPhiMin, fPhiMax, fNBinsPt, fPtMin, fPtMax);
 
   AliAnalysisTaskFragmentationFunction::SetProperties(fh2EtaPhi, "#eta", "#phi"); 
   AliAnalysisTaskFragmentationFunction::SetProperties(fh2HighPtEtaPhi, "#eta", "#phi");
@@ -2270,9 +2320,9 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
   // fJetsKine->SetOwner(kTRUE); // delete AOD jets using mom from Kine Tree via TList::Clear()
 
   if(fBckgMode && 
-     (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters ||  fBckgType[3]==kBckgClusters ||
-      fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || 
-      fBckgType[2]==kBckgClustersOutLeading || fBckgType[3]==kBckgClustersOutLeading)){
+     (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters ||  fBckgType[3]==kBckgClusters || fBckgType[4]==kBckgClusters ||
+      fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading || 
+      fBckgType[3]==kBckgClustersOutLeading || fBckgType[4]==kBckgClustersOutLeading)){
     
     fBckgJetsRec = new TList();
     fBckgJetsRec->SetOwner(kFALSE);
@@ -2308,6 +2358,9 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
   fh1VertexZ                 = new TH1F("fh1VertexZ", "Vertex z distribution", 30, -15., 15.);
   fh1EvtMult                = new TH1F("fh1EvtMult","Event multiplicity, track pT cut > 150 MeV/c, |#eta| < 0.9",120,0.,12000.);
   fh1EvtCent                = new TH1F("fh1EvtCent","centrality",100,0.,100.);
+  fh2TrackPtVsDCAXY          = new TH2F("fh2TrackPtVsDCAXY","",400,-0.02,0.02,100,0.,10.); 
+  fh2TrackPtVsDCAZ           = new TH2F("fh2TrackPtVsDCAZ","",100,-0.050,0.050,100,0.,10.);
+
   fh1Xsec                    = new TProfile("fh1Xsec","xsec from pyxsec.root",1,0,1);
   fh1Xsec->GetXaxis()->SetBinLabel(1,"<#sigma>");
   fh1Trials                  = new TH1F("fh1Trials","trials from pyxsec.root",1,0,1);
@@ -2322,33 +2375,34 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
 
   // Background
   if(fBckgMode) {
-    if(fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || 
-       fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || 
-       fBckgType[2]==kBckgClustersOutLeading || fBckgType[3]==kBckgClustersOutLeading){
+    if(fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || fBckgType[4]==kBckgClusters || 
+       fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading || 
+       fBckgType[3]==kBckgClustersOutLeading || fBckgType[4]==kBckgClustersOutLeading){
       
       fh1nRecBckgJetsCuts        = new TH1F("fh1nRecBckgJetsCuts","reconstructed background jets per event",10,-0.5,9.5);
       fh1nGenBckgJets            = new TH1F("fh1nGenBckgJets","generated background jets per event",10,-0.5,9.5);
     }
 
-    if(fBckgType[0]==kBckgPerp || fBckgType[1]==kBckgPerp || fBckgType[2]==kBckgPerp || fBckgType[3]==kBckgPerp)
+    if(fBckgType[0]==kBckgPerp || fBckgType[1]==kBckgPerp || fBckgType[2]==kBckgPerp || fBckgType[3]==kBckgPerp || fBckgType[4]==kBckgPerp )
       fh1PerpMult                = new TH1F("fh1PerpMult","Background multiplicity - Cone perpendicular to leading jet axis",500,0.,500.);
-    if(fBckgType[0]==kBckgASide || fBckgType[1]==kBckgASide || fBckgType[2]==kBckgASide || fBckgType[3]==kBckgASide)
+    if(fBckgType[0]==kBckgASide || fBckgType[1]==kBckgASide || fBckgType[2]==kBckgASide || fBckgType[3]==kBckgASide || fBckgType[4]==kBckgASide)
       fh1ASideMult               = new TH1F("fh1ASideMult","Background multiplicity - Cone in the away side of leading jet axis",500,0.,500.);
-    if(fBckgType[0]==kBckgASideWindow || fBckgType[1]==kBckgASideWindow || fBckgType[2]==kBckgASideWindow || fBckgType[3]==kBckgASideWindow)
+    if(fBckgType[0]==kBckgASideWindow || fBckgType[1]==kBckgASideWindow || fBckgType[2]==kBckgASideWindow || fBckgType[3]==kBckgASideWindow || fBckgType[4]==kBckgASideWindow)
       fh1ASideWindowMult         = new TH1F("fh1ASideWindowMult","Background multiplicity - Cone in the away side of leading jet axis",500,0.,500.);
-    if(fBckgType[0]==kBckgPerpWindow || fBckgType[1]==kBckgPerpWindow || fBckgType[2]==kBckgPerpWindow || fBckgType[3]==kBckgPerpWindow)
+    if(fBckgType[0]==kBckgPerpWindow || fBckgType[1]==kBckgPerpWindow || fBckgType[2]==kBckgPerpWindow || fBckgType[3]==kBckgPerpWindow || fBckgType[4]==kBckgPerpWindow)
       fh1PerpWindowMult         = new TH1F("fh1PerpWindowMult","Background multiplicity - Cone in the perp direction of leading jet axis",500,0.,500.);
-    if(fBckgType[0]==kBckgOutLJ || fBckgType[1]==kBckgOutLJ || fBckgType[2]==kBckgOutLJ || fBckgType[3]==kBckgOutLJ)
+    if(fBckgType[0]==kBckgOutLJ || fBckgType[1]==kBckgOutLJ || fBckgType[2]==kBckgOutLJ || fBckgType[3]==kBckgOutLJ || fBckgType[4]==kBckgOutLJ)
       fh1OutLeadingMult          = new TH1F("fh1OutLeadingMult","Background multiplicity - Cone outside leading jet",500,0,500.);
-    if(fBckgType[0]==kBckgOutLJStat || fBckgType[1]==kBckgOutLJStat || fBckgType[2]==kBckgOutLJStat || fBckgType[3]==kBckgOutLJStat)
+    if(fBckgType[0]==kBckgOutLJStat || fBckgType[1]==kBckgOutLJStat || fBckgType[2]==kBckgOutLJStat || fBckgType[3]==kBckgOutLJStat || fBckgType[4]==kBckgOutLJStat)
       fh1OutLeadingStatMult      = new TH1F("fh1OutLeadingStatMult","Background multiplicity - Cone outside leading jet",3000,0,3000.);
-    if(fBckgType[0]==kBckgOut2J || fBckgType[1]==kBckgOut2J || fBckgType[2]==kBckgOut2J || fBckgType[3]==kBckgOut2J)
+    if(fBckgType[0]==kBckgOut2J || fBckgType[1]==kBckgOut2J || fBckgType[2]==kBckgOut2J || fBckgType[3]==kBckgOut2J || fBckgType[4]==kBckgOut2J)
       fh1Out2JetsMult            = new TH1F("fh1Out2JetsMult","Background multiplicity - Cone outside 2 jets",500,0.,500.);
-    if(fBckgType[0]==kBckgOut3J || fBckgType[1]==kBckgOut3J || fBckgType[2]==kBckgOut3J || fBckgType[3]==kBckgOut3J)
+    if(fBckgType[0]==kBckgOut3J || fBckgType[1]==kBckgOut3J || fBckgType[2]==kBckgOut3J || fBckgType[3]==kBckgOut3J || fBckgType[4]==kBckgOut3J)
       fh1Out3JetsMult            = new TH1F("fh1Out3JetsMult","Background multiplicity - Cone outside 3 jets",500,0.,500.);
-    if(fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters)
+    if(fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || fBckgType[4]==kBckgClusters)
       fh1MedianClustersMult  = new TH1F("fh1MedianClustersMult","Background multiplicity - median cluster",500,0.,500.);
-    if(fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading || fBckgType[3]==kBckgClustersOutLeading)
+    if(fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading || fBckgType[3]==kBckgClustersOutLeading 
+       || fBckgType[4]==kBckgClustersOutLeading)
       fh1OutClustersMult            = new TH1F("fh1OutClustersMult","Background multiplicity - clusters outside leading jet",3000,0.,3000.);
   }
   
@@ -2588,8 +2642,8 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
   // Background
   if(fBckgMode){
     // Track QA
-    TString title[4];
-    for(Int_t i=0; i<4; i++){
+    TString title[5];
+    for(Int_t i=0; i<5; i++){
       if(fBckgType[i]==kBckgPerp) title[i]="Perp";
       else if(fBckgType[i]==kBckgPerpWindow) title[i]="PerpW";
       else if(fBckgType[i]==kBckgASide) title[i]="ASide";
@@ -2640,6 +2694,16 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
                                                               fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
                                                               fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, 
                                                               fQATrackHighPtThreshold);
+      fQABckgHisto4RecCuts      = new AliFragFuncQATrackHistos("Bckg"+title[4]+"RecCuts", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, 
+                                                              fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
+                                                              fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, 
+                                                              fQATrackHighPtThreshold);
+      fQABckgHisto4Gen          = new AliFragFuncQATrackHistos("Bckg"+title[4]+"Gen", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, 
+                                                              fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
+                                                              fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, 
+                                                              fQATrackHighPtThreshold);
+
+
     } // end: background QA
 
     if(fFFMode){
@@ -2710,6 +2774,23 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
                                                      fFFNBinsPt, fFFPtMin, fFFPtMax, 
                                                      fFFNBinsXi, fFFXiMin, fFFXiMax,  
                                                      fFFNBinsZ , fFFZMin , fFFZMax);
+      fFFBckgHisto4RecCuts    = new AliFragFuncHistos("Bckg"+title[4]+"RecCuts", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, 
+                                                     fFFNBinsPt, fFFPtMin, fFFPtMax, 
+                                                     fFFNBinsXi, fFFXiMin, fFFXiMax,  
+                                                     fFFNBinsZ , fFFZMin , fFFZMax);
+      fFFBckgHisto4RecLeading = new AliFragFuncHistos("Bckg"+title[4]+"RecLeading", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, 
+                                                     fFFNBinsPt, fFFPtMin, fFFPtMax, 
+                                                     fFFNBinsXi, fFFXiMin, fFFXiMax,  
+                                                     fFFNBinsZ , fFFZMin , fFFZMax);
+      fFFBckgHisto4Gen        = new AliFragFuncHistos("Bckg"+title[4]+"Gen", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, 
+                                                     fFFNBinsPt, fFFPtMin, fFFPtMax, 
+                                                     fFFNBinsXi, fFFXiMin, fFFXiMax,  
+                                                     fFFNBinsZ , fFFZMin , fFFZMax);
+      fFFBckgHisto4GenLeading = new AliFragFuncHistos("Bckg"+title[4]+"GenLeading", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, 
+                                                     fFFNBinsPt, fFFPtMin, fFFPtMax, 
+                                                     fFFNBinsXi, fFFXiMin, fFFXiMax,  
+                                                     fFFNBinsZ , fFFZMin , fFFZMax);
+
     } // end: background FF
 
     if(fIJMode){    
@@ -2892,6 +2973,10 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
       fFFBckgHisto3RecLeading->DefineHistos();
       fFFBckgHisto3Gen->DefineHistos();
       fFFBckgHisto3GenLeading->DefineHistos();
+      fFFBckgHisto4RecCuts->DefineHistos();
+      fFFBckgHisto4RecLeading->DefineHistos();
+      fFFBckgHisto4Gen->DefineHistos();
+      fFFBckgHisto4GenLeading->DefineHistos();
     }
 
     if(fIJMode){
@@ -2918,6 +3003,8 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
       fQABckgHisto2Gen->DefineHistos();
       fQABckgHisto3RecCuts->DefineHistos();
       fQABckgHisto3Gen->DefineHistos();
+      fQABckgHisto4RecCuts->DefineHistos();
+      fQABckgHisto4Gen->DefineHistos();
     }
   } // end: background
   
@@ -2934,6 +3021,8 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
   fCommonHistList->Add(fh1EvtSelection);
   fCommonHistList->Add(fh1EvtMult);
   fCommonHistList->Add(fh1EvtCent);
+  fCommonHistList->Add(fh2TrackPtVsDCAXY);
+  fCommonHistList->Add(fh2TrackPtVsDCAZ);
   fCommonHistList->Add(fh1VertexNContributors);
   fCommonHistList->Add(fh1VertexZ);    
   fCommonHistList->Add(fh1nRecJetsCuts);
@@ -2974,6 +3063,9 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
       fFFBckgHisto2RecLeading->AddToOutput(fCommonHistList);
       fFFBckgHisto3RecCuts->AddToOutput(fCommonHistList);
       fFFBckgHisto3RecLeading->AddToOutput(fCommonHistList);
+      fFFBckgHisto4RecCuts->AddToOutput(fCommonHistList);
+      fFFBckgHisto4RecLeading->AddToOutput(fCommonHistList);
+
       if(genJets && genTracks){
        fFFBckgHisto0Gen->AddToOutput(fCommonHistList);
        fFFBckgHisto0GenLeading->AddToOutput(fCommonHistList);
@@ -2983,6 +3075,8 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
        fFFBckgHisto2GenLeading->AddToOutput(fCommonHistList);
        fFFBckgHisto3Gen->AddToOutput(fCommonHistList);
        fFFBckgHisto3GenLeading->AddToOutput(fCommonHistList);
+       fFFBckgHisto4Gen->AddToOutput(fCommonHistList);
+       fFFBckgHisto4GenLeading->AddToOutput(fCommonHistList);
       }
     }
 
@@ -2991,33 +3085,36 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
       fQABckgHisto1RecCuts->AddToOutput(fCommonHistList);
       fQABckgHisto2RecCuts->AddToOutput(fCommonHistList);
       fQABckgHisto3RecCuts->AddToOutput(fCommonHistList);
+      fQABckgHisto4RecCuts->AddToOutput(fCommonHistList);
       if(genJets && genTracks){
        fQABckgHisto0Gen->AddToOutput(fCommonHistList);
        fQABckgHisto1Gen->AddToOutput(fCommonHistList);
        fQABckgHisto2Gen->AddToOutput(fCommonHistList);
        fQABckgHisto3Gen->AddToOutput(fCommonHistList);
+       fQABckgHisto4Gen->AddToOutput(fCommonHistList);
       }
     }
 
-    if(fBckgType[0]==kBckgOutLJ || fBckgType[1]==kBckgOutLJ || fBckgType[2]==kBckgOutLJ || fBckgType[3]==kBckgOutLJ)
+    if(fBckgType[0]==kBckgOutLJ || fBckgType[1]==kBckgOutLJ || fBckgType[2]==kBckgOutLJ || fBckgType[3]==kBckgOutLJ || fBckgType[4]==kBckgOutLJ)
       fCommonHistList->Add(fh1OutLeadingMult);
-    if(fBckgType[0]==kBckgOutLJStat || fBckgType[1]==kBckgOutLJStat || fBckgType[2]==kBckgOutLJStat || fBckgType[3]==kBckgOutLJStat)
+    if(fBckgType[0]==kBckgOutLJStat || fBckgType[1]==kBckgOutLJStat || fBckgType[2]==kBckgOutLJStat || fBckgType[3]==kBckgOutLJStat || fBckgType[4]==kBckgOutLJStat)
       fCommonHistList->Add(fh1OutLeadingStatMult);
-    if(fBckgType[0]==kBckgPerp || fBckgType[1]==kBckgPerp || fBckgType[2]==kBckgPerp || fBckgType[3]==kBckgPerp )
+    if(fBckgType[0]==kBckgPerp || fBckgType[1]==kBckgPerp || fBckgType[2]==kBckgPerp || fBckgType[3]==kBckgPerp || fBckgType[4]==kBckgPerp)
       fCommonHistList->Add(fh1PerpMult);
-    if(fBckgType[0]==kBckgASide || fBckgType[1]==kBckgASide || fBckgType[2]==kBckgASide || fBckgType[3]==kBckgASide)
+    if(fBckgType[0]==kBckgASide || fBckgType[1]==kBckgASide || fBckgType[2]==kBckgASide || fBckgType[3]==kBckgASide || fBckgType[4]==kBckgASide)
       fCommonHistList->Add(fh1ASideMult);
-    if(fBckgType[0]==kBckgASideWindow || fBckgType[1]==kBckgASideWindow || fBckgType[2]==kBckgASideWindow || fBckgType[3]==kBckgASideWindow)
+    if(fBckgType[0]==kBckgASideWindow || fBckgType[1]==kBckgASideWindow || fBckgType[2]==kBckgASideWindow || fBckgType[3]==kBckgASideWindow || fBckgType[4]==kBckgASideWindow)
       fCommonHistList->Add(fh1ASideWindowMult);
-    if(fBckgType[0]==kBckgPerpWindow || fBckgType[1]==kBckgPerpWindow || fBckgType[2]==kBckgPerpWindow || fBckgType[3]==kBckgPerpWindow)
+    if(fBckgType[0]==kBckgPerpWindow || fBckgType[1]==kBckgPerpWindow || fBckgType[2]==kBckgPerpWindow || fBckgType[3]==kBckgPerpWindow || fBckgType[4]==kBckgPerpWindow)
       fCommonHistList->Add(fh1PerpWindowMult);
-    if(fBckgType[0]==kBckgOut2J || fBckgType[1]==kBckgOut2J || fBckgType[2]==kBckgOut2J || fBckgType[3]==kBckgOut2J)
+    if(fBckgType[0]==kBckgOut2J || fBckgType[1]==kBckgOut2J || fBckgType[2]==kBckgOut2J || fBckgType[3]==kBckgOut2J || fBckgType[4]==kBckgOut2J)
       fCommonHistList->Add(fh1Out2JetsMult);
-    if(fBckgType[0]==kBckgOut3J || fBckgType[1]==kBckgOut3J || fBckgType[2]==kBckgOut3J || fBckgType[3]==kBckgOut3J)
+    if(fBckgType[0]==kBckgOut3J || fBckgType[1]==kBckgOut3J || fBckgType[2]==kBckgOut3J || fBckgType[3]==kBckgOut3J || fBckgType[4]==kBckgOut3J)
       fCommonHistList->Add(fh1Out3JetsMult);
-    if(fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters)
+    if(fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || fBckgType[4]==kBckgClusters)
       fCommonHistList->Add(fh1MedianClustersMult);
-    if(fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading || fBckgType[3]==kBckgClustersOutLeading)
+    if(fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading 
+       || fBckgType[3]==kBckgClustersOutLeading || fBckgType[4]==kBckgClustersOutLeading)
       fCommonHistList->Add(fh1OutClustersMult);
   }
 
@@ -3042,9 +3139,9 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
   }
 
   if(fBckgMode && 
-     (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters ||  fBckgType[3]==kBckgClusters || 
-      fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || 
-      fBckgType[2]==kBckgClustersOutLeading || fBckgType[3]==kBckgClustersOutLeading)) {
+     (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || fBckgType[4]==kBckgClusters ||
+      fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading || 
+      fBckgType[3]==kBckgClustersOutLeading || fBckgType[4]==kBckgClustersOutLeading)) {
     fCommonHistList->Add(fh1nRecBckgJetsCuts);
     if(genJets) fCommonHistList->Add(fh1nGenBckgJets);
   }
@@ -3330,9 +3427,9 @@ void AliAnalysisTaskFragmentationFunction::UserExec(Option_t *)
 
   //____ fetch background jets ___________________________________________________
   if(fBckgMode && 
-     (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters ||
-      fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || 
-      fBckgType[2]==kBckgClustersOutLeading || fBckgType[3]==kBckgClustersOutLeading)){
+     (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || fBckgType[4]==kBckgClusters ||
+      fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading || 
+      fBckgType[3]==kBckgClustersOutLeading || fBckgType[4]==kBckgClustersOutLeading)){
 
     Int_t nBJ = GetListOfBckgJets(fBckgJetsRec, kJetsRec);
     Int_t nRecBckgJets = 0;
@@ -3401,8 +3498,32 @@ void AliAnalysisTaskFragmentationFunction::UserExec(Option_t *)
        AliVParticle *part = dynamic_cast<AliVParticle*>(fTracksGen->At(it));
        if(part)fQATrackHistosGen->FillTrackQA( part->Eta(), TVector2::Phi_0_2pi(part->Phi()), part->Pt());
       }
+
+      // fill DCA to prim vertex
+      for(Int_t it=0; it<nRecPartCuts; ++it){
+       AliAODTrack *aodtr = dynamic_cast<AliAODTrack*>(fTracksRecCuts->At(it));
+
+       if(!aodtr) continue;
+       if(!primVtx) continue; 
+       
+       Double_t Bfield = fAOD->GetMagneticField();
+       Double_t dz[2];
+       Double_t cov[3];
+
+       AliAODTrack tmp(*aodtr);
+       tmp.PropagateToDCA(primVtx, Bfield, 5., dz, cov);
+
+       Double_t dcaXY = dz[0];
+       Double_t dcaZ  = dz[1];
+
+       fh2TrackPtVsDCAXY->Fill(dcaXY,tmp.Pt());
+       fh2TrackPtVsDCAZ->Fill(dcaZ,tmp.Pt());
+      }
     }
 
+    
+
+
     // loop over jets
     
     if(fQAMode&2){
@@ -3483,6 +3604,11 @@ void AliAnalysisTaskFragmentationFunction::UserExec(Option_t *)
                           fFFBckgHisto3RecCuts, fFFBckgHisto3RecLeading,
                           fIJBckgHisto3RecCuts, fIJBckgHisto3RecLeading,
                           fQABckgHisto3RecCuts);
+         if(fBckgType[4]!=-1)
+           FillBckgHistos(fBckgType[4], fTracksRecCuts, fJetsRecCuts, jet, leadTrackPt, leadTrackV,
+                          fFFBckgHisto4RecCuts, fFFBckgHisto4RecLeading,
+                          fIJBckgHisto4RecCuts, fIJBckgHisto4RecLeading,
+                          fQABckgHisto4RecCuts);
        } // end if(fBckgMode)
        
        delete leadTrackV;
@@ -3801,7 +3927,7 @@ void AliAnalysisTaskFragmentationFunction::UserExec(Option_t *)
                      
                      if (it < jettracklist2->GetSize())
                        { 
-                         Float_t trackPt2 = (dynamic_cast<AliVParticle*>(jettracklist2->At(it)))->Pt();
+                         Float_t trackPt2 = ((AliVParticle*)jettracklist2->At(it))->Pt();
                          Float_t jetPt2 = jet2->Pt();
                          
                          Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
@@ -3948,9 +4074,9 @@ void AliAnalysisTaskFragmentationFunction::UserExec(Option_t *)
   fJetsRecEff->Clear();
 
   if(fBckgMode && 
-     (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters ||
-      fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || 
-      fBckgType[2]==kBckgClustersOutLeading || fBckgType[3]==kBckgClustersOutLeading)){
+     (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || fBckgType[4]==kBckgClusters ||
+      fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading || 
+      fBckgType[3]==kBckgClustersOutLeading || fBckgType[4]==kBckgClustersOutLeading)){
 
     fBckgJetsRec->Clear();
     fBckgJetsRecCuts->Clear();
@@ -5067,6 +5193,7 @@ void AliAnalysisTaskFragmentationFunction::GetClusterTracksOutOf1Jet(AliAODJet*
     for(Int_t it = 0; it<nTracksJet; it++){
        
       AliVParticle*   track = dynamic_cast<AliVParticle*>(bgrCluster->GetTrack(it));
+      if(!track) continue;
        
       Float_t trackPt  = track->Pt();
       Float_t trackEta = track->Eta();
@@ -5093,8 +5220,12 @@ void AliAnalysisTaskFragmentationFunction::GetClusterTracksMedian(TList* outputl
   // using cluster with median density (odd number of clusters) 
   // or picking randomly one of the two closest to median (even number)
   
+  normFactor = 0;
+
   Int_t nBckgClusters = fBckgJetsRec->GetEntries(); // not 'recCuts': use all clusters in full eta range
 
+  if(!nBckgClusters) return;
+
   Double_t* bgrDensity = new Double_t[nBckgClusters];
   Int_t*    indices    = new Int_t[nBckgClusters];
     
@@ -5156,6 +5287,7 @@ void AliAnalysisTaskFragmentationFunction::GetClusterTracksMedian(TList* outputl
   for(Int_t it = 0; it<nTracksJet; it++){
        
     AliVParticle* track = dynamic_cast<AliVParticle*>(medianCluster->GetTrack(it));
+    if(!track) continue;
        
     Float_t trackPt  = track->Pt();
     Float_t trackEta = track->Eta();
@@ -5219,6 +5351,7 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
       for(Int_t it=0; it<tracklistoutleading->GetSize(); ++it){
        
        AliVParticle* trackVP   = (AliVParticle*)(tracklistoutleading->At(it));
+       if(!trackVP) continue;
        TLorentzVector* trackV  = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P());
        
        Float_t jetPt   = jet->Pt();
@@ -5279,6 +5412,7 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
       for(Int_t it=0; it<tracklistoutleadingStat->GetSize(); ++it){
        
        AliVParticle* trackVP   = dynamic_cast<AliVParticle*>(tracklistoutleadingStat->At(it));
+       if(!trackVP) continue;
        TLorentzVector* trackV  = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P());
        
        Float_t jetPt   = jet->Pt();
@@ -5382,6 +5516,7 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
       for(Int_t it=0; it<tracklistaside->GetSize(); ++it){
 
         AliVParticle*   trackVP = (AliVParticle*)(tracklistaside->At(it));
+       if(!trackVP) continue;
         TLorentzVector* trackV  = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P());
 
         Float_t jetPt   = jet->Pt();
@@ -5421,6 +5556,7 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
       for(Int_t it=0; it<tracklistasidew->GetSize(); ++it){
 
         AliVParticle*   trackVP = dynamic_cast<AliVParticle*>(tracklistasidew->At(it));
+       if(!trackVP) continue;
         TLorentzVector* trackV  = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P());
 
         Float_t jetPt   = jet->Pt();
@@ -5459,6 +5595,7 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
       for(Int_t it=0; it<tracklistperpw->GetSize(); ++it){
 
         AliVParticle*   trackVP = dynamic_cast<AliVParticle*>(tracklistperpw->At(it));
+       if(!trackVP) continue;
         TLorentzVector* trackV  = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P());
 
         Float_t jetPt   = jet->Pt();
@@ -5493,6 +5630,7 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
       for(Int_t it=0; it<tracklistout2jets->GetSize(); ++it){
     
        AliVParticle*   trackVP = dynamic_cast<AliVParticle*>(tracklistout2jets->At(it));
+       if(!trackVP) continue;
        TLorentzVector* trackV  = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P());
        
        Float_t jetPt   = jet->Pt();
@@ -5546,6 +5684,7 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
       for(Int_t it=0; it<tracklistout2jetsStat->GetSize(); ++it){
        
        AliVParticle*   trackVP = dynamic_cast<AliVParticle*>(tracklistout2jetsStat->At(it));
+       if(!trackVP) continue;
        TLorentzVector* trackV  = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P());
        
        Float_t jetPt   = jet->Pt();
@@ -5560,7 +5699,7 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
            if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt, normFactor2Jets);
            if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV, normFactor2Jets );
            
-           //if(fQAMode&1)     qabckghistocuts->FillTrackQA( trackEta, TVector2::Phi_0_2pi(trackPhi), trackPt);
+           if(fQAMode&1) qabckghistocuts->FillTrackQA( trackV->Eta(), TVector2::Phi_0_2pi(trackV->Phi()), trackPt ); // OB added bgr QA
          }
 
        // All cases included
@@ -5573,7 +5712,6 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
            if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV, normFactor2Jets );
 
            if(fQAMode&1) qabckghistocuts->FillTrackQA( trackV->Eta(), TVector2::Phi_0_2pi(trackV->Phi()), trackPt ); // OB added bgr QA 
-
          }
        delete trackV;
       }
@@ -5603,6 +5741,7 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
       for(Int_t it=0; it<tracklistout3jets->GetSize(); ++it){
        
        AliVParticle*   trackVP = dynamic_cast<AliVParticle*>(tracklistout3jets->At(it));
+       if(!trackVP) continue;
        TLorentzVector* trackV  = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P());
        
        Float_t jetPt   = jet->Pt();
@@ -5657,6 +5796,7 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
       for(Int_t it=0; it<tracklistout3jetsStat->GetSize(); ++it){
        
        AliVParticle*   trackVP = dynamic_cast<AliVParticle*>(tracklistout3jetsStat->At(it));
+       if(!trackVP) continue;
        TLorentzVector* trackV  = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P());
        
        Float_t jetPt   = jet->Pt();
@@ -5719,6 +5859,7 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
     for(Int_t it=0; it<tracklistClustersOutLeading->GetSize(); ++it){
       
       AliVParticle*   trackVP = dynamic_cast<AliVParticle*>(tracklistClustersOutLeading->At(it));
+      if(!trackVP) continue;
       TLorentzVector* trackV  = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P());
       
       Float_t trackPt = trackVP->Pt();
@@ -5743,10 +5884,11 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
     
     GetClusterTracksMedian(tracklistClustersMedian, normFactorClusters); 
     fh1MedianClustersMult->Fill(tracklistClustersMedian->GetSize());
-    
+
     for(Int_t it=0; it<tracklistClustersMedian->GetSize(); ++it){
       
       AliVParticle*   trackVP = dynamic_cast<AliVParticle*>(tracklistClustersMedian->At(it));
+      if(!trackVP) continue;
       TLorentzVector* trackV  = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P());
       
       Float_t trackPt = trackVP->Pt();
index 3a323e217698a9595a6de45b9d261a6f0e2a580f..811b46d2d33ef1c533804ce17b8356d39c83a711 100644 (file)
@@ -360,8 +360,8 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE {
   virtual void   SetFFRadius(Float_t r = 0.4) { fFFRadius = r; }
   virtual void   SetFFBckgRadius(Float_t r = 0.7) { fFFBckgRadius = r; }
   virtual void   SetBckgMode(Bool_t bg = 1) { fBckgMode = bg; }
-  virtual void   SetBckgType(Int_t bg0 = 0, Int_t bg1 = 1,Int_t bg2 = 2, Int_t bg3 = 3) 
-  { fBckgType[0] = bg0; fBckgType[1] = bg1; fBckgType[2] = bg2; fBckgType[3] = bg3; }
+  virtual void   SetBckgType(Int_t bg0 = 0, Int_t bg1 = 1,Int_t bg2 = 2, Int_t bg3 = 3, Int_t bg4 = 4
+  { fBckgType[0] = bg0; fBckgType[1] = bg1; fBckgType[2] = bg2; fBckgType[3] = bg3; fBckgType[4] = bg4; }
   virtual void   SetIJMode(Int_t ij = 1)      {fIJMode = ij;}
   virtual void   SetQAMode(Int_t qa = 3)      {fQAMode = qa;}
   virtual void   SetFFMode(Int_t ff = 1)      {fFFMode = ff;}
@@ -409,7 +409,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE {
     fPhiCorrNBinsEta = nEta; fPhiCorrEtaMin = etaMin; fPhiCorrEtaMax = etaMax;
     fPhiCorrNBinsPhi = nPhi; fPhiCorrPhiMin = phiMin; fPhiCorrPhiMax = phiMax; }
 
-  void   SetIJHistoBins(Int_t nJetPt = 245, Float_t jetPtMin = 5, Float_t jetPtMax = 250, Int_t nPt = 200, Float_t ptMin = 0., Float_t ptMax = 200., 
+  void   SetIJHistoBins(Int_t nJetPt = 23, Float_t jetPtMin = 5, Float_t jetPtMax = 120, Int_t nPt = 120, Float_t ptMin = 0., Float_t ptMax = 120., 
                        Int_t nZ = 22,  Float_t zMin = 0.,  Float_t zMax = 1.1, Int_t nCosTheta = 100,  Float_t costhetaMin = 0.,  Float_t costhetaMax = 1.,
                        Int_t nTheta = 200,  Float_t thetaMin = -0.5,  Float_t thetaMax = 1.5, Int_t nJt = 25,  Float_t jtMin = 0.,  Float_t jtMax = 5.)
   { fIJNBinsJetPt = nJetPt; fIJJetPtMin = jetPtMin; fIJJetPtMax = jetPtMax; fIJNBinsPt = nPt; fIJPtMin = ptMin; fIJPtMax = ptMax;
@@ -476,8 +476,8 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE {
   enum {kTrackUndef=0, kTrackAOD, kTrackAODQualityCuts, kTrackAODCuts, kTrackKineAll, kTrackKineCharged, kTrackKineChargedAcceptance, 
        kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance};
   enum {kJetsUndef=0, kJetsRec, kJetsRecAcceptance, kJetsGen, kJetsGenAcceptance, kJetsKine, kJetsKineAcceptance};
-  enum {kBckgPerp=0, kBckgOutLJ, kBckgOut2J, kBckgOut3J, kBckgOutAJ, kBckgOutLJStat, kBckgOut2JStat, kBckgOut3JStat, kBckgOutAJStat, kBckgClusters
-       kBckgClustersOutLeading, kBckgASide, kBckgASideWindow, kBckgPerpWindow};
+  enum {kBckgPerp=0, kBckgOutLJ, kBckgOut2J, kBckgClusters, kBckgClustersOutLeading, kBckgOut3J, kBckgOutAJ, kBckgOutLJStat
+       kBckgOut2JStat, kBckgOut3JStat, kBckgOutAJStat,  kBckgASide, kBckgASideWindow, kBckgPerpWindow};
 
  
  private:
@@ -530,7 +530,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE {
   Float_t fFFRadius;        // if radius > 0 construct FF from tracks within cone around jet axis, otherwise use trackRefs  
   Float_t fFFBckgRadius;    // compute background outside cone of this radius around jet axes
   Bool_t  fBckgMode;        // Set background subtraction mode
-  Int_t   fBckgType[4];        // Set background subtraction mode
+  Int_t   fBckgType[5];     // Set background subtraction mode
   Int_t   fIJMode;          // Set intrajet mode
   Int_t   fQAMode;          // QA mode: 0x00=0 none, 0x01=1 track qa, 0x10=2 track qa, 0x11=3 both
   Int_t   fFFMode;          // fragmentation function mode
@@ -731,6 +731,10 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE {
   TH1F *fh1EvtMult;              //! number of reconstructed tracks after cuts 
   TH1F *fh1EvtCent;              //! centrality percentile 
 
+  TH2F  *fh2TrackPtVsDCAXY;       //! track pt vs DCA 
+  TH2F  *fh2TrackPtVsDCAZ;        //! track pt vs DCA
+
+
   TProfile* fh1Xsec;              //! pythia cross section and trials
   TH1F*     fh1Trials;            //! sum of trials
   TH1F*     fh1PtHard;            //! pt hard of the event
@@ -744,7 +748,6 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE {
   TH2F  *fh2PtRecVsGenPrim;       //! association rec/gen MC: rec vs gen pt 
 
   // tracking efficiency 
-
   
   AliFragFuncQATrackHistos* fQATrackHistosRecEffGen;      //! tracking efficiency: generated primaries 
   AliFragFuncQATrackHistos* fQATrackHistosRecEffRec;      //! tracking efficiency: reconstructed primaries
@@ -779,6 +782,8 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE {
   AliFragFuncQATrackHistos* fQABckgHisto2Gen;      //! track QA: generated tracks
   AliFragFuncQATrackHistos* fQABckgHisto3RecCuts;  //! track QA: reconstructed tracks after cuts
   AliFragFuncQATrackHistos* fQABckgHisto3Gen;      //! track QA: generated tracks
+  AliFragFuncQATrackHistos* fQABckgHisto4RecCuts;  //! track QA: reconstructed tracks after cuts
+  AliFragFuncQATrackHistos* fQABckgHisto4Gen;      //! track QA: generated tracks
   
   AliFragFuncHistos*  fFFBckgHisto0RecCuts;       //! Bckg (outside leading jet or 2 jets or more) FF reconstructed tracks after cuts 
   AliFragFuncHistos*  fFFBckgHisto0RecLeading;    //! Bckg (outside leading jet or 2 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt  
@@ -796,6 +801,10 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE {
   AliFragFuncHistos*  fFFBckgHisto3RecLeading;    //! Bckg (outside leading jet or 3 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt  
   AliFragFuncHistos*  fFFBckgHisto3Gen;           //! Bckg (outside leading jet or 3 jets or more) FF generated tracks after cuts 
   AliFragFuncHistos*  fFFBckgHisto3GenLeading;    //! Bckg (outside leading jet or 3 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt
+  AliFragFuncHistos*  fFFBckgHisto4RecCuts;       //! Bckg (outside leading jet or 4 jets or more) FF reconstructed tracks after cuts 
+  AliFragFuncHistos*  fFFBckgHisto4RecLeading;    //! Bckg (outside leading jet or 4 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt  
+  AliFragFuncHistos*  fFFBckgHisto4Gen;           //! Bckg (outside leading jet or 4 jets or more) FF generated tracks after cuts 
+  AliFragFuncHistos*  fFFBckgHisto4GenLeading;    //! Bckg (outside leading jet or 4 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt
 
 
   AliFragFuncIntraJetHistos*  fIJBckgHisto0RecCuts;    //!
@@ -814,7 +823,10 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE {
   AliFragFuncIntraJetHistos*  fIJBckgHisto3RecLeading; //!
   AliFragFuncIntraJetHistos*  fIJBckgHisto3Gen;        //!
   AliFragFuncIntraJetHistos*  fIJBckgHisto3GenLeading; //!
-
+  AliFragFuncIntraJetHistos*  fIJBckgHisto4RecCuts;    //!
+  AliFragFuncIntraJetHistos*  fIJBckgHisto4RecLeading; //!
+  AliFragFuncIntraJetHistos*  fIJBckgHisto4Gen;        //!
+  AliFragFuncIntraJetHistos*  fIJBckgHisto4GenLeading; //!
 
   TRandom3*                   fRandom;          // TRandom3 for background estimation 
   Int_t                       fBckgSubMethod;   // Bckg method: 1 = leading jet excluded, 2 = 2 most energetic jets excluded        
index 5362090b2928668a7aa25818968232126957ef65..89de093f365ef9f7405ef6a8c20022ef5dcc6807 100644 (file)
@@ -1,5 +1,5 @@
 // **************************************
-//  used for the correction of determiantion of reconstructed jet spectra
+// used for the correction of determiantion of reconstructed jet spectra
 // Compares input (gen) and output (rec) jets   
 // *******************************************
 
@@ -147,6 +147,7 @@ AliAnalysisTaskJetSpectrum2::AliAnalysisTaskJetSpectrum2():
     fh1PtTracksLeadingIn[ij] = 0;
     fh2NJetsPt[ij]  = 0;
     fh2NTracksPt[ij]  = 0;
+    fh2TrackEtaPt[ij] = 0;
     fh3MultTrackPtRP[ij] = 0;
     fh2LeadingTrackPtTrackPhi[ij] = 0;
     for(int i = 0;i <= kMaxJets;++i){
@@ -253,6 +254,7 @@ AliAnalysisTaskJetSpectrum2::AliAnalysisTaskJetSpectrum2(const char* name):
     fh1PtTracksLeadingIn[ij] = 0;
     fh2NJetsPt[ij]  = 0;
     fh2NTracksPt[ij]  = 0;
+    fh2TrackEtaPt[ij] = 0;
     fh3MultTrackPtRP[ij] = 0;
     fh2LeadingTrackPtTrackPhi[ij] = 0;
     for(int i = 0;i <= kMaxJets;++i){
@@ -414,9 +416,9 @@ void AliAnalysisTaskJetSpectrum2::UserCreateOutputObjects()
   fh1Centrality = new TH1F("fh1Centrality","cent;cent (%)",101,-0.5,100.5);
   fHistList->Add(fh1Centrality);
 
-  fh2MultRec = new TH2F("fh2MultRec","multiplicity rec;# tracks;# jetrefs",400,-0.5,4000,400,0.,4000);
+  fh2MultRec = new TH2F("fh2MultRec","multiplicity rec;# tracks;# jetrefs",500,0,5000,500,0.,5000);
   fHistList->Add(fh2MultRec);
-  fh2MultGen = new TH2F("fh2MultGen","multiplicity gen;# tracks;# jetrefs",400,-0.5,4000,400,0.,4000);
+  fh2MultGen = new TH2F("fh2MultGen","multiplicity gen;# tracks;# jetrefs",400,0,5000,500,0.,5000);
   fHistList->Add(fh2MultGen);
 
   fh2RPSubevents = new TH2F("fh2RPSubevents" ,"Reaction Plane Angle" , 180, 0, TMath::Pi(), 180, 0, TMath::Pi());
@@ -482,17 +484,21 @@ void AliAnalysisTaskJetSpectrum2::UserCreateOutputObjects()
     fh1PtTracksLeadingIn[ij] = new TH1F(Form("fh1PtTracksLeading%sIn",cAdd.Data()),Form("%s track p_T;p_{T} (GeV/c)",cAdd.Data()),nBinPt,binLimitsPt);
     fHistList->Add(fh1PtTracksLeadingIn[ij]);
     
-    fh1SumPtTrack[ij] = new TH1F(Form("fh1SumPtTrack%s",cAdd.Data()),Form("Sum %s track p_T;p_{T} (GeV/c)",cAdd.Data()),900,0.,900.);
+    fh1SumPtTrack[ij] = new TH1F(Form("fh1SumPtTrack%s",cAdd.Data()),Form("Sum %s track p_T;p_{T} (GeV/c)",cAdd.Data()),1000,0.,3000.);
     fHistList->Add(fh1SumPtTrack[ij]);
     
     fh2NJetsPt[ij]  = new TH2F(Form("fh2N%sJetsPt",cAdd.Data()),Form("Number of %s jets above threshhold;p_{T,cut} (GeV/c);N_{jets}",cAdd.Data()),nBinPt,binLimitsPt,50,-0.5,49.5);
     fHistList->Add(fh2NJetsPt[ij]);
     
-    fh2NTracksPt[ij]  = new TH2F(Form("fh2N%sTracksPt",cAdd.Data()),Form("Number of %s tracks above threshhold;p_{T,cut} (GeV/c);N_{tracks}",cAdd.Data()),nBinPt,binLimitsPt,1000,0.,4000);
+    fh2NTracksPt[ij]  = new TH2F(Form("fh2N%sTracksPt",cAdd.Data()),Form("Number of %s tracks above threshhold;p_{T,cut} (GeV/c);N_{tracks}",cAdd.Data()),nBinPt,binLimitsPt,1000,0.,5000);
     fHistList->Add(fh2NTracksPt[ij]);
     
+
+    fh2TrackEtaPt[ij] = new TH2F(Form("fh2TrackEtaPt%s",cAdd.Data()),";#eta;p_{T,track}",nBinPt,binLimitsPt,50,-1.,1.);
+    fHistList->Add(fh2TrackEtaPt[ij]);
+
     fh3MultTrackPtRP[ij]  = new TH3F(Form("fh3MultTrackPtRP%s",
-                                         cAdd.Data()),Form("%s track p_T;# tracks;;p_{T} (GeV/c)",cAdd.Data()),400,0,4000,nBinPt,0,300,(Int_t)fNRPBins,-0.5,fNRPBins-0.5);
+                                         cAdd.Data()),Form(";# tracks;%s track p_T;RP Bin",cAdd.Data()),250,0,5000,100.,0.,50.,(Int_t)fNRPBins,-0.5,fNRPBins-0.5);
     fHistList->Add(fh3MultTrackPtRP[ij]);
     
     fh2LeadingTrackPtTrackPhi[ij] = new TH2F(Form("fh2Leading%sTrackPtTrackPhi",cAdd.Data()),Form("phi of leading %s track;p_{T};#phi;",cAdd.Data()),
@@ -513,7 +519,7 @@ void AliAnalysisTaskJetSpectrum2::UserCreateOutputObjects()
        fh2PhiPt[ij][i] = new TH2F(Form("fh2PhiPt%s_j%d",cAdd.Data(),i),Form("pt vs phi %s;#phi;p_{T};",cAdd.Data()),
                                   nBinPhi,binLimitsPhi,nBinPt,binLimitsPt);
 
-       fh3MultPtRP[ij][i]  = new TH3F(Form("fh3MultPtRP%s_j%d",cAdd.Data(),i),Form("%s jets p_T;# tracks;;p_{T} (GeV/c)",cAdd.Data()),400,0,4000,nBinPt,0,300,(Int_t)fNRPBins,-0.5,fNRPBins-0.5);
+       fh3MultPtRP[ij][i]  = new TH3F(Form("fh3MultPtRP%s_j%d",cAdd.Data(),i),Form("%s jets p_T;# tracks;;p_{T} (GeV/c)",cAdd.Data()),250,0,5000,nBinPt,0,300,(Int_t)fNRPBins,-0.5,fNRPBins-0.5);
       fHistList->Add(fh3MultPtRP[ij][i]);
 
 
@@ -1034,7 +1040,7 @@ void AliAnalysisTaskJetSpectrum2::FillTrackHistos(TList &particlesList,int iType
       if(tmpPhi<0)tmpPhi+=TMath::Pi()*2.;    
       Int_t phiBin = GetPhiBin(tmpPhi-fRPAngle);
       fh3MultTrackPtRP[iType]->Fill(refMult,tmpPt,phiBin); 
-
+      fh2TrackEtaPt[iType]->Fill(tmpTrack->Eta(),tmpPt);
       if(tmpTrack==leading){
        fh1PtTracksLeadingIn[iType]->Fill(tmpPt);
        fh2LeadingTrackPtTrackPhi[iType]->Fill(tmpPt,tmpPhi);
@@ -1321,7 +1327,7 @@ Float_t AliAnalysisTaskJetSpectrum2::GetCentrality(){
     if(fUseAODTrackInput)aod = dynamic_cast<AliAODEvent*>(InputEvent());
     else aod = AODEvent();
     if(!aod){
-      return 100;
+      return 101;
     }
     return aod->GetHeader()->GetCentrality();
 }
index 91db74105fb8bc643380f981e2a386ec351670cb..5d04566e8520e71e2ff257ea834ba3cbf6dccea5 100644 (file)
@@ -93,7 +93,7 @@ class AliAnalysisTaskJetSpectrum2 : public AliAnalysisTaskSE
     // this has to match with our selection of input events
     enum {kTrackUndef = 0, kTrackAOD, kTrackKineAll,kTrackKineCharged, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance};
     enum {kAnaMC =  0x1, kAnaMCESD = 0x2};
-    enum {kMaxJets = 3};
+    enum {kMaxJets = 2};
     enum {kJetRec = 0, kJetGen, kJetRecFull, kJetGenFull, kJetTypes}; //
     enum {kMaxCorrelation =  3};
     
@@ -209,13 +209,15 @@ class AliAnalysisTaskJetSpectrum2 : public AliAnalysisTaskSE
     TH1F*         fh1SumPtTrack[kJetTypes]; //! sum over all track pT    
 
     TH1F*         fh1PtIn[kJetTypes][kMaxJets+1];  //! Jet pt  
-    TH1F*         fh1PtJetsIn[kJetTypes];  //! Jet pt for all jets
-    TH1F*         fh1PtTracksIn[kJetTypes];  //! track pt for all tracks
+    TH1F*         fh1PtJetsIn[kJetTypes];       //! Jet pt for all jets
+    TH1F*         fh1PtTracksIn[kJetTypes];     //! track pt for all tracks
     TH1F*         fh1PtTracksInLow[kJetTypes];  //! track pt for all tracks
     TH1F*         fh1PtTracksLeadingIn[kJetTypes];  //! track pt for all tracks
     
     TH2F*         fh2NJetsPt[kJetTypes];    //! Number of found jets above threshold
     TH2F*         fh2NTracksPt[kJetTypes];  //! Number of tracks above threshold
+    TH2F*         fh2TrackEtaPt[kJetTypes];       //! eta of tracks    
+
     TH2F*         fh2LeadingTrackPtTrackPhi[kJetTypes]; //! phi distribution of accepted leading tracks
     TH2F*         fh2RhoPt[kJetTypes][kMaxJets+1];     //! jet shape variable rho
     TH2F*         fh2PsiPt[kJetTypes][kMaxJets+1];     //! jet shape variable psi
index 252415ffa34cea3ca4d8ae1514057ecb300b96ab..968884723a8a602d5a1c48ab6bf3acb4d73ea598 100644 (file)
@@ -244,10 +244,7 @@ AliAnalysisTaskFragmentationFunction *AddTaskFragmentationFunction(
    task->UseRecEffRecJetPtBins(); // efficiency in bins of rec/gen jet pt - default: kTRUE  
 
    task->SetBckgMode(1);        // default: bgMode = 1 
-   task->SetBckgType(AliAnalysisTaskFragmentationFunction::kBckgPerp,
-                    AliAnalysisTaskFragmentationFunction::kBckgOutLJStat,
-                    AliAnalysisTaskFragmentationFunction::kBckgClustersOutLeading,
-                    AliAnalysisTaskFragmentationFunction::kBckgClusters);  
+   task->SetBckgType();
    task->SetBranchRecBackClusters("clustersAOD_KT04_B0_Filter00256_Cut00150_Skip00");
 
 
index 7c19cc1a16b1e826fc6ffe77cb4b72a72ddf32e8..c3a452f99f3e0ea6e6ce5573e1f4ac9a4553c002 100644 (file)
@@ -94,6 +94,12 @@ AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec,const char* bG
    pwg4spec->SetMinJetPt(5.);\r
    pwg4spec->SetJetEtaWindow(0.4);\r
 \r
+   Float_t fDQxy[2] = {-0.398,-0.379};\r
+   pwg4spec->SetDeltaQxy(fDQxy);\r
+\r
+   \r
+\r
+\r
    if(type == "AOD"){\r
      // Assume all jet are produced already\r
      pwg4spec->SetAODJetInput(kTRUE);\r
index 9f2291664d08bcde2cc70f4da1ed7535d8a7276b..5c8a95459cd7507b1b7cf3b3e54ed7fd408871de 100644 (file)
@@ -816,7 +816,8 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
           taskjetSpectrum->SetBranchBkgGen(bkgClusters.Data());
           taskjetSpectrum->SetFlagJetType(AliAnalysisTaskJetSpectrum2::kJetRecFull,0);
           taskjetSpectrum->SetFlagJetType(AliAnalysisTaskJetSpectrum2::kJetGenFull,0);
-          taskjetSpectrum->SetDebugLevel(3);
+          taskjetSpectrum->SetTrackEtaWindow(fTrackEtaWindow);
+          taskjetSpectrum->SetJetEtaWindow(fJetEtaWindow);
 
           taskjetSpectrum = AddTaskJetSpectrum2("clustersAOD_KT04_B0_Filter00256_Cut01000_Skip00RandomConeSkip00",
                                                 "clustersAOD_KT04_B0_Filter00256_Cut01000_Skip00RandomCone_random",
@@ -825,7 +826,8 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
           taskjetSpectrum->SetBranchBkgGen(bkgClusters.Data());
           taskjetSpectrum->SetFlagJetType(AliAnalysisTaskJetSpectrum2::kJetRecFull,0);
           taskjetSpectrum->SetFlagJetType(AliAnalysisTaskJetSpectrum2::kJetGenFull,0);
-
+          taskjetSpectrum->SetTrackEtaWindow(fTrackEtaWindow);
+          taskjetSpectrum->SetJetEtaWindow(fJetEtaWindow);
 
 
           // check the old subtracted vs. the new subtracted
@@ -856,9 +858,7 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
           if(iAODanalysis)SetAODInput(taskjetSpectrum);
           */
 
-          taskjetSpectrum = AddTaskJetSpectrum2(Form("jetsAOD_UA104_B2_Filter%05d_Cut01000",kHighPtFilterMask),kDefaultJetBranch.Data(),kDeltaAODJetName.Data(),kHighPtFilterMask,AliVEvent::kMB,0,i);
-          //      taskjetSpectrum->SetDebugLevel(3);
-          //      taskjetSpectrum->SetMinJetPt(10);
+          taskjetSpectrum = AddTaskJetSpectrum2(Form("jetsAOD_UA104_B2_Filter%05d_Cut01000",kHighPtFilterMask),kDefaultJetBranch.Data(),kDeltaAODJetName.Data(),kHighPtFilterMask,AliVEvent::kMB,0,i);    
           taskjetSpectrum->SetTrackEtaWindow(fTrackEtaWindow);
           taskjetSpectrum->SetJetEtaWindow(fJetEtaWindow);
           taskjetSpectrum->SetBranchBkgRec(bkgClusters.Data());
@@ -927,7 +927,7 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
        if (!taskjetSpectrum) ::Warning("AnalysisTrainPWG4Jets", "AliAnalysisTaskJetSpectrum2 cannot run for this train conditions - EXCLUDED");
      }
    }
-
+   AliAnalysisManager::SetCommonFileName("PWG4_Fragmentation.root");
    if(iPWG4Fragmentation){
      gROOT->LoadMacro("$ALICE_ROOT/PWG4/macros/AddTaskFragmentationFunction.C");
        AliAnalysisTaskFragmentationFunction *taskFrag = 0;
@@ -943,16 +943,23 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
      
          // UA1
          taskFrag = AddTaskFragmentationFunction(1<<0,kHighPtFilterMask, 1); 
+        taskFrag = AddTaskFragmentationFunction(1<<0,kHighPtFilterMask, 2); 
+        taskFrag = AddTaskFragmentationFunction(1<<0,kHighPtFilterMask, 3); 
+        taskFrag = AddTaskFragmentationFunction(1<<0,kHighPtFilterMask, 4); 
 
          // SISCONE 
+        /*
          taskFrag = AddTaskFragmentationFunction(1<<28,kHighPtFilterMask, 1);
          taskFrag = AddTaskFragmentationFunction(1<<29,kHighPtFilterMask, 1);
          taskFrag = AddTaskFragmentationFunction(1<<30,kHighPtFilterMask, 1);
+        */
 
          // Anti-kT B2 - B3
          taskFrag = AddTaskFragmentationFunction(1<<26,kHighPtFilterMask, 1);
          taskFrag = AddTaskFragmentationFunction(1<<27,kHighPtFilterMask, 1);
 
+        
+
        }
        if (!taskFrag) ::Warning("AnalysisTrainPWG4Jets", "AliAnalysisTaskFragmentationFunction cannot run for this train conditions - EXCLUDED");
    }
@@ -1044,7 +1051,7 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
      if(!taskMini)::Warning("AnalysisTrainPWG4Jets", "AliAnalysisTaskMinjet cannot run for this train conditions - EXCLUDED");
    }
 
-
+   AliAnalysisManager::SetCommonFileName("PWG4_HighPtQA.root");
    if(iPWG4PtQAMC){
      gROOT->LoadMacro("$ALICE_ROOT/PWG4/macros/AddTaskPWG4HighPtQAMC.C");
      AliPWG4HighPtQAMC *taskQAMC = 0;