Fix location dependent paths, enable toggle for CF, manual switch for MC
authorcbaumann <cbaumann@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 Jun 2012 09:54:48 +0000 (09:54 +0000)
committercbaumann <cbaumann@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 Jun 2012 09:54:48 +0000 (09:54 +0000)
PWGDQ/dielectron/macrosLMEE/AddTask_cbaumann_LMEEPbPb2011.C
PWGDQ/dielectron/macrosLMEE/AddTask_cbaumann_LMEEpp2010.C
PWGDQ/dielectron/macrosLMEE/ConfigLMEEPbPb2011.C
PWGDQ/dielectron/macrosLMEE/ConfigLMEEpp2010.C

index 578915f..65915be 100644 (file)
@@ -29,10 +29,10 @@ AliAnalysisTask *AddTask_cbaumann_LMEEPbPb2011(Bool_t runRejection=kFALSE, Bool_
 
 
 
-  if (!gROOT->GetListOfGlobalFunctions()->FindObject(configFile.Data()))
-    gROOT->LoadMacro(configFilePath.Data());
   if (!gROOT->GetListOfGlobalFunctions()->FindObject(configLMEECutLib.Data()))
     gROOT->LoadMacro(configLMEECutLibPath.Data());
+  if (!gROOT->GetListOfGlobalFunctions()->FindObject(configFile.Data()))
+    gROOT->LoadMacro(configFilePath.Data());
 
   LMEECutLib* cutlib = new LMEECutLib();
   AliAnalysisTaskMultiDielectron *task=new AliAnalysisTaskMultiDielectron("MultiDiEData");
@@ -77,8 +77,10 @@ AliAnalysisTask *AddTask_cbaumann_LMEEPbPb2011(Bool_t runRejection=kFALSE, Bool_
        TList::Class(),
        AliAnalysisManager::kOutputContainer,
        "cbaumann_LMEEPbPb2011_out.root");
+  
+  AliAnalysisDataContainer *cOutputHist2 = 0x0;
   if (enableCF) {
-    AliAnalysisDataContainer *cOutputHist2 =
+    cOutputHist2 = 
       mgr->CreateContainer("cbaumann_LMEEPbPb2011_CF",
          TList::Class(),
          AliAnalysisManager::kOutputContainer,
index 9549ce4..e2499e6 100644 (file)
@@ -7,7 +7,18 @@ AliAnalysisTask *AddTask_cbaumann_LMEEpp2010(Bool_t runTwo=kFALSE, Bool_t hasMC=
   }
 
   //set config file name
-  TString configFile("$ALICE_ROOT/PWGDQ/dielectron/macrosLMEE/ConfigLMEEpp2010.C");
+  //create config File names: TRAIN_ROOT is for running on GSI train, 
+  // ALICE_ROOT for CERN Lego trains
+  TString configBasePath("$TRAIN_ROOT/cbaumann_dielectron/");
+  TString trainRoot=gSystem->Getenv("TRAIN_ROOT");
+  if (trainRoot.IsNull()) configBasePath= "$ALICE_ROOT/PWGDQ/dielectron/macrosLMEE/";
+  TString configFile("ConfigLMEEpp2010.C");
+  TString configLMEECutLib("LMEECutLib.C");
+
+  TString configLMEECutLibPath(configBasePath+configLMEECutLib);
+  TString configFilePath(configBasePath+configFile);
+
+
 
   //AOD Usage not yet testes/avialable-------------------------------------
 
@@ -24,8 +35,11 @@ AliAnalysisTask *AddTask_cbaumann_LMEEpp2010(Bool_t runTwo=kFALSE, Bool_t hasMC=
 
   //  create task and add it to the manager
 
-  gROOT->LoadMacro("$ALICE_ROOT/PWGDQ/dielectron/macrosLMEE/LMEECutLib.C");
-  gROOT->LoadMacro(configFile.Data());
+  if (!gROOT->GetListOfGlobalFunctions()->FindObject(configLMEECutLib.Data()))
+       gROOT->LoadMacro(configLMEECutLibPath.Data());
+  if (!gROOT->GetListOfGlobalFunctions()->FindObject(configFile.Data()))
+       gROOT->LoadMacro(configFilePath.Data());
+  
   LMEECutLib* cutlib = new LMEECutLib();
   AliAnalysisTaskMultiDielectron *task=new AliAnalysisTaskMultiDielectron("MultiDiEData");
   if (!hasMC) task->UsePhysicsSelection();
@@ -60,8 +74,9 @@ AliAnalysisTask *AddTask_cbaumann_LMEEpp2010(Bool_t runTwo=kFALSE, Bool_t hasMC=
        TList::Class(),
        AliAnalysisManager::kOutputContainer,
        "cbaumann_LMEEpp2010_out.root");
+    AliAnalysisDataContainer *cOutputHist2 = 0x0;
   if (enableCF) {
-    AliAnalysisDataContainer *cOutputHist2 =
+    cOutputHist2 =
       mgr->CreateContainer("cbaumann_LMEEpp2010_CF",
          TList::Class(),
          AliAnalysisManager::kOutputContainer,
index 440b79f..ac52e69 100644 (file)
@@ -9,7 +9,7 @@ const Int_t nDie=arrNames->GetEntries();
 Bool_t MCenabled=kFALSE;
 
 
-AliDielectron* ConfigLMEEPbPb2011(Int_t cutDefinition, Bool_t hasMC=kFALSE, Bool_t CFenable=kFALSE)
+AliDielectron* ConfigLMEEPbPb2011(Int_t cutDefinition, Bool_t withMC=kFALSE, Bool_t CFenable=kFALSE)
 {
 
   Int_t selectedPID=-1;
@@ -21,7 +21,7 @@ AliDielectron* ConfigLMEEPbPb2011(Int_t cutDefinition, Bool_t hasMC=kFALSE, Bool
   // Setup the instance of AliDielectron
   //
 
-  MCenabled=hasMC;
+  MCenabled=withMC;
   // create the actual framework object
 
   TString name=Form("%02d",cutDefinition);
@@ -77,12 +77,12 @@ AliDielectron* ConfigLMEEPbPb2011(Int_t cutDefinition, Bool_t hasMC=kFALSE, Bool
 
 //Legacy cuts, check consistence w/ 1 & 4, then remove
   else if (cutDefinition==7) {
-       selectedPID = LMEECutLib::kPbPb2011TPCandTOFwide;
+       selectedPID = LMEECutLib::kPbPb2011TPCandTOF;
        selectedCentrality = LMEECutLib::kPbPb2011Central;
        rejectionStep = kFALSE;
   }
   else if (cutDefinition==8) {
-       selectedPID = LMEECutLib::kPbPb2011TPCandTOFwide;
+       selectedPID = LMEECutLib::kPbPb2011TPCandTOF;
        selectedCentrality = LMEECutLib::kPbPb2011Central;
        rejectionStep = kTRUE;
   }
index 0583664..88a65f9 100644 (file)
@@ -1,4 +1,3 @@
-#include "LMEECutLib.C"
 void InitHistograms(AliDielectron *die, Int_t cutDefinition);
 void InitCF(AliDielectron* die, Int_t cutDefinition);
 void EnableMC();
@@ -10,7 +9,7 @@ const Int_t nDie=arrNames->GetEntries();
 Bool_t MCenabled=kFALSE;
 
 
-AliDielectron* ConfigLMEEpp2010(Int_t cutDefinition, Bool_t hasMC=kFALSE, Bool_t CFenable=kTRUE);
+AliDielectron* ConfigLMEEpp2010(Int_t cutDefinition, Bool_t withMC=kFALSE, Bool_t CFenable=kTRUE)
 {
 
   Int_t selectedPID=-1;
@@ -21,7 +20,7 @@ AliDielectron* ConfigLMEEpp2010(Int_t cutDefinition, Bool_t hasMC=kFALSE, Bool_t
   // Setup the instance of AliDielectron
   //
 
-  MCenabled=hasMC;
+  MCenabled=withMC;
 
  // create the actual framework object