]>
Commit | Line | Data |
---|---|---|
a8f6c03f | 1 | void AddTaskFlowD2H( int nDmeson, TString fileName, int RPsource, |
2 | int EtaGapSP=3, double aMax=-0.2, double bMin=+0.2, | |
3 | int minCent=30, int maxCent=50, TString suffixName="C" ) | |
4 | { | |
5 | suffixName += Form("%d%d_%s",minCent,maxCent,fileName.Data()); | |
6 | //-R-P---c-u-t-s-------------------------------------------------------------- | |
7 | AliFlowTrackCuts* cutsRP; | |
8 | double aMin, aMax, bMin, bMax; // For SP method | |
9 | switch (RPsource) { | |
10 | case (0): | |
11 | cutsRP = (AliFlowTrackCuts*) | |
12 | AliFlowTrackCuts::GetStandardTPCStandaloneTrackCuts2010(); | |
13 | cutsRP->SetEtaRange( -0.8, +0.8 ); | |
14 | cutsRP->SetPtRange( 0.2, 5.0 ); | |
15 | cutsRP->SetAODfilterBit(1); | |
16 | cutsRP->SetName( Form("rp_cuts_%s",suffixName.Data()) ); | |
17 | aMin=-0.8, bMax=0.8; | |
18 | break; | |
19 | case (1): | |
20 | cutsRP = (AliFlowTrackCuts*) | |
21 | AliFlowTrackCuts::GetStandardVZEROOnlyTrackCuts(); | |
22 | aMin = -3.7; aMax = -2.2 ; bMin = 3.4; bMax = +5.1; | |
23 | break; | |
24 | } | |
25 | fileName.Append(".root"); | |
26 | //-P-O-I---c-u-t-s------------------------------------------------------------ | |
27 | double flowBands[5][2]; | |
28 | switch (nDmeson) { //thanks to ROOT for allowing this | |
29 | case (AliRDHFCuts::kD0toKpiCuts): | |
30 | AliRDHFCutsD0toKpi *cutsPOI = new AliRDHFCutsD0toKpi( Form("D0toKpi_%s",suffixName.Data()) ); | |
31 | flowBands[0][0]=1.700; flowBands[0][1]=1.750; | |
32 | flowBands[1][0]=1.750; flowBands[1][1]=1.800; | |
33 | flowBands[2][0]=1.830; flowBands[2][1]=1.900; | |
34 | flowBands[3][0]=1.930; flowBands[3][1]=1.970; | |
35 | flowBands[4][0]=1.970; flowBands[4][1]=2.030; | |
36 | break; | |
37 | case (AliRDHFCuts::kDstarCuts): | |
38 | AliRDHFCutsDStartoKpipi *cutsPOI = new AliRDHFCutsDStartoKpipi( Form("DStartoKpipi_%s",suffixName.Data()) ); | |
39 | flowBands[0][0]=0.140; flowBands[0][1]=0.142; | |
40 | flowBands[1][0]=0.144; flowBands[1][1]=0.147; | |
41 | flowBands[2][0]=0.150; flowBands[2][1]=0.155; | |
42 | flowBands[3][0]=0.155; flowBands[3][1]=0.160; | |
43 | flowBands[4][0]=0.160; flowBands[4][1]=0.165; | |
44 | break; | |
45 | } | |
46 | cutsPOI->SetStandardCutsPbPb2010(); | |
47 | cutsPOI->SetUseCentrality(AliRDHFCuts::kCentV0M); | |
48 | cutsPOI->SetMinCentrality(minCent); cutsPOI->SetMaxCentrality(maxCent); | |
49 | cutsPOI->SetUseAOD049(); | |
50 | ||
51 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
52 | AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer(); | |
53 | ||
54 | //-----------------FLOWD2H TASK---------------------------- | |
55 | AliAnalysisTaskFlowD2H *taskSel = new AliAnalysisTaskFlowD2H( | |
56 | Form("FlowD2H_%s",suffixName.Data()), | |
57 | cutsRP, cutsPOI, nDmeson); | |
58 | taskSel->SelectCollisionCandidates(AliVEvent::kMB); | |
59 | taskSel->SetDebug(); | |
60 | taskSel->SetFlowEtaRangeAB( aMin, aMax, bMin, bMax ); | |
61 | TString Qvector; | |
62 | switch (EtaGapSP) { | |
63 | case 0: | |
64 | taskSel->SetPOIEtaRange( -1.5, aMax ); | |
65 | Qvector = "Qb"; | |
66 | break; | |
67 | case 1: | |
68 | taskSel->SetPOIEtaRange( bMin, +1.5 ); | |
69 | Qvector = "Qa"; | |
70 | break; | |
71 | case 3: | |
72 | taskSel->SetPOIEtaRange( -1.5, 1.5 ); | |
73 | Qvector = "QaQb"; // dummy | |
74 | break; | |
75 | } | |
76 | taskSel->SetFlowPtRange( 2, 16 ); | |
77 | for(int i=0; i!=5; ++i) | |
78 | taskSel->SetFlowBandRange( i, flowBands[i][0], flowBands[i][1] ); | |
79 | mgr->AddTask(taskSel); | |
80 | AliAnalysisDataContainer *coutputCandidatesQA = mgr->CreateContainer( | |
81 | Form("QA_%s",suffixName.Data()),TList::Class(), | |
82 | AliAnalysisManager::kOutputContainer, fileName+":QACandidates"); | |
83 | mgr->ConnectOutput(taskSel,1,coutputCandidatesQA); | |
84 | mgr->ConnectInput (taskSel,0,cinput1); | |
85 | AliAnalysisDataContainer *coutputCandidates[5]; | |
86 | for(int r=0; r!=5; ++r) { | |
87 | coutputCandidates[r] = mgr->CreateContainer( | |
88 | Form("Flow_MassBand%d_%s",r,suffixName.Data()), | |
89 | AliFlowEventSimple::Class(), AliAnalysisManager::kExchangeContainer); | |
90 | mgr->ConnectOutput(taskSel,2+r,coutputCandidates[r]); | |
91 | } | |
92 | // Scalar Product | |
93 | AliAnalysisTaskScalarProduct *taskSP[5]; | |
94 | AliAnalysisDataContainer *coutputSP[5]; | |
95 | for(int r=0; r!=5; ++r) { | |
96 | taskSP[r] = new AliAnalysisTaskScalarProduct( | |
97 | Form("SP_MassBand%d_%s",r,suffixName.Data()),kFALSE); | |
98 | taskSP[r]->SetRelDiffMsub(1.0); | |
99 | taskSP[r]->SetApplyCorrectionForNUA(kTRUE); | |
100 | taskSP[r]->SetTotalQvector( Qvector.Data() ); | |
101 | mgr->AddTask( taskSP[r] ); | |
102 | TString outputSP = fileName + Form(":outputSP_MassBand%d",r); | |
103 | coutputSP[r] = mgr->CreateContainer( | |
104 | Form("cobjSP_MassBand%d_%s",r,suffixName.Data()),TList::Class(), | |
105 | AliAnalysisManager::kOutputContainer,outputSP.Data()); | |
106 | mgr->ConnectInput(taskSP[r],0,coutputCandidates[r]); | |
107 | mgr->ConnectOutput(taskSP[r],1,coutputSP[r]); | |
108 | } | |
109 | if(RPsource!=0) | |
110 | return; | |
111 | if(EtaGapSP!=3) | |
112 | return; | |
113 | cout << "HERE!\n"; | |
114 | // Event Plane | |
115 | AliAnalysisTaskEventPlane *taskEP[5]; | |
116 | AliAnalysisDataContainer *coutputEP[5]; | |
117 | for(int r=0; r!=5; ++r) { | |
118 | taskEP[r] = new AliAnalysisTaskEventPlane( | |
119 | Form("EP_MassBand%d_%s",r,suffixName.Data()),kFALSE); | |
120 | taskEP[r]->SetApplyCorrectionForNUA(kTRUE); | |
121 | taskEP[r]->SetNormalizationType( 0 ); | |
122 | mgr->AddTask( taskEP[r] ); | |
123 | TString outputEP = fileName + Form(":outputEP_MassBand%d",r); | |
124 | coutputEP[r] = mgr->CreateContainer( | |
125 | Form("cobjEP_MassBand%d_%s",r,suffixName.Data()),TList::Class(), | |
126 | AliAnalysisManager::kOutputContainer,outputEP.Data()); | |
127 | mgr->ConnectInput(taskEP[r],0,coutputCandidates[r]); | |
128 | mgr->ConnectOutput(taskEP[r],1,coutputEP[r]); | |
129 | } | |
130 | // Event Plane 2 | |
131 | AliAnalysisTaskEventPlane *taskEP2[5]; | |
132 | AliAnalysisDataContainer *coutputEP2[5]; | |
133 | for(int r=0; r!=5; ++r) { | |
134 | taskEP2[r] = new AliAnalysisTaskEventPlane( | |
135 | Form("EP2_MassBand%d_%s",r,suffixName.Data()),kFALSE); | |
136 | taskEP2[r]->SetApplyCorrectionForNUA(kTRUE); | |
137 | taskEP2[r]->SetNormalizationType( 0 ); | |
138 | mgr->AddTask( taskEP2[r] ); | |
139 | TString outputEP2 = fileName + Form(":outputEP2_MassBand%d",r); | |
140 | coutputEP2[r] = mgr->CreateContainer( | |
141 | Form("cobjEP2_MassBand%d_%s",r,suffixName.Data()),TList::Class(), | |
142 | AliAnalysisManager::kOutputContainer,outputEP2.Data()); | |
143 | mgr->ConnectInput(taskEP2[r],0,coutputCandidates[r]); | |
144 | mgr->ConnectOutput(taskEP2[r],1,coutputEP2[r]); | |
145 | } | |
146 | // Q-Cumulants | |
147 | AliAnalysisTaskQCumulants *taskQC[5]; | |
148 | AliAnalysisDataContainer *coutputQC[5]; | |
149 | for(int r=0; r!=5; ++r) { | |
150 | taskQC[r] = new AliAnalysisTaskQCumulants( | |
151 | Form("QC_MassBand%d_%s",r,suffixName.Data()),kFALSE); | |
152 | taskQC[r]->SetCalculateCumulantsVsM(kFALSE); | |
153 | taskQC[r]->SetnBinsMult(10000); | |
154 | taskQC[r]->SetMinMult(0.); | |
155 | taskQC[r]->SetMaxMult(10000.); | |
156 | taskQC[r]->SetApplyCorrectionForNUA(kTRUE); | |
157 | taskQC[r]->SetFillMultipleControlHistograms(kFALSE); | |
158 | mgr->AddTask( taskQC[r] ); | |
159 | TString outputQC = fileName + Form(":outputQC_MassBand%d",r); | |
160 | coutputQC[r] = mgr->CreateContainer( | |
161 | Form("cobjQC_MassBand%d_%s",r,suffixName.Data()),TList::Class(), | |
162 | AliAnalysisManager::kOutputContainer,outputQC.Data()); | |
163 | mgr->ConnectInput(taskQC[r],0,coutputCandidates[r]); | |
164 | mgr->ConnectOutput(taskQC[r],1,coutputQC[r]); | |
165 | } | |
166 | } | |
167 |