2011 track cuts
[u/mrichter/AliRoot.git] / PWG / EMCAL / macros / AddTaskEmcalEsdTpcTrack.C
CommitLineData
0601d71e 1// $Id$
2
25283b37 3AliEmcalEsdTpcTrackTask* AddTaskEmcalEsdTpcTrack(
0601d71e 4 const char *name = "TpcSpdVertexConstrainedTracks"
5)
25283b37 6{
7 // Get the pointer to the existing analysis manager via the static access method.
8 //==============================================================================
9 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
10 if (!mgr)
11 {
12 ::Error("AddTaskEmcalEsdTpcTrack", "No analysis manager to connect to.");
13 return NULL;
14 }
15
16 // Check the analysis type using the event handlers connected to the analysis manager.
17 //==============================================================================
18 if (!mgr->GetInputEventHandler())
19 {
20 ::Error("AddTaskEmcalEsdTpcTrack", "This task requires an input event handler");
21 return NULL;
22 }
23
24 //-------------------------------------------------------
25 // Init the task and do settings
26 //-------------------------------------------------------
27
344cd45d 28 gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C");
29
4f558131 30 /* hybrid track cuts*/
344cd45d 31 AliESDtrackCuts *cutsp = CreateTrackCutsPWGJE(10001007); //1000 adds SPD any requirement
32 AliESDtrackCuts *hybsp = CreateTrackCutsPWGJE(10041007); //1004 removes ITSrefit requirement from standard set
33 hybsp->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kOff);
25283b37 34
35 AliEmcalEsdTpcTrackTask *eTask = new AliEmcalEsdTpcTrackTask();
36 eTask->SetTrackCuts(cutsp);
37 eTask->SetHybridTrackCuts(hybsp);
344cd45d 38
25283b37 39 eTask->SetTracksName(name);
40
344cd45d 41 cout << " *** Hybrid track selector task configured *** " << endl;
25283b37 42
43 //-------------------------------------------------------
44 // Final settings, pass to manager and set the containers
45 //-------------------------------------------------------
25283b37 46 mgr->AddTask(eTask);
47
48 // Create containers for input/output
344cd45d 49 AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
50 mgr->ConnectInput(eTask, 0, cinput1);
25283b37 51
52 return eTask;
25283b37 53}