Attempt to monitor what file is read and merged by what job
[u/mrichter/AliRoot.git] / PWGJE / macros / AddTaskKMeans.C
CommitLineData
70f2ce9d 1AliAnalysisTaskKMeans *AddTaskKMeans()\r
2{\r
3// Creates a dijet task, configures it and adds it to the analysis manager.\r
4\r
5 // Get the pointer to the existing analysis manager via the static access method.\r
6 //==============================================================================\r
7 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r
8 if (!mgr) {\r
9 ::Error("AddTaskJets", "No analysis manager to connect to.");\r
10 return NULL;\r
11 }\r
12\r
13 // Check the analysis type using the event handlers connected to the analysis manager.\r
14 //==============================================================================\r
15 if (!mgr->GetInputEventHandler()) {\r
16 ::Error("AddTaskKMeans", "This task requires an input event handler");\r
17 return NULL;\r
18 }\r
19\r
20 // Create the task and configure it.\r
21 //===========================================================================\r
22\r
23 AliAnalysisTaskKMeans *taskKMeans = new AliAnalysisTaskKMeans("K-Means Analysis");\r
24 taskKMeans->SetDebugLevel(0);\r
25 AliESDtrackCuts* esdTrackCutsL = new AliESDtrackCuts("AliESDtrackCuts", "Standard");\r
26 esdTrackCutsL->SetMinNClustersTPC(50);\r
27 esdTrackCutsL->SetRequireTPCRefit(kTRUE);\r
28 esdTrackCutsL->SetRequireITSRefit(kTRUE);\r
29 esdTrackCutsL->SetMaxDCAToVertexXY(3.);\r
30 esdTrackCutsL->SetMaxDCAToVertexZ(3.);\r
31 esdTrackCutsL->SetAcceptKinkDaughters(kFALSE);\r
32 taskKMeans->SetCuts(esdTrackCutsL);\r
6930ed8b 33 taskKMeans->SetK(4);\r
3ac7cdd1 34 taskKMeans->SetMinimumMultiplicity(10);\r
5aa2a5a5 35 AliKMeansClustering::SetBeta(1.);\r
70f2ce9d 36 mgr->AddTask(taskKMeans);\r
37\r
38 AliAnalysisDataContainer* cout_kmeans = mgr->CreateContainer("KMeans", TList::Class(),AliAnalysisManager::kOutputContainer,\r
39 Form("%s:PWG4_KMeans", AliAnalysisManager::GetCommonFileName()));\r
40\r
41 // Create ONLY the output containers for the data produced by the task.\r
42 // Get and connect other common input/output containers via the manager as below\r
43 //==============================================================================\r
44 mgr->ConnectInput (taskKMeans, 0, mgr->GetCommonInputContainer());\r
70f2ce9d 45 mgr->ConnectOutput (taskKMeans, 1, cout_kmeans);\r
46\r
47 return taskKMeans;\r
48}\r