]>
Commit | Line | Data |
---|---|---|
befb009c | 1 | AliAnalysisTask *AddTaskPtFlucPbPb(){ |
2 | //get the current analysis manager | |
3 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
4 | if (!mgr) { | |
5 | Error("AddTask_sheckel_PtFlucPbPb", "No analysis manager found."); | |
6 | return 0; | |
7 | } | |
8 | ||
9 | ||
10 | // --- Check for MC --- | |
11 | AliMCEventHandler *mcH = static_cast<AliMCEventHandler*>(mgr->GetMCtruthEventHandler()); | |
12 | ||
13 | ||
e86642d5 | 14 | // --- For MC: Set AMPT or other MC --- |
15 | Bool_t isAMPT = kFALSE; // default is kFALSE, e.g. for data | |
16 | if (mcH) isAMPT = kFALSE; // kTRUE = AMPT, kFALSE = other, e.g. HIJING ---> has to be set by the user! <--- | |
17 | ||
18 | ||
befb009c | 19 | //============= Set Task Name =================== |
20 | TString taskName=("AliAnalysisTaskPtFlucPbPb.cxx+"); | |
21 | //=============================================== | |
22 | // Load the task | |
23 | gROOT->LoadMacro(taskName.Data()); | |
24 | if (gProof){ | |
25 | TString taskSO=gSystem->pwd(); | |
26 | taskSO+="/"; | |
27 | taskSO+=taskName(0,taskName.First('.'))+"_cxx.so"; | |
28 | gProof->Exec(Form("gSystem->Load(\"%s\")",taskSO.Data()),kTRUE); | |
29 | } | |
30 | ||
31 | ||
32 | //========= Add task to the ANALYSIS manager ===== | |
33 | AliAnalysisTaskPtFlucPbPb *task = new AliAnalysisTaskPtFlucPbPb("sheckelTaskPtFlucPbPb"); | |
34 | ||
35 | ||
36 | // --- Set ESD track Cuts --- | |
37 | ||
38 | AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("esdTrackCuts"); // My pp track cuts (ITS+TPC) | |
39 | AliESDtrackCuts *esdCuts = new AliESDtrackCuts("esdCuts"); // TPC-only track cuts | |
40 | ||
41 | // -- My pp track cuts (ITS+TPC) | |
42 | // TPC | |
43 | esdTrackCuts->SetRequireTPCStandAlone(kFALSE); | |
44 | esdTrackCuts->SetMinNClustersTPC(70); | |
45 | esdTrackCuts->SetMaxChi2PerClusterTPC(4.0); | |
46 | esdTrackCuts->SetAcceptKinkDaughters(kFALSE); | |
47 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
48 | // ITS | |
49 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
50 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kAny); | |
51 | // DCA to vertex | |
52 | esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01"); // 7*(0.0026+0.0050/pt^1.01) | |
53 | esdTrackCuts->SetMaxDCAToVertexZ(2.); | |
54 | esdTrackCuts->SetDCAToVertex2D(kFALSE); | |
55 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
56 | // Pt range and acceptance in eta | |
57 | esdTrackCuts->SetPtRange(0.15,2.); | |
58 | esdTrackCuts->SetEtaRange(-0.8,0.8); | |
59 | ||
60 | ||
61 | // -- TPC-only track cuts | |
62 | // TPC | |
63 | esdCuts->SetRequireTPCStandAlone(kTRUE); | |
64 | esdCuts->SetMinNClustersTPC(70); | |
65 | esdCuts->SetMaxChi2PerClusterTPC(4.0); | |
66 | esdCuts->SetAcceptKinkDaughters(kFALSE); | |
67 | esdCuts->SetRequireTPCRefit(kFALSE); | |
68 | // ITS | |
69 | esdCuts->SetRequireITSRefit(kFALSE); | |
70 | // DCA to vertex | |
71 | esdCuts->SetMaxDCAToVertexXY(2.4); // cm | |
72 | esdCuts->SetMaxDCAToVertexZ(3.2); // cm | |
73 | esdCuts->SetDCAToVertex2D(kTRUE); | |
74 | esdCuts->SetRequireSigmaToVertex(kFALSE); | |
75 | // Pt range and acceptance in eta | |
76 | esdCuts->SetPtRange(0.15,2.); | |
77 | esdCuts->SetEtaRange(-0.8,0.8); | |
78 | ||
79 | // --- End track Cuts --- | |
80 | ||
81 | ||
82 | // task->SetAliESDtrackCuts(esdTrackCuts); | |
83 | task->SetAliESDtrackCuts(esdCuts); | |
84 | ||
e86642d5 | 85 | if (!isAMPT) task->SelectCollisionCandidates(AliVEvent::kMB); |
86 | ||
befb009c | 87 | task->SetMaxVertexZ(10.); // cm |
e86642d5 | 88 | task->SetMaxVertexZDiff1(-1.); // <= 0. -> off, > 0. -> diff in cm |
befb009c | 89 | task->SetNContributors(1); |
90 | task->SetUseCentrality(1); // 0=off, 1=VZERO, 2=SPD(not implemented) | |
91 | ||
92 | if (mcH) task->SetMC(kTRUE); | |
e86642d5 | 93 | if (mcH) task->SetMCType(0); // 0 = ESD, 1 = MC truth with ESD, 2 = mod. MC truth with ESD, |
94 | // 3 = MC truth only, 4 = mod. MC truth only | |
95 | ||
96 | if (isAMPT) task->SetMCAMPT(kTRUE); | |
97 | else task->SetMCAMPT(kFALSE); | |
befb009c | 98 | |
99 | ||
100 | mgr->AddTask(task); | |
101 | ||
102 | ||
103 | //================================================ | |
104 | // data containers | |
105 | //================================================ | |
106 | ||
107 | // input container | |
108 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
109 | ||
110 | // output container | |
111 | AliAnalysisDataContainer *coutput = | |
112 | mgr->CreateContainer("sheckel_PtFlucPbPb", TList::Class(), | |
113 | AliAnalysisManager::kOutputContainer,"sheckel_PtFlucPbPb.root"); | |
114 | ||
115 | // connect containers | |
116 | mgr->ConnectInput (task, 0, cinput ); | |
117 | mgr->ConnectOutput (task, 1, coutput ); | |
118 | ||
119 | return task; | |
120 | ||
121 | } |