]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/macros/AnalysisTrainNewFilterAODMC.C
new filtering macros for data and MC
[u/mrichter/AliRoot.git] / ANALYSIS / macros / AnalysisTrainNewFilterAODMC.C
index 72a9c71bb7a8299242233dea12e9034a07b38277..f71e8c5d1c00b5401603550bfd71f982d6c1a918 100644 (file)
 
 //==================   TRAIN NAME   ============================================
 TString     train_name         = "FILTERsim"; // local folder name
-TString     train_tag          = "sim+tasks";        // Train special tag appended to 
+TString     train_tag          = "_PbPb";        // Train special tag appended to 
                                             // visible name. ("data", "sim", "pp", "highmult", ...)
                // Name in train page (DON'T CHANGE)
 TString     visible_name       = Form("FILTER%s$2_$3", train_tag.Data()); //# FIXED #
                // Add train composition and other comments
-TString     job_comment        = "#PhysSel# ==AODs: std(+jets)/(di)muon/vertexing/dielectrons ==ANALYSIS: gammaconv, jpsi, hfe";
+TString     job_comment        = "centrality, stdAOD(+jets)/vertexing";
 TString     job_tag            = Form("%s: %s", visible_name.Data(), job_comment.Data());
 //==============================================================================
 
@@ -47,16 +47,16 @@ Bool_t      useProductionMode  = kTRUE;   // use the plugin in production mode
 // AliRoot.
 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-06";  // *CHANGE ME IF MORE RECENT IN GRID*
-TString     aliroot_version    = "v4-20-11-AN";  // *CHANGE ME IF MORE RECENT IN GRID*                                          
+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*                                          
 // Change production base directory here (test mode)
-TString     alien_datadir      = "/alice/sim/LHC10d2";
+TString     alien_datadir      = "/alice/sim/LHC11a3";
                // Work directory in GRID (DON'T CHANGE)
 TString     grid_workdir       = "/alice/cern.ch/user/a/alidaq/AOD/AOD$2";
                // Data pattern - change as needed for test mode
 TString     data_pattern       = "*ESDs.root";
 // Set the run range
-Int_t run_numbers[10] = {117222}; // **********************!!!!!!!
+Int_t run_numbers[10] = {137236}; // **********************!!!!!!!
 //Int_t       run_range[2]       =  {114786, 114949};  // LHC09a7   *CHANGE ME*
 // AliEn output directory. If blank will become output_<train_name>
                // Output directory (DON'T CHANGE)
@@ -67,15 +67,18 @@ TString     data_collection    = "$1/qa1.xml";
 TString     outputSingleFolder = "";
 //TString     outputSingleFolder = "deltas";
 // Number of files merged in a chunk
-Int_t       maxMergeFiles      = 20;
+Int_t       maxMergeFiles      = 10;
+// Number of test files
+Int_t       nTestFiles         = 1;
 // Files that should not be merged
-TString     mergeExclude       = "AliAOD.root AliAOD.VertexingHF.root AliAOD.Jets.root deltaAODPartCorr.root AliAOD.Muons.root AliAOD.Dimuons.root AliAOD.Dielectron.root";
+//TString     mergeExclude       = "AliAOD.root AliAOD.VertexingHF.root AliAOD.Jets.root deltaAODPartCorr.root AliAOD.Muons.root AliAOD.Dimuons.root AliAOD.Dielectron.root";
+TString     mergeExclude       = "";
 // Make replicas on the storages below
 TString     outputStorages      = "disk=4";
 // Number of runs per master job
 Int_t       nRunsPerMaster     = 10;
 // Maximum number of files per job (gives size of AOD)
-Int_t       nFilesPerJob       = 50;
+Int_t       nFilesPerJob       = 20;
 // Int_t       nFilesPerJob       = 1; (AOD->delta AOD production case)
 // ### Settings that make sense only for local analysis
 //==============================================================================
@@ -86,8 +89,9 @@ TString     local_xmldataset   = "";
 //==============================================================================
 Bool_t      usePhysicsSelection = kTRUE; // use physics selection
 Bool_t      useTender           = kFALSE; // use tender wagon
+Bool_t      useCentrality       = kTRUE;  //use centrality
 Bool_t      useMergeViaJDL      = kTRUE;  // merge via JDL
-Bool_t      useFastReadOption   = kTRUE;  // use xrootd tweaks
+Bool_t      useFastReadOption   = kFALSE;  // use xrootd tweaks
 Bool_t      useOverwriteMode    = kTRUE;  // overwrite existing collections
 Bool_t      useDATE             = kFALSE; // use date in train name
 Bool_t      useDBG              = kTRUE;  // activate debugging
