]>
Commit | Line | Data |
---|---|---|
f27a7e81 | 1 | void RunAlignmentDataFilterITS() { |
2 | // | |
3 | // Macro to extract AliTrackPoints for ITS | |
4 | // A.Dainese, andrea.dainese@pd.infn.it | |
5 | // | |
6 | ||
7b63be54 | 7 | // Input |
8 | Bool_t singlefile=kTRUE; | |
9 | TString esdpath="/home/dainesea/alignData/RAWdata_CosmicsSum09/RecoSPDpro/chunk."; | |
10 | Int_t ifirst=1, ilast=6; | |
11 | // | |
f27a7e81 | 12 | Int_t nentries=1234567890; |
13 | Int_t firstentry=0; | |
14 | ||
15 | // Load geometry file | |
16 | AliGeomManager::LoadGeometry("geometry.root"); | |
17 | ||
18 | // Load PWG1 library | |
19 | gSystem->Load("libANALYSIS.so"); | |
20 | gSystem->Load("libANALYSISalice.so"); | |
21 | gSystem->Load("libPWG1.so"); | |
22 | ||
23 | ||
24 | // Create the analysis manager | |
25 | AliAnalysisManager *mgr = new AliAnalysisManager("testAnalysis"); | |
26 | ||
27 | // Create the task | |
28 | AliAlignmentDataFilterITS *taskFilter = new AliAlignmentDataFilterITS("filterITS"); | |
29 | AliLog::SetClassDebugLevel("AliAlignmentDataFilterITS",10); | |
30 | // configuration via AliITSRecoParam (should be taken from OCDB) | |
31 | AliITSReconstructor *itsReconstructor = new AliITSReconstructor(); | |
32 | AliITSRecoParam *itsRecoParam = AliITSRecoParam::GetCosmicTestParam(); | |
33 | itsReconstructor->SetRecoParam(itsRecoParam); | |
34 | ||
35 | ||
36 | // Add ESD handler | |
37 | AliESDInputHandler *esdH = new AliESDInputHandler(); | |
38 | mgr->SetInputEventHandler(esdH); | |
39 | ||
40 | TChain *chainESD = new TChain("esdTree"); | |
7b63be54 | 41 | if(singlefile) { |
42 | chainESD->Add("AliESDs.root"); | |
43 | } else { | |
44 | for(Int_t i=ifirst; i<=ilast; i++) { | |
45 | TString esdfile=esdpath; esdfile+=i; esdfile.Append("/AliESDs.root"); | |
46 | chainESD->Add(esdfile.Data()); | |
47 | } | |
48 | } | |
49 | ||
f27a7e81 | 50 | // Attach input |
51 | cInput = mgr->CreateContainer("cInput",TChain::Class(),AliAnalysisManager::kInputContainer); | |
52 | //mgr->ConnectInput(taskFilter, 0, cInput); // v4-16-Release | |
53 | mgr->ConnectInput(taskFilter,0,mgr->GetCommonInputContainer()); | |
54 | ||
55 | // Attach output | |
56 | cOutput0= mgr->CreateContainer("cOutput0",TTree::Class(),AliAnalysisManager::kOutputContainer,"AliTrackPoints.root"); | |
57 | mgr->ConnectOutput(taskFilter,0,cOutput0); | |
58 | cOutput1= mgr->CreateContainer("cOutput1",TList::Class(),AliAnalysisManager::kOutputContainer,"AliTrackPoints.root"); | |
59 | mgr->ConnectOutput(taskFilter,1,cOutput1); | |
60 | ||
61 | // Enable debug printouts | |
62 | mgr->SetDebugLevel(10); | |
63 | ||
64 | // Run analysis | |
65 | mgr->InitAnalysis(); | |
66 | mgr->PrintStatus(); | |
67 | mgr->StartAnalysis("local",chainESD,nentries,firstentry); | |
68 | ||
69 | return; | |
70 | } | |
71 |