]>
Commit | Line | Data |
---|---|---|
a65a7e70 | 1 | AliAnalysisTaskPhiCorrelations *AddTaskPhiCorrelations(Int_t analysisMode = 0, Bool_t ppRun = kFALSE, const char* outputFileName = 0, Bool_t eventMixing = kTRUE, Int_t zVtxAxis = 0, const char* containerName = "histosPhiCorrelations", const char* folderName = "PWG4_PhiCorrelations") |
2 | { | |
3 | // Get the pointer to the existing analysis manager via the static access method. | |
4 | //============================================================================== | |
5 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
6 | if (!mgr) { | |
7 | ::Error("AddTaskPhiCorrelations", "No analysis manager to connect to."); | |
8 | return NULL; | |
9 | } | |
10 | ||
11 | // Create the task and configure it. | |
12 | //=========================================================================== | |
13 | AliAnalysisTaskPhiCorrelations* ana = new AliAnalysisTaskPhiCorrelations(containerName); | |
14 | ana->SetMode(analysisMode);// data or corrections mode | |
15 | ||
16 | // if (analysisMode == 0) // data | |
17 | // ana->SelectCollisionCandidates(AliVEvent::kMB); | |
18 | ||
19 | // common config, | |
20 | ana->SetDebugLevel(0); | |
21 | // ana->SetFilterBit(16); | |
22 | //ana->SetFilterBit(64+32); | |
23 | ||
24 | // Int_t bit = 1; | |
25 | Int_t bit = 128; | |
26 | // Int_t bit = 256; | |
27 | // Int_t bit = 512; | |
28 | // Int_t bit = 1024; | |
29 | ana->SetFilterBit(bit); | |
30 | ||
31 | Printf("AddTaskPhiCorrelations:\n\n\n++++++++++ Using bit %d ++++++++++++\n\n\n", bit); | |
32 | ||
33 | ana->SetTrackEtaCut(0.9); | |
34 | ||
35 | ana->SetPtMin(0.5); | |
36 | ||
37 | //ana->SetEventSelectionBit(AliAnalysisHelperJetTasks::kIsPileUp); | |
38 | ana->SetReduceMemoryFootprint(kTRUE); | |
39 | //ana->SetSelectCharge(2); | |
40 | ||
41 | ana->SetEventMixing(eventMixing); | |
42 | ana->SetUseVtxAxis(zVtxAxis); | |
43 | ||
44 | ana->SetZVertex(10); | |
45 | ||
46 | // ana->SetSkipTrigger(kTRUE); | |
47 | // ana->SetTriggerRestrictEta(0.5); | |
48 | // ana->SetEtaOrdering(kTRUE); | |
49 | ||
50 | // ana->SetPairCuts(kTRUE, kTRUE); | |
51 | ||
52 | // ana->SetCompareCentralities(kTRUE); | |
53 | // ana->SetTwoTrackEfficiencyCut(kTRUE); | |
54 | ||
55 | // ana->SetFillpT(kTRUE); | |
56 | ||
57 | // ana->SetInjectedSignals(kTRUE); | |
58 | // ana->SetRejectCentralityOutliers(); | |
59 | ||
60 | //pA | |
61 | /* ana->SetEventSelectionBit(AliVEvent::kCINT5); | |
62 | ana->SetTwoTrackEfficiencyCut(); | |
63 | ana->SetStepsFillSkip(kFALSE, kTRUE);*/ | |
64 | // ana->SetCentralityMethod("ZNA_MANUAL"); | |
65 | // ana->SetCentralityMethod("TRACKS_MANUAL"); | |
66 | // ana->SetCourseCentralityBinning(kTRUE); | |
67 | // ana->SetMixingTracks(1); | |
68 | ||
69 | if (0) | |
70 | { | |
71 | Printf("AddTaskPhiCorrelations:\n\n\n++++++++++ Using SPD centrality selection ++++++++++++\n\n\n"); | |
72 | ana->SetCentralityMethod("CL1"); | |
73 | } | |
74 | ||
75 | if (0) | |
76 | { | |
77 | Printf("AddTaskPhiCorrelations:\n\n\n++++++++++ Using ZDC centrality selection ++++++++++++\n\n\n"); | |
78 | ana->SetCentralityMethod("ZEMvsZDC"); | |
79 | } | |
80 | ||
81 | ||
82 | if (ppRun) | |
83 | { | |
84 | Printf("AddTaskPhiCorrelations:\n\n\n+++++++++++++++ Configuring for p+p! +++++++++++++++++\n\n\n"); | |
85 | ana->SetCentralityMethod(""); // only for pp | |
86 | } | |
87 | ||
88 | // gSystem->Sleep(3000); | |
89 | ||
90 | mgr->AddTask(ana); | |
91 | ||
92 | // Create ONLY the output containers for the data produced by the task. | |
93 | // Get and connect other common input/output containers via the manager as below | |
94 | //============================================================================== | |
95 | if (!outputFileName) | |
96 | outputFileName = AliAnalysisManager::GetCommonFileName(); | |
97 | ||
98 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(containerName, TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s:%s", outputFileName, folderName)); | |
99 | ||
100 | mgr->ConnectInput (ana, 0, mgr->GetCommonInputContainer()); | |
101 | mgr->ConnectOutput (ana, 0, coutput1 ); | |
102 | ||
103 | return ana; | |
104 | } |