Fix in the last caall to CleanOwnPrimaryVertex
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliAnalysisTaskMEVertexingHFTest.C
CommitLineData
a25935a9 1void AliAnalysisTaskMEVertexingHFTest()\r
2{\r
3 //\r
4 // Test macro for the AliAnalysisTaskME for heavy-flavour event mixing\r
5 // r.romita@gsi.de\r
6 //\r
7\r
8 Bool_t useParFiles=kFALSE;\r
9 \r
10 gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/LoadLibraries.C");\r
11 LoadLibraries(useParFiles);\r
12\r
13 // Local files \r
14 \r
15\r
16 TChain* chain = new TChain("aodTree");\r
17 Char_t fileName[100];\r
18 sprintf(fileName,"AliAODs.root");\r
19 chain->Add(fileName);\r
20 \r
21 // Create the analysis manager\r
22 AliAnalysisManager *mgr = new AliAnalysisManager("My Manager","My Manager");\r
23 \r
24 // Input Handler\r
25 AliMultiEventInputHandler *inputHandler = new AliMultiEventInputHandler(4,1);\r
26 AliEventPoolOTF* pool = new AliEventPoolOTF("event pool", "AOD");\r
27 // apply selections\r
28 pool->SetMultiplicityBin(0, 100, 2);\r
29 pool->SetZVertexBinning(-20., 20., 2);\r
30 pool->Init();\r
31 //set tag directory\r
32 Char_t tagDir[100];\r
33 sprintf(tagDir,".");\r
34 pool->SetTagDirectory(tagDir);\r
35 mgr->SetInputEventHandler(inputHandler);\r
36 mgr->SetEventPool(pool);\r
37 inputHandler->SetEventPool(pool);\r
38 \r
39 // Output \r
40 AliAODHandler *aodHandler = new AliAODHandler();\r
41 aodHandler->SetOutputFileName("AliAOD.VertexingHF.root");\r
42 aodHandler->SetCreateNonStandardAOD();\r
43 mgr->SetOutputEventHandler(aodHandler);\r
44 \r
8e80bfcb 45 gROOT->LoadMacro("AddTaskHFMixing.C");\r
a25935a9 46 AliAnalysisTaskMEVertexingHF *hfTask = AddTaskHFMixing();\r
47 \r
48 \r
49 //\r
50 // Run the analysis\r
51 // \r
52 printf("CHAIN HAS %d ENTRIES\n",(Int_t)chain->GetEntries());\r
53 if(!mgr->InitAnalysis()) return;\r
54\r
55 mgr->PrintStatus();\r
56\r
57 TStopwatch watch;\r
58 watch.Start();\r
59 mgr->StartAnalysis("mix",chain, 1000);\r
60 watch.Stop();\r
61 watch.Print();\r
62 delete mgr;\r
63\r
64 return;\r
65}\r