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