1 #if ! defined (__CINT__) || defined (__MAKECINT__)
5 #include "AliAnalysisManager.h"
6 #include "AliAnalysisDataContainer.h"
7 #include "PWG1/TRD/AliTRDpwg1Helper.h"
8 #include "PWG1/TRD/AliTRDcheckPID.h"
9 #include "PWG1/TRD/AliTRDpidRefMaker.h"
10 #include "PWG1/TRD/AliTRDpidRefMakerNN.h"
11 #include "PWG1/TRD/AliTRDpidRefMakerLQ.h"
14 void AddTRDcheckPID(AliAnalysisManager *mgr, Int_t map, AliAnalysisDataContainer **ci, AliAnalysisDataContainer **co)
16 Info("AddTRDcheckPID", Form("[0]=\"%s\" [1]=\"%s\"", ci[0]->GetName(), ci[1]->GetName()));
18 AliTRDcheckPID *pid(NULL);
19 mgr->AddTask(pid = new AliTRDcheckPID((char*)"TRDcheckPID"));
20 //AliLog::SetClassDebugLevel("AliTRDcheckPID", 5);
21 pid->SetDebugLevel(0);
22 pid->SetMCdata(mgr->GetMCtruthEventHandler());
24 // define PID exchange container
25 co[0] = mgr->CreateContainer("InfoPID", TObjArray::Class(), AliAnalysisManager::kExchangeContainer);
26 mgr->ConnectInput (pid, 0, mgr->GetCommonInputContainer());
27 mgr->ConnectInput (pid, 1, ci[0]);
28 mgr->ConnectInput (pid, 2, ci[1]);
29 mgr->ConnectOutput(pid, 1, mgr->CreateContainer(pid->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD_Performance",mgr->GetCommonFileName())));
30 mgr->ConnectOutput(pid, 2, co[0]);
32 if(TESTBIT(map, AliTRDpwg1Helper::kPIDRefMaker)){
34 //AliLog::SetClassDebugLevel("AliTRDpidRefMaker", 3);
35 //AliLog::SetClassDebugLevel("AliTRDpidRefMakerNN", 3);
36 //AliLog::SetClassDebugLevel("AliTRDpidRefMakerLQ", 3);
38 // TRD pid reference maker NN
39 AliTRDpidRefMaker *ref(NULL);
40 mgr->AddTask(ref = new AliTRDpidRefMakerNN((char*)"TRDrefMakerNN"));
41 ref->SetDebugLevel(3);
42 ref->SetMCdata(mgr->GetMCtruthEventHandler());
43 ref->SetFriends(kTRUE);
44 mgr->ConnectInput( ref, 0, mgr->GetCommonInputContainer());
45 mgr->ConnectInput( ref, 1, ci[0]);
46 mgr->ConnectInput( ref, 2, ci[1]);
47 mgr->ConnectInput( ref, 3, co[0]);
48 mgr->ConnectOutput(ref, 1, mgr->CreateContainer("MonitorNN", TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD_Calibration",mgr->GetCommonFileName())));
49 mgr->ConnectOutput(ref, 2, mgr->CreateContainer(ref->GetName(), TTree::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD_Calibration", mgr->GetCommonFileName())));
51 // TRD pid reference maker LQ
52 mgr->AddTask(ref = new AliTRDpidRefMakerLQ((char*)"TRDrefMakerLQ"));
53 ref->SetDebugLevel(3);
54 ref->SetMCdata(mgr->GetMCtruthEventHandler());
55 ref->SetFriends(kTRUE);
56 mgr->ConnectInput(ref, 0, mgr->GetCommonInputContainer());
57 mgr->ConnectInput(ref, 1, ci[0]);
58 mgr->ConnectInput(ref, 2, ci[1]);
59 mgr->ConnectInput(ref, 3, co[0]);
60 mgr->ConnectOutput(ref, 1, mgr->CreateContainer("MonitorLQ", TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD_Calibration", mgr->GetCommonFileName())));
61 mgr->ConnectOutput(ref, 2, mgr->CreateContainer(ref->GetName(), TTree::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD_Calibration", mgr->GetCommonFileName())));
62 mgr->ConnectOutput(ref, 3, mgr->CreateContainer("PDF", TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD_Calibration", mgr->GetCommonFileName())));