]>
Commit | Line | Data |
---|---|---|
1ee39b3a | 1 | #if ! defined (__CINT__) || defined (__MAKECINT__) |
2 | #include "TTree.h" | |
3 | #include "AliLog.h" | |
4 | #include "AliAnalysisManager.h" | |
5 | #include "AliAnalysisDataContainer.h" | |
d4f4bb29 | 6 | #include "PWG1/TRD/macros/AliTRDperformanceTrain.h" |
7 | #include "PWG1/TRD/AliTRDcheckPID.h" | |
8 | #include "PWG1/TRD/AliTRDpidRefMaker.h" | |
7c365e61 | 9 | #include "PWG1/TRD/AliTRDpidRefMakerLQ.h" |
1ee39b3a | 10 | #endif |
11 | ||
d4f4bb29 | 12 | #include "PWG1/TRD/macros/helper.C" |
1ee39b3a | 13 | void AddTRDcheckPID(AliAnalysisManager *mgr, Char_t *trd, AliAnalysisDataContainer **ci/*, AliAnalysisDataContainer **co*/) |
14 | { | |
f2e89a4c | 15 | AliLog::SetClassDebugLevel("AliTRDcheckPID", 5); |
1ee39b3a | 16 | Int_t map = ParseOptions(trd); |
10195c56 | 17 | AliAnalysisDataContainer *ce(NULL); |
3d83da78 | 18 | if(TSTBIT(map, kCheckPID)){ |
10195c56 | 19 | AliTRDcheckPID *pid = 0x0; |
f2e89a4c | 20 | mgr->AddTask(pid = new AliTRDcheckPID((char*)"checkPID")); |
10195c56 | 21 | pid->SetDebugLevel(0); |
22 | pid->SetMCdata(mgr->GetMCtruthEventHandler()); | |
3d83da78 | 23 | mgr->ConnectInput (pid, 0, mgr->GetCommonInputContainer()); |
24 | mgr->ConnectInput (pid, 1, ci[0]); | |
25 | mgr->ConnectOutput(pid, 1, mgr->CreateContainer(pid->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, "TRD.Performance.root")); | |
7c365e61 | 26 | |
10195c56 | 27 | // define PID exchange container |
28 | ce = mgr->CreateContainer("InfoPID", TObjArray::Class(), AliAnalysisManager::kExchangeContainer); | |
3d83da78 | 29 | mgr->ConnectOutput(pid, 2, ce); |
10195c56 | 30 | } |
1ee39b3a | 31 | |
32 | if(TSTBIT(map, kPIDRefMaker)){ | |
33 | // TRD pid reference maker | |
34 | AliTRDpidRefMaker *ref = new AliTRDpidRefMaker(); | |
35 | mgr->AddTask(ref); | |
36 | ref->SetDebugLevel(3); | |
37 | AliLog::SetClassDebugLevel("AliTRDpidRefMaker", 3); | |
38 | ref->SetMCdata(mgr->GetMCtruthEventHandler()); | |
39 | ref->SetFriends(kTRUE); | |
7c365e61 | 40 | |
7c365e61 | 41 | // link basic ref maker |
3d83da78 | 42 | mgr->ConnectInput( ref, 1, ci[0]); |
43 | mgr->ConnectInput( ref, 2, ci[2]); | |
10195c56 | 44 | if(ce) mgr->ConnectInput( ref, 2, ce); |
3d83da78 | 45 | mgr->ConnectOutput(ref, 1, mgr->CreateContainer(Form("Moni%s", ref->GetName()), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", ref->GetName()))); |
46 | mgr->ConnectOutput(ref, 2, mgr->CreateContainer(ref->GetName(), TTree::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", ref->GetName()))); | |
7c365e61 | 47 | |
48 | // TRD pid reference maker LQ | |
49 | AliTRDpidRefMakerLQ *lq = new AliTRDpidRefMakerLQ(); | |
50 | mgr->AddTask(lq); | |
51 | lq->SetDebugLevel(3); | |
52 | AliLog::SetClassDebugLevel("AliTRDpidRefMakerLQ", 3); | |
53 | lq->SetMCdata(mgr->GetMCtruthEventHandler()); | |
54 | lq->SetFriends(kTRUE); | |
3d83da78 | 55 | mgr->ConnectInput(lq, 1, ci[0]); |
56 | mgr->ConnectInput(lq, 0, ci[2]); | |
10195c56 | 57 | if(ce) mgr->ConnectInput(lq, 2, ce); |
3d83da78 | 58 | mgr->ConnectOutput(lq, 1, mgr->CreateContainer(Form("Moni%s", lq->GetName()), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", ref->GetName()))); |
59 | mgr->ConnectOutput(lq, 2, mgr->CreateContainer(lq->GetName(), TTree::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", ref->GetName()))); | |
60 | mgr->ConnectOutput(lq, 3, mgr->CreateContainer("PDF", TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", lq->GetName()))); | |
1ee39b3a | 61 | } |
62 | } | |
63 |