]>
Commit | Line | Data |
---|---|---|
824c6477 | 1 | AliAnalysisTask *AddTaskHFEemcQA(){ |
2 | //get the current analysis manager | |
3 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
4 | if (!mgr) { | |
5 | Error("AddTaskHFE", "No analysis manager found."); | |
6 | return NULL; | |
7 | } | |
8 | if (!mgr->GetInputEventHandler()) { | |
9 | ::Error("AddTaskHFE", "This task requires an input event handler"); | |
10 | return NULL; | |
11 | } | |
12 | TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
13 | ||
14 | Bool_t MCthere=kFALSE; | |
15 | AliMCEventHandler *mcH = dynamic_cast<AliMCEventHandler*>(mgr->GetMCtruthEventHandler()); | |
16 | if(!mcH){ | |
17 | MCthere=kFALSE; | |
18 | }else{ | |
19 | MCthere=kTRUE; | |
20 | } | |
21 | ||
22 | ||
23 | gROOT->LoadMacro("AliAnalysisTaskHFEemcQA.cxx++g"); | |
24 | ||
25 | // +++ EMCal MB | |
26 | AliAnalysisTaskHFEemcQA *hfecalqa = new AliAnalysisTaskHFEemcQA("emcqa"); | |
27 | mgr->AddTask(hfecalqa); | |
28 | hfecalqa->SelectCollisionCandidates(AliVEvent::kINT8); | |
29 | TString containerName = mgr->GetCommonFileName(); | |
30 | containerName += ":PWGHF_hfeHFEemcQAINT8"; | |
31 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
32 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("HFEemcQAINT8", TList::Class(),AliAnalysisManager::kOutputContainer, containerName.Data()); | |
33 | mgr->ConnectInput(hfecalqa, 0, cinput); | |
34 | mgr->ConnectOutput(hfecalqa, 1, coutput1); | |
35 | /* | |
36 | mgr->ConnectInput (hfecalqa,0,cinput); | |
37 | hfecalqa->ConnectOutput(1, mgr->CreateContainer("HFE_Results_EMCALINT8", TList::Class(), | |
38 | AliAnalysisManager::kOutputContainer, containerName.Data())); | |
39 | hfecalqa->ConnectOutput(2, mgr->CreateContainer("HFE_QA_EMCALINT8", TList::Class(), | |
40 | AliAnalysisManager::kOutputContainer, containerName.Data())); | |
41 | */ | |
42 | ||
43 | // EMCal EGA | |
44 | AliAnalysisTaskHFEemcQA *hfecalqaTrig0 = new AliAnalysisTaskHFEemcQA("emcqa"); | |
45 | mgr->AddTask(hfecalqaTrig0); | |
46 | hfecalqaTrig0->SelectCollisionCandidates(AliVEvent::kEMCEGA); | |
47 | TString containerName1 = mgr->GetCommonFileName(); | |
48 | containerName1 += ":PWGHF_hfeHFEemcQATrigGA"; | |
49 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
50 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("HFEemcQATrigGA", TList::Class(),AliAnalysisManager::kOutputContainer, containerName1.Data()); | |
51 | mgr->ConnectInput(hfecalqaTrig0, 0, cinput); | |
52 | mgr->ConnectOutput(hfecalqaTrig0, 1, coutput1); | |
53 | ||
54 | ||
55 | // EMCal EJE | |
56 | AliAnalysisTaskHFEemcQA *hfecalqaTrig1 = new AliAnalysisTaskHFEemcQA("emcqa"); | |
57 | mgr->AddTask(hfecalqaTrig1); | |
58 | hfecalqaTrig1->SelectCollisionCandidates(AliVEvent::kEMCEJE); | |
59 | TString containerName2 = mgr->GetCommonFileName(); | |
60 | containerName1 += ":PWGHF_hfeHFEemcQATrigJE"; | |
61 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
62 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("HFEemcQATrigJE", TList::Class(),AliAnalysisManager::kOutputContainer, containerName2.Data()); | |
63 | mgr->ConnectInput(hfecalqaTrig1, 0, cinput); | |
64 | mgr->ConnectOutput(hfecalqaTrig1, 1, coutput1); | |
65 | ||
66 | //return hfecalqa; | |
67 | return NULL; | |
68 | } |