Extended the set of deltaAOD jets and added general SISCONE config
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Oct 2009 09:30:41 +0000 (09:30 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Oct 2009 09:30:41 +0000 (09:30 +0000)
PWG4/macros/AnalysisTrainCAF.C

index 5d528b8..9d4bac4 100644 (file)
@@ -8,7 +8,7 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
 \r
 \r
   Bool_t debug         = kTRUE;\r
-  Bool_t useMC         = kFALSE;\r
+  Bool_t useMC         = kTRUE;\r
   Bool_t readTR        = kFALSE;\r
   Bool_t bPROOF        = kFALSE;\r
   Bool_t bLOCALPAR     = kFALSE;  // flag that swtiches on loading of local par files insead of loading libs, needed for grid and local testing\r
@@ -19,9 +19,9 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
   Int_t iESDfilter     = 1;  // Only active if iAODanalysis=0\r
   Int_t iJETAN         = 1;\r
   Int_t iJETANESD      = 0;\r
-  Int_t iJETANMC       = 1;\r
-  Int_t iJETANMC2       = 1;\r
-  Int_t iFASTJET     = 0;\r
+  Int_t iJETANMC       = 0;\r
+  Int_t iJETANMC2       = 0;\r
+  Int_t iFASTJET     = 1;\r
   Int_t iDIJETAN       = 0;\r
   Int_t iPWG4SPECTRUM  = 0;\r
   Int_t iPWG4JFSYSTEMATICS  = 0;\r
@@ -43,7 +43,8 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
   TChain *chain = 0;\r
   // CKB quick hack for local analysis\r
   gROOT->LoadMacro("CreateESDChain.C");\r
-  TChain *chain = CreateChain("aodTree","AOD_LHC09a1.txt",100);\r
+  TChain *chain = CreateChain("aodTree",ds,1);\r
+  //  TChain *chain = CreateChain("esdTree",ds,100);\r
   //  chain = new TChain("aodTree");\r
   //  chain->Add("/Users/kleinb/bigdisk/1/LHC09a3/001/AliAOD.root");\r
 \r
@@ -82,6 +83,7 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
   if(iFASTJET){\r
     gSystem->Load("libCGAL.so");\r
     gSystem->Load("libfastjet.so");\r
+    gSystem->Load("libsiscone.so");\r
     gSystem->Load("libSISConePlugin.so");  \r
   }\r
 \r
@@ -134,6 +136,8 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
     }   \r
     // --- Enable particle correlation analysis\r
     if (iPWG4UE||iPWG4SPECTRUM||iPWG4JFSYSTEMATICS||iPWG4JETCORRECTION||iPWG4THREEJETS) {\r
+      gProof->UploadPackage("JETAN.par");\r
+      gProof->EnablePackage("JETAN");\r
       gProof->UploadPackage("PWG4JetTasks.par");\r
       gProof->EnablePackage("PWG4JetTasks");\r
     }   \r
@@ -162,7 +166,10 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
        SetupPar("JETAN");         \r
        if(iFASTJET)    SetupPar("FASTJETAN");     \r
       }\r
-      if (iPWG4UE||iPWG4SPECTRUM||iPWG4JFSYSTEMATICS)SetupPar("PWG4JetTasks");\r
+      if (iPWG4UE||iPWG4SPECTRUM||iPWG4JFSYSTEMATICS){\r
+       SetupPar("JETAN");         \r
+       SetupPar("PWG4JetTasks");\r
+      }\r
     }\r
     else{\r
       Printf("Loading Local libs");\r
@@ -174,10 +181,13 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
       // --- Enable the JETAN Package\r
       if (iJETAN||iJETANESD||iJETANMC||iJETANMC2){\r
        gSystem->Load("libJETAN");\r
-       gSystem->Load("libFASTJETAN");\r
+       if(iFASTJET)gSystem->Load("libFASTJETAN");\r
       }\r
       // --- Enable particle correlation analysis\r
-      if (iPWG4UE||iPWG4SPECTRUM||iPWG4JFSYSTEMATICS||iPWG4THREEJETS)gSystem->Load("libPWG4JetTasks"); \r
+      if (iPWG4UE||iPWG4SPECTRUM||iPWG4JFSYSTEMATICS||iPWG4THREEJETS){\r
+       gSystem->Load("libJETAN");\r
+       gSystem->Load("libPWG4JetTasks"); \r
+      }\r
     }\r
 \r
   }\r
@@ -219,20 +229,28 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
     }   \r
 \r
     // Debugging if needed\r
-    if (debug) mgr->SetDebugLevel(0);\r
+    if (debug) mgr->SetDebugLevel(10);\r
     //    AliLog::EnableDebug(kTRUE);\r
-    AliLog::SetGlobalLogLevel(0);\r
+    AliLog::SetGlobalLogLevel(1);\r
 \r
 \r
     if (iESDfilter && !iAODanalysis) {\r
-      gROOT->LoadMacro("AddTaskESDfilter.C");\r
-      AliAnalysisTaskESDfilter *esdfilter = AddTaskESDfilter();\r
+      gSystem->Load("libCORRFW.so");\r
+      gSystem->Load("libPWG3muon.so");\r
+\r
+      gROOT->LoadMacro(Form("%s/ANALYSIS/macros/AddTaskESDfilter.C",gSystem->ExpandPathName("${ALICE_ROOT}")));\r
+      //      gROOT->LoadMacro("AddTaskESDfilter.C");\r
+      AliAnalysisTaskESDfilter *esdfilter = AddTaskESDFilter();\r
+      Printf("esdFilter %p",esdfilter); \r
     }   \r
     // Jet analysis from the AOD\r
     if (iJETAN) {\r
       gROOT->LoadMacro("AddTaskJets.C");\r
-      AliAnalysisTaskJets *jetanaAOD  = AddTaskJets("AOD","UA1",0.4);\r
-      jetanaAOD->SetNonStdBranch("jetsAOD");    \r
+      //      AliAnalysisTaskJets *jetanaAOD  = AddTaskJets("AOD","UA1",0.4);\r
+      //      AliAnalysisTaskJets *jetanaAOD  = AddTaskJets("AOD","UA1",0.4);\r
+      //      jetanaAOD->SetNonStdBranch("jetsAOD_UA1");    \r
+      AliAnalysisTaskJets *jetanaAOD  = AddTaskJets();\r
+      Int_t i = AddTaskJetsDelta();\r
     }   \r
     // JETANALYSIS from the ESD\r
     if (iJETANESD && !iAODanalysis) {\r
@@ -244,15 +262,17 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
     // Jet analysisMC\r
     if (iJETANMC ){ \r
       gROOT->LoadMacro("AddTaskJets.C");\r
+      //      AliAnalysisTaskJets *jetanaMC =  AddTaskJets("AODMC","UA1",0.4);\r
       AliAnalysisTaskJets *jetanaMC =  AddTaskJets("AODMC","UA1",0.4);\r
       jetanaMC->SetDebugLevel(0);\r
-      jetanaMC->SetNonStdBranch("jetsMC");\r
+      jetanaMC->SetNonStdBranch("jetsMC_UA1");\r
     }   \r
     if (iJETANMC2 ){ \r
       gROOT->LoadMacro("AddTaskJets.C");\r
+      //      AliAnalysisTaskJets *jetanaMC2 = AddTaskJets("AODMC2","UA1",0.4);\r
       AliAnalysisTaskJets *jetanaMC2 = AddTaskJets("AODMC2","UA1",0.4);\r
       jetanaMC2->SetDebugLevel(0);\r
-      jetanaMC2->SetNonStdBranch("jetsMC2");\r
+      jetanaMC2->SetNonStdBranch("jetsMC2_UA1");\r
     }   \r
     // Dijet analysis\r
     if(iDIJETAN){\r
@@ -260,14 +280,17 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
       AliAnalysisTaskDiJets *dijetana  = AddTaskDiJets();\r
     }\r
     if (iPWG4SPECTRUM) {\r
-      gROOT->LoadMacro("AddTaskJetSpectrum.C");\r
-      AliAnalysisTaskJetSpectrum* pwg4spec = AddTaskJetSpectrum();\r
+      gROOT->LoadMacro("AddTaskJetSpectrum2.C");\r
+      AliAnalysisTaskJetSpectrum2* pwg4spec = AddTaskJetSpectrum2();\r
+      pwg4spec->SetAODInput(kTRUE);\r
+      pwg4spec->SetBranchRec("jets");\r
       pwg4spec->SetAnalysisType(0);\r
       pwg4spec->SetDebugLevel(0);\r
     }   \r
     if (iPWG4JFSYSTEMATICS) {\r
       gROOT->LoadMacro("AddTaskJFSystematics.C");\r
-      AliAnalysisTaskJFSystematics* pwg4jfs = AddTaskJFSystematics("jetsAOD","jetsMC");\r
+      AliAnalysisTaskJFSystematics* pwg4jfs = AddTaskJFSystematics("jetsMC","jets");\r
+      pwg4jfs->SetAODInput(kTRUE);\r
       pwg4jfs->SetDebugLevel(0);\r
     }   \r
     if (iPWG4JETCORRECTION) {\r
@@ -292,9 +315,10 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
     // Run the analysis\r
     //    \r
     if (mgr->InitAnalysis()) {\r
-       mgr->PrintStatus();\r
+      mgr->PrintStatus();\r
+      Printf("Chain with %d entries",chain->GetEntries()); \r
        if(bPROOF)mgr->StartAnalysis("proof",dataset.Data(), nEvents,nOffset);\r
-       else mgr->StartAnalysis("local",chain,100);\r
+       else mgr->StartAnalysis("local",chain,nEvents);\r
     }   \r
 }\r
 TChain *CreateChainFromCollection(const char* xmlfile, const char *treeName="esdTree",Int_t nFiles = 0)\r