]>
Commit | Line | Data |
---|---|---|
430f811f | 1 | #ifndef __CINT__ |
2 | #include <Rtypes.h> | |
3 | #endif | |
4 | Int_t AddRsnDaughterCutsKStarNsigma_Syst(AliPID::EParticleType type1,AliPID::EParticleType type2,TString opt,Bool_t isRsnMini=kFALSE,AliRsnInputHandler *rsnIH=0,AliAnalysisTaskSE *task=0) | |
5 | { | |
6 | ||
7 | if (!rsnIH) return 0; | |
8 | ||
9 | Bool_t valid = kTRUE; | |
10 | Int_t isPP = AliAnalysisManager::GetGlobalInt("rsnIsPP",valid); | |
11 | Int_t useCommonQualityCut = AliAnalysisManager::GetGlobalInt("rsnCommonQualityCut",valid); | |
12 | ||
13 | Bool_t usePPCut = kFALSE; | |
14 | ||
15 | if (isPP && (opt.Contains("usePP"))) usePPCut = kTRUE; | |
16 | ||
17 | ||
18 | // === USER HAS TO SET CORRECT NUMBER OF CUTS SETS ===== | |
19 | Int_t numberOfCuts = 2; | |
20 | ||
21 | //--------------------------------------------- | |
22 | // Define single cutsP | |
23 | //--------------------------------------------- | |
24 | ||
25 | Printf("AddRsnDaughterCutsKStarNsigma_Syst Option : %s",opt.Data()); | |
26 | ||
27 | ||
28 | // default values | |
29 | Double_t nSigmaTPC_Pi=3.0; | |
30 | Double_t nSigmaTPC_K=3.0; | |
31 | Double_t nSigmaTOF_Pi=3.0; | |
32 | Double_t nSigmaTOF_K=3.0; | |
33 | Double_t etaRange=0.8; | |
34 | ||
35 | //Use single track Pt Cuts | |
36 | Double_t trackPtMin = 0.15; | |
37 | Double_t trackPtMax = 1.e20; | |
38 | Bool_t useTrackPtCut = kTRUE; | |
39 | ||
40 | if(opt.Contains("minPt20")) trackPtMin=0.2; | |
41 | if(opt.Contains("minPt30")) trackPtMin=0.3; | |
42 | if(opt.Contains("minPt40")) trackPtMin=0.4; | |
43 | if(opt.Contains("minPt50")) trackPtMin=0.5; | |
44 | if(opt.Contains("minPt60")) trackPtMin=0.6; | |
45 | ||
46 | ||
47 | //Use min TPC cluster Cut | |
48 | Int_t minclsK,maxclsK; | |
49 | Int_t minclsPi,maxclsPi; | |
50 | ||
51 | Bool_t useTPC_Pi=kFALSE; | |
52 | Bool_t useTOF_Pi=kFALSE; | |
53 | Bool_t useTPC_K=kFALSE; | |
54 | Bool_t useTOF_K=kFALSE; | |
55 | ||
56 | if (opt.Contains("qualityonly")) { | |
57 | useTPC_Pi=kFALSE; | |
58 | useTOF_Pi=kFALSE; | |
59 | useTPC_K=kFALSE; | |
60 | useTOF_K=kFALSE; | |
61 | } else if (!opt.Contains("nsig")) { | |
62 | useTPC_Pi=kTRUE; | |
63 | useTOF_Pi=kTRUE; | |
64 | useTPC_K=kTRUE; | |
65 | useTOF_K=kTRUE; | |
66 | } | |
67 | ||
68 | if (opt.Contains("PiTPCnsig")) useTPC_Pi=kTRUE; | |
69 | if (opt.Contains("PiTOFnsig")) useTOF_Pi=kTRUE; | |
70 | if (opt.Contains("KTPCnsig")) useTPC_K=kTRUE; | |
71 | if (opt.Contains("KTOFnsig")) useTOF_K=kTRUE; | |
72 | ||
73 | if (opt.Contains("PiTPCnsig10")) nSigmaTPC_Pi = 1.0; | |
74 | if (opt.Contains("PiTPCnsig15")) nSigmaTPC_Pi = 1.5; | |
75 | if (opt.Contains("PiTPCnsig20")) nSigmaTPC_Pi = 2.0; | |
76 | if (opt.Contains("PiTPCnsig25")) nSigmaTPC_Pi = 2.5; | |
77 | if (opt.Contains("PiTPCnsig30")) nSigmaTPC_Pi = 3.0; | |
78 | ||
79 | if (opt.Contains("KTPCnsig10")) nSigmaTPC_K = 1.0; | |
80 | if (opt.Contains("KTPCnsig15")) nSigmaTPC_K = 1.5; | |
81 | if (opt.Contains("KTPCnsig20")) nSigmaTPC_K = 2.0; | |
82 | if (opt.Contains("KTPCnsig25")) nSigmaTPC_K = 2.5; | |
83 | if (opt.Contains("KTPCnsig30")) nSigmaTPC_K = 3.0; | |
84 | ||
85 | if (opt.Contains("PiTOFnsig10")) nSigmaTOF_Pi = 1.0; | |
86 | if (opt.Contains("PiTOFnsig15")) nSigmaTOF_Pi = 1.5; | |
87 | if (opt.Contains("PiTOFnsig20")) nSigmaTOF_Pi = 2.0; | |
88 | if (opt.Contains("PiTOFnsig25")) nSigmaTOF_Pi = 2.5; | |
89 | if (opt.Contains("PiTOFnsig30")) nSigmaTOF_Pi = 3.0; | |
90 | ||
91 | if (opt.Contains("KTOFnsig10")) nSigmaTOF_K = 1.0; | |
92 | if (opt.Contains("KTOFnsig15")) nSigmaTOF_K = 1.5; | |
93 | if (opt.Contains("KTOFnsig20")) nSigmaTOF_K = 2.0; | |
94 | if (opt.Contains("KTOFnsig25")) nSigmaTOF_K = 2.5; | |
95 | if (opt.Contains("KTOFnsig30")) nSigmaTOF_K = 3.0; | |
96 | ||
97 | ||
98 | Bool_t usePDG=kFALSE; | |
99 | if (opt.Contains("pdg")) { | |
100 | Printf("Using PDG"); | |
101 | usePDG = kTRUE; | |
102 | } | |
103 | ||
104 | Bool_t useEta = kFALSE; | |
105 | if (opt.Contains("eta")) { | |
106 | Printf("Using ETA range (%.2f,%.2f)",-etaRange,etaRange); | |
107 | useEta = kTRUE; | |
108 | } | |
109 | ||
110 | // KAON SETTINGS ======================================= | |
111 | TString scheme=""; | |
112 | TString cutname = "K_Kstar"; | |
113 | if (!opt.IsNull()) cutname += Form("_%s",opt.Data()); | |
114 | AliRsnCutSet *cutsK = new AliRsnCutSet(cutname.Data(), AliRsnTarget::kDaughter); | |
115 | ||
116 | AliRsnCutTrackQuality *qualityCutK = new AliRsnCutTrackQuality("cutQuatityK"); | |
117 | if (useCommonQualityCut>=0) { | |
118 | qualityCutK->SetAODTestFilterBit(useCommonQualityCut); | |
119 | ||
120 | } else { | |
121 | qualityCutK->SetDefaults2010(); | |
122 | ||
123 | } | |
124 | ||
125 | //No filter bit | |
126 | if(opt.Contains("NOfb")) qualityCutK->SetAODTestFilterBit(-1); | |
127 | ||
128 | cutsK->AddCut(qualityCutK); | |
129 | if (!scheme.IsNull()) scheme += "&"; | |
130 | scheme += qualityCutK->GetName(); | |
131 | ||
132 | ||
133 | if (useTPC_K) { | |
134 | AliRsnCutPIDNSigma *cutKTPC = new AliRsnCutPIDNSigma("cutNSigmaTPCK",AliPID::kKaon,AliRsnCutPIDNSigma::kTPC); | |
135 | cutKTPC->SinglePIDRange(nSigmaTPC_K); | |
136 | cutsK->AddCut(cutKTPC); | |
137 | if (!scheme.IsNull()) scheme += "&"; | |
138 | scheme += cutKTPC->GetName(); | |
139 | } | |
140 | ||
141 | if (useTOF_K) { | |
142 | AliRsnCutPIDNSigma *cutKTOF = new AliRsnCutPIDNSigma("cutNSigmaTOFK",AliPID::kKaon,AliRsnCutPIDNSigma::kTOF); | |
143 | cutKTOF->SinglePIDRange(nSigmaTOF_K); | |
144 | cutsK->AddCut(cutKTOF); | |
145 | if (!scheme.IsNull()) scheme += "&"; | |
146 | scheme += cutKTOF->GetName(); | |
147 | } | |
148 | if (useEta) { | |
149 | AliRsnValueDaughter *valEtaK = new AliRsnValueDaughter(Form("val%sETA%s",AliPID::ParticleName(type2),opt.Data()),AliRsnValueDaughter::kEta); | |
150 | AliRsnCutValue *cutEtaK = new AliRsnCutValue(Form("cut%sETA%s",AliPID::ParticleName(type2),opt.Data()),-etaRange,etaRange); | |
151 | cutEtaK->SetTargetType(AliRsnTarget::kDaughter); | |
152 | cutEtaK->SetValueObj(valEtaK); | |
153 | cutsK->AddCut(cutEtaK); | |
154 | if (!scheme.IsNull()) scheme += "&"; | |
155 | scheme += cutEtaK->GetName(); | |
156 | } | |
157 | if (usePDG) { | |
158 | AliRsnCutPID *cutPDGK = new AliRsnCutPID(Form("cut%sPDG%s",AliPID::ParticleName(type2),opt.Data()),type2,0.0,kTRUE); | |
159 | cutsK->AddCut(cutPDGK); | |
160 | if (!scheme.IsNull()) scheme += "&"; | |
161 | scheme += cutPDGK->GetName(); | |
162 | } | |
163 | ||
164 | ||
165 | ||
166 | //MinPt cut kaon | |
167 | if (useTrackPtCut) { | |
168 | Printf("Adding Pt min=%.3f max=%.3f ...",trackPtMin,trackPtMax); | |
169 | AliRsnValueDaughter *valTrackPtK = new AliRsnValueDaughter(Form("val%sTrackPt%s",AliPID::ParticleName(type2),opt.Data()),AliRsnValueDaughter::kPt); | |
170 | ||
171 | AliRsnCutValue *cutTrackPtK = new AliRsnCutValue(Form("cut%sTrackPt%s",AliPID::ParticleName(type2),opt.Data()),trackPtMin,trackPtMax); | |
172 | cutTrackPtK->SetTargetType(AliRsnTarget::kDaughter); | |
173 | cutTrackPtK->SetValueObj(valTrackPtK); | |
174 | cutsK->AddCut(cutTrackPtK); | |
175 | if (!scheme.IsNull()) scheme += "&"; | |
176 | scheme += cutTrackPtK->GetName(); | |
177 | } | |
178 | ||
179 | //Ncluster cut kaon | |
180 | if(opt.Contains("tpcncl80K")){ | |
181 | Printf("***** adding 80 TPCNCL cut Kaon"); | |
182 | AliRsnValueDaughter* val_tpcnclK = new AliRsnValueDaughter(Form("val%s_tpcncl_%s",AliPID::ParticleName(type2),opt.Data()),AliRsnValueDaughter::kNTPCclusters); | |
183 | AliRsnCutValue* cut_tpcnclK = new AliRsnCutValue(Form("cut%s_tpcncl_%s",AliPID::ParticleName(type2),opt.Data()),80,10000); | |
184 | cut_tpcnclK->SetTargetType(AliRsnTarget::kDaughter); | |
185 | cut_tpcnclK->SetValueObj(val_tpcnclK); | |
186 | cutsK->AddCut(cut_tpcnclK); | |
187 | if (!scheme.IsNull()) scheme += "&"; | |
188 | scheme += cut_tpcnclK->GetName(); | |
189 | } | |
190 | ||
191 | if(opt.Contains("tpcncl90K")){ | |
192 | Printf("***** adding 90 TPCNCL cut Kaon"); | |
193 | AliRsnValueDaughter* val_tpcnclK = new AliRsnValueDaughter(Form("val%s_tpcncl_%s",AliPID::ParticleName(type2),opt.Data()),AliRsnValueDaughter::kNTPCclusters); | |
194 | AliRsnCutValue* cut_tpcnclK = new AliRsnCutValue(Form("cut%s_tpcncl_%s",AliPID::ParticleName(type2),opt.Data()),90,10000); | |
195 | cut_tpcnclK->SetTargetType(AliRsnTarget::kDaughter); | |
196 | cut_tpcnclK->SetValueObj(val_tpcnclK); | |
197 | cutsK->AddCut(cut_tpcnclK); | |
198 | if (!scheme.IsNull()) scheme += "&"; | |
199 | scheme += cut_tpcnclK->GetName(); | |
200 | } | |
201 | ||
202 | if(opt.Contains("tpcncl100K")){ | |
203 | Printf("***** adding 100 TPCNCL cut Kaon"); | |
204 | AliRsnValueDaughter* val_tpcnclK = new AliRsnValueDaughter(Form("val%s_tpcncl_%s",AliPID::ParticleName(type2),opt.Data()),AliRsnValueDaughter::kNTPCclusters); | |
205 | AliRsnCutValue* cut_tpcnclK = new AliRsnCutValue(Form("cut%s_tpcncl_%s",AliPID::ParticleName(type2),opt.Data()),100,10000); | |
206 | cut_tpcnclK->SetTargetType(AliRsnTarget::kDaughter); | |
207 | cut_tpcnclK->SetValueObj(val_tpcnclK); | |
208 | cutsK->AddCut(cut_tpcnclK); | |
209 | if (!scheme.IsNull()) scheme += "&"; | |
210 | scheme += cut_tpcnclK->GetName(); | |
211 | } | |
212 | ||
213 | ||
214 | //Ncluster cut kaon through AliRsnCutTrackQuality | |
215 | if(opt.Contains("QTPCnclK")){ | |
216 | AliRsnCutTrackQuality *QTPCNclsCutK = new AliRsnCutTrackQuality("QTPCnclK"); | |
217 | QTPCNclsCutK->DisableAll();//disable all cuts, filter bit, pT, eta, and DCAxy cuts will be reset later | |
218 | QTPCNclsCutK->SetAODTestFilterBit(5);//reset the filter bit cut | |
219 | QTPCNclsCutK->SetCheckOnlyFilterBit(kFALSE);//tells the cut object to check all other cuts individually, not just the filter bit | |
220 | QTPCNclsCutK->SetPtRange(0.15,1.e20);//reset the pT cut | |
221 | QTPCNclsCutK->SetEtaRange(-0.8,0.8);//reset the eta cut | |
222 | ||
223 | if(opt.Contains("nclK70")) minclsK=70; | |
224 | if(opt.Contains("nclK80")) minclsK=80; | |
225 | if(opt.Contains("nclK90")) minclsK=90; | |
226 | if(opt.Contains("nclK100")) minclsK=100; | |
227 | ||
228 | Printf(Form("++++++++ Adding Cut: NclustersTPC Kaon >= %d",minclsK)); | |
229 | QTPCNclsCutK->SetTPCminNClusters(minclsK); | |
230 | ||
231 | cutsK->AddCut(QTPCNclsCutK); | |
232 | if (!scheme.IsNull()) scheme += "&"; | |
233 | scheme += QTPCNclsCutK->GetName(); | |
234 | } | |
235 | ||
236 | ||
237 | //pt dep dcaxy cut on kaon | |
238 | if(opt.Contains("PtDCAK")){ | |
239 | AliRsnCutTrackQuality *dcaxyCutK = new AliRsnCutTrackQuality("ptdcaK"); | |
240 | dcaxyCutK->DisableAll();//disable all cuts, filter bit, pT, eta, and DCAxy cuts will be reset later | |
241 | dcaxyCutK->SetAODTestFilterBit(5);//reset the filter bit cut | |
242 | dcaxyCutK->SetCheckOnlyFilterBit(kFALSE);//tells the cut object to check all other cuts individually, not just the filter bit | |
243 | dcaxyCutK->SetPtRange(0.15,1.e20);//reset the pT cut | |
244 | dcaxyCutK->SetEtaRange(-0.8,0.8);//reset the eta cut | |
245 | if(opt.Contains("DCAK7s")){dcaxyCutK->SetDCARPtFormula("0.0182+0.0350/pt^1.01");} | |
246 | if(opt.Contains("DCAK6s")){dcaxyCutK->SetDCARPtFormula("0.0156+0.03/pt^1.01");} | |
247 | if(opt.Contains("DCAK5s")){dcaxyCutK->SetDCARPtFormula("0.013+0.025/pt^1.01");} | |
248 | if(opt.Contains("DCAK4s")){dcaxyCutK->SetDCARPtFormula("0.0104+0.02/pt^1.01");} | |
249 | if(opt.Contains("DCAK3s")){dcaxyCutK->SetDCARPtFormula("0.0078+0.015/pt^1.01");} | |
250 | if(opt.Contains("DCAK2s")){dcaxyCutK->SetDCARPtFormula("0.0052+0.01/pt^1.01");} | |
251 | if(opt.Contains("DCAK1s")){dcaxyCutK->SetDCARPtFormula("0.0026+0.005/pt^1.01");} | |
252 | cutsK->AddCut(dcaxyCutK); | |
253 | if (!scheme.IsNull()) scheme += "&"; | |
254 | scheme += dcaxyCutK->GetName(); | |
255 | } | |
256 | ||
257 | Printf ("CUT Scheme for KAON is '%s'",scheme.Data()); | |
258 | cutsK->SetCutScheme(scheme.Data()); | |
259 | ||
260 | // END KAON ======================================= | |
261 | ||
262 | // Pion SETTINGS =========================================== | |
263 | ||
264 | scheme=""; | |
265 | cutname = "Pi_Kstar"; | |
266 | if (!opt.IsNull()) cutname += Form("_%s",opt.Data()); | |
267 | AliRsnCutSet *cutsP = new AliRsnCutSet(cutname.Data(), AliRsnTarget::kDaughter); | |
268 | ||
269 | AliRsnCutTrackQuality *qualityCutPi = new AliRsnCutTrackQuality("cutQuatityPi"); | |
270 | if (useCommonQualityCut>=0) { | |
271 | qualityCutPi->SetAODTestFilterBit(useCommonQualityCut); | |
272 | ||
273 | } else { | |
274 | qualityCutPi->SetDefaults2010(); | |
275 | } | |
276 | //No filter bit | |
277 | if(opt.Contains("NOfb")) qualityCutPi->SetAODTestFilterBit(-1); | |
278 | ||
279 | cutsP->AddCut(qualityCutPi); | |
280 | if (!scheme.IsNull()) scheme += "&"; | |
281 | scheme += qualityCutPi->GetName(); | |
282 | if (useTPC_Pi) { | |
283 | AliRsnCutPIDNSigma *cutPiTPC = new AliRsnCutPIDNSigma("cutNSigmaTPCPi",AliPID::kPion,AliRsnCutPIDNSigma::kTPC); | |
284 | cutPiTPC->SinglePIDRange(nSigmaTPC_Pi); | |
285 | cutsP->AddCut(cutPiTPC); | |
286 | if (!scheme.IsNull()) scheme += "&"; | |
287 | scheme += cutPiTPC->GetName(); | |
288 | } | |
289 | if (useTOF_Pi) { | |
290 | AliRsnCutPIDNSigma *cutPiTOF = new AliRsnCutPIDNSigma("cutNSigmaTOFPi",AliPID::kPion,AliRsnCutPIDNSigma::kTOF); | |
291 | cutPiTOF->SinglePIDRange(nSigmaTOF_Pi); | |
292 | cutsP->AddCut(cutPiTOF); | |
293 | if (!scheme.IsNull()) scheme += "&"; | |
294 | scheme += cutPiTOF->GetName(); | |
295 | } | |
296 | if (useEta) { | |
297 | AliRsnValueDaughter *valEtaP = new AliRsnValueDaughter(Form("val%sETA%s",AliPID::ParticleName(type1),opt.Data()),AliRsnValueDaughter::kEta); | |
298 | AliRsnCutValue *cutEtaP = new AliRsnCutValue(Form("cut%sETA%s",AliPID::ParticleName(type1),opt.Data()),-etaRange,etaRange); | |
299 | cutEtaP->SetTargetType(AliRsnTarget::kDaughter); | |
300 | cutEtaP->SetValueObj(valEtaP); | |
301 | cutsP->AddCut(cutEtaP); | |
302 | if (!scheme.IsNull()) scheme += "&"; | |
303 | scheme += cutEtaP->GetName(); | |
304 | } | |
305 | if (usePDG) { | |
306 | AliRsnCutPID *cutPDGP = new AliRsnCutPID(Form("cut%sPDG%s",AliPID::ParticleName(type1),opt.Data()),type1,0.0,kTRUE); | |
307 | cutsP->AddCut(cutPDGP); | |
308 | if (!scheme.IsNull()) scheme += "&"; | |
309 | scheme += cutPDGP->GetName(); | |
310 | } | |
311 | ||
312 | //MinPt cut pion | |
313 | if (useTrackPtCut) { | |
314 | Printf("Adding Pt min=%.3f max=%.3f ...",trackPtMin,trackPtMax); | |
315 | AliRsnValueDaughter *valTrackPtP = new AliRsnValueDaughter(Form("val%sTrackPt%s",AliPID::ParticleName(type1),opt.Data()),AliRsnValueDaughter::kPt); | |
316 | ||
317 | AliRsnCutValue *cutTrackPtP = new AliRsnCutValue(Form("cut%sTrackPt%s",AliPID::ParticleName(type1),opt.Data()),trackPtMin,trackPtMax); | |
318 | cutTrackPtP->SetTargetType(AliRsnTarget::kDaughter); | |
319 | cutTrackPtP->SetValueObj(valTrackPtP); | |
320 | cutsP->AddCut(cutTrackPtP); | |
321 | if (!scheme.IsNull()) scheme += "&"; | |
322 | scheme += cutTrackPtP->GetName(); | |
323 | } | |
324 | ||
325 | //Ncluster cut pion | |
326 | if(opt.Contains("tpcncl80Pi")){ | |
327 | Printf("***** adding 80 TPCNCL cut Pion"); | |
328 | AliRsnValueDaughter* val_tpcnclP = new AliRsnValueDaughter(Form("val%s_tpcncl_%s",AliPID::ParticleName(type1),opt.Data()),AliRsnValueDaughter::kNTPCclusters); | |
329 | AliRsnCutValue* cut_tpcnclP = new AliRsnCutValue(Form("cut%s_tpcncl_%s",AliPID::ParticleName(type1),opt.Data()),80,10000); | |
330 | cut_tpcnclP->SetTargetType(AliRsnTarget::kDaughter); | |
331 | cut_tpcnclP->SetValueObj(val_tpcnclP); | |
332 | cutsP->AddCut(cut_tpcnclP); | |
333 | if (!scheme.IsNull()) scheme += "&"; | |
334 | scheme += cut_tpcnclP->GetName(); | |
335 | } | |
336 | ||
337 | if(opt.Contains("tpcncl90Pi")){ | |
338 | Printf("***** adding 90 TPCNCL cut Pion"); | |
339 | AliRsnValueDaughter* val_tpcnclP = new AliRsnValueDaughter(Form("val%s_tpcncl_%s",AliPID::ParticleName(type1),opt.Data()),AliRsnValueDaughter::kNTPCclusters); | |
340 | AliRsnCutValue* cut_tpcnclP = new AliRsnCutValue(Form("cut%s_tpcncl_%s",AliPID::ParticleName(type1),opt.Data()),90,10000); | |
341 | cut_tpcnclP->SetTargetType(AliRsnTarget::kDaughter); | |
342 | cut_tpcnclP->SetValueObj(val_tpcnclP); | |
343 | cutsP->AddCut(cut_tpcnclP); | |
344 | if (!scheme.IsNull()) scheme += "&"; | |
345 | scheme += cut_tpcnclP->GetName(); | |
346 | } | |
347 | ||
348 | ||
349 | if(opt.Contains("tpcncl100Pi")){ | |
350 | Printf("***** adding 100 TPCNCL cut Pion"); | |
351 | AliRsnValueDaughter* val_tpcnclP = new AliRsnValueDaughter(Form("val%s_tpcncl_%s",AliPID::ParticleName(type1),opt.Data()),AliRsnValueDaughter::kNTPCclusters); | |
352 | AliRsnCutValue* cut_tpcnclP = new AliRsnCutValue(Form("cut%s_tpcncl_%s",AliPID::ParticleName(type1),opt.Data()),100,10000); | |
353 | cut_tpcnclP->SetTargetType(AliRsnTarget::kDaughter); | |
354 | cut_tpcnclP->SetValueObj(val_tpcnclP); | |
355 | cutsP->AddCut(cut_tpcnclP); | |
356 | if (!scheme.IsNull()) scheme += "&"; | |
357 | scheme += cut_tpcnclP->GetName(); | |
358 | } | |
359 | ||
360 | //Ncluster cut on pion through AliRsnCutTrackQuality | |
361 | if(opt.Contains("QTPCnclPi")){ | |
362 | AliRsnCutTrackQuality *QTPCNclsCutPi = new AliRsnCutTrackQuality("QTPCnclPi"); | |
363 | QTPCNclsCutPi->DisableAll();//disable all cuts, filter bit, pT, eta, and DCAxy cuts will be reset later | |
364 | QTPCNclsCutPi->SetAODTestFilterBit(5);//reset the filter bit cut | |
365 | QTPCNclsCutPi->SetCheckOnlyFilterBit(kFALSE);//tells the cut object to check all other cuts individually, not just the filter bit | |
366 | QTPCNclsCutPi->SetPtRange(0.15,1.e20);//reset the pT cut | |
367 | QTPCNclsCutPi->SetEtaRange(-0.8,0.8);//reset the eta cut | |
368 | ||
369 | if(opt.Contains("nclPi70")) minclsPi=70; | |
370 | if(opt.Contains("nclPi80")) minclsPi=80; | |
371 | if(opt.Contains("nclPi90")) minclsPi=90; | |
372 | if(opt.Contains("nclPi100")) minclsPi=100; | |
373 | ||
374 | Printf(Form("+++++++++ Adding Cut: NclustersTPC Pion >= %d",minclsPi)); | |
375 | QTPCNclsCutPi->SetTPCminNClusters(minclsPi); | |
376 | ||
377 | cutsP->AddCut(QTPCNclsCutPi); | |
378 | if (!scheme.IsNull()) scheme += "&"; | |
379 | scheme += QTPCNclsCutPi->GetName(); | |
380 | ||
381 | } | |
382 | ||
383 | //pt dep dcaxy cut pion | |
384 | if(opt.Contains("PtDCAP")){ | |
385 | AliRsnCutTrackQuality *dcaxyCutP = new AliRsnCutTrackQuality("ptdcaP6s"); | |
386 | dcaxyCutP->DisableAll();//disable all cuts, filter bit, pT, eta, and DCAxy cuts will be reset later | |
387 | dcaxyCutP->SetAODTestFilterBit(5);//reset the filter bit cut | |
388 | dcaxyCutP->SetCheckOnlyFilterBit(kFALSE);//tells the cut object to check all other cuts individually, not just the filter bit | |
389 | dcaxyCutP->SetPtRange(0.15,1.e20);//reset the pT cut | |
390 | dcaxyCutP->SetEtaRange(-0.8,0.8);//reset the eta cut | |
391 | if(opt.Contains("DCAP7s")){dcaxyCutP->SetDCARPtFormula("0.0182+0.0350/pt^1.01");} | |
392 | if(opt.Contains("DCAP6s")){dcaxyCutP->SetDCARPtFormula("0.0156+0.03/pt^1.01");} | |
393 | if(opt.Contains("DCAP5s")){dcaxyCutP->SetDCARPtFormula("0.013+0.025/pt^1.01");} | |
394 | if(opt.Contains("DCAP4s")){dcaxyCutP->SetDCARPtFormula("0.0104+0.02/pt^1.01");} | |
395 | if(opt.Contains("DCAP3s")){dcaxyCutP->SetDCARPtFormula("0.0078+0.015/pt^1.01");} | |
396 | if(opt.Contains("DCAP2s")){dcaxyCutP->SetDCARPtFormula("0.0052+0.01/pt^1.01");} | |
397 | if(opt.Contains("DCAP1s")){dcaxyCutP->SetDCARPtFormula("0.0026+0.005/pt^1.01");} | |
398 | cutsP->AddCut(dcaxyCutP); | |
399 | if (!scheme.IsNull()) scheme += "&"; | |
400 | scheme += dcaxyCutP->GetName(); | |
401 | } | |
402 | ||
403 | Printf ("CUT Scheme for PION is '%s'",scheme.Data()); | |
404 | cutsP->SetCutScheme(scheme.Data()); | |
405 | ||
406 | // END PION ======================================= | |
407 | ||
408 | if (opt.Contains("mon")) { | |
409 | AddMonitorOutput(cutsP->GetMonitorOutput(),opt); | |
410 | AddMonitorOutput(cutsK->GetMonitorOutput(),opt); | |
411 | } | |
412 | if (isRsnMini) { | |
413 | AliRsnMiniAnalysisTask *taskRsnMini = dynamic_cast<AliRsnMiniAnalysisTask *>(task); | |
414 | if (taskRsnMini) { | |
415 | taskRsnMini->AddTrackCuts(cutsK); | |
416 | taskRsnMini->AddTrackCuts(cutsP); | |
417 | ||
418 | } | |
419 | } else { | |
420 | AliRsnDaughterSelector *sel = rsnIH->GetSelector(); | |
421 | // sel->SetLabelCheck(kFALSE); | |
422 | sel->Add(cutsP, kTRUE); | |
423 | sel->Add(cutsK, kTRUE); | |
424 | } | |
425 | return numberOfCuts; | |
426 | ||
427 | } |