@@ -106,47 +110,47 @@ 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       = 1;      // Task that copies only muon events in a separate AOD (PWG3)
+Int_t       iMUONcopyAOD       = 0;      // Task that copies only muon events in a separate AOD (PWG3)
 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     = 1;      // Gamma conversion analysis (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       iPWG3hfe           = 1;      // Electrons analysis (PWG3)
-Int_t       iPWG3JPSIfilter    = 1;      // JPSI filtering (PWG3)
-Int_t       iPWG3JPSI          = 1;      // JPSI analysis (PWG3)
+Int_t       iPWG3hfe           = 0;      // Electrons analysis (PWG3)
+Int_t       iPWG3JPSIfilter    = 0;      // JPSI filtering (PWG3)
+Int_t       iPWG3JPSI          = 0;      // JPSI analysis (PWG3)
 Int_t       iPWG3d2h           = 0;      // D0->2 hadrons (PWG3)
-Int_t        iPWG3d0mass       = 1;      // D0 mass (PWG3D2H)                                                                              
-Int_t        iPWG3d0massLS     = 1;      // D0 mass LS (PWG3D2H)                                                                           
-Int_t        iPWG3dplus        = 1;      // D+ analysis (PWG3D2H)                                                                          
-Int_t        iPWG3LSd0         = 1;      // LS D0 analysis (PWG3D2H)                                                                       
-Int_t        iPWG3LSjpsi       = 1;      // LS J/Psi analysis (PWG3D2H)                                                                    
-Int_t        iPWG3CFd0         = 1;      // CF D0 analysis (PWG3D2H)                                                                       
-Int_t        iPWG3promptd0     = 1;      // prompt D0 analysis (PWG3D2H)                                                                   
+Int_t        iPWG3d0mass       = 0;      // D0 mass (PWG3D2H)                                                                              
+Int_t        iPWG3d0massLS     = 0;      // D0 mass LS (PWG3D2H)                                                                           
+Int_t        iPWG3dplus        = 0;      // D+ analysis (PWG3D2H)                                                                          
+Int_t        iPWG3LSd0         = 0;      // LS D0 analysis (PWG3D2H)                                                                       
+Int_t        iPWG3LSjpsi       = 0;      // LS J/Psi analysis (PWG3D2H)                                                                    
+Int_t        iPWG3CFd0         = 0;      // CF D0 analysis (PWG3D2H)                                                                       
+Int_t        iPWG3promptd0     = 0;      // prompt D0 analysis (PWG3D2H)                                                                   
 Int_t       iPWG3MuonTrain     = 0;      // Muon analysis train
 Int_t       iPWG2femto         = 0;      // Femtoscopy task (PWG2)
 Int_t       iPWG2spectra       = 0;      // Spectra tasks (PWG2
-Int_t        iPWG2protons      = 1;         // Proton-antiproton analysis
-Int_t        iPWG2checkcascade = 1;         // Check cascades task
-Int_t        iPWG2perfcascade  = 1;         // Check performance cascade
-Int_t        iPWG2checkv0      = 1;         // Check V0 task
-Int_t        iPWG2strange      = 1;         // Strangeness task
-Int_t        iPWG2central      = 1;         // Anisothropy in central collisions
+Int_t        iPWG2protons      = 0;         // Proton-antiproton analysis
+Int_t        iPWG2checkcascade = 0;         // Check cascades task
+Int_t        iPWG2perfcascade  = 0;         // Check performance cascade
+Int_t        iPWG2checkv0      = 0;         // Check V0 task
+Int_t        iPWG2strange      = 0;         // Strangeness task
+Int_t        iPWG2central      = 0;         // Anisothropy in central collisions
 Int_t       iPWG2flow          = 0;      // Flow analysis tasks (PWG2)
 Int_t       iPWG2res           = 0;      // Resonances task (PWG2)
 Int_t        iPWG2rsneff       = 0;      // Resonances efficiency
 Int_t       iPWG2kink          = 0;      // Kink analysis tasks (PWG2)
-Int_t        iPWG2kinkESDMC    = 1;         // Kink ESD-MC comparison (PWG2)
-Int_t        iPWG2kinkLSKstar  = 1;      // Kink like-sign K* (PWG2)
-Int_t        iPWG2kinkLSL1520  = 1;      // Kink like-sign L1520 (PWG2)
-Int_t        iPWG2kinkLSPhi    = 1;      // Kink like-sign Phi (PWG2)
-Int_t        iPWG2kinkKstarESD = 1;      // Kink Kstar ESD (PWG2)
-Int_t        iPWG2kinkKstarMC  = 1;      // Kink Kstar MC (PWG2)
-Int_t        iPWG2kinkL1520ESD = 1;      // Kink L1520 ESD (PWG2)
-Int_t        iPWG2kinkL1520MC  = 1;      // Kink L1520 MC (PWG2)
-Int_t        iPWG2kinkPhiESD   = 1;      // Kink resonances Phi ESD (PWG2)
-Int_t        iPWG2kinkPhiMC    = 1;      // Kink resonances Phi MC (PWG2)
+Int_t        iPWG2kinkESDMC    = 0;         // Kink ESD-MC comparison (PWG2)
+Int_t        iPWG2kinkLSKstar  = 0;      // Kink like-sign K* (PWG2)
+Int_t        iPWG2kinkLSL1520  = 0;      // Kink like-sign L1520 (PWG2)
+Int_t        iPWG2kinkLSPhi    = 0;      // Kink like-sign Phi (PWG2)
+Int_t        iPWG2kinkKstarESD = 0;      // Kink Kstar ESD (PWG2)
+Int_t        iPWG2kinkKstarMC  = 0;      // Kink Kstar MC (PWG2)
+Int_t        iPWG2kinkL1520ESD = 0;      // Kink L1520 ESD (PWG2)
+Int_t        iPWG2kinkL1520MC  = 0;      // Kink L1520 MC (PWG2)
+Int_t        iPWG2kinkPhiESD   = 0;      // Kink resonances Phi ESD (PWG2)
+Int_t        iPWG2kinkPhiMC    = 0;      // Kink resonances Phi MC (PWG2)
 Int_t       iPWG2evchar        = 0;      // Event characteristics (PWG2)
 Int_t       iPWG2unicor        = 0;      // Unicor analysis (PWG2)
 Int_t       iPWG2forward       = 0;      // FMD analysis (PWG2)
@@ -154,8 +158,8 @@ Int_t       iPWG2forward       = 0;      // FMD analysis (PWG2)
 // ### Configuration macros used for each module
 //==============================================================================
 TString     configPWG2femto    = "$ALICE_ROOT/PWG2/FEMTOSCOPY/macros/Train/Train3/ConfigFemtoAnalysis.C";
-//TString     configPWG3d2h      = "$ALICE_ROOT/PWG3/vertexingHF/ConfigVertexingHF_highmult.C";
-TString     configPWG3d2h      = "$ALICE_ROOT/PWG3/vertexingHF/ConfigVertexingHF.C";
+TString     configPWG3d2h      = "$ALICE_ROOT/PWG3/vertexingHF/ConfigVertexingHF_highmult.C";
+//TString     configPWG3d2h      = "$ALICE_ROOT/PWG3/vertexingHF/ConfigVertexingHF.C";
 // Temporaries.
 TString anaPars = "";
 TString anaLibs = "";
@@ -364,6 +368,12 @@ void AddAnalysisTasks()
       gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
       mgr->RegisterExtraFile("event_stat.root");
       AliPhysicsSelectionTask *physSel = AddTaskPhysicsSelection(useMC);
+      mgr->AddStatisticsTask();
+   }
+   
+   if (useCentrality) {
+      gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
+      AliCentralitySelectionTask *taskCentrality = AddTaskCentrality();   
    }
 
    if (iESDfilter && !iAODanalysis) {
@@ -373,9 +383,9 @@ void AddAnalysisTasks()
          printf("Registering delta AOD file\n");
          mgr->RegisterExtraFile("AliAOD.Muons.root");
          mgr->RegisterExtraFile("AliAOD.Dimuons.root");
-         AliAnalysisTaskESDfilter *taskesdfilter = AddTaskESDFilter(useKFILTER, kTRUE, kTRUE, usePhysicsSelection);
+         AliAnalysisTaskESDfilter *taskesdfilter = AddTaskESDFilter(useKFILTER, kTRUE, kTRUE, usePhysicsSelection, kFALSE, AliESDpid::kTOF_T0, kTRUE);
       } else {
-         AliAnalysisTaskESDfilter *taskesdfilter = AddTaskESDFilter(useKFILTER, kFALSE, kFALSE, usePhysicsSelection);
+         AliAnalysisTaskESDfilter *taskesdfilter = AddTaskESDFilter(useKFILTER, kFALSE, kFALSE, usePhysicsSelection,kFALSE, AliESDpid::kTOF_T0, kTRUE);
       }   
    }   
 
@@ -1238,7 +1248,7 @@ AliAnalysisAlien* CreateAlienHandler(const char *plugin_mode)
       plugin->SetOutputToRunNo();
    }   
    plugin->SetJobTag(job_tag);
-   plugin->SetNtestFiles(10);
+   plugin->SetNtestFiles(nTestFiles);
    plugin->SetCheckCopy(kFALSE);
    plugin->SetOneStageMerging(kTRUE);
 // Set versions of used packages