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