]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/EMCALTasks/macros/AddTaskEMCALPi0V2ShSh.C
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / macros / AddTaskEMCALPi0V2ShSh.C
CommitLineData
fc0f5568 1AliAnalysisTaskEMCAPi0V2ShSh *AddTaskEMCAPi0V2ShSh()
2{
3
4 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
5
6 if (!mgr)
7 {
8 ::Error("AddTaskEMCAPi0V2ShSh", "No analysis manager to connect to.");
9 return NULL;
10 }
11
12 if (!mgr->GetInputEventHandler())
13 {
14 ::Error("AddTaskEventplane", "This task requires an input event handler");
15 return NULL;
16 }
17 TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
18
19 Bool_t ismc=kFALSE;
20 ismc = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
21 cout<<"AddTaskEMCAPi0V2ShSh - MC config is: "<<ismc<<endl;
22
23 if (ismc) return 0;
24
25 UInt_t physMB = 0;
26 UInt_t physJet = 0;
27 UInt_t physGam = 0;
28 UInt_t physEMC = 0;
29
30 TString sGeomName = AliEMCALGeometry::GetDefaultGeometryName();
31
32 AliAnalysisTaskEMCAPi0V2ShSh *task = new AliAnalysisTaskEMCAPi0V2ShSh("EMCALTry_astahlle");
33
34 task->SelectCollisionCandidates(AliVEvent::kSemiCentral);
35
36 if(!ismc)
37 {
38 RequestMemory(task, 250*1024);
39 mgr->AddTask(task);
40
41 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
42 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("hist", TList::Class(),AliAnalysisManager::kOutputContainer, "lhc11h_2_EMCAPi0V2ShSh.root");
43
44 mgr->ConnectInput(task, 0, cinput);
45 mgr->ConnectOutput(task, 1, coutput1);
46
47 }
48 return task;
49}
50