-AliAnalysisTaskThreeJets * AddTaskThreeJets()\r
+AliAnalysisTaskThreeJets * AddTaskThreeJets(char *bRec = "jets",char * bGen = "jetsAODMC_UA104")\r
{\r
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r
if (!mgr) {\r
\r
AliAnalysisTaskThreeJets * threeJets = new AliAnalysisTaskThreeJets("Three Jet Analysis");\r
\r
- threeJets->SetBranchGen("jetsMC"); \r
- threeJets->SetBranchRec("jets");\r
+ threeJets->SetBranchRec(bRec);\r
+ threeJets->SetBranchGen(bGen); \r
+ // threeJets->SetDebugLevel(10);\r
threeJets->SetR(.5); \r
+ threeJets->SelectCollisionCandidates();\r
+ // threeJets->SetUseMC(kFALSE); // explicitly switch of use of MC/search for MC Jets\r
+\r
+ \r
+ TString type = mgr->GetInputEventHandler()->GetDataType();\r
+ if(type == "AOD"){\r
+ threeJets->SetAODInput(kTRUE);\r
+ }\r
+ \r
+\r
+\r
mgr->AddTask(threeJets);\r
\r
+ \r
\r
\r
\r
- // Create ONLY the output containers for the data produced by the task.\r
- // Get and connect other common input/output containers via the manager as below\r
- //==============================================================================\r
- AliAnalysisDataContainer *coutput1_Corr = mgr->CreateContainer("threeJets", TList::Class(),AliAnalysisManager::kOutputContainer,"threeJets.root");\r
+ // Create ONLY the output containers for the data produced by the task.\r
+ // Get and connect other common input/output containers via the manager as below\r
+ //==============================================================================\r
+ 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
\r
- mgr->ConnectInput (threeJets, 0, mgr->GetCommonInputContainer());\r
- mgr->ConnectOutput (threeJets, 0, mgr->GetCommonOutputContainer());\r
- mgr->ConnectOutput (threeJets, 1, coutput1_Corr );\r
- \r
- return threeJets;\r
+ mgr->ConnectInput (threeJets, 0, mgr->GetCommonInputContainer());\r
+ mgr->ConnectOutput (threeJets, 0, mgr->GetCommonOutputContainer());\r
+ mgr->ConnectOutput (threeJets, 1, coutput1_Corr );\r
+ \r
+ return threeJets;\r
}\r
\r
\r