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