]>
Commit | Line | Data |
---|---|---|
1ee39b3a | 1 | #if ! defined (__CINT__) || defined (__MAKECINT__) |
2 | #include "TTree.h" | |
3f19c2cd | 3 | #include "AliLog.h" |
1ee39b3a | 4 | #include "AliAnalysisManager.h" |
5 | #include "AliAnalysisDataContainer.h" | |
37097f6f | 6 | #include "TRD/AliTRDgeometry.h" |
d4f4bb29 | 7 | #include "PWG1/TRD/macros/AliTRDperformanceTrain.h" |
8 | #include "PWG1/TRD/AliTRDresolution.h" | |
9 | #include "PWG1/TRD/AliTRDclusterResolution.h" | |
10 | #include "PWG1/TRD/AliTRDalignmentTask.h" | |
1ee39b3a | 11 | #endif |
12 | ||
d4f4bb29 | 13 | #include "PWG1/TRD/macros/helper.C" |
3d2a3dff | 14 | void AddTRDresolution(AliAnalysisManager *mgr, Char_t *trd, AliAnalysisDataContainer **ci) |
1ee39b3a | 15 | { |
16 | Int_t map = ParseOptions(trd); | |
705f8b0a | 17 | if(!TSTBIT(map, kResolution)) return; |
3d2a3dff | 18 | printf("AddTRDresolution <- [0]=\"%s\" [1]=\"%s\" [2]=\"%s\"\n", ci[0]->GetName(), ci[1]->GetName(), ci[2]->GetName()); |
3f19c2cd | 19 | |
37097f6f | 20 | AliLog::SetClassDebugLevel("AliTRDrecoTask", 2); |
21 | AliLog::SetClassDebugLevel("AliTRDresolution", 2); | |
705f8b0a | 22 | AliTRDresolution *res(NULL); |
3d2a3dff | 23 | const Char_t *suffix[]={"", "SA", "K"}; |
24 | for(Int_t itq=0; itq<1/*3*/; itq++){ | |
25 | mgr->AddTask(res = new AliTRDresolution(Form("TRDresolution%s", suffix[itq]))); | |
26 | res->SetMCdata(mgr->GetMCtruthEventHandler()); | |
27 | res->SetPostProcess(kFALSE); | |
2589cf64 | 28 | res->SetDebugLevel(0); |
29 | //if(itq==0) res->SetSegmentationLevel(1); | |
3d2a3dff | 30 | res->SetNameId(suffix[itq]); |
31 | mgr->ConnectInput(res, 0, mgr->GetCommonInputContainer()); | |
32 | mgr->ConnectInput(res, 1, ci[itq]); | |
997f86cb | 33 | mgr->ConnectOutput(res,1, mgr->CreateContainer(res->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD_Performance", mgr->GetCommonFileName()))); |
3d2a3dff | 34 | |
35 | // Create output containers for calibration tasks | |
36 | AliAnalysisDataContainer *co(NULL); | |
64096f2e | 37 | co = mgr->CreateContainer(Form("%sCl2Trk%s", res->GetName(), suffix[itq]), TObjArray::Class(), AliAnalysisManager::kExchangeContainer); |
3d2a3dff | 38 | mgr->ConnectOutput(res, AliTRDresolution::kClToTrk, co); |
64096f2e | 39 | co = mgr->CreateContainer(Form("%sCl2MC%s", res->GetName(), suffix[itq]), TObjArray::Class(), AliAnalysisManager::kExchangeContainer); |
3d2a3dff | 40 | mgr->ConnectOutput(res, AliTRDresolution::kClToMC, co); |
3d2a3dff | 41 | |
42 | TObjArray *coa = mgr->GetContainers(); | |
43 | // Cluster Error Parameterization | |
44 | if(TSTBIT(map, kClErrParam)){ | |
45 | AliTRDclusterResolution *taskCl(NULL); | |
37097f6f | 46 | AliLog::SetClassDebugLevel("AliTRDclusterResolution", 2); |
801d4d50 | 47 | for(Int_t idet(10); idet<11/*AliTRDgeometry::kNdet*/; idet++){ |
37097f6f | 48 | mgr->AddTask(taskCl = new AliTRDclusterResolution(Form("ClErrCalib%03d", idet))); |
801d4d50 | 49 | taskCl->SetCalibrationRegion(idet); |
e9d62bd2 | 50 | taskCl->SetDebugLevel(0); |
51 | mgr->ConnectInput(taskCl, 0, mgr->GetCommonInputContainer()); | |
37097f6f | 52 | mgr->ConnectInput(taskCl, 1, (AliAnalysisDataContainer*)coa->FindObject(Form("%sCl2Trk%s", res->GetName(), suffix[itq]))); |
e9d62bd2 | 53 | mgr->ConnectOutput(taskCl, 1, mgr->CreateContainer(taskCl->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD.CalibClErrParam", mgr->GetCommonFileName()))); |
37097f6f | 54 | if(mgr->GetMCtruthEventHandler()){ |
55 | mgr->AddTask(taskCl = new AliTRDclusterResolution(Form("ClErrCalibMC%03d", idet))); | |
801d4d50 | 56 | taskCl->SetCalibrationRegion(idet); |
37097f6f | 57 | taskCl->SetDebugLevel(0); |
58 | mgr->ConnectInput(taskCl, 0, mgr->GetCommonInputContainer()); | |
59 | mgr->ConnectInput(taskCl, 1, (AliAnalysisDataContainer*)coa->FindObject(Form("%sCl2MC%s", res->GetName(), suffix[itq]))); | |
60 | mgr->ConnectOutput(taskCl, 1, mgr->CreateContainer(taskCl->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD.CalibClErrParam", mgr->GetCommonFileName()))); | |
61 | } | |
e9d62bd2 | 62 | } |
3d2a3dff | 63 | } |
1ee39b3a | 64 | } |
65 | ||
66 | // TRD alignment | |
67 | if(TSTBIT(map, kAlignment)){ | |
705f8b0a | 68 | AliTRDalignmentTask *taskAlign(NULL); |
69 | mgr->AddTask(taskAlign = new AliTRDalignmentTask((char*)"TRDalignment")); | |
70 | taskAlign->SetDebugLevel(0); | |
71 | //AliLog::SetClassDebugLevel("AliTRDalignmentTask", 5); | |
72 | mgr->ConnectInput(taskAlign, 0, mgr->GetCommonInputContainer()); | |
87c9fc00 | 73 | mgr->ConnectInput(taskAlign, 1, ci[0]); |
705f8b0a | 74 | mgr->ConnectOutput(taskAlign, 1, mgr->CreateContainer(Form("h%s", taskAlign->GetName()), TObjArray::Class(), AliAnalysisManager::kExchangeContainer)); |
997f86cb | 75 | mgr->ConnectOutput(taskAlign, 2, mgr->CreateContainer(taskAlign->GetName(), TTree::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD.Calib%s",mgr->GetCommonFileName(), taskAlign->GetName()))); |
1ee39b3a | 76 | } |
77 | } | |
78 |