]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/EMCALTasks/macros/AddTaskTrgContam.C
SHUTTLE module
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / macros / AddTaskTrgContam.C
CommitLineData
0601d71e 1// $Id$
2
3AliAnalysisTaskTrgContam *AddTaskTrgContam(
4 Double_t trgThresh=4.8,
5 Double_t exoticCut=0.97
6)
eb7f0edc 7{
8 // Get the pointer to the existing analysis manager via the static access method.
9 //==============================================================================
10 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
11 if (!mgr) {
d08ef5dc 12 ::Error("AddTaskTrgContam", "No analysis manager to connect to.");
eb7f0edc 13 return NULL;
14 }
15
16 // Create the task and configure it.
17 //===========================================================================
18 AliAnalysisTaskTrgContam* ana = new AliAnalysisTaskTrgContam("");
19
20 ana->SelectCollisionCandidates( AliVEvent::kEMC1 | AliVEvent::kMB | AliVEvent::kEMC7 | AliVEvent::kINT7);
21
22 Bool_t isMC = (mgr->GetMCtruthEventHandler() != NULL);
23 if (isMC)
24 return 0x0;
25
26 ana->SetTrigThresh(trgThresh);
27 ana->SetExotCut(exoticCut);
28
29 mgr->AddTask(ana);
30
31 // Create ONLY the output containers for the data produced by the task.
32 // Get and connect other common input/output containers via the manager as below
33 //==============================================================================
34 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("histosTrgContam", TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s", AliAnalysisManager::GetCommonFileName()));
35
36 mgr->ConnectInput (ana, 0, mgr->GetCommonInputContainer());
37 mgr->ConnectOutput (ana, 1, coutput1 );
38
39 return ana;
40}