]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/SPECTRA/macros/AddTaskProtons.C
Adopting for real data + improvments in the macro to visualize the QA and the results
[u/mrichter/AliRoot.git] / PWG2 / SPECTRA / macros / AddTaskProtons.C
index d1b8ca6e8d9e7ee91ba1a97370c8ae23cf2803b3..547e70ddce1962694e822c94926eae1004c45ffd 100644 (file)
@@ -1,4 +1,5 @@
-AliAnalysisTaskProtons *AddTaskProtons(const char *analysisType="Hybrid",
+AliAnalysisTaskProtons *AddTaskProtons(Bool_t kAnalyzeMC = kFALSE,
+                                      const char *analysisType="Hybrid",
                                       const char *pidMode="Bayesian")
 {
   // Creates a proton analysis task and adds it to the analysis manager.
@@ -20,9 +21,11 @@ AliAnalysisTaskProtons *AddTaskProtons(const char *analysisType="Hybrid",
   TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
   gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonAnalysis.C");
   AliProtonAnalysis *pa = 0;
-  if (type=="ESD") pa = GetProtonAnalysisObject("ESD", analysisType, pidMode);
-  else if (type=="AOD") pa = GetProtonAnalysisObject("AOD", analysisType, pidMode);
-  else pa = GetProtonAnalysisObject("MC", analysisType, pidMode);
+  if (type=="ESD") pa = GetProtonAnalysisObject("ESD", kAnalyzeMC, 
+                                               analysisType, pidMode);
+  else if (type=="AOD") pa = GetProtonAnalysisObject("AOD", kAnalyzeMC, 
+                                                    analysisType, pidMode);
+  else pa = GetProtonAnalysisObject("MC", analysisType, kAnalyzeMC, pidMode);
 
   // Create the task, add it to manager and configure it.
   //===========================================================================