]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/TRD/macros/AddTRDcheckPID.C
use folders TRD_Performance, TRD_Calibration and TRD_Alignment to store
[u/mrichter/AliRoot.git] / PWG1 / TRD / macros / AddTRDcheckPID.C
CommitLineData
1ee39b3a 1#if ! defined (__CINT__) || defined (__MAKECINT__)
2#include "TTree.h"
a7fa310f 3#include "TError.h"
1ee39b3a 4#include "AliLog.h"
5#include "AliAnalysisManager.h"
6#include "AliAnalysisDataContainer.h"
99535225 7#include "PWG1/TRD/AliTRDpwg1Helper.h"
d4f4bb29 8#include "PWG1/TRD/AliTRDcheckPID.h"
9#include "PWG1/TRD/AliTRDpidRefMaker.h"
705f8b0a 10#include "PWG1/TRD/AliTRDpidRefMakerNN.h"
7c365e61 11#include "PWG1/TRD/AliTRDpidRefMakerLQ.h"
1ee39b3a 12#endif
13
a7fa310f 14void AddTRDcheckPID(AliAnalysisManager *mgr, Int_t map, AliAnalysisDataContainer **ci, AliAnalysisDataContainer **co)
1ee39b3a 15{
a7fa310f 16 Info("AddTRDcheckPID", Form("[0]=\"%s\" [1]=\"%s\"", ci[0]->GetName(), ci[1]->GetName()));
7c365e61 17
705f8b0a 18 AliTRDcheckPID *pid(NULL);
4fa7d600 19 mgr->AddTask(pid = new AliTRDcheckPID((char*)"TRDcheckPID"));
705f8b0a 20 //AliLog::SetClassDebugLevel("AliTRDcheckPID", 5);
21 pid->SetDebugLevel(0);
22 pid->SetMCdata(mgr->GetMCtruthEventHandler());
1ee39b3a 23
705f8b0a 24 // define PID exchange container
45d01ff8 25 co[0] = mgr->CreateContainer("InfoPID", TObjArray::Class(), AliAnalysisManager::kExchangeContainer);
705f8b0a 26 mgr->ConnectInput (pid, 0, mgr->GetCommonInputContainer());
27 mgr->ConnectInput (pid, 1, ci[0]);
28 mgr->ConnectInput (pid, 2, ci[1]);
997f86cb 29 mgr->ConnectOutput(pid, 1, mgr->CreateContainer(pid->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD_Performance",mgr->GetCommonFileName())));
45d01ff8 30 mgr->ConnectOutput(pid, 2, co[0]);
7c365e61 31
99535225 32 if(TESTBIT(map, AliTRDpwg1Helper::kPIDRefMaker)){
7c365e61 33
45d01ff8 34 //AliLog::SetClassDebugLevel("AliTRDpidRefMaker", 3);
35 //AliLog::SetClassDebugLevel("AliTRDpidRefMakerNN", 3);
36 //AliLog::SetClassDebugLevel("AliTRDpidRefMakerLQ", 3);
37
38 // TRD pid reference maker NN
39 AliTRDpidRefMaker *ref(NULL);
4fa7d600 40 mgr->AddTask(ref = new AliTRDpidRefMakerNN((char*)"TRDrefMakerNN"));
45d01ff8 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]);
d0967050 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())));
45d01ff8 50
51 // TRD pid reference maker LQ
4fa7d600 52 mgr->AddTask(ref = new AliTRDpidRefMakerLQ((char*)"TRDrefMakerLQ"));
45d01ff8 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]);
d0967050 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())));
45d01ff8 63 }
1ee39b3a 64}
65