T0 ESD convert:only time from triggered interaction used for T0 raw vertex calculations
[u/mrichter/AliRoot.git] / ANALYSIS / DphiAnalysis.C
index d2603a8..ea04004 100644 (file)
@@ -9,24 +9,27 @@ void DphiAnalysis()
       gSystem->Load("libAOD.so");
       gSystem->Load("libESD.so");
       gSystem->Load("libANALYSISalice.so");
-      gSystem->Load("libJETAN.so");
 
      //
     if (gApplication) gApplication->InitializeGraphics();
     // Create the chain
     //
+
+    //TString path("/afs/cern.ch/user/m/morsch/public/");
+    TString path("./");
     TChain* chain = new TChain("aodTree");
-    chain->Add("./AliAODs.root");
+    chain->Add(Form("%s/%s",path.Data(),"AliAOD.root"));
 
     /////////////////////////////////////////////////////////////////////////////////// 
     // Create the analysis manager
     //
     // Input 
-    AliMultiAODInputHandler* inpHandler = new AliMultiAODInputHandler(2);
+    AliMultiEventInputHandler* inpHandler = new AliMultiEventInputHandler(2, 1);
     // Pool
-    AliEventPoolOTF* pool = new AliEventPoolOTF("event pool", "event pool");
-    pool->SetTagDirectory(".");
-    pool->SetMultiplicityBin(0, 100, 1);
+    AliEventPoolOTF* pool = new AliEventPoolOTF("event pool", "AOD");
+
+    pool->SetTagDirectory(path.Data());
+    pool->SetMultiplicityBin(0, 100, 100);
     pool->Init();
     
     AliAnalysisManager *mgr  = new AliAnalysisManager("Jet Manager", "Jet Manager");
@@ -37,21 +40,24 @@ void DphiAnalysis()
 
     mgr->SetDebugLevel(10);
     /////////////////////////////////////////////////////////////////////////////////// 
+    gROOT->LoadMacro("AliAnalysisTaskPhiCorr.cxx++g");
     AliAnalysisTaskPhiCorr *dphiana = new AliAnalysisTaskPhiCorr("Phi Correlation Analysis");
     dphiana->SetDebugLevel(10);
     mgr->AddTask(dphiana);
     
     //
     // Create containers for input/output
-    AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
+    AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain",TChain::Class(), 
+                                                            AliAnalysisManager::kInputContainer);
 
-//    AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("tree", TTree::Class(),
-//                                                           AliAnalysisManager::kOutputContainer, "default");
+    AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("tree", TTree::Class(),
+                                                             AliAnalysisManager::kExchangeContainer, "default");
     AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(),
                                                              AliAnalysisManager::kOutputContainer, "histos.root");
 
 
-    mgr->ConnectInput  (dphiana,  0, cinput1  );
+    mgr->ConnectInput  (dphiana,  0,  mgr->GetCommonInputContainer());
+    mgr->ConnectOutput (dphiana,  0, coutput1 );
     mgr->ConnectOutput (dphiana,  1, coutput2 );
 
     //