]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/macros/AnalysisTrainNewFilterAOD.C
Split: fix refs to AddTaskCentrality.C
[u/mrichter/AliRoot.git] / ANALYSIS / macros / AnalysisTrainNewFilterAOD.C
index 742bb0b75249b9585c15e3a0fbe3459f697cda91..de08cd4c9eefe56cead157618439da670f7d9de6 100644 (file)
@@ -38,7 +38,7 @@ TString     proof_outdir       = "";
 // ### Settings that make sense when using the Alien plugin
 //==============================================================================
 Int_t       runOnData          = 1;       // Set to 1 if processing real data
-Int_t       iCollision         = 0;       // 0=pp, 1=Pb-Pb
+Int_t       iCollision         = 1;       // 0=pp, 1=Pb-Pb
 Bool_t      usePLUGIN          = kTRUE;   // do not change
 Bool_t      useProductionMode  = kTRUE;   // use the plugin in production mode
 // Usage of par files ONLY in grid mode and ONLY if the code is not available
@@ -48,7 +48,7 @@ Bool_t      useProductionMode  = kTRUE;   // use the plugin in production mode
 Bool_t      usePAR             = kFALSE;  // use par files for extra libs
 Bool_t      useCPAR            = kFALSE;  // use par files for common libs
 TString     root_version       = "v5-27-06b";  // *CHANGE ME IF MORE RECENT IN GRID*
-TString     aliroot_version    = "v4-21-13-AN";  // *CHANGE ME IF MORE RECENT IN GRID*                                          
+TString     aliroot_version    = "v4-21-14-AN";  // *CHANGE ME IF MORE RECENT IN GRID*                                          
 // Change production base directory here (test mode)
 TString     alien_datadir      = "/alice/data/2010/LHC10h";
                // Work directory in GRID (DON'T CHANGE)
@@ -110,13 +110,14 @@ Bool_t      saveProofToAlien    = kFALSE; // save proof outputs in AliEn
 Int_t       iAODanalysis       = 0;      // Analysis on input AOD's
 Int_t       iAODhandler        = 1;      // Analysis produces an AOD or dAOD's
 Int_t       iESDfilter         = 1;      // ESD to AOD filter (barrel + muon tracks)
-Int_t       iMUONcopyAOD       = 0;      // Task that copies only muon events in a separate AOD (PWG3)
+Int_t       iMUONcopyAOD       = 1;      // Task that copies only muon events in a separate AOD (PWG3)
+Int_t       iMakeDimuonAOD     = 0;      // AliAOD.Dimuons.root
 Int_t       iJETAN             = 1;      // Jet analysis (PWG4)
 Int_t       iJETANdelta        = 0;      // Jet delta AODs
 Int_t       iPWG4partcorr      = 0;      // Gamma-hadron correlations task (PWG4)
 Int_t       iPWG4gammaconv     = 0;      // Gamma conversion analysis (PWG4)
 Int_t       iPWG4omega3pi      = 0;      // Omega to 3 pi analysis (PWG4)
-Int_t       iPWG3vertexing     = 1;      // Vertexing HF task (PWG3)
+Int_t       iPWG3vertexing     = 0;//1      // Vertexing HF task (PWG3)
 Int_t       iPWG3hfe           = 0;      // Electrons analysis (PWG3)
 Int_t       iPWG3JPSIfilter    = 0;      // JPSI filtering (PWG3)
 Int_t       iPWG3JPSI          = 0;      // JPSI analysis (PWG3)
@@ -359,7 +360,7 @@ void AddAnalysisTasks()
   // Tender and supplies. Needs to be called for every event.
   //
    if (useTender) {
-      gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/TenderSupplies/AddTaskTender.C");
+      gROOT->LoadMacro("$ALICE_ROOT/TENDER/TenderSupplies/AddTaskTender.C");
       // IF V0 tender needed, put kTRUE below
       AliAnalysisTaskSE *tender = AddTaskTender(useV0tender);
 //      tender->SetDebugLevel(2);
@@ -374,7 +375,7 @@ void AddAnalysisTasks()
    }
    
    if (useCentrality) {
-      gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
+      gROOT->LoadMacro("$ALICE_ROOT/OADB/macros/AddTaskCentrality.C");
       AliCentralitySelectionTask *taskCentrality = AddTaskCentrality();   
    }
    
