Adding stream level and debug streamer to the base class
[u/mrichter/AliRoot.git] / TPC / macros / CalibrateTPC.C
CommitLineData
1037b1ac 1/*
2 Simple calibration analysis
3
4
5 //1. Load needed libraries
6 gSystem->Load("libANALYSIS");
7 gSystem->Load("libTPCcalib");
8 //
9 // Setup analysis manager
10 //
11 gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+")
12 .L $ALICE_ROOT/TPC/macros/CalibrateTPC.C
13 AliAnalysisManager * mgr = SetupCalibTask();
14 //
15 // Process data - chain
16 //
17 gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros");
ae28e92e 18 gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+")
1037b1ac 19 AliXRDPROOFtoolkit tool;
ae28e92e 20 TChain * chain = tool.MakeChain("chain.txt","esdTree",0,10000000);
21 chain->Lookup();
22 mgr->SetNSysInfo(20);
1037b1ac 23 mgr->StartAnalysis("local",chain);
24
25
26*/
27
28
29AliAnalysisManager * SetupCalibTask() {
30 //
31 //
32 //
33 TStopwatch stopwatch;
34 stopwatch.Start();
35
36 AliAnalysisManager *mgr=new AliAnalysisManager("TestManager");
37
38 AliESDInputHandler* esdH=new AliESDInputHandler;
39 esdH->SetActiveBranches("ESDfriend");
40 mgr->SetInputEventHandler(esdH);
ae28e92e 41 //
42 //
43 AliCDBManager::Instance()->SetRun(1) ;
44 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
45 AliTPCClusterParam * clusterParam = AliTPCcalibDB::Instance()->GetClusterParam();
1037b1ac 46
47 AliTPCAnalysisTaskcalib *task1=new AliTPCAnalysisTaskcalib("foo bar");
48
49 AliTPCcalibTracksCuts *cuts = new AliTPCcalibTracksCuts(20, 0.4, 0.5, 0.13, 0.018);
50
ae28e92e 51 AliTPCcalibTracks *calibTracks = new AliTPCcalibTracks("calibTracks", "Resolution calibration object for tracks", clusterParam, cuts);
52 calibTracks->SetDebugLevel(5);
53 calibTracks->SetStreamLevel(5);
54 // ---*---*-----*-*-----*----------*---
1037b1ac 55 // ADD CALIB JOBS HERE!!!!!!!!!!!!!!!!
56 task1->AddJob(new AliTPCcalibAlign);//"align","The kewl alignment job"));
ae28e92e 57 task1->AddJob(new AliTPCcalibTracksGain("TPCGainTracks","TPCGainTracks",cuts));
58 task1->AddJob(calibTracks);
1037b1ac 59 // task1->AddJob(new AliTPCcalibBase);
60 // task1->AddJob(new AliTPCcalibV0);
61 // -*----*----*---*-*------*-------**--
62 // -------*--*---------*-----*-------*-
63
64 mgr->AddTask(task1);
65
66 AliAnalysisDataContainer *cinput1
67 =mgr->CreateContainer("cchain1",TChain::Class(),
68 AliAnalysisManager::kInputContainer);
69 AliAnalysisDataContainer *coutput1
70 =mgr->CreateContainer("asdofhaw",TObjArray::Class(),
71 AliAnalysisManager::kOutputContainer,
72 "CalibObjects.root");
73
74 mgr->ConnectInput(task1,0,cinput1);
75 mgr->ConnectOutput(task1,0,coutput1);
76
77 if (!mgr->InitAnalysis()) return;
78 mgr->PrintStatus();
79
80 stopwatch.Stop();
81 stopwatch.Print();
82 return mgr;
83}