added option for variable binning depending on the dataset for high pt QA and spectra...
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 Sep 2010 13:01:07 +0000 (13:01 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 Sep 2010 13:01:07 +0000 (13:01 +0000)
PWG4/JetTasks/AliPWG4HighPtQAMC.cxx
PWG4/JetTasks/AliPWG4HighPtQAMC.h
PWG4/JetTasks/AliPWG4HighPtQATPConly.cxx
PWG4/JetTasks/AliPWG4HighPtQATPConly.h
PWG4/JetTasks/AliPWG4HighPtSpectra.cxx
PWG4/macros/AddTaskPWG4HighPtQAMC.C
PWG4/macros/AddTaskPWG4HighPtQATPConly.C
PWG4/macros/AddTaskPWG4HighPtSpectra.C
PWG4/macros/AnalysisTrainPWG4Jets.C

index 314cccd..4bbb7a1 100644 (file)
@@ -48,8 +48,10 @@ ClassImp(AliPWG4HighPtQAMC)
 
 AliPWG4HighPtQAMC::AliPWG4HighPtQAMC(): AliAnalysisTask("AliPWG4HighPtQAMC", ""), 
   fESD(0), 
+  fMC(0),
   fTrackCuts(0), 
   fTrackCutsITS(0),
+  fPtMax(100.),
   fNEventAll(0),
   fNEventSel(0),
   fPtAll(0),  
@@ -85,8 +87,10 @@ AliPWG4HighPtQAMC::AliPWG4HighPtQAMC(): AliAnalysisTask("AliPWG4HighPtQAMC", "")
 AliPWG4HighPtQAMC::AliPWG4HighPtQAMC(const char *name): 
   AliAnalysisTask(name, ""), 
   fESD(0),
+  fMC(0),
   fTrackCuts(),
   fTrackCutsITS(),
+  fPtMax(100.),
   fNEventAll(0),
   fNEventSel(0),
   fPtAll(0),
@@ -133,21 +137,30 @@ AliPWG4HighPtQAMC::AliPWG4HighPtQAMC(const char *name):
 //________________________________________________________________________
 void AliPWG4HighPtQAMC::ConnectInputData(Option_t *) 
 {
-  // Connect ESD here
+  // Connect ESD and MC event handler here
   // Called once
   AliDebug(2,Form(">> AliPWG4HighPtSpectra::ConnectInputData \n"));
   TTree* tree = dynamic_cast<TTree*> (GetInputData(0));
   if (!tree) {
-    AliDebug(2,Form("ERROR: Could not read chain from input slot 0"));
-  } else {
-    
-    AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
-    
-    if (!esdH) {
-      AliDebug(2,Form("ERROR: Could not get ESDInputHandler"));
-    } else
-      fESD = esdH->GetEvent();
+    AliDebug(2,Form( "ERROR: Could not read chain from input slot 0 \n"));
+    return;
   }
+
+  AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
+
+  if (!esdH) {
+    AliDebug(2,Form("ERROR: Could not get ESDInputHandler"));
+    return;
+  } else
+    fESD = esdH->GetEvent();
+  
+ AliMCEventHandler *eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
+ if (!eventHandler) {
+   AliDebug(2,Form( "ERROR: Could not retrieve MC event handler \n"));
+ }
+  else
+    fMC = eventHandler->MCEvent();
+
 }
 
 //________________________________________________________________________
@@ -169,7 +182,7 @@ void AliPWG4HighPtQAMC::CreateOutputObjects() {
   
   Int_t fgkNPtBins=98;
   Float_t fgkPtMin=2.;
-  Float_t fgkPtMax=100.;
+  Float_t fgkPtMax=fPtMax;
   Int_t fgkResPtBins=80;
 
   fNEventAll = new TH1F("fNEventAll","NEventAll",1,-0.5,0.5);
@@ -306,12 +319,11 @@ void AliPWG4HighPtQAMC::Exec(Option_t *) {
   // Main loop
   // Called for each event
   AliDebug(2,Form(">> AliPWG4HighPtQATPConly::Exec \n"));  
-  
   // All events without selection
   fNEventAll->Fill(0.);
 
   if (!fESD) {
-    AliDebug(2,Form("ERROR: fESD not available"));
+    AliDebug(2,Form("ERROR: fESD not available\n"));
     PostData(0, fHistList);
     PostData(1, fHistListITS);
     return;
@@ -326,35 +338,19 @@ void AliPWG4HighPtQAMC::Exec(Option_t *) {
     return;
   }
   
- AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
-  if (!eventHandler) {
-    AliDebug(2,Form("ERROR: Could not retrieve MC event handler"));
-    PostData(0, fHistList);
-    PostData(1, fHistListITS);
-    return;
-  }
-
-  AliMCEvent* mcEvent = eventHandler->MCEvent();
-  if (!mcEvent) {
-    AliDebug(2,Form("ERROR: Could not retrieve MC event"));
-    PostData(0, fHistList);
-    PostData(1, fHistListITS);
-    return;
-  }
-
-  AliDebug(2,Form("MC particles: %d", mcEvent->GetNumberOfTracks()));
-
-  if (!fESD) {
-    AliDebug(2,Form("ERROR: fESD not available"));
+  AliStack* stack = 0x0;
+  
+  if(fMC) {
+    AliDebug(2,Form("MC particles: %d", fMC->GetNumberOfTracks()));
+    stack = fMC->Stack();                //Particles Stack
+    AliDebug(2,Form("MC particles stack: %d", stack->GetNtrack()));
+  } else {
+    AliDebug(2,Form("ERROR: Could not retrieve MC eventHandler"));
     PostData(0, fHistList);
     PostData(1, fHistListITS);
     return;
   }
 
-  AliStack* stack = mcEvent->Stack();                //Particles Stack
-
-  AliDebug(2,Form("MC particles stack: %d", stack->GetNtrack()));
-
   const AliESDVertex *vtx = fESD->GetPrimaryVertex();
   // Need vertex cut
   TString vtxName(vtx->GetName());
@@ -372,7 +368,6 @@ void AliPWG4HighPtQAMC::Exec(Option_t *) {
 
   double primVtx[3];
   vtx->GetXYZ(primVtx);
-  //  printf("primVtx: %g  %g  %g \n",primVtx[0],primVtx[1],primVtx[2]);
   if(TMath::Sqrt(primVtx[0]*primVtx[0] + primVtx[1]*primVtx[1])>1. || TMath::Abs(primVtx[2]>10.)){
     // Post output data
     PostData(0, fHistList);
@@ -392,7 +387,7 @@ void AliPWG4HighPtQAMC::Exec(Option_t *) {
   }
 
   Int_t nTracks = fESD->GetNumberOfTracks();
-  AliDebug(2,Form("nTracks %d", nTracks));
+  AliDebug(2,Form("nTracks ESD%d", nTracks));
 
   int nMCtracks = stack->GetNtrack();
 
index 0a5519d..8f49fd4 100644 (file)
@@ -29,6 +29,7 @@ class TH3F;
 class TList;
 class AliESDEvent;
 class AliESDtrackCuts;
+class AliMCEvent;
 
 class AliPWG4HighPtQAMC: public AliAnalysisTask {
 
@@ -45,18 +46,24 @@ class AliPWG4HighPtQAMC: public AliAnalysisTask {
   void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
   void SetCutsITS(AliESDtrackCuts* trackCutsITS) {fTrackCutsITS = trackCutsITS;}
 
+  void SetPtMax(Float_t ptmax) {fPtMax = ptmax;}
+  Float_t GetPtMax()           {return fPtMax;}
+
  protected:
 
  private:
 
-  void InitHistPointers();
   AliPWG4HighPtQAMC(const AliPWG4HighPtQAMC&);
   AliPWG4HighPtQAMC& operator=(const AliPWG4HighPtQAMC&);
 
   AliESDEvent *fESD;              //! ESD object
+  AliMCEvent  *fMC;               //! MC event object
   AliESDtrackCuts *fTrackCuts;    // TrackCuts for global reconstructed vs MC comparison
   AliESDtrackCuts *fTrackCutsITS; // TrackCuts including ITSrefit
 
+  Float_t fPtMax;                 // Maximum pT for histograms
+
   
   TH1F *fNEventAll;                            //! Event counter
   TH1F *fNEventSel;                            //! Event counter
index d5d4a17..07e880c 100644 (file)
@@ -65,6 +65,7 @@ AliPWG4HighPtQATPConly::AliPWG4HighPtQATPConly(): AliAnalysisTask("AliPWG4HighPt
   fCutType(1),
   fTrackCuts(0), 
   fTrackCutsITS(0),
+  fPtMax(100.),
   fNEventAll(0),
   fNEventSel(0),
   fPtAll(0),
@@ -155,6 +156,7 @@ AliPWG4HighPtQATPConly::AliPWG4HighPtQATPConly(const char *name):
   fCutType(1),  
   fTrackCuts(),
   fTrackCutsITS(),
+  fPtMax(100.),
   fNEventAll(0),
   fNEventSel(0),
   fPtAll(0),
@@ -280,9 +282,7 @@ void AliPWG4HighPtQATPConly::ConnectInputData(Option_t *)
     fESD = esdH->GetEvent();
   
  AliMCEventHandler *eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
- // AliMCEventHandler* mcH = dynamic_cast<AliMCEventHandler*>
- //                        (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
-  if (!eventHandler) {
+ if (!eventHandler) {
     AliDebug(2,Form( "ERROR: Could not retrieve MC event handler \n"));
   }
   else
@@ -314,17 +314,31 @@ void AliPWG4HighPtQATPConly::CreateOutputObjects() {
   for(Int_t i=0; i<=fgkNPhiBins; i++) binsPhi[i]=(Double_t)kMinPhi + (kMaxPhi-kMinPhi)/fgkNPhiBins*(Double_t)i ;
   
   Float_t fgkPtMin=0.;
-  Float_t fgkPtMax=100.;
+  Float_t fgkPtMax=fPtMax;
+
+  Float_t ptBinEdges[2][2];
+  ptBinEdges[0][0] = 10.;
+  ptBinEdges[0][1] = 1.;
+  ptBinEdges[1][0] = 20.;
+  ptBinEdges[1][1] = 2.;
+  Float_t binWidth3 = 5.;
+  if(fPtMax>100.) {
+    ptBinEdges[0][0] = 100.;
+    ptBinEdges[0][1] = 5.;
+    ptBinEdges[1][0] = 300.;
+    ptBinEdges[1][1] = 10.;
+    binWidth3 = 20.;
+  }
 
   const Float_t ptmin1 =  fgkPtMin;
-  const Float_t ptmax1 =  10.0 ;
+  const Float_t ptmax1 =  ptBinEdges[0][0];
   const Float_t ptmin2 =  ptmax1 ;
-  const Float_t ptmax2 =  20.0 ;
+  const Float_t ptmax2 =  ptBinEdges[1][0];
   const Float_t ptmin3 =  ptmax2 ;
   const Float_t ptmax3 =  fgkPtMax;
-  const Int_t nbin11 = (int)(ptmax1-ptmin1);
-  const Int_t nbin12 = (int)((ptmax2-ptmin2)/2.)+nbin11;
-  const Int_t nbin13 = (int)((ptmax3-ptmin3)/5.)+nbin12;
+  const Int_t nbin11 = (int)((ptmax1-ptmin1)/ptBinEdges[0][1]);
+  const Int_t nbin12 = (int)((ptmax2-ptmin2)/ptBinEdges[1][1])+nbin11;
+  const Int_t nbin13 = (int)((ptmax3-ptmin3)/binWidth3)+nbin12;
   Int_t fgkNPtBins=nbin13;
   //Create array with low edges of each bin
   Double_t *binsPt=new Double_t[fgkNPtBins+1];
@@ -398,9 +412,9 @@ void AliPWG4HighPtQATPConly::CreateOutputObjects() {
   fHistList->Add(fNEventAll);
   fNEventSel = new TH1F("fNEventSel","NEvent Selected for analysis",1,-0.5,0.5);
   fHistList->Add(fNEventSel);
-  fPtAll = new TH1F("fPtAll","PtAll",fgkNPtBins, binsPt);//fgkPtMin, fgkPtMax);
+  fPtAll = new TH1F("fPtAll","PtAll",fgkNPtBins, binsPt);
   fHistList->Add(fPtAll);
-  fPtSel = new TH1F("fPtSel","PtSel",fgkNPtBins, binsPt);//fgkPtMin, fgkPtMax);
+  fPtSel = new TH1F("fPtSel","PtSel",fgkNPtBins, binsPt);
   fHistList->Add(fPtSel);
  
   fPtAllminPtTPCvsPtAll = new TH2F("fPtAllminPtTPCvsPtAll","PtAllminPtTPCvsPtAll",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt);
@@ -840,25 +854,22 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
   }
 
   AliStack* stack = 0x0;
-  AliMCEvent* mcEvent = 0x0;
   
   if(fMC) {
-    mcEvent = fMC;
-    if (!mcEvent) {
+    AliDebug(2,Form("MC particles: %d", fMC->GetNumberOfTracks()));
+    
+    stack = fMC->Stack();                //Particles Stack
+    
+    AliDebug(2,Form("MC particles stack: %d", stack->GetNtrack()));
+  }
+  else {
       AliDebug(2,Form("ERROR: Could not retrieve MC event"));
       PostData(0, fHistList);
       PostData(1, fHistListTPC);
       PostData(2, fHistListITS);
       return;
     }
-    
-    AliDebug(2,Form("MC particles: %d", mcEvent->GetNumberOfTracks()));
-    
-    stack = mcEvent->Stack();                //Particles Stack
-    
-    AliDebug(2,Form("MC particles stack: %d", stack->GetNtrack()));
-  }
-  
+      
 
   const AliESDVertex *vtx = fESD->GetPrimaryVertexTracks();
   // Need vertex cut
index e9c8012..1a72d27 100644 (file)
@@ -51,8 +51,10 @@ class AliPWG4HighPtQATPConly: public AliAnalysisTask {
   void SetCutType(Int_t ctype) {fCutType = ctype;}
   void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
   void SetCutsITS(AliESDtrackCuts* trackCutsITS) {fTrackCutsITS = trackCutsITS;}
+  void SetPtMax(Float_t ptmax) {fPtMax = ptmax;}
 
   Int_t GetCutType() {return fCutType;}
+  Float_t GetPtMax()           {return fPtMax;}
 
  protected:
 
@@ -68,6 +70,8 @@ class AliPWG4HighPtQATPConly: public AliAnalysisTask {
   Int_t fCutType;                 // Cut Type set in AddTask*
   AliESDtrackCuts *fTrackCuts;    // TrackCuts for global vs TPConly comparison
   AliESDtrackCuts *fTrackCutsITS; // TrackCuts including ITSrefit
+
+  Float_t fPtMax;                 // Maximum pT for histograms
   
   TH1F *fNEventAll;                             //! Event counter
   TH1F *fNEventSel;                             //! Event counter: Selected events for analysis
index a78c20d..3a33d96 100644 (file)
@@ -169,7 +169,6 @@ void AliPWG4HighPtSpectra::Exec(Option_t *)
   // This handler can return the current MC event
   
   AliMCEventHandler *eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
-  //  AliMCEventHandler* eventHandler = (AliMCEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
   
   AliStack* stack = 0x0;
   AliMCEvent* mcEvent = 0x0;
@@ -181,7 +180,7 @@ void AliPWG4HighPtSpectra::Exec(Option_t *)
       PostData(0,fHistList);
       PostData(1,fCFManagerPos->GetParticleContainer());
       PostData(2,fCFManagerNeg->GetParticleContainer());
-    return;
+      return;
     }
     
     AliDebug(2,Form("MC particles: %d", mcEvent->GetNumberOfTracks()));
@@ -334,7 +333,6 @@ void AliPWG4HighPtSpectra::Exec(Option_t *)
       {
        AliMCParticle *mcPart  = (AliMCParticle*)mcEvent->GetTrack(iPart);
        if(!mcPart) continue;
-       
        //fill the container
        containerInputMC[0] = mcPart->Pt();
        containerInputMC[1] = mcPart->Phi();      
index 50b92a1..7aabf90 100644 (file)
@@ -1,6 +1,6 @@
 //DEFINITION OF A FEW CONSTANTS
 
-AliPWG4HighPtQAMC* AddTaskPWG4HighPtQAMC()
+AliPWG4HighPtQAMC* AddTaskPWG4HighPtQAMC(char *prodType = "LHC10e14")
 {
   // Creates HighPtQAMC analysis task and adds it to the analysis manager.
   
@@ -45,7 +45,8 @@ AliPWG4HighPtQAMC* AddTaskPWG4HighPtQAMC()
   AliPWG4HighPtQAMC *taskPWG4QAMC = new AliPWG4HighPtQAMC("AliPWG4HighPtQAMC");
   taskPWG4QAMC->SetCuts(trackCuts);
   taskPWG4QAMC->SetCutsITS(trackCutsITS);
-  
+  if(!strcmp(prodType, "LHC10e14")  || !strcmp(prodType, "PbPb")) taskPWG4QAMC->SetPtMax(500.);
+  else taskPWG4QAMC->SetPtMax(100.);
  
   // E. Create ONLY the output containers for the data produced by the task.
   // Get and connect other common input/output containers via the manager as below
index d334dfc..0dd8f16 100644 (file)
@@ -1,6 +1,6 @@
 //DEFINITION OF A FEW CONSTANTS
 
-AliPWG4HighPtQATPConly* AddTaskPWG4HighPtQATPConly(int cuts=1)//1: Standard Cuts 2009 2: GetStandardITSTPCTrackCuts2009
+AliPWG4HighPtQATPConly* AddTaskPWG4HighPtQATPConly(char *prodType = "LHC10e14",int cuts=2)//1: Standard Cuts 2009 2: GetStandardITSTPCTrackCuts2009
 {
   // Creates HighPtQATPConly analysis task and adds it to the analysis manager.
   
@@ -74,7 +74,9 @@ AliPWG4HighPtQATPConly* AddTaskPWG4HighPtQATPConly(int cuts=1)//1: Standard Cuts
   taskPWG4QA->SetCuts(trackCuts);
   taskPWG4QA->SetCutsITS(trackCutsITS);
   taskPWG4QA->SetCutType(cuts);
+  if(!strcmp(prodType, "LHC10e14") || !strcmp(prodType, "PbPb")) taskPWG4QA->SetPtMax(500.);
+  else taskPWG4QA->SetPtMax(100.);
+
   // E. Create ONLY the output containers for the data produced by the task.
   // Get and connect other common input/output containers via the manager as below
   //==============================================================================
index 707d098..e2570fe 100644 (file)
@@ -1,6 +1,4 @@
 //DEFINITION OF A FEW CONSTANTS
-const Float_t ptmin =  2.0 ;
-const Float_t ptmax =  50.0 ;
 const Float_t phimin = 0.;
 const Float_t phimax = 2.*TMath::Pi();
 const Float_t etamin = -0.9;
@@ -10,18 +8,11 @@ const Float_t dcarmax = 0.2;
 const Float_t chi2TPCmin = 0.0;
 const Float_t chi2TPCmax = 4.;
 
-const Float_t ptmin1 =  ptmin ;
-const Float_t ptmax1 =  10.0 ;
-const Float_t ptmin2 =  ptmax1 ;
-const Float_t ptmax2 =  20.0 ;
-const Float_t ptmin3 =  ptmax2 ;
-const Float_t ptmax3 =  ptmax ;
-
 const Int_t   mintrackrefsTPC = 1;
 const Int_t   mintrackrefsITS = 1;
 const Int_t   charge  = 1;
 
-AliPWG4HighPtSpectra* AddTaskPWG4HighPtSpectra()
+AliPWG4HighPtSpectra* AddTaskPWG4HighPtSpectra(char *prodType = "LHC10e14")
 {
   // Creates HighPtSpectra analysis task and adds it to the analysis manager.
   
@@ -61,11 +52,36 @@ AliPWG4HighPtSpectra* AddTaskPWG4HighPtSpectra()
   Int_t kStepSecondaries = 2;
   Int_t kStepReconstructedMC = 3;
   Int_t kStepMCAcceptance = 4;
-  
+
+  //redefine pt ranges in case of Jet-Jet production
+  Float_t ptBinEdges[2][2];
+  Float_t ptmin =  2.0 ;
+  Float_t ptmax =  50.0 ;
+  Float_t binWidth3 = 5.;
+  if(!strcmp(prodType, "LHC10e14") || !strcmp(prodType, "PbPb")) { 
+    ptmin =  0.0 ;
+    ptmax =  500.0 ;
+
+    ptBinEdges[0][0] = 100.;
+    ptBinEdges[0][1] = 5.;
+    ptBinEdges[1][0] = 300.;
+    ptBinEdges[1][1] = 10.;
+    binWidth3 = 20.;
+  } else { 
+    ptmin =  2.0 ;
+    ptmax =  50.0 ;
+    
+    ptBinEdges[0][0] = 10.;
+    ptBinEdges[0][1] = 1.;
+    ptBinEdges[1][0] = 20.;
+    ptBinEdges[1][1] = 2.;
+    binWidth3 = 5.;
+  }
+    
   const Int_t nvar   = 5; //number of variables on the grid: pt:phi:eta:DCAR:Chi2/NClusTPC
-  const Int_t nbin11 = (int)(ptmax1-ptmin1);
-  const Int_t nbin12 = (int)((ptmax2-ptmin2)/2.)+nbin11;
-  const Int_t nbin13 = (int)((ptmax3-ptmin3)/5.)+nbin12;
+  const Int_t nbin11 = (int)((ptBinEdges[0][0]-ptmin)/ptBinEdges[0][1]);
+  const Int_t nbin12 = (int)((ptBinEdges[1][0]-ptBinEdges[0][0])/ptBinEdges[1][1])+nbin11;
+  const Int_t nbin13 = (int)((ptmax-ptBinEdges[1][0])/binWidth3)+nbin12;
   const Int_t nbin1  = nbin13; //bins in pt 
   const Int_t nbin2  =  18;//36; //bins in phi
   const Int_t nbin3  =  8; //bins in eta
@@ -89,11 +105,10 @@ AliPWG4HighPtSpectra* AddTaskPWG4HighPtSpectra()
 
   //values for bin lower bounds 
   for(Int_t i=0; i<=nbin1; i++) {
-    if(i<=nbin11) binLim1[i]=(Double_t)ptmin1 + (ptmax1-ptmin1)/nbin11*(Double_t)i ;  
-    if(i<=nbin12 && i>nbin11) binLim1[i]=(Double_t)ptmin2 + (ptmax2-ptmin2)/(nbin12-nbin11)*((Double_t)i-(Double_t)nbin11) ;  
-    if(i<=nbin13 && i>nbin12) binLim1[i]=(Double_t)ptmin3 + (ptmax3-ptmin3)/(nbin13-nbin12)*((Double_t)i-(Double_t)nbin12) ;  
+    if(i<=nbin11) binLim1[i]=(Double_t)ptmin + (ptBinEdges[0][0]-ptmin)/nbin11*(Double_t)i ;  
+    if(i<=nbin12 && i>nbin11) binLim1[i]=(Double_t)ptBinEdges[0][0] + (ptBinEdges[1][0]-ptBinEdges[0][0])/(nbin12-nbin11)*((Double_t)i-(Double_t)nbin11) ;  
+    if(i<=nbin13 && i>nbin12) binLim1[i]=(Double_t)ptBinEdges[1][0] + (ptmax-ptBinEdges[1][0])/(nbin13-nbin12)*((Double_t)i-(Double_t)nbin12) ;  
   }
-  //  for(Int_t i=0; i<=nbin1; i++) binLim1[i]=(Double_t)ptmin + (ptmax-ptmin)/nbin1*(Double_t)i ;  
   for(Int_t i=0; i<=nbin2; i++) binLim2[i]=(Double_t)phimin + (phimax-phimin)/nbin2*(Double_t)i ;
   for(Int_t i=0; i<=nbin3; i++) binLim3[i]=(Double_t)etamin + (etamax-etamin)/nbin3*(Double_t)i ;  
   for(Int_t i=0; i<=nbin4; i++) binLim4[i]=(Double_t)dcarmin + (dcarmax-dcarmin)/nbin4*(Double_t)i ;
index 4aa2451..e839786 100644 (file)
@@ -588,15 +588,15 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
    }
    if(iPWG4PtQAMC){
      gROOT->LoadMacro("$ALICE_ROOT/PWG4/macros/AddTaskPWG4HighPtQAMC.C");
-     AliPWG4HighPtQAMC *taskQAMC = AddTaskPWG4HighPtQAMC();
+     AliPWG4HighPtQAMC *taskQAMC = AddTaskPWG4HighPtQAMC(kGridDataSet.Data());
      if (!taskQAMC) ::Warning("AnalysisTrainPWG4Jets", "AliAnalysisTaskQAMC cannot run for this train conditions - EXCLUDED");
    }
 
    if(iPWG4PtQATPC){
      gROOT->LoadMacro("$ALICE_ROOT/PWG4/macros/AddTaskPWG4HighPtQATPConly.C");
      AliPWG4HighPtQATPConly *taskQATPC = 0;
-     if(iPWG4PtQATPC&1)taskQATPC = AddTaskPWG4HighPtQATPConly(1);
-     if(iPWG4PtQATPC&2)taskQATPC = AddTaskPWG4HighPtQATPConly(2);
+     if(iPWG4PtQATPC&1)taskQATPC = AddTaskPWG4HighPtQATPConly(kGridDataSet.Data(),1);
+     if(iPWG4PtQATPC&2)taskQATPC = AddTaskPWG4HighPtQATPConly(kGridDataSet.Data(),2);
 
  if (!taskQATPC) ::Warning("AnalysisTrainPWG4Jets", "AliAnalysisTaskQATPC cannot run for this train conditions - EXCLUDED");
    }
@@ -613,7 +613,7 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
 
    if(iPWG4PtSpectra){
      gROOT->LoadMacro("$ALICE_ROOT/PWG4/macros/AddTaskPWG4HighPtSpectra.C");
-     AliPWG4HighPtSpectra *taskPtSpectra = AddTaskPWG4HighPtSpectra();
+     AliPWG4HighPtSpectra *taskPtSpectra = AddTaskPWG4HighPtSpectra(kGridDataSet.Data());
      if (!taskPtSpectra) ::Warning("AnalysisTrainPWG4Jets", "AliAnalysisTaskPtSpectra cannot run for this train conditions - EXCLUDED");
    }
    if(iPWG4KMeans){