fixed running with PtQAMC
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 23 Sep 2010 14:46:00 +0000 (14:46 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 23 Sep 2010 14:46:00 +0000 (14:46 +0000)
PWG4/macros/AnalysisTrainPWG4Jets.C

index 7044d52..fb75057 100644 (file)
@@ -596,8 +596,11 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
    }
    if(iPWG4PtQAMC){
      gROOT->LoadMacro("$ALICE_ROOT/PWG4/macros/AddTaskPWG4HighPtQAMC.C");
-     AliPWG4HighPtQAMC *taskQAMC = AddTaskPWG4HighPtQAMC(kGridDataSet.Data(),0);
-     if(kUseMC)taskQAMC = AddTaskPWG4HighPtQAMC(kGridDataSet.Data());
+     AliPWG4HighPtQAMC *taskQAMC = 0;
+     if(kUseMC){
+       if(iPWG4PtQAMC&1)taskQAMC = AddTaskPWG4HighPtQAMC(kGridDataSet.Data(),0);
+       if(iPWG4PtQAMC&1)taskQAMC = AddTaskPWG4HighPtQAMC(kGridDataSet.Data(),1);
+     }
      if (!taskQAMC) ::Warning("AnalysisTrainPWG4Jets", "AliAnalysisTaskQAMC cannot run for this train conditions - EXCLUDED");
    }