]>
Commit | Line | Data |
---|---|---|
60da4435 | 1 | void anaTask() |
2 | { | |
2c61a839 | 3 | //Macro to run pi0 calibration on local ESD files. |
4 | //Author: Boris Polishchuk. | |
5 | ||
6 | ||
7 | //Uncomment the line below if your ESD files are from old productions | |
8 | //so there are no PHOS geometry matrices written in the ESD. | |
9 | //You can find an ideal geometry here: $ALICE_ROOT/test/QA/geometry.root | |
10 | //and copy to your working directory. | |
11 | ||
12 | //AliGeomManager::LoadGeometry("geometry.root"); | |
13 | ||
14 | //You can apply misalignment by following | |
15 | //(remember that your local OCDB in ./PHOS should contain a copy of the | |
16 | //$ALICE_ROOT/OCDB/PHOS/Align directory while ./PHOS/Calib/EmcGainPedestals | |
17 | //should contain the corrections to the calibration coefficients (~1) | |
18 | //instead of real CC (~0.005)! ): | |
19 | ||
20 | // AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); | |
21 | // AliCDBManager::Instance()->SetSpecificStorage("PHOS/*","local://./"); | |
22 | ||
23 | // AliCDBManager::Instance()->SetRun(0); | |
24 | // AliCDBEntry* e = AliCDBManager::Instance()->Get("PHOS/Align/Data"); | |
25 | // TClonesArray *array = (TClonesArray*) e->GetObject(); | |
26 | // AliGeomManager::ApplyAlignObjsToGeom(*array); | |
60da4435 | 27 | |
60da4435 | 28 | |
29 | // load analysis framework | |
30 | gSystem->Load("libANALYSIS"); | |
31 | gSystem->Load("libANALYSISalice"); //AliAnalysisTaskSE | |
42bc64cf | 32 | gSystem->Load("libPHOSpi0Calib"); |
60da4435 | 33 | |
34 | gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C"); | |
35 | TChain* chain = CreateESDChain("list.txt", 300); | |
36 | ||
37 | // for includes use either global setting in $HOME/.rootrc | |
38 | // ACLiC.IncludePaths: -I$ALICE_ROOT/include | |
39 | // or in each macro | |
40 | // gSystem->AddIncludePath("$ALICE_ROOT/include"); | |
41 | ||
42 | // Create the analysis manager | |
43 | AliAnalysisManager *mgr = new AliAnalysisManager("Pi0Calib"); | |
44 | ||
45 | ||
46 | ||
47 | AliVEventHandler* esdH = new AliESDInputHandler(); | |
48 | mgr->SetInputEventHandler(esdH); | |
49 | ||
50 | // Create task | |
51 | ||
60da4435 | 52 | AliAnalysisTaskPi0CalibSelection *task = new AliAnalysisTaskPi0CalibSelection("Pi0CalibSelection"); |
53 | //task->SetClusterMinEnergy(0.4); | |
54 | ||
55 | // Add task | |
56 | mgr->AddTask(task); | |
57 | ||
58 | // Create containers for input/output | |
42bc64cf | 59 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); |
60da4435 | 60 | AliAnalysisDataContainer *coutput = mgr->CreateContainer("histos", TList::Class(), AliAnalysisManager::kOutputContainer, "histos.root"); |
61 | ||
62 | // Connect input/output | |
63 | mgr->ConnectInput(task, 0, cinput); | |
64 | mgr->ConnectOutput(task, 1, coutput); | |
65 | ||
66 | // Enable debug printouts | |
67 | mgr->SetDebugLevel(10); | |
68 | ||
69 | if (!mgr->InitAnalysis()) | |
70 | return; | |
71 | ||
72 | mgr->PrintStatus(); | |
73 | ||
74 | mgr->StartAnalysis("local", chain); | |
75 | } |