@@ -384,10 +385,13 @@ void AddAnalysisTasks()
       if (iMUONcopyAOD) {
          printf("Registering delta AOD file\n");
          mgr->RegisterExtraFile("AliAOD.Muons.root");
-         mgr->RegisterExtraFile("AliAOD.Dimuons.root");
-         AliAnalysisTaskESDfilter *taskesdfilter = AddTaskESDFilter(useKFILTER, kTRUE, kTRUE, usePhysicsSelection, kFALSE, AliESDpid::kTOF_T0, kTRUE);
+        if ( iMakeDimuonAOD )
+        {
+          mgr->RegisterExtraFile("AliAOD.Dimuons.root");
+        }
+        AliAnalysisTaskESDfilter *taskesdfilter = AddTaskESDFilter(useKFILTER, kTRUE,(iMakeDimuonAOD==1), usePhysicsSelection, kFALSE, kTRUE);
       } else {
-         AliAnalysisTaskESDfilter *taskesdfilter = AddTaskESDFilter(useKFILTER, kFALSE, kFALSE, usePhysicsSelection,kFALSE, AliESDpid::kTOF_T0, kTRUE);
+        AliAnalysisTaskESDfilter *taskesdfilter = AddTaskESDFilter(useKFILTER, kFALSE, kFALSE, usePhysicsSelection,kFALSE, kTRUE);
       }   
    }   
 
@@ -693,7 +697,9 @@ void StartAnalysis(const char *mode, TChain *chain) {
             ::Error("AnalysisTrainNew.C::StartAnalysis", "Cannot create the chain");
             return;
          }   
-         mgr->StartAnalysis(mode, chain);
+       mgr->SetNSysInfo(1);
+       mgr->StartAnalysis(mode, chain);
+       AliCodeTimer::Instance()->Print();
          return;
       case 1:
          if (!proof_dataset.Length()) {
@@ -894,11 +900,11 @@ Bool_t LoadCommonLibraries(const char *mode)
    }   
    Bool_t success = kTRUE;
    // ROOT libraries
-   gSystem->Load("libTree.so");
-   gSystem->Load("libGeom.so");
-   gSystem->Load("libVMC.so");
-   gSystem->Load("libPhysics.so");
-   gSystem->Load("libMinuit.so");
+   gSystem->Load("libTree");
+   gSystem->Load("libGeom");
+   gSystem->Load("libVMC");
+   gSystem->Load("libPhysics");
+   gSystem->Load("libMinuit");
    
    // Load framework classes. Par option ignored here.
    switch (imode) {
@@ -958,8 +964,8 @@ Bool_t LoadAnalysisLibraries(const char *mode)
 // Load common analysis libraries.
    Bool_t success = kTRUE;
    if (useTender) {
-      if (!LoadLibrary("TENDER", mode, kTRUE) ||
-          !LoadLibrary("TENDERSupplies", mode, kTRUE)) return kFALSE;
+      if (!LoadLibrary("Tender", mode, kTRUE) ||
+          !LoadLibrary("TenderSupplies", mode, kTRUE)) return kFALSE;
    }       
    if (iESDfilter || iPWG3MuonTrain) {
       if (!LoadLibrary("PWG3base", mode, kTRUE) ||
@@ -1074,7 +1080,7 @@ Bool_t LoadLibrary(const char *module, const char *mode, Bool_t rec=kFALSE)
       return kTRUE;
    } 
    // Check if the library is already loaded
-   if (strlen(gSystem->GetLibraries(Form("%s.so", module), "", kFALSE)) > 0)
+   if (strlen(gSystem->GetLibraries(module, "", kFALSE)) > 0)
       return kTRUE;    
    switch (imode) {
       case 0:
@@ -1083,7 +1089,7 @@ Bool_t LoadLibrary(const char *module, const char *mode, Bool_t rec=kFALSE)
             result = SetupPar(module);
             if (rec) anaPars += Form("%s.par ", module);
          } else {
-            result = gSystem->Load(Form("lib%s.so", module));
+            result = gSystem->Load(Form("lib%s", module));
             if (rec) anaLibs += Form("lib%s.so ", module);
          }   
          break;
@@ -1272,7 +1278,7 @@ AliAnalysisAlien* CreateAlienHandler(const char *plugin_mode)
          if (run_numbers[i]==0) break;
          plugin->AddRunNumber(run_numbers[i]);
       }   
-   }   
+   }
 // Define alien work directory where all files will be copied. Relative to alien $HOME.
    plugin->SetGridWorkingDir(grid_workdir);
 // Declare alien output directory. Relative to working directory.