changed output file name to lower case
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Sep 2009 15:03:33 +0000 (15:03 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Sep 2009 15:03:33 +0000 (15:03 +0000)
PWG4/macros/AnalysisTrainCAF.C

index 298d130..b646ea2 100644 (file)
@@ -8,24 +8,25 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
 \r
 \r
   Bool_t debug         = kTRUE;\r
-  Bool_t useMC         = kTRUE;\r
+  Bool_t useMC         = kFALSE;\r
   Bool_t readTR        = kFALSE;\r
-  Bool_t bPROOF        = kTRUE;\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
 \r
     \r
-  Int_t iAODanalysis   = 0;\r
+  Int_t iAODanalysis   = 1;\r
   Int_t iAODhandler    = 1;\r
   Int_t iESDfilter     = 1;  // Only active if iAODanalysis=0\r
   Int_t iJETAN         = 1;\r
-  Int_t iJETANESD      = 1;\r
+  Int_t iJETANESD      = 0;\r
   Int_t iJETANMC       = 1;\r
   Int_t iJETANMC2       = 1;\r
-  Int_t iDIJETAN       = 1;\r
-  Int_t iPWG4SPECTRUM  = 1;\r
-  Int_t iPWG4JFSYSTEMATICS  = 1;\r
-  Int_t iPWG4JETCORRECTION  = 1;\r
-  Int_t iPWG4THREEJETS  = 1;\r
+  Int_t iFASTJET     = 1;\r
+  Int_t iDIJETAN       = 0;\r
+  Int_t iPWG4SPECTRUM  = 0;\r
+  Int_t iPWG4JFSYSTEMATICS  = 0;\r
+  Int_t iPWG4JETCORRECTION  = 0;\r
+  Int_t iPWG4THREEJETS  = 0;\r
   Int_t iPWG4UE        = 0;\r
   Int_t iPWG4PID        = 0;\r
 \r
@@ -33,7 +34,6 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
     useMC = kFALSE;\r
     readTR = kFALSE;\r
     iESDfilter = 0;\r
-    iMUONfilter = 0;\r
   }    \r
   if (iJETAN) iESDfilter=1;\r
   if (iESDfilter) iAODhandler=1;\r
@@ -42,8 +42,10 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
   TString dataset(ds);\r
   TChain *chain = 0;\r
   // CKB quick hack for local analysis\r
-  // gROOT->LoadMacro("CreateESDChain.C");\r
-  // TChain *chain = CreateESDChain("tmp.txt",1000);\r
+  gROOT->LoadMacro("CreateESDChain.C");\r
+  TChain *chain = CreateChain("aodTree","AOD_LHC09a1.txt",100);\r
+  //  chain = new TChain("aodTree");\r
+  //  chain->Add("/Users/kleinb/bigdisk/1/LHC09a3/001/AliAOD.root");\r
 \r
  \r
   printf("==================================================================\n");\r
@@ -56,6 +58,7 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
   if (iJETANESD)    printf("=  Jet analysis from ESD                                         =\n");\r
   if (iJETANMC)     printf("=  Jet analysis from Kinematics                                  =\n");\r
   if (iJETANMC2)     printf("=  Jet analysis 2 from Kinematics                               =\n");\r
+  if (iFASTJET)     printf("=  Loading FastJet                               =\n");\r
   if (iDIJETAN)     printf("=  DiJet analysis                                                 =\n");\r
   if (iPWG4SPECTRUM)printf("=  PWG4 Jet spectrum analysis                                    =\n");\r
   if (iPWG4JFSYSTEMATICS)printf("=  PWG4 Jet Finder systematics                                   =\n");\r
@@ -76,7 +79,12 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
   gSystem->Load("libGeom.so");\r
   gSystem->Load("libVMC.so");\r
   gSystem->Load("libPhysics.so");\r
-  \r
+  if(iFASTJET){\r
+    gSystem->Load("libCGAL.so");\r
+    gSystem->Load("libfastjet.so");\r
+    gSystem->Load("libSISConePlugin.so");  \r
+  }\r
+\r
 \r
   // Reset user processes if CAF if not responding anymore\r
   // TProof::Reset("alicecaf"); \r
@@ -119,6 +127,10 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
     if (iJETAN||iJETANESD||iJETANMC||iJETANMC2) {\r
       gProof->UploadPackage("JETAN.par");\r
       gProof->EnablePackage("JETAN");\r
+      if(iFASTJET){\r
+       gProof->UploadPackage("FASTJETAN.par");\r
+       gProof->EnablePackage("FASTJETAN"); \r
+      }\r
     }   \r
     // --- Enable particle correlation analysis\r
     if (iPWG4UE||iPWG4SPECTRUM||iPWG4JFSYSTEMATICS||iPWG4JETCORRECTION||iPWG4THREEJETS) {\r
@@ -146,7 +158,10 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
       SetupPar("AOD");    \r
       SetupPar("ANALYSIS"); \r
       SetupPar("ANALYSISalice");\r
-      if (iJETAN||iJETANESD||iJETANMC||iJETANMC2)SetupPar("JETAN");       \r
+      if (iJETAN||iJETANESD||iJETANMC||iJETANMC2){\r
+       SetupPar("JETAN");         \r
+       if(iFASTJET)    SetupPar("FASTJETAN");     \r
+      }\r
       if (iPWG4UE||iPWG4SPECTRUM||iPWG4JFSYSTEMATICS)SetupPar("PWG4JetTasks");\r
     }\r
     else{\r
@@ -157,7 +172,10 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
       gSystem->Load("libANALYSIS");\r
       gSystem->Load("libANALYSISalice");  \r
       // --- Enable the JETAN Package\r
-      if (iJETAN||iJETANESD||iJETANMC||iJETANMC2) gSystem->Load("libJETAN");\r
+      if (iJETAN||iJETANESD||iJETANMC||iJETANMC2){\r
+       gSystem->Load("libJETAN");\r
+       gSystem->Load("libFASTJETAN");\r
+      }\r
       // --- Enable particle correlation analysis\r
       if (iPWG4UE||iPWG4SPECTRUM||iPWG4JFSYSTEMATICS||iPWG4THREEJETS)gSystem->Load("libPWG4JetTasks"); \r
     }\r
@@ -193,7 +211,7 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
     if (iAODhandler) {\r
        // AOD output handler\r
        AliAODHandler* aodHandler   = new AliAODHandler();\r
-       aodHandler->SetFillAOD(kFALSE);\r
+       //      aodHandler->SetFillAOD(kFALSE);\r
        mgr->SetOutputEventHandler(aodHandler);       \r
        aodHandler->SetOutputFileName(Form("AliAODs_pwg4_%07d-%07d.root",nOffset,nOffset+nEvents));\r
        cout_aod = mgr->GetCommonOutputContainer();\r
@@ -213,27 +231,28 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
     // Jet analysis from the AOD\r
     if (iJETAN) {\r
       gROOT->LoadMacro("AddTaskJets.C");\r
-      AliAnalysisTaskJets *jetanaAOD  = AddTaskJets("AOD","UA1");\r
+      AliAnalysisTaskJets *jetanaAOD  = AddTaskJets("AOD","FASTJET",0.4);\r
+      jetanaAOD->SetNonStdBranch("jetsAODFJ");    \r
     }   \r
     // JETANALYSIS from the ESD\r
     if (iJETANESD && !iAODanalysis) {\r
       gROOT->LoadMacro("AddTaskJets.C");\r
       AliAnalysisTaskJets *jetanaESD = AddTaskJets("ESD","UA1");\r
-      jetanaESD->SetDebugLevel(10);\r
+      jetanaESD->SetDebugLevel(0);\r
       jetanaESD->SetNonStdBranch("jetsESD");    \r
     }   \r
     // Jet analysisMC\r
-    if (iJETANMC && useMC){ \r
+    if (iJETANMC ){ \r
       gROOT->LoadMacro("AddTaskJets.C");\r
-      AliAnalysisTaskJets *jetanaMC =  AddTaskJets("MC","UA1MC");\r
-      jetanaMC->SetDebugLevel(10);\r
-      jetanaMC->SetNonStdBranch("jetsMC");\r
+      AliAnalysisTaskJets *jetanaMC =  AddTaskJets("AODMC","FASTJET",0.4);\r
+      jetanaMC->SetDebugLevel(0);\r
+      jetanaMC->SetNonStdBranch("jetsMCFJ");\r
     }   \r
-    if (iJETANMC2 && useMC){ \r
+    if (iJETANMC2 ){ \r
       gROOT->LoadMacro("AddTaskJets.C");\r
-      AliAnalysisTaskJets *jetanaMC2 = AddTaskJets("MC2","UA1");\r
-      jetanaMC2->SetDebugLevel(10);\r
-      jetanaMC2->SetNonStdBranch("jetsMC2");\r
+      AliAnalysisTaskJets *jetanaMC2 = AddTaskJets("AODMC2","UA1",0.4);\r
+      jetanaMC2->SetDebugLevel(0);\r
+      jetanaMC2->SetNonStdBranch("jetsMC2FJ");\r
     }   \r
     // Dijet analysis\r
     if(iDIJETAN){\r
@@ -243,12 +262,13 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
     if (iPWG4SPECTRUM) {\r
       gROOT->LoadMacro("AddTaskJetSpectrum.C");\r
       AliAnalysisTaskJetSpectrum* pwg4spec = AddTaskJetSpectrum();\r
-      pwg4spec->SetDebugLevel(10);\r
+      pwg4spec->SetAnalysisType(0);\r
+      pwg4spec->SetDebugLevel(0);\r
     }   \r
     if (iPWG4JFSYSTEMATICS) {\r
       gROOT->LoadMacro("AddTaskJFSystematics.C");\r
-      AliAnalysisTaskJFSystematics* pwg4jfs = AddTaskJFSystematics();\r
-      pwg4jfs->SetDebugLevel(11);\r
+      AliAnalysisTaskJFSystematics* pwg4jfs = AddTaskJFSystematics("jetsAOD","jetsMC");\r
+      pwg4jfs->SetDebugLevel(0);\r
     }   \r
     if (iPWG4JETCORRECTION) {\r
       gROOT->LoadMacro("AddTaskJetCorrections.C");\r
@@ -274,7 +294,7 @@ void AnalysisTrainCAF(Int_t nEvents = 10000, Int_t nOffset = 0, char *ds = "/PWG
     if (mgr->InitAnalysis()) {\r
        mgr->PrintStatus();\r
        if(bPROOF)mgr->StartAnalysis("proof",dataset.Data(), nEvents,nOffset);\r
-       else mgr->StartAnalysis("local",chain);\r
+       else mgr->StartAnalysis("local",chain,100);\r
     }   \r
 }\r
 TChain *CreateChainFromCollection(const char* xmlfile, const char *treeName="esdTree",Int_t nFiles = 0)\r