]>
Commit | Line | Data |
---|---|---|
aaebd73d | 1 | //RUN SETTINGS |
2 | //analysis type can be ESD, AOD, MC, ESDMC0, ESDMC1 | |
3 | const TString type = "ESD"; | |
4 | ||
5 | ||
6 | //SETTING THE CUTS | |
7 | ||
8 | //for integrated flow | |
9 | const Double_t ptmin1 = 0.0; | |
10 | const Double_t ptmax1 = 1000.0; | |
11 | const Double_t ymin1 = -2.; | |
12 | const Double_t ymax1 = 2.; | |
13 | const Int_t mintrackrefsTPC1 = 2; | |
14 | const Int_t mintrackrefsITS1 = 3; | |
15 | const Int_t charge1 = 1; | |
16 | const Int_t PDG1 = 211; | |
17 | const Int_t minclustersTPC1 = 50; | |
18 | const Int_t maxnsigmatovertex1 = 3; | |
19 | ||
20 | //for differential flow | |
21 | const Double_t ptmin2 = 0.0; | |
22 | const Double_t ptmax2 = 1000.0; | |
23 | const Double_t ymin2 = -2.; | |
24 | const Double_t ymax2 = 2.; | |
25 | const Int_t mintrackrefsTPC2 = 2; | |
26 | const Int_t mintrackrefsITS2 = 3; | |
27 | const Int_t charge2 = 1; | |
28 | const Int_t PDG2 = 321; | |
29 | const Int_t minclustersTPC2 = 50; | |
30 | const Int_t maxnsigmatovertex2 = 3; | |
31 | ||
32 | ||
2188af53 | 33 | void runProofCumulants(const Char_t* data="/PWG2/akisiel/LHC500C2030", Int_t nRuns=4, Int_t offset=0) { |
34 | //void runProofCumulants(const Char_t* data="/PWG2/akisiel/LHC500C0005", Int_t nRuns=-1, Int_t offset=0){ | |
35 | ||
36 | //void runProofCumulants(const Char_t* data="/PWG2/pganoti/Pythia6At10TeV_05T_b", Int_t nRuns=1000, Int_t offset=0){ | |
37 | //void runProofCumulants(const Char_t* data="/PWG2/jgrosseo/sim_1600XX_esd", Int_t nRuns=-1, Int_t offset=0){ | |
38 | ||
39 | //void runProofCumulants(const Char_t* data="/COMMON/COMMON/run15035_PbPb", Int_t nRuns=-1, Int_t offset=0){ | |
40 | ||
41 | //void runProofCumulants(const Char_t* data="/PWG2/hricaud/LHC07f_160033DataSet", Int_t nRuns=-1, Int_t offset=0){ | |
42 | ||
43 | //void runProofCumulants(const Char_t* data="/PWG2/hricaud/LHC07f_160038_root_archiveDataSet", Int_t nRuns=-1, Int_t offset=0){ | |
44 | ||
45 | //void runProofCumulants(const Char_t* data="/PWG2/belikov/40825", Int_t nRuns=-1, Int_t offset=0){ | |
46 | ||
47 | ||
48 | ||
aaebd73d | 49 | TStopwatch timer; |
50 | timer.Start(); | |
51 | ||
52 | printf("*** Connect to PROOF ***\n"); | |
2188af53 | 53 | TProof::Open("abilandz@lxb6046.cern.ch"); |
54 | //TProof::Open("snelling@localhost"); | |
55 | ||
56 | gProof->UploadPackage("STEERBase.par"); | |
57 | gProof->EnablePackage("STEERBase"); | |
58 | gProof->UploadPackage("ESD.par"); | |
59 | gProof->EnablePackage("ESD"); | |
60 | gProof->UploadPackage("AOD.par"); | |
61 | gProof->EnablePackage("AOD"); | |
62 | gProof->UploadPackage("ANALYSIS.par"); | |
63 | gProof->EnablePackage("ANALYSIS"); | |
64 | gProof->UploadPackage("ANALYSISalice.par"); | |
65 | gProof->EnablePackage("ANALYSISalice"); | |
66 | gProof->UploadPackage("PWG2AOD.par"); | |
67 | gProof->EnablePackage("PWG2AOD"); | |
68 | gProof->UploadPackage("CORRFW.par"); | |
69 | gProof->EnablePackage("CORRFW"); | |
70 | gProof->ClearPackage("PWG2flow"); | |
71 | gProof->UploadPackage("PWG2flow.par"); | |
72 | gProof->EnablePackage("PWG2flow"); | |
73 | ||
aaebd73d | 74 | |
75 | ||
76 | //____________________________________________// | |
77 | //Create cuts using correction framework | |
78 | ||
79 | //############# cuts on MC | |
80 | AliCFTrackKineCuts* mcKineCuts1 = new AliCFTrackKineCuts("mcKineCuts1","MC-level kinematic cuts"); | |
81 | mcKineCuts1->SetPtRange(ptmin1,ptmax1); | |
82 | mcKineCuts1->SetRapidityRange(ymin1,ymax1); | |
83 | mcKineCuts1->SetChargeMC(charge1); | |
84 | ||
85 | AliCFTrackKineCuts* mcKineCuts2 = new AliCFTrackKineCuts("mcKineCuts2","MC-level kinematic cuts"); | |
86 | mcKineCuts2->SetPtRange(ptmin2,ptmax2); | |
87 | mcKineCuts2->SetRapidityRange(ymin2,ymax2); | |
88 | mcKineCuts2->SetChargeMC(charge2); | |
89 | ||
90 | AliCFParticleGenCuts* mcGenCuts1 = new AliCFParticleGenCuts("mcGenCuts1","MC particle generation cuts"); | |
91 | mcGenCuts1->SetRequireIsPrimary(); | |
92 | mcGenCuts1->SetRequirePdgCode(PDG1); | |
93 | ||
94 | AliCFParticleGenCuts* mcGenCuts2 = new AliCFParticleGenCuts("mcGenCuts2","MC particle generation cuts"); | |
95 | mcGenCuts2->SetRequireIsPrimary(); | |
96 | mcGenCuts2->SetRequirePdgCode(PDG2); | |
97 | ||
98 | //############# Acceptance Cuts ???????? | |
99 | AliCFAcceptanceCuts *mcAccCuts = new AliCFAcceptanceCuts("mcAccCuts","MC acceptance cuts"); | |
100 | mcAccCuts->SetMinNHitITS(mintrackrefsITS1); | |
101 | mcAccCuts->SetMinNHitTPC(mintrackrefsTPC1); | |
102 | ||
103 | //############# Rec-Level kinematic cuts | |
104 | AliCFTrackKineCuts *recKineCuts1 = new AliCFTrackKineCuts("recKineCuts1","rec-level kine cuts"); | |
105 | recKineCuts1->SetPtRange(ptmin1,ptmax1); | |
106 | recKineCuts1->SetRapidityRange(ymin1,ymax1); | |
107 | recKineCuts1->SetChargeRec(charge1); | |
108 | ||
109 | AliCFTrackKineCuts *recKineCuts2 = new AliCFTrackKineCuts("recKineCuts2","rec-level kine cuts"); | |
110 | recKineCuts2->SetPtRange(ptmin2,ptmax2); | |
111 | recKineCuts2->SetRapidityRange(ymin2,ymax2); | |
112 | recKineCuts2->SetChargeRec(charge2); | |
113 | ||
114 | AliCFTrackQualityCuts *recQualityCuts = new AliCFTrackQualityCuts("recQualityCuts","rec-level quality cuts"); | |
115 | recQualityCuts->SetMinNClusterTPC(minclustersTPC1); | |
116 | recQualityCuts->SetRequireITSRefit(kTRUE); | |
117 | ||
118 | AliCFTrackIsPrimaryCuts *recIsPrimaryCuts = new AliCFTrackIsPrimaryCuts("recIsPrimaryCuts","rec-level isPrimary cuts"); | |
119 | recIsPrimaryCuts->SetMaxNSigmaToVertex(maxnsigmatovertex1); | |
120 | ||
121 | AliCFTrackCutPid* cutPID1 = new AliCFTrackCutPid("cutPID1","ESD_PID") ; | |
122 | AliCFTrackCutPid* cutPID2 = new AliCFTrackCutPid("cutPID2","ESD_PID") ; | |
123 | int n_species = AliPID::kSPECIES ; | |
124 | Double_t* prior = new Double_t[n_species]; | |
2188af53 | 125 | |
aaebd73d | 126 | prior[0] = 0.0244519 ; |
127 | prior[1] = 0.0143988 ; | |
128 | prior[2] = 0.805747 ; | |
129 | prior[3] = 0.0928785 ; | |
130 | prior[4] = 0.0625243 ; | |
131 | ||
132 | cutPID1->SetPriors(prior); | |
133 | cutPID1->SetProbabilityCut(0.0); | |
134 | cutPID1->SetDetectors("TPC TOF"); | |
135 | switch(TMath::Abs(PDG1)) { | |
136 | case 11 : cutPID1->SetParticleType(AliPID::kElectron, kTRUE); break; | |
137 | case 13 : cutPID1->SetParticleType(AliPID::kMuon , kTRUE); break; | |
138 | case 211 : cutPID1->SetParticleType(AliPID::kPion , kTRUE); break; | |
139 | case 321 : cutPID1->SetParticleType(AliPID::kKaon , kTRUE); break; | |
140 | case 2212 : cutPID1->SetParticleType(AliPID::kProton , kTRUE); break; | |
141 | default : printf("UNDEFINED PID\n"); break; | |
142 | } | |
143 | ||
144 | cutPID2->SetPriors(prior); | |
145 | cutPID2->SetProbabilityCut(0.0); | |
146 | cutPID2->SetDetectors("TPC TOF"); | |
147 | switch(TMath::Abs(PDG2)) { | |
148 | case 11 : cutPID2->SetParticleType(AliPID::kElectron, kTRUE); break; | |
149 | case 13 : cutPID2->SetParticleType(AliPID::kMuon , kTRUE); break; | |
150 | case 211 : cutPID2->SetParticleType(AliPID::kPion , kTRUE); break; | |
151 | case 321 : cutPID2->SetParticleType(AliPID::kKaon , kTRUE); break; | |
152 | case 2212 : cutPID2->SetParticleType(AliPID::kProton , kTRUE); break; | |
153 | default : printf("UNDEFINED PID\n"); break; | |
154 | } | |
155 | ||
156 | printf("CREATE MC KINE CUTS\n"); | |
157 | TObjArray* mcList1 = new TObjArray(0); | |
158 | mcList1->AddLast(mcKineCuts1); | |
159 | mcList1->AddLast(mcGenCuts1); | |
160 | ||
161 | TObjArray* mcList2 = new TObjArray(0); | |
162 | mcList2->AddLast(mcKineCuts2); | |
163 | mcList2->AddLast(mcGenCuts2); | |
164 | ||
165 | printf("CREATE ACCEPTANCE CUTS\n"); | |
166 | TObjArray* accList = new TObjArray(0) ; | |
167 | accList->AddLast(mcAccCuts); | |
168 | ||
169 | printf("CREATE RECONSTRUCTION CUTS\n"); | |
170 | TObjArray* recList1 = new TObjArray(0) ; | |
171 | recList1->AddLast(recKineCuts1); | |
172 | recList1->AddLast(recQualityCuts); | |
173 | recList1->AddLast(recIsPrimaryCuts); | |
174 | ||
175 | TObjArray* recList2 = new TObjArray(0) ; | |
176 | recList2->AddLast(recKineCuts2); | |
177 | recList2->AddLast(recQualityCuts); | |
178 | recList2->AddLast(recIsPrimaryCuts); | |
179 | ||
180 | printf("CREATE PID CUTS\n"); | |
181 | TObjArray* fPIDCutList1 = new TObjArray(0) ; | |
182 | fPIDCutList1->AddLast(cutPID1); | |
183 | ||
184 | TObjArray* fPIDCutList2 = new TObjArray(0) ; | |
185 | fPIDCutList2->AddLast(cutPID2); | |
186 | ||
2188af53 | 187 | printf("CREATE INTERFACE AND CUTS\n"); |
aaebd73d | 188 | AliCFManager* cfmgr1 = new AliCFManager(); |
189 | cfmgr1->SetParticleCutsList(AliCFManager::kPartGenCuts,mcList1); | |
190 | //cfmgr1->SetParticleCutsList(AliCFManager::kPartAccCuts,accList); | |
191 | cfmgr1->SetParticleCutsList(AliCFManager::kPartRecCuts,recList1); | |
192 | cfmgr1->SetParticleCutsList(AliCFManager::kPartSelCuts,fPIDCutList1); | |
193 | ||
194 | AliCFManager* cfmgr2 = new AliCFManager(); | |
195 | cfmgr2->SetParticleCutsList(AliCFManager::kPartGenCuts,mcList2); | |
196 | //cfmgr2->SetParticleCutsList(AliCFManager::kPartAccCuts,accList); | |
197 | cfmgr2->SetParticleCutsList(AliCFManager::kPartRecCuts,recList2); | |
198 | cfmgr2->SetParticleCutsList(AliCFManager::kPartSelCuts,fPIDCutList2); | |
2188af53 | 199 | |
200 | ||
201 | ||
202 | ||
203 | //____________________________________________// | |
204 | // Make the analysis manager | |
205 | AliAnalysisManager *mgr = new AliAnalysisManager("TestManager"); | |
206 | ||
207 | if (type == "ESD"){ | |
208 | AliVEventHandler* esdH = new AliESDInputHandler; | |
209 | //esdH->SetInactiveBranches("FMD CaloCluster"); //needed? | |
210 | mgr->SetInputEventHandler(esdH); } | |
211 | ||
212 | if (type == "AOD"){ | |
213 | AliVEventHandler* aodH = new AliAODInputHandler; | |
214 | mgr->SetInputEventHandler(aodH); } | |
215 | ||
216 | if (type == "MC" || type == "ESDMC0" || type == "ESDMC1"){ | |
217 | AliVEventHandler* esdH = new AliESDInputHandler; | |
218 | mgr->SetInputEventHandler(esdH); | |
219 | ||
220 | AliMCEventHandler *mc = new AliMCEventHandler(); | |
221 | mgr->SetMCtruthEventHandler(mc); } | |
aaebd73d | 222 | |
2188af53 | 223 | |
224 | ||
225 | ||
226 | ||
227 | ||
228 | ||
229 | ||
230 | ||
aaebd73d | 231 | //____________________________________________// |
232 | // 1st Pt task | |
233 | AliAnalysisTaskCumulants *task1 = new AliAnalysisTaskCumulants("TaskCumulants"); | |
2188af53 | 234 | task1->SetAnalysisType(type); |
aaebd73d | 235 | task1->SetCFManager1(cfmgr1); |
236 | task1->SetCFManager2(cfmgr2); | |
237 | mgr->AddTask(task1); | |
238 | ||
2188af53 | 239 | |
aaebd73d | 240 | // Create containers for input/output |
2188af53 | 241 | AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain1",TChain::Class(),AliAnalysisManager::kInputContainer); |
242 | TString outputName = "outputFromCumulantAnalysis"; | |
243 | outputName+=type; | |
244 | outputName+=".root"; | |
245 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("clist1", TList::Class(),AliAnalysisManager::kOutputContainer,outputName); | |
246 | ||
247 | //added according to Andrei: | |
248 | //coutput1->SetSpecialOutput(); | |
249 | ||
aaebd73d | 250 | |
251 | //____________________________________________// | |
252 | mgr->ConnectInput(task1,0,cinput1); | |
253 | mgr->ConnectOutput(task1,0,coutput1); | |
254 | ||
255 | if (!mgr->InitAnalysis()) return; | |
256 | mgr->PrintStatus(); | |
257 | // old way with a chain | |
258 | // mgr->StartAnalysis("proof",chain); | |
259 | mgr->StartAnalysis("proof",data,nRuns,offset); | |
260 | ||
261 | timer.Stop(); | |
262 | timer.Print(); | |
263 | } |