1 AliAnalysisTaskFragmentationFunction *AddTaskFragmentationFunction(UInt_t filterMask = 0,Int_t iPhysicsSelection)
3 // Creates a jet fider task, configures it and adds it to the analysis manager.
5 // Get the pointer to the existing analysis manager via the static access method.
6 //==============================================================================
7 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
9 ::Error("AddTaskFragmentationFunction", "No analysis manager to connect to.");
13 // Check the analysis type using the event handlers connected to the analysis manager.
14 //==============================================================================
15 if (!mgr->GetInputEventHandler()) {
16 ::Error("AddTaskMyDyJets", "This task requires an input event handler");
20 // Create the task and configure it.
21 //===========================================================================
23 AliAnalysisTaskFragmentationFunction* pwg4dijets = new AliAnalysisTaskFragmentationFunction("Fragmentation Function Study");
25 pwg4dijets->SetBranchGen("jetsMC");
26 pwg4dijets->SetBranchRec("jets");
27 // pwg4dijets->SetBranchRec("jetsUA1AOD");
28 pwg4dijets->SetLimitGenJetEta(0);
29 pwg4dijets->SetFilterMask(filterMask);
30 if(iPhysicsSelection) pwg4dijets->SelectCollisionCandidates();
31 mgr->AddTask(pwg4dijets);
37 // Create ONLY the output containers for the data produced by the task.
38 // Get and connect other common input/output containers via the manager as below
39 //==============================================================================
40 AliAnalysisDataContainer *coutput1_FF = mgr->CreateContainer("PWG4_FF", TList::Class(),AliAnalysisManager::kOutputContainer,"PWG4_FF.root");
42 mgr->ConnectInput (pwg4dijets, 0, mgr->GetCommonInputContainer());
43 mgr->ConnectOutput (pwg4dijets, 0, mgr->GetCommonOutputContainer());
44 mgr->ConnectOutput (pwg4dijets, 1, coutput1_FF );