1 #if ! defined (__CINT__) || defined (__MAKECINT__)
4 #include "AliAnalysisManager.h"
5 #include "AliAnalysisDataContainer.h"
6 #include "PWG1/TRD/macros/AliTRDperformanceTrain.h"
7 #include "PWG1/TRD/AliTRDcheckPID.h"
8 #include "PWG1/TRD/AliTRDpidRefMaker.h"
9 #include "PWG1/TRD/AliTRDpidRefMakerNN.h"
10 #include "PWG1/TRD/AliTRDpidRefMakerLQ.h"
13 #include "PWG1/TRD/macros/helper.C"
14 void AddTRDcheckPID(AliAnalysisManager *mgr, Char_t *trd, AliAnalysisDataContainer **ci, AliAnalysisDataContainer **co)
16 Int_t map = ParseOptions(trd);
17 if(!TSTBIT(map, kCheckPID)) return;
18 printf("AddTRDcheckPID <- [0]=\"%s\" [1]=\"%s\"\n", ci[0]->GetName(), ci[1]->GetName());
20 AliTRDcheckPID *pid(NULL);
21 mgr->AddTask(pid = new AliTRDcheckPID((char*)"TRDcheckPID"));
22 //AliLog::SetClassDebugLevel("AliTRDcheckPID", 5);
23 pid->SetDebugLevel(0);
24 pid->SetMCdata(mgr->GetMCtruthEventHandler());
26 // define PID exchange container
27 co[0] = mgr->CreateContainer("InfoPID", TObjArray::Class(), AliAnalysisManager::kExchangeContainer);
28 mgr->ConnectInput (pid, 0, mgr->GetCommonInputContainer());
29 mgr->ConnectInput (pid, 1, ci[0]);
30 mgr->ConnectInput (pid, 2, ci[1]);
31 mgr->ConnectOutput(pid, 1, mgr->CreateContainer(pid->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD_Performance",mgr->GetCommonFileName())));
32 mgr->ConnectOutput(pid, 2, co[0]);
34 if(TSTBIT(map, kPIDRefMaker)){
36 //AliLog::SetClassDebugLevel("AliTRDpidRefMaker", 3);
37 //AliLog::SetClassDebugLevel("AliTRDpidRefMakerNN", 3);
38 //AliLog::SetClassDebugLevel("AliTRDpidRefMakerLQ", 3);
40 // TRD pid reference maker NN
41 AliTRDpidRefMaker *ref(NULL);
42 mgr->AddTask(ref = new AliTRDpidRefMakerNN((char*)"TRDrefMakerNN"));
43 ref->SetDebugLevel(3);
44 ref->SetMCdata(mgr->GetMCtruthEventHandler());
45 ref->SetFriends(kTRUE);
46 mgr->ConnectInput( ref, 0, mgr->GetCommonInputContainer());
47 mgr->ConnectInput( ref, 1, ci[0]);
48 mgr->ConnectInput( ref, 2, ci[1]);
49 mgr->ConnectInput( ref, 3, co[0]);
50 mgr->ConnectOutput(ref, 1, mgr->CreateContainer("MonitorNN", TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD.CalibPIDrefMaker",mgr->GetCommonFileName())));
51 mgr->ConnectOutput(ref, 2, mgr->CreateContainer(ref->GetName(), TTree::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD.CalibPIDrefMaker", mgr->GetCommonFileName())));
53 // TRD pid reference maker LQ
54 mgr->AddTask(ref = new AliTRDpidRefMakerLQ((char*)"TRDrefMakerLQ"));
55 ref->SetDebugLevel(3);
56 ref->SetMCdata(mgr->GetMCtruthEventHandler());
57 ref->SetFriends(kTRUE);
58 mgr->ConnectInput(ref, 0, mgr->GetCommonInputContainer());
59 mgr->ConnectInput(ref, 1, ci[0]);
60 mgr->ConnectInput(ref, 2, ci[1]);
61 mgr->ConnectInput(ref, 3, co[0]);
62 mgr->ConnectOutput(ref, 1, mgr->CreateContainer("MonitorLQ", TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD.CalibPIDrefMaker", mgr->GetCommonFileName())));
63 mgr->ConnectOutput(ref, 2, mgr->CreateContainer(ref->GetName(), TTree::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD.CalibPIDrefMaker", mgr->GetCommonFileName())));
64 mgr->ConnectOutput(ref, 3, mgr->CreateContainer("PDF", TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD.CalibPIDrefMakerLQ", mgr->GetCommonFileName())));