1) adding also the change in the AddTask macro for the efficiency correction file
authormiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 3 May 2013 13:26:31 +0000 (13:26 +0000)
committermiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 3 May 2013 13:26:31 +0000 (13:26 +0000)
PWGCF/EBYE/macros/AddTaskBalancePsiCentralityTrain.C

index eacc81c..737a0ea 100644 (file)
@@ -40,7 +40,8 @@ AliAnalysisTaskBFPsi *AddTaskBalancePsiCentralityTrain(Double_t centrMin=0.,
                                                       TString fileNameBase="AnalysisResults",\r
                                                       TString fArgEventClass="Centrality",\r
                                                       TString analysisTypeUser="AOD",\r
-                                                      Bool_t bVertexBinning=kTRUE) {\r
+                                                      Bool_t bVertexBinning=kTRUE,\r
+                                                      TString correctionFileName = "$ALICE_ROOT/PWGCF/EBYE/BalanceFunctions/Corrections/CorrectionMaps.root") {\r
   // Creates a balance function analysis task and adds it to the analysis manager.\r
   // Get the pointer to the existing analysis manager via the static access method.\r
   TString outputFileName(fileNameBase);\r
@@ -111,15 +112,9 @@ AliAnalysisTaskBFPsi *AddTaskBalancePsiCentralityTrain(Double_t centrMin=0.,
   taskBF->SetEventClass(fArgEventClass);\r
  \r
   //++++++++++++++++++++++\r
-  TString correctionFileName = "$ALICE_ROOT/PWGCF/EBYE/BalanceFunctions/Corrections/CorrectionMaps.root"; //to put the path for the correction maps\r
-  TFile *fCorrectionMatrix  = TFile::Open(correctionFileName.Data());\r
-  if(!fCorrectionMatrix){\r
-    Printf("WARNING CORRECTION histogram file not found");\r
-    return NULL;\r
-  }\r
-  \r
+  // Efficiency + Contamination corrections\r
+  // If correctionFileName = "", do not use corrections\r
   taskBF->SetInputCorrection(correctionFileName.Data(),"");\r
-\r
   //+++++++++++++++++++++\r
 \r
   taskBF->SetAnalysisObject(bf);\r