]>
Commit | Line | Data |
---|---|---|
4b2c784b | 1 | // |
2 | // General macro to configure the RSN analysis task. | |
3 | // It calls all configs desired by the user, by means | |
4 | // of the boolean switches defined in the first lines. | |
5 | // --- | |
6 | // Inputs: | |
7 | // 1) flag to know if running on MC or data | |
8 | // 2) path where all configs are stored | |
9 | // --- | |
10 | // Returns: | |
11 | // kTRUE --> initialization successful | |
12 | // kFALSE --> initialization failed (some config gave errors) | |
13 | // | |
14 | ||
15 | AliRsnMiniAnalysisTask * AddAnalysisTaskPhiRAApPb | |
16 | ( | |
17 | Bool_t isMC, | |
18 | Bool_t isPP, | |
19 | const char *path, | |
20 | Int_t nmix = 0 | |
21 | ) | |
22 | { | |
23 | // | |
24 | // -- INITIALIZATION ---------------------------------------------------------------------------- | |
25 | // | |
26 | ||
27 | // retrieve analysis manager | |
28 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
29 | ||
30 | // create the task and connect with physics selection | |
31 | AliRsnMiniAnalysisTask *task = new AliRsnMiniAnalysisTask("RSN", isMC); | |
32 | task->UseESDTriggerMask(AliVEvent::kINT7); | |
33 | ||
34 | // settings | |
35 | if (isPP) | |
36 | task->UseMultiplicity("QUALITY"); | |
37 | else | |
38 | task->UseCentrality("V0A"); | |
39 | ||
40 | // set mixing | |
41 | task->UseContinuousMix(); | |
42 | //task->UseBinnedMix(); | |
43 | task->SetNMix(nmix); | |
44 | task->SetMaxDiffVz(5.0); | |
45 | task->SetMaxDiffMult(20.0); | |
46 | task->SetMaxDiffAngle(1E20); | |
47 | ||
48 | mgr->AddTask(task); | |
49 | ||
50 | // | |
51 | // -- EVENT CUTS (same for all configs) --------------------------------------------------------- | |
52 | // | |
53 | ||
54 | AliRsnCutEventUtils *cutEventUtils = new AliRsnCutEventUtils("cutEventUtils", kTRUE, kTRUE); | |
55 | cutEventUtils->SetUseVertexSelection2013pA(kTRUE); | |
56 | cutEventUtils->SetMinPlpContribSPD(5); | |
57 | ||
58 | ||
59 | ||
60 | // define and fill cut set | |
61 | AliRsnCutSet *eventCuts = new AliRsnCutSet("eventCuts", AliRsnTarget::kEvent); | |
62 | eventCuts->AddCut(cutEventUtils); | |
63 | eventCuts->SetCutScheme(cutEventUtils->GetName()); | |
64 | ||
65 | // set cuts in task | |
66 | task->SetEventCuts(eventCuts); | |
67 | ||
68 | // | |
69 | // -- EVENT-ONLY COMPUTATIONS ------------------------------------------------------------------- | |
70 | // | |
71 | ||
72 | // initialize value computation for multiplicity/centrality | |
73 | // second argument tells if the value must be taken from MC | |
74 | // (when this can be done) | |
75 | // after creating the value, the task returns its ID | |
76 | Int_t multID = task->CreateValue(AliRsnMiniValue::kMult, kFALSE); | |
77 | ||
78 | // create event-related output | |
79 | AliRsnMiniOutput *outMult = task->CreateOutput("eventMult", "HIST", "EVENT"); | |
80 | // set axes, by passing value ID and defining the binning | |
81 | if (isPP) | |
82 | outMult->AddAxis(multID, 300, 0.0, 300.0); | |
83 | else | |
84 | outMult->AddAxis(multID, 100, 0.0, 100.0); | |
85 | ||
86 | // | |
87 | // -- PAIR CUTS (common to all resonances) ------------------------------------------------------ | |
88 | // | |
89 | ||
90 | AliRsnCutMiniPair *cutY = new AliRsnCutMiniPair("cutRapidity", AliRsnCutMiniPair::kRapidityRange); | |
91 | cutY->SetRangeD(-0.765, -0.165); | |
92 | ||
93 | AliRsnCutMiniPair *cutY2 = new AliRsnCutMiniPair("cutRapidity2", AliRsnCutMiniPair::kRapidityRange); | |
94 | cutY2->SetRangeD(-0.465, 0.035); | |
95 | ||
96 | AliRsnCutSet *cutsPair = new AliRsnCutSet("pairCuts", AliRsnTarget::kMother); | |
97 | cutsPair->AddCut(cutY); | |
98 | cutsPair->SetCutScheme(cutY->GetName()); | |
99 | ||
100 | AliRsnCutSet *cutsPair2 = new AliRsnCutSet("pairCuts2", AliRsnTarget::kMother); | |
101 | cutsPair2->AddCut(cutY2); | |
102 | cutsPair2->SetCutScheme(cutY2->GetName()); | |
103 | ||
104 | // | |
105 | // -- CONFIGS ----------------------------------------------------------------------------------- | |
106 | // | |
107 | ||
108 | ||
109 | gROOT->LoadMacro(Form("%s/ConfigPhiRAApPb.C", path)); | |
110 | if (!ConfigPhiRAApPb(task, isMC, isPP, "", cutsPair, cutsPair2)) return 0x0; | |
111 | ||
112 | ||
113 | // | |
114 | // -- CONTAINERS -------------------------------------------------------------------------------- | |
115 | // | |
116 | ||
117 | const char *file = AliAnalysisManager::GetCommonFileName(); | |
118 | AliAnalysisDataContainer *output = mgr->CreateContainer("RsnOut", TList::Class(), AliAnalysisManager::kOutputContainer, file); | |
119 | mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer()); | |
120 | mgr->ConnectOutput(task, 1, output); | |
121 | ||
122 | return task; | |
123 | } |