New directory for the VMC tests (Ivana, Eva)
[u/mrichter/AliRoot.git] / TRD / qaRec / macros / AddTRDefficiency.C
CommitLineData
873458ab 1#if ! defined (__CINT__) || defined (__MAKECINT__)
2#include "AliAnalysisManager.h"
3#include "AliAnalysisDataContainer.h"
6da3eee3 4#include "TRD/qaRec/macros/AliTRDperformanceTrain.h"
873458ab 5#include "TRD/qaRec/AliTRDefficiency.h"
6#include "TRD/qaRec/AliTRDefficiencyMC.h"
7#include "TRD/qaRec/AliTRDmultiplicity.h"
8#endif
9
c82c70b6 10#include "TRD/qaRec/macros/helper.C"
6da3eee3 11void AddTRDefficiency(AliAnalysisManager *mgr, Char_t *trd, AliAnalysisDataContainer **ci/*, AliAnalysisDataContainer **co*/)
873458ab 12{
6da3eee3 13 Int_t map = ParseOptions(trd);
14 if(!(TSTBIT(map, kEfficiency))) return;
15
873458ab 16 Bool_t mc = mgr->GetMCtruthEventHandler();
17 AliTRDefficiency *eff = 0x0;
18 mgr->AddTask(eff = new AliTRDefficiency());
19 eff->SetDebugLevel(0);
20 mgr->ConnectInput(eff, 0, ci[0]);
21 mgr->ConnectOutput(eff, 0, mgr->CreateContainer(eff->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, "TRD.Performance.root"));
22
23
24 // TRD combined tracking efficiency
25 AliTRDefficiencyMC *effMC = 0x0;
26 if(mc && TSTBIT(map, kEfficiencyMC)){
27 mgr->AddTask(effMC = new AliTRDefficiencyMC());
28 effMC->SetDebugLevel(0);
29
30 // Create containers for input/output
31 mgr->ConnectInput(effMC, 0, ci[0]);
32 mgr->ConnectOutput(effMC, 0, mgr->CreateContainer(effMC->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Task%s.root", effMC->GetName())));
33 }
34
35 // TRD single track selection
36 if(!(TSTBIT(map, kMultiplicity))) return;
37
38 AliTRDmultiplicity *mult = 0x0;
39 mgr->AddTask(mult = new AliTRDmultiplicity());
40 mult->SetDebugLevel(0);
41 mgr->ConnectInput(mult, 0, ci[0]);
42 mgr->ConnectOutput(mult, 0, mgr->CreateContainer(mult->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Task%s.root", mult->GetName())));
43}
44