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