]>
Commit | Line | Data |
---|---|---|
fdceab34 | 1 | //DEFINITION OF A FEW CONSTANTS |
de88b926 | 2 | #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) |
3 | ||
67ebd013 | 4 | const Float_t phimin = 0.; |
5 | const Float_t phimax = 2.*TMath::Pi(); | |
6 | const Float_t etamin = -0.9; | |
7 | const Float_t etamax = 0.9; | |
67ebd013 | 8 | |
dae7dd67 | 9 | const Int_t mintrackrefsTPC = 0; |
10 | const Int_t mintrackrefsITS = 0; | |
fdceab34 | 11 | |
7b90d977 | 12 | void AddTaskPWG4HighPtSpectraAll(char *prodType = "LHC10h",Bool_t isPbPb=kTRUE, Int_t iAODanalysis = 0) |
fdceab34 | 13 | { |
7b90d977 | 14 | int cent = 10; |
15 | ||
16 | AliPWG4HighPtSpectra *taskSpectra00cent10 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,0); | |
17 | AliPWG4HighPtSpectra *taskSpectra01cent10 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,1); | |
b43ea0be | 18 | // AliPWG4HighPtSpectra *taskSpectra02cent10 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,2); |
5a0bd31f | 19 | // AliPWG4HighPtSpectra *taskSpectra10cent10 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,1,0); |
380cff49 | 20 | // AliPWG4HighPtSpectra *taskSpectra20cent10 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,2,0); |
21 | AliPWG4HighPtSpectra *taskSpectra70cent10 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,0); | |
22 | AliPWG4HighPtSpectra *taskSpectra71cent10 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,1); | |
b43ea0be | 23 | AliPWG4HighPtSpectra *taskSpectra72cent10 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,2); |
7b90d977 | 24 | |
25 | if(isPbPb) { | |
26 | for(cent=0; cent<4; cent++) { | |
27 | AliPWG4HighPtSpectra *taskSpectra00 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,0); | |
28 | AliPWG4HighPtSpectra *taskSpectra01 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,1); | |
b43ea0be | 29 | // AliPWG4HighPtSpectra *taskSpectra02 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,2); |
5a0bd31f | 30 | // AliPWG4HighPtSpectra *taskSpectra10 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,1,0); |
380cff49 | 31 | // AliPWG4HighPtSpectra *taskSpectra20 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,2,0); |
32 | AliPWG4HighPtSpectra *taskSpectra70 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,0); | |
33 | AliPWG4HighPtSpectra *taskSpectra71 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,1); | |
b43ea0be | 34 | AliPWG4HighPtSpectra *taskSpectra72 = AddTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,2); |
7b90d977 | 35 | } |
36 | } | |
37 | ||
38 | } | |
39 | ||
40 | ||
41 | AliPWG4HighPtSpectra* AddTaskPWG4HighPtSpectra(char *prodType = "LHC10e14", Bool_t isPbPb=kTRUE,Int_t centClass = 0, Int_t trackType = 0, Int_t cuts = 0) | |
42 | { | |
43 | ||
44 | /* | |
a5e0d236 | 45 | trackType: 0 = global |
7b90d977 | 46 | 1 = TPC stand alone |
47 | 2 = TPC stand alone constrained to SPD vertex | |
5a0bd31f | 48 | cuts: 0 (global) = standard ITSTPC2010 a la RAA analysis |
49 | 1 (global) = ITSrefit, no SPD requirements -> standard for jet analysis | |
50 | 2 (global) = ITSrefit + no hits in SPD | |
51 | 3 (global) = standard ITS tight cuts with nCrossed rows cut for hybrid tracks | |
7b90d977 | 52 | 0 (TPC) = standard TPC + NClusters>70 |
53 | 1 (TPC) = standard TPC + NClusters>0 --> to study new TPC QA recommendations | |
54 | */ | |
55 | ||
67ebd013 | 56 | // Creates HighPtSpectra analysis task and adds it to the analysis manager. |
fdceab34 | 57 | |
380cff49 | 58 | //Load common track cut class |
5c4489e2 | 59 | gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C"); |
380cff49 | 60 | |
fdceab34 | 61 | // A. Get the pointer to the existing analysis manager via the static access method. |
62 | //============================================================================== | |
63 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
64 | if (!mgr) { | |
65 | Error("AddTaskPWG4HighPtSpectra", "No analysis manager to connect to."); | |
66 | return NULL; | |
67 | } | |
68 | ||
69 | // B. Check the analysis type using the event handlers connected to the analysis | |
70 | // manager. The availability of MC handler can also be checked here. | |
71 | //============================================================================== | |
72 | if (!mgr->GetInputEventHandler()) { | |
67ebd013 | 73 | ::Error("AddTaskPWG4HighPtSpectra", "This task requires an input event handler"); |
fdceab34 | 74 | return NULL; |
75 | } | |
76 | TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
77 | const char *analysisType = "ESD";//"TPC" | |
78 | ||
79 | // C. Create the task, add it to manager. | |
80 | //=========================================================================== | |
67ebd013 | 81 | //CONTAINER DEFINITION |
fdceab34 | 82 | Info("AliPWG4HighPtSpectra","SETUP CONTAINER"); |
83 | //the sensitive variables, their indices | |
67ebd013 | 84 | UInt_t ipt = 0; |
85 | UInt_t iphi = 1; | |
86 | UInt_t ieta = 2; | |
dae7dd67 | 87 | UInt_t incls = 3; |
67ebd013 | 88 | |
fdceab34 | 89 | //Setting up the container grid... |
de88b926 | 90 | UInt_t nstep = 4; //Steps/Modes for containers |
7b90d977 | 91 | Int_t kStepReconstructed = 0; |
92 | Int_t kStepSecondaries = 1; | |
93 | Int_t kStepReconstructedMC = 2; | |
94 | Int_t kStepMCAcceptance = 3; | |
b1cd0099 | 95 | |
96 | //redefine pt ranges in case of Jet-Jet production | |
de88b926 | 97 | Float_t ptBinEdges[4][4]; |
98 | Float_t ptmin = 0.0 ; | |
99 | Float_t ptmax = 100.0 ; | |
100 | ||
101 | ptBinEdges[0][0] = 2.; | |
102 | ptBinEdges[0][1] = 0.2; | |
103 | ptBinEdges[1][0] = 6.; | |
104 | ptBinEdges[1][1] = 0.5; | |
105 | ptBinEdges[2][0] = 20.; | |
106 | ptBinEdges[2][1] = 2.; | |
107 | ptBinEdges[3][0] = 100.; | |
108 | ptBinEdges[3][1] = 5.; | |
109 | ||
dae7dd67 | 110 | const Int_t nvar = 4; //number of variables on the grid: pt:phi:eta:NClsIter1 |
de88b926 | 111 | |
112 | const Int_t nbin11 = round((ptBinEdges[0][0]-ptmin)/ptBinEdges[0][1]); | |
113 | const Int_t nbin12 = round((ptBinEdges[1][0]-ptBinEdges[0][0])/ptBinEdges[1][1])+nbin11; | |
114 | const Int_t nbin13 = round((ptBinEdges[2][0]-ptBinEdges[1][0])/ptBinEdges[2][1])+nbin12; | |
115 | const Int_t nbin14 = round((ptBinEdges[3][0]-ptBinEdges[2][0])/ptBinEdges[3][1])+nbin13; | |
116 | ||
117 | const Int_t nbin1 = nbin14; //bins in pt | |
a31b8a87 | 118 | const Int_t nbin2 = 18; //bins in phi |
119 | const Int_t nbin3 = 2; //bins in eta | |
dae7dd67 | 120 | const Int_t nbin4 = 6; //bins in NClsIter1: 0 70 80 90 100 120 |
121 | ||
fdceab34 | 122 | |
fdceab34 | 123 | //arrays for the number of bins in each dimension |
124 | Int_t iBin[nvar]; | |
125 | iBin[0]=nbin1; | |
67ebd013 | 126 | iBin[1]=nbin2; |
127 | iBin[2]=nbin3; | |
dae7dd67 | 128 | iBin[3]=nbin4; |
ec555a3c | 129 | |
fdceab34 | 130 | //arrays for lower bounds : |
131 | Double_t *binLim1=new Double_t[nbin1+1]; | |
67ebd013 | 132 | Double_t *binLim2=new Double_t[nbin2+1]; |
133 | Double_t *binLim3=new Double_t[nbin3+1]; | |
dae7dd67 | 134 | Double_t *binLim4=new Double_t[nbin4+1]; |
ec555a3c | 135 | |
67ebd013 | 136 | //values for bin lower bounds |
137 | for(Int_t i=0; i<=nbin1; i++) { | |
b1cd0099 | 138 | if(i<=nbin11) binLim1[i]=(Double_t)ptmin + (ptBinEdges[0][0]-ptmin)/nbin11*(Double_t)i ; |
de88b926 | 139 | if(i<=nbin12 && i>nbin11) binLim1[i]=(Double_t)ptBinEdges[0][0] + (ptBinEdges[1][0]-ptBinEdges[0][0])/(nbin12-nbin11)*((Double_t)i-(Double_t)nbin11) ; |
140 | if(i<=nbin13 && i>nbin12) binLim1[i]=(Double_t)ptBinEdges[1][0] + (ptBinEdges[2][0]-ptBinEdges[1][0])/(nbin13-nbin12)*((Double_t)i-(Double_t)nbin12) ; | |
141 | if(i<=nbin14 && i>nbin13) binLim1[i]=(Double_t)ptBinEdges[2][0] + (ptBinEdges[3][0]-ptBinEdges[2][0])/(nbin14-nbin13)*((Double_t)i-(Double_t)nbin13) ; | |
67ebd013 | 142 | } |
67ebd013 | 143 | for(Int_t i=0; i<=nbin2; i++) binLim2[i]=(Double_t)phimin + (phimax-phimin)/nbin2*(Double_t)i ; |
144 | for(Int_t i=0; i<=nbin3; i++) binLim3[i]=(Double_t)etamin + (etamax-etamin)/nbin3*(Double_t)i ; | |
dae7dd67 | 145 | binLim4[0] = 0.; |
146 | binLim4[1] = 70.; | |
147 | binLim4[2] = 80.; | |
148 | binLim4[3] = 90.; | |
149 | binLim4[4] = 100.; | |
150 | binLim4[5] = 120.; | |
151 | binLim4[6] = 160.; | |
152 | ||
67ebd013 | 153 | |
154 | AliCFContainer* containerPos = new AliCFContainer("containerPos","container for positive tracks",nstep,nvar,iBin); | |
155 | //setting the bin limits | |
156 | containerPos -> SetBinLimits(ipt,binLim1); | |
157 | containerPos -> SetBinLimits(iphi,binLim2); | |
158 | containerPos -> SetBinLimits(ieta,binLim3); | |
dae7dd67 | 159 | containerPos -> SetBinLimits(incls,binLim4); |
fdceab34 | 160 | |
67ebd013 | 161 | AliCFContainer* containerNeg = new AliCFContainer("containerNeg","container for negative tracks",nstep,nvar,iBin); |
fdceab34 | 162 | //setting the bin limits |
67ebd013 | 163 | containerNeg -> SetBinLimits(ipt,binLim1); |
164 | containerNeg -> SetBinLimits(iphi,binLim2); | |
165 | containerNeg -> SetBinLimits(ieta,binLim3); | |
dae7dd67 | 166 | containerNeg -> SetBinLimits(incls,binLim4); |
67ebd013 | 167 | |
fdceab34 | 168 | //CREATE THE CUTS ----------------------------------------------- |
169 | //Use AliESDtrackCuts | |
327d12da | 170 | AliESDtrackCuts *trackCuts = new AliESDtrackCuts("AliESDtrackCuts","Standard Cuts"); |
171 | AliESDtrackCuts *trackCutsReject = 0x0; | |
7b90d977 | 172 | //Standard Cuts |
173 | //Set track cuts for global tracks | |
174 | if(trackType==0 && cuts==0) { | |
380cff49 | 175 | // tight global tracks - RAA analysis |
5c4489e2 | 176 | trackCuts = CreateTrackCutsPWGJE(1000); |
34fc6450 | 177 | } |
7b90d977 | 178 | if(trackType==0 && cuts==1) { |
380cff49 | 179 | //Cuts global tracks with ITSrefit requirement and SPDrequirement for jet analysis |
5c4489e2 | 180 | trackCuts = CreateTrackCutsPWGJE(10001006); |
5a0bd31f | 181 | } |
182 | if(trackType==0 && cuts==2) { | |
183 | //Cuts global tracks with ITSrefit requirement but without SPD | |
5c4489e2 | 184 | trackCuts = CreateTrackCutsPWGJE(10011006); |
5a0bd31f | 185 | } |
380cff49 | 186 | if(trackType==7 && cuts==0) { |
b43ea0be | 187 | // no requirements on SPD and ITSrefit failed |
5c4489e2 | 188 | trackCuts = CreateTrackCutsPWGJE(10041006); //no ITSrefit requirement |
189 | trackCutsReject = CreateTrackCutsPWGJE(1006); //ITSrefit requirement | |
ed5c9f3f | 190 | trackCutsReject->SetEtaRange(etamin,etamax); |
b43ea0be | 191 | trackCutsReject->SetPtRange(0.15, 1e10); |
34fc6450 | 192 | } |
380cff49 | 193 | if(trackType==7 && cuts==1) { |
b43ea0be | 194 | //Cuts global tracks with ITSrefit requirement but without SPD |
5c4489e2 | 195 | trackCuts = CreateTrackCutsPWGJE(10011006); |
b43ea0be | 196 | } |
197 | if(trackType==7 && cuts==2) { | |
198 | // no requirements on SPD and ITSrefit failed | |
5c4489e2 | 199 | trackCuts = CreateTrackCutsPWGJE(10041006); //no ITSrefit requirement filter 256 |
200 | trackCutsReject = CreateTrackCutsPWGJE(10001006); //ITSrefit requirement filter 16 | |
dae7dd67 | 201 | trackCutsReject->SetEtaRange(etamin,etamax); |
b43ea0be | 202 | trackCutsReject->SetPtRange(0.15, 1e10); |
380cff49 | 203 | } |
204 | ||
7b90d977 | 205 | if(trackType==1 && cuts==0) { |
206 | //Set track cuts for TPConly tracks | |
5c4489e2 | 207 | trackCuts = CreateTrackCutsPWGJE(2001); |
7b90d977 | 208 | } |
209 | if(trackType==2 && cuts==0) { | |
210 | // Set track cuts for TPConly constrained tracks | |
5c4489e2 | 211 | trackCuts = CreateTrackCutsPWGJE(2001); |
7b90d977 | 212 | } |
dae7dd67 | 213 | trackCuts->SetEtaRange(etamin,etamax); |
10295ac3 | 214 | trackCuts->SetPtRange(0.15, 1e10); |
43032097 | 215 | |
ec555a3c | 216 | // Gen-Level kinematic cuts |
fdceab34 | 217 | AliCFTrackKineCuts *mcKineCuts = new AliCFTrackKineCuts("mcKineCuts","MC-level kinematic cuts"); |
67ebd013 | 218 | mcKineCuts->SetPtRange(0.15,1e10); |
dae7dd67 | 219 | mcKineCuts->SetEtaRange(etamin,etamax);//-0.5,0.5); |
fdceab34 | 220 | mcKineCuts->SetRequireIsCharged(kTRUE); |
221 | ||
222 | //Acceptance Cuts | |
dae7dd67 | 223 | //AliCFAcceptanceCuts *mcAccCuts = new AliCFAcceptanceCuts("mcAccCuts","MC acceptance cuts"); |
fdceab34 | 224 | // mcAccCuts->SetMinNHitITS(mintrackrefsITS); |
dae7dd67 | 225 | //mcAccCuts->SetMinNHitTPC(mintrackrefsTPC); |
fdceab34 | 226 | |
227 | TObjArray* recList = new TObjArray(0); | |
fdceab34 | 228 | TObjArray* secList = new TObjArray(0) ; |
9b58297c | 229 | TObjArray* recMCList = new TObjArray(0); |
fdceab34 | 230 | |
231 | printf("CREATE MC KINE CUTS\n"); | |
232 | TObjArray* mcList = new TObjArray(0) ; | |
233 | mcList->AddLast(mcKineCuts); | |
dae7dd67 | 234 | //mcList->AddLast(mcAccCuts); |
fdceab34 | 235 | |
236 | //CREATE THE INTERFACE TO CORRECTION FRAMEWORK USED IN THE TASK | |
237 | printf("CREATE INTERFACE AND CUTS\n"); | |
67ebd013 | 238 | AliCFManager* manPos = new AliCFManager("manPos","Manager for Positive tracks") ; |
239 | manPos->SetParticleContainer(containerPos); | |
9b58297c | 240 | manPos->SetParticleCutsList(kStepReconstructed,recList); |
9b58297c | 241 | manPos->SetParticleCutsList(kStepSecondaries,secList); |
242 | manPos->SetParticleCutsList(kStepReconstructedMC,recMCList); | |
243 | manPos->SetParticleCutsList(kStepMCAcceptance,mcList); | |
67ebd013 | 244 | |
245 | AliCFManager* manNeg = new AliCFManager("manNeg","Manager for Negative tracks") ; | |
246 | manNeg->SetParticleContainer(containerNeg); | |
9b58297c | 247 | manNeg->SetParticleCutsList(kStepReconstructed,recList); |
9b58297c | 248 | manNeg->SetParticleCutsList(kStepSecondaries,secList); |
249 | manNeg->SetParticleCutsList(kStepReconstructedMC,recMCList); | |
250 | manNeg->SetParticleCutsList(kStepMCAcceptance,mcList); | |
67ebd013 | 251 | |
252 | ||
aa3ba8d2 | 253 | AliPWG4HighPtSpectra *taskPWG4HighPtSpectra = new AliPWG4HighPtSpectra(Form("AliPWG4HighPtSpectraCent%dTrackType%dCuts%d",centClass,trackType,cuts)); |
34fc6450 | 254 | taskPWG4HighPtSpectra->SetTrackType(trackType); |
fdceab34 | 255 | taskPWG4HighPtSpectra->SetCuts(trackCuts); |
327d12da | 256 | taskPWG4HighPtSpectra->SetCutsReject(trackCutsReject); |
43032097 | 257 | taskPWG4HighPtSpectra->SetCFManagerPos(manPos); //here is set the CF manager + |
258 | taskPWG4HighPtSpectra->SetCFManagerNeg(manNeg); //here is set the CF manager - | |
67ebd013 | 259 | |
7b90d977 | 260 | if(isPbPb) { |
261 | taskPWG4HighPtSpectra->SetIsPbPb(kTRUE); | |
262 | taskPWG4HighPtSpectra->SetCentralityClass(centClass); | |
263 | } | |
dae7dd67 | 264 | // taskPWG4HighPtSpectra->SetSigmaConstrainedMax(5.); |
7b90d977 | 265 | |
e50809ff | 266 | |
fdceab34 | 267 | // E. Create ONLY the output containers for the data produced by the task. |
268 | // Get and connect other common input/output containers via the manager as below | |
269 | //============================================================================== | |
270 | ||
43032097 | 271 | //------ output containers ------ |
fdceab34 | 272 | TString outputfile = AliAnalysisManager::GetCommonFileName(); |
7b90d977 | 273 | outputfile += Form(":PWG4_HighPtSpectraCent%dTrackType%dCuts%d",centClass,trackType,cuts); |
10295ac3 | 274 | |
7b90d977 | 275 | AliAnalysisDataContainer *coutput0 = mgr->CreateContainer(Form("chist0HighPtSpectraCent%dTrackType%dCuts%d",centClass,trackType,cuts), TList::Class(),AliAnalysisManager::kOutputContainer,outputfile); |
276 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(Form("ccontainer0HighPtSpectraCent%dTrackType%dCuts%d",centClass,trackType,cuts), AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile); | |
277 | AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(Form("ccontainer1HighPtSpectraCent%dTrackType%dCuts%d",centClass,trackType,cuts), AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile); | |
278 | AliAnalysisDataContainer *cout_cuts0 = mgr->CreateContainer(Form("qa_SpectraTrackCutsCent%dTrackType%dCuts%d",centClass,trackType,cuts), AliESDtrackCuts::Class(), AliAnalysisManager::kParamContainer,outputfile); | |
43032097 | 279 | |
fdceab34 | 280 | mgr->AddTask(taskPWG4HighPtSpectra); |
281 | ||
282 | mgr->ConnectInput(taskPWG4HighPtSpectra,0,mgr->GetCommonInputContainer()); | |
283 | mgr->ConnectOutput(taskPWG4HighPtSpectra,0,coutput0); | |
284 | mgr->ConnectOutput(taskPWG4HighPtSpectra,1,coutput1); | |
67ebd013 | 285 | mgr->ConnectOutput(taskPWG4HighPtSpectra,2,coutput2); |
e5abcde9 | 286 | mgr->ConnectOutput(taskPWG4HighPtSpectra,3,cout_cuts0); |
fdceab34 | 287 | |
288 | // Return task pointer at the end | |
289 | return taskPWG4HighPtSpectra; | |
290 | } |