1 AliAnalysisTaskThreeJets * AddTaskThreeJets(char *bRec = "jets",char * bGen = "jetsAODMC_UA104")
\r
3 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
\r
5 ::Error("AddTaskThreeJets", "No analysis manager to connect to.");
\r
9 // Check the analysis type using the event handlers connected to the analysis manager.
\r
10 //==============================================================================
\r
11 if (!mgr->GetInputEventHandler()) {
\r
12 ::Error("AddTaskThreeJets", "This task requires an input event handler");
\r
16 // Create the task and configure it.
\r
17 //===========================================================================
\r
19 AliAnalysisTaskThreeJets * threeJets = new AliAnalysisTaskThreeJets("Three Jet Analysis");
\r
21 threeJets->SetBranchRec(bRec);
\r
22 threeJets->SetBranchGen(bGen);
\r
23 // threeJets->SetDebugLevel(10);
\r
24 threeJets->SetR(.5);
\r
25 threeJets->SelectCollisionCandidates();
\r
26 // threeJets->SetUseMC(kFALSE); // explicitly switch of use of MC/search for MC Jets
\r
29 TString type = mgr->GetInputEventHandler()->GetDataType();
\r
31 threeJets->SetAODInput(kTRUE);
\r
36 mgr->AddTask(threeJets);
\r
42 // Create ONLY the output containers for the data produced by the task.
\r
43 // Get and connect other common input/output containers via the manager as below
\r
44 //==============================================================================
\r
45 AliAnalysisDataContainer *coutput1_Corr = mgr->CreateContainer(Form("threeJets_%s_%s",bRec,bGen), TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s:PWG4_threeJets_%s_%s",AliAnalysisManager::GetCommonFileName(),bRec,bGen));
\r
47 mgr->ConnectInput (threeJets, 0, mgr->GetCommonInputContainer());
\r
48 mgr->ConnectOutput (threeJets, 0, mgr->GetCommonOutputContainer());
\r
49 mgr->ConnectOutput (threeJets, 1, coutput1_Corr );
\r
55 AliAnalysisTaskThreeJets * AddTaskJetCorrections(AliAnalysisManager* mgr,AliAnalysisDataContainer *cinput)
\r
58 ::Error("AddTaskJetSpectrum", "No analysis manager to connect to.");
\r
62 // Check the analysis type using the event handlers connected to the analysis manager.
\r
63 //==============================================================================
\r
64 if (!mgr->GetInputEventHandler()) {
\r
65 ::Error("AddTaskJetSpectrum", "This task requires an input event handler");
\r
69 AliAnalysisTaskThreeJets * threeJets = new AliAnalysisTaskThreeJets("ThreeJetAnalysis");
\r
71 threeJets->SetBranchGen("jetsMC");
\r
72 threeJets->SetBranchRec("jets");
\r
73 threeJets->SetR(.5);
\r
74 mgr->AddTask(threeJets);
\r
76 AliAnalysisDataContainer * coutpu0 = mgr->CreateContainer("coutpu0", TTree::Class(),
\r
77 AliAnalysisManager::kExchangeContainer);
\r
78 AliAnalysisDataContainer *coutput1_threeJets = mgr->CreateContainer("threeJets", TList::Class(),AliAnalysisManager::kOutputContainer,"threeJets.root");
\r
80 mgr->ConnectInput (threeJets, 0, cinput);
\r
81 mgr->ConnectOutput (threeJets, 0, coutpu0);
\r
82 mgr->ConnectOutput (threeJets, 1, coutput1_Corr );
\r