]>
Commit | Line | Data |
---|---|---|
a75aacd6 | 1 | \r |
2 | \r | |
3 | void ConfigTaskUE(AliAnalysisTaskUE * ueana ); // common config, extend with different cases\r | |
4 | \r | |
5 | AliAnalysisTaskLeadingTrackUE *AddTaskLeadingTrackUE(Int_t analysisMode = 0)\r | |
6 | {\r | |
7 | // Creates a jet fider task, configures it and adds it to the analysis manager.\r | |
8 | \r | |
9 | // Get the pointer to the existing analysis manager via the static access method.\r | |
10 | //==============================================================================\r | |
11 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r | |
12 | if (!mgr) {\r | |
13 | ::Error("AddTaskLeadingTrackUE", "No analysis manager to connect to.");\r | |
14 | return NULL;\r | |
15 | } \r | |
16 | \r | |
17 | // Check the analysis type using the event handlers connected to the analysis manager.\r | |
18 | //==============================================================================\r | |
19 | if (!mgr->GetInputEventHandler()) {\r | |
20 | ::Error("AddTaskLeadingTrackUE", "This task requires an input event handler");\r | |
21 | return NULL;\r | |
22 | }\r | |
23 | \r | |
24 | // Create the task and configure it.\r | |
25 | //===========================================================================\r | |
26 | \r | |
27 | AliAnalysisTaskLeadingTrackUE* ueana = new AliAnalysisTaskLeadingTrackUE("UEAnalysis_LeadingTrack");\r | |
28 | ueana->SetMode(analysisMode);// data or corrections mode\r | |
29 | ConfigTaskUE(ueana);\r | |
30 | \r | |
31 | mgr->AddTask(ueana);\r | |
32 | \r | |
33 | // Create ONLY the output containers for the data produced by the task.\r | |
34 | // Get and connect other common input/output containers via the manager as below\r | |
35 | //==============================================================================\r | |
36 | AliAnalysisDataContainer *coutput1_UE = 0;\r | |
37 | coutput1_UE = mgr->CreateContainer("histosLeadingTrackUE", TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s:PWG4_LeadingTrackUE",AliAnalysisManager::GetCommonFileName()));\r | |
38 | \r | |
39 | mgr->ConnectInput (ueana, 0, mgr->GetCommonInputContainer());\r | |
40 | mgr->ConnectOutput (ueana, 0, coutput1_UE );\r | |
41 | \r | |
42 | return ueana;\r | |
43 | }\r | |
44 | \r | |
45 | void ConfigTaskUE(AliAnalysisTaskLeadingTrackUE * ueana){\r | |
46 | // common config,\r | |
47 | ueana->SetDebugLevel(0); \r | |
48 | ueana->SetPtRangeInHist(100, 0., 100.);\r | |
8ecf60e0 | 49 | // ueana->SetFilterBit(16); \r |
50 | ueana->SetFilterBit(64+128); \r | |
a75aacd6 | 51 | ueana->SetTrackEtaCut(0.8);\r |
52 | ueana->SetLeadingTrackEtaCut(0.8);\r | |
b1831bcb | 53 | ueana->SetEventSelectionBit(AliAnalysisHelperJetTasks::kIsPileUp);\r |
8ecf60e0 | 54 | ueana->SetReduceMemoryFootprint(kTRUE);\r |
b1831bcb | 55 | \r |
a75aacd6 | 56 | if (1)\r |
57 | {\r | |
210f8ded | 58 | file = TFile::Open("$ALICE_ROOT/PWG4/JetTasks/inputFiles/ue_trackingefficiency.root");\r |
a75aacd6 | 59 | trackingEff = (TH1D*) file->Get("trackingefficiency");\r |
60 | ueana->SetTrackingEfficiency(trackingEff);\r | |
61 | }\r | |
62 | }\r |