Renames and new scripts
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / MakeAOD.C
index 9758949a75aded068e8f1fadc065ad6ece5fb256..ad5f428be731cc936cd28e12c45ca905338247ca 100644 (file)
  * @ingroup pwg2_forward_scripts
  */
 void MakeAOD(const char* esddir, 
-            Int_t       nEvents=1000
-            Bool_t      proof=false,
+            Int_t       nEvents=-1
+            Int_t       proof=0,
             Bool_t      mc=false)
 {
   // --- Libraries to load -------------------------------------------
   gROOT->Macro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/LoadLibs.C");
 
   // --- Check for proof mode, and possibly upload pars --------------
-  if (proof) 
-    gROOT->Macro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/LoadPars.C");
+  if (proof> 0) { 
+    gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/LoadPars.C");
+    LoadPars(proof);
+  }
   
   // --- Our data chain ----------------------------------------------
   gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/MakeESDChain.C");
-  TChain* chain = MakeESDChain(esddir,mc);
+  TChain* chain = MakeESDChain(esddir,true);
   // If 0 or less events is select, choose all 
   if (nEvents <= 0) nEvents = chain->GetEntries();
 
   // --- Creating the manager and handlers ---------------------------
-  AliAnalysisManager *mgr  = new AliAnalysisManager("Analysis Train", 
-                                                   "FMD analysis train");
+  AliAnalysisManager *mgr  = new AliAnalysisManager("Forward Train", 
+                                                   "Forward multiplicity");
+  AliAnalysisManager::SetCommonFileName("forward.root");
 
   // --- ESD input handler -------------------------------------------
   AliESDInputHandler *esdHandler = new AliESDInputHandler();
-  esdHandler->SetInactiveBranches("AliESDACORDE "
-                                 "AliRawDataErrorLogs "
-                                 "CaloClusters "
-                                 "Cascades "
-                                 "EMCALCells "
+  esdHandler->SetInactiveBranches(// "AliESDRun " 
+                                 // "AliESDHeader "
+                                 // "AliESDZDC "
+                                 // "AliESDFMD "
+                                 // "AliESDVZERO " 
+                                 "AliESDTZERO " 
+                                 "TPCVertex " 
+                                 // "SPDVertex "
+                                 // "PrimaryVertex "
+                                 // "AliMultiplicity "
+                                 "PHOSTrigger "
                                  "EMCALTrigger "
-                                 "Kinks "
-                                 "Cascades "
-                                 "MuonTracks "
+                                 "SPDPileupVertices " 
+                                 "TrkPileupVertices " 
+                                 // "Tracks "
+                                 "MuonTracks " 
+                                 "PmdTracks "
                                  "TrdTracks "
+                                 "V0s " 
+                                 "Cascades " 
+                                 "Kinks " 
                                  "CaloClusters "
+                                 "EMCALLCells "
+                                 "PHOSCells "
+                                 "AliRawDataErrorLogs "
+                                 "ALIESDCACORDE " 
                                  "HLTGlobalTrigger");
   mgr->SetInputEventHandler(esdHandler);      
        
@@ -71,10 +89,30 @@ void MakeAOD(const char* esddir,
   aodHandler->SetOutputFileName("AliAODs.root");
 
   // --- Add tasks ---------------------------------------------------
-  gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/AddTaskFMD.C");
+  // Physics selection 
   gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
-  AddTaskFMD(mc);
   AddTaskPhysicsSelection(mc, kTRUE, kTRUE);
+
+#if 1
+  // Centrality 
+  gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/Compile.C");
+  // gDebug = 10;
+  Compile("$ALICE_ROOT/PWG2/FORWARD/analysis2/AddTaskCopyHeader.C","+");
+  // gDebug = 10;
+  Compile("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/AliESDCentrality.C","+g");
+  // gDebug = 0;
+  AddTaskCopyHeader();
+
+
+  // Central multiplicity
+  Compile("$ALICE_ROOT/PWG2/FORWARD/analysis2/AddTaskCentralMult.C","+");
+  AddTaskCentralMult();
+#endif
+
+  // FMD 
+  gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/AddTaskFMD.C");
+  AddTaskFMD(mc);
+
   
   // --- Run the analysis --------------------------------------------
   TStopwatch t;