]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoESDTrackCut.cxx
bugfix: Lambda and ALambda Hijing and Inject histos added twice to output list of...
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / AliFemtoUser / AliFemtoESDTrackCut.cxx
CommitLineData
76ce4b5b 1/*
2***************************************************************************
3*
87ede832 4* $Id$
5*
76ce4b5b 6*
76ce4b5b 7***************************************************************************
8*
87ede832 9*
10*
76ce4b5b 11*
12***************************************************************************
13*
14* $Log$
15* Revision 1.3 2007/05/22 09:01:42 akisiel
16* Add the possibiloity to save cut settings in the ROOT file
17*
18* Revision 1.2 2007/05/21 10:38:25 akisiel
19* More coding rule conformance
20*
21* Revision 1.1 2007/05/16 10:25:06 akisiel
22* Making the directory structure of AliFemtoUser flat. All files go into one common directory
23*
24* Revision 1.4 2007/05/03 09:46:10 akisiel
25* Fixing Effective C++ warnings
26*
27* Revision 1.3 2007/04/27 07:25:59 akisiel
28* Make revisions needed for compilation from the main AliRoot tree
29*
30* Revision 1.1.1.1 2007/04/25 15:38:41 panos
31* Importing the HBT code dir
32*
33* Revision 1.4 2007-04-03 16:00:08 mchojnacki
34* Changes to iprove memory managing
35*
36* Revision 1.3 2007/03/13 15:30:03 mchojnacki
37* adding reader for simulated data
38*
39* Revision 1.2 2007/03/08 14:58:03 mchojnacki
40* adding some alice stuff
41*
42* Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki
43* First version on CVS
44*
45**************************************************************************/
46
47#include "AliFemtoESDTrackCut.h"
48#include <cstdio>
49
87ede832 50#ifdef __ROOT__
76ce4b5b 51ClassImp(AliFemtoESDTrackCut)
52#endif
53
54
55// electron
56// 0.13 - 1.8
57// 0 7.594129e-02 8.256141e-03
58// 1 -5.535827e-01 8.170825e-02
59// 2 1.728591e+00 3.104210e-01
60// 3 -2.827893e+00 5.827802e-01
61// 4 2.503553e+00 5.736207e-01
62// 5 -1.125965e+00 2.821170e-01
63// 6 2.009036e-01 5.438876e-02
64
65// pion
66// 0.13 - 2.0
67// 0 1.063457e+00 8.872043e-03
68// 1 -4.222208e-01 2.534402e-02
69// 2 1.042004e-01 1.503945e-02
70
71// kaon
72// 0.18 - 2.0
73// 0 -7.289406e-02 1.686074e-03
74// 1 4.415666e-01 1.143939e-02
75// 2 -2.996790e-01 1.840964e-02
76// 3 6.704652e-02 7.783990e-03
77
78// proton
79// 0.26 - 2.0
80// 0 -3.730200e-02 2.347311e-03
81// 1 1.163684e-01 1.319316e-02
82// 2 8.354116e-02 1.997948e-02
83// 3 -4.608098e-02 8.336400e-03
84
85
86 AliFemtoESDTrackCut::AliFemtoESDTrackCut() :
87 fCharge(0),
88 fLabel(0),
89 fStatus(0),
90 fPIDMethod(knSigma),
12a3e650 91 fNsigmaTPCTOF(kFALSE),
87ede832 92 fNsigmaTPConly(kFALSE),
93 fNsigma(3.),
76ce4b5b 94 fminTPCclsF(0),
95 fminTPCncls(0),
96 fminITScls(0),
97 fMaxITSchiNdof(1000.0),
98 fMaxTPCchiNdof(1000.0),
99 fMaxSigmaToVertex(1000.0),
100 fNTracksPassed(0),
101 fNTracksFailed(0),
102 fRemoveKinks(kFALSE),
103 fRemoveITSFake(kFALSE),
87ede832 104 fMostProbable(0),
76ce4b5b 105 fMaxImpactXY(1000.0),
c53b8e2c 106 fMinImpactXY(-1000.0),
76ce4b5b 107 fMaxImpactZ(1000.0),
108 fMaxImpactXYPtOff(1000.0),
109 fMaxImpactXYPtNrm(1000.0),
110 fMaxImpactXYPtPow(1000.0),
111 fMinPforTOFpid(0.0),
112 fMaxPforTOFpid(10000.0),
113 fMinPforTPCpid(0.0),
114 fMaxPforTPCpid(10000.0),
115 fMinPforITSpid(0.0),
2e04885f 116 fMaxPforITSpid(10000.0),
117 fElectronRejection(0)
76ce4b5b 118{
119 // Default constructor
120 fNTracksPassed = fNTracksFailed = 0;
121 fCharge = 0; // takes both charges 0
122 fPt[0]=0.0; fPt[1] = 100.0;//100
123 fRapidity[0]=-2; fRapidity[1]=2;//-2 2
124 fEta[0]=-2; fEta[1]=2;//-2 2
125 fPidProbElectron[0]=-1;fPidProbElectron[1]=2;
126 fPidProbPion[0]=-1; fPidProbPion[1]=2;
127 fPidProbKaon[0]=-1;fPidProbKaon[1]=2;
128 fPidProbProton[0]=-1;fPidProbProton[1]=2;
129 fPidProbMuon[0]=-1;fPidProbMuon[1]=2;
4eac0b05 130 for (Int_t i = 0; i < 3; i++)
131 fCutClusterRequirementITS[i] = AliESDtrackCuts::kOff;
76ce4b5b 132 fLabel=false;
133 fStatus=0;
134 fminTPCclsF=0;
135 fminITScls=0;
136 fPIDMethod=knSigma;
12a3e650 137 fNsigmaTPCTOF=kFALSE;
87ede832 138 fNsigmaTPConly=kFALSE;
139 fNsigma=3.;
76ce4b5b 140}
141//------------------------------
142AliFemtoESDTrackCut::~AliFemtoESDTrackCut(){
143 /* noop */
144}
145//------------------------------
146bool AliFemtoESDTrackCut::Pass(const AliFemtoTrack* track)
147{
4eac0b05 148 //cout<<"AliFemtoESDTrackCut::Pass"<<endl;
c9b0c11d 149
87ede832 150 // test the particle and return
76ce4b5b 151 // true if it meets all the criteria
152 // false if it doesn't meet at least one of the criteria
153 float tMost[5];
87ede832 154
76ce4b5b 155 //cout<<"AliFemtoESD cut"<<endl;
156 //cout<<fPidProbPion[0]<<" < pi ="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
157 if (fStatus!=0)
158 {
159 //cout<<" status "<<track->Label()<<" "<<track->Flags()<<" "<<track->TPCnclsF()<<" "<<track->ITSncls()<<endl;
160 if ((track->Flags()&fStatus)!=fStatus)
161 {
162 // cout<<track->Flags()<<" "<<fStatus<<" no go through status"<<endl;
163 return false;
164 }
87ede832 165
76ce4b5b 166 }
167 if (fRemoveKinks) {
168 if ((track->KinkIndex(0)) || (track->KinkIndex(1)) || (track->KinkIndex(2)))
169 return false;
170 }
171 if (fRemoveITSFake) {
172 if (track->ITSncls() < 0)
173 return false;
174 }
175 if (fminTPCclsF>track->TPCnclsF())
176 {
177 //cout<<" No go because TPC Number of ClsF"<<fminTPCclsF<< " "<<track->TPCnclsF()<<endl;
178 return false;
179 }
180 if (fminTPCncls>track->TPCncls())
181 {
182 //cout<<" No go because TPC Number of ClsF"<<fminTPCclsF<< " "<<track->TPCnclsF()<<endl;
183 return false;
184 }
185 if (fminITScls>track->ITSncls())
186 {
187 //cout<<" No go because ITS Number of Cls"<<fminITScls<< " "<<track->ITSncls()<<endl;
188 return false;
189 }
190
191 if (fMaxImpactXY < TMath::Abs(track->ImpactD()))
192 return false;
193
c53b8e2c 194 if (fMinImpactXY > TMath::Abs(track->ImpactD()))
195 return false;
196
76ce4b5b 197 if (fMaxImpactZ < TMath::Abs(track->ImpactZ()))
198 return false;
87ede832 199
76ce4b5b 200 if (fMaxSigmaToVertex < track->SigmaToVertex()) {
201 return false;
202 }
87ede832 203
204 if (track->ITSncls() > 0)
76ce4b5b 205 if ((track->ITSchi2()/track->ITSncls()) > fMaxITSchiNdof) {
206 return false;
207 }
208
209 if (track->TPCncls() > 0)
210 if ((track->TPCchi2()/track->TPCncls()) > fMaxTPCchiNdof) {
211 return false;
212 }
4eac0b05 213 //ITS cluster requirenments
214 for (Int_t i = 0; i < 3; i++)
215 if(!CheckITSClusterRequirement(fCutClusterRequirementITS[i], track->HasPointOnITSLayer(i*2), track->HasPointOnITSLayer(i*2+1)))
216 return false;
76ce4b5b 217
218 if (fLabel)
219 {
220 //cout<<"labels"<<endl;
221 if(track->Label()<0)
222 {
223 fNTracksFailed++;
224 // cout<<"No Go Through the cut"<<endl;
225 // cout<<fLabel<<" Label="<<track->Label()<<endl;
226 return false;
87ede832 227 }
76ce4b5b 228 }
229 if (fCharge!=0)
87ede832 230 {
76ce4b5b 231 //cout<<"AliFemtoESD cut ch "<<endl;
232 //cout<<fCharge<<" Charge="<<track->Charge()<<endl;
87ede832 233 if (track->Charge()!= fCharge)
76ce4b5b 234 {
235 fNTracksFailed++;
236 // cout<<"No Go Through the cut"<<endl;
237 // cout<<fCharge<<" Charge="<<track->Charge()<<endl;
238 return false;
239 }
240 }
4eac0b05 241
242
87ede832 243
4eac0b05 244
76ce4b5b 245 Bool_t tTPCPidIn = (track->Flags()&AliFemtoTrack::kTPCpid)>0;
246 Bool_t tITSPidIn = (track->Flags()&AliFemtoTrack::kITSpid)>0;
247 Bool_t tTOFPidIn = (track->Flags()&AliFemtoTrack::kTOFpid)>0;
87ede832 248
76ce4b5b 249 if(fMinPforTOFpid > 0 && track->P().Mag() > fMinPforTOFpid &&
250 track->P().Mag() < fMaxPforTOFpid && !tTOFPidIn)
251 {
252 fNTracksFailed++;
253 return false;
254 }
87ede832 255
76ce4b5b 256 if(fMinPforTPCpid > 0 && track->P().Mag() > fMinPforTPCpid &&
257 track->P().Mag() < fMaxPforTPCpid && !tTPCPidIn)
258 {
259 fNTracksFailed++;
260 return false;
261 }
87ede832 262
76ce4b5b 263 if(fMinPforITSpid > 0 && track->P().Mag() > fMinPforITSpid &&
264 track->P().Mag() < fMaxPforITSpid && !tITSPidIn)
265 {
266 fNTracksFailed++;
267 return false;
268 }
87ede832 269
76ce4b5b 270
271 float tEnergy = ::sqrt(track->P().Mag2()+fMass*fMass);
e52a5f82 272 float tRapidity = 0;
273 if(tEnergy-track->P().z()!=0 && (tEnergy+track->P().z())/(tEnergy-track->P().z())>0)
274 tRapidity = 0.5*::log((tEnergy+track->P().z())/(tEnergy-track->P().z()));
76ce4b5b 275 float tPt = ::sqrt((track->P().x())*(track->P().x())+(track->P().y())*(track->P().y()));
276 float tEta = track->P().PseudoRapidity();
87ede832 277
76ce4b5b 278 if (fMaxImpactXYPtOff < 999.0) {
279 if ((fMaxImpactXYPtOff + fMaxImpactXYPtNrm*TMath::Power(tPt, fMaxImpactXYPtPow)) < TMath::Abs(track->ImpactD())) {
280 fNTracksFailed++;
281 return false;
282 }
283 }
284
285 if ((tRapidity<fRapidity[0])||(tRapidity>fRapidity[1]))
286 {
287 fNTracksFailed++;
87ede832 288 //cout<<"No Go Through the cut"<<endl;
76ce4b5b 289 //cout<<fRapidity[0]<<" < Rapidity ="<<tRapidity<<" <"<<fRapidity[1]<<endl;
290 return false;
291 }
292 if ((tEta<fEta[0])||(tEta>fEta[1]))
293 {
294 fNTracksFailed++;
87ede832 295 //cout<<"No Go Through the cut"<<endl;
76ce4b5b 296 //cout<<fEta[0]<<" < Eta ="<<tEta<<" <"<<fEta[1]<<endl;
297 return false;
298 }
299 if ((tPt<fPt[0])||(tPt>fPt[1]))
300 {
301 fNTracksFailed++;
302 //cout<<"No Go Through the cut"<<endl;
303 //cout<<fPt[0]<<" < Pt ="<<Pt<<" <"<<fPt[1]<<endl;
304 return false;
305 }
4eac0b05 306
307
308
309
87ede832 310 // cout << "Track has pids: "
311 // << track->PidProbElectron() << " "
312 // << track->PidProbMuon() << " "
313 // << track->PidProbPion() << " "
314 // << track->PidProbKaon() << " "
315 // << track->PidProbProton() << " "
76ce4b5b 316 // << track->PidProbElectron()+track->PidProbMuon()+track->PidProbPion()+track->PidProbKaon()+track->PidProbProton() << endl;
317
87ede832 318
76ce4b5b 319 if ((track->PidProbElectron()<fPidProbElectron[0])||(track->PidProbElectron()>fPidProbElectron[1]))
320 {
321 fNTracksFailed++;
322 //cout<<"No Go Through the cut"<<endl;
323 //cout<<fPidProbElectron[0]<<" < e ="<<track->PidProbElectron()<<" <"<<fPidProbElectron[1]<<endl;
324 return false;
325 }
326 if ((track->PidProbPion()<fPidProbPion[0])||(track->PidProbPion()>fPidProbPion[1]))
327 {
328 fNTracksFailed++;
329 //cout<<"No Go Through the cut"<<endl;
330 //cout<<fPidProbPion[0]<<" < pi ="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
331 return false;
332 }
333 if ((track->PidProbKaon()<fPidProbKaon[0])||(track->PidProbKaon()>fPidProbKaon[1]))
334 {
335 fNTracksFailed++;
336 //cout<<"No Go Through the cut"<<endl;
337 //cout<<fPidProbKaon[0]<<" < k ="<<track->PidProbKaon()<<" <"<<fPidProbKaon[1]<<endl;
338 return false;
339 }
340 if ((track->PidProbProton()<fPidProbProton[0])||(track->PidProbProton()>fPidProbProton[1]))
341 {
342 fNTracksFailed++;
343 //cout<<"No Go Through the cut"<<endl;
344 //cout<<fPidProbProton[0]<<" < p ="<<track->PidProbProton()<<" <"<<fPidProbProton[1]<<endl;
345 return false;
346 }
347 if ((track->PidProbMuon()<fPidProbMuon[0])||(track->PidProbMuon()>fPidProbMuon[1]))
348 {
349 fNTracksFailed++;
350 //cout<<"No Go Through the cut"<<endl;
351 //cout<<fPidProbMuon[0]<<" < mi="<<track->PidProbMuon()<<" <"<<fPidProbMuon[1]<<endl;
352 return false;
353 }
354
a8521c0f 355 //****N Sigma Method -- electron rejection****
356 if(fElectronRejection)
357 if(!IsElectron(track->NSigmaTPCE(),track->NSigmaTPCPi(),track->NSigmaTPCK(), track->NSigmaTPCP()))
358 return false;
359
360
76ce4b5b 361 if (fMostProbable) {
87ede832 362
76ce4b5b 363 int imost=0;
364 tMost[0] = track->PidProbElectron()*PidFractionElectron(track->P().Mag());
365 tMost[1] = 0.0;
366 tMost[2] = track->PidProbPion()*PidFractionPion(track->P().Mag());
367 tMost[3] = track->PidProbKaon()*PidFractionKaon(track->P().Mag());
368 tMost[4] = track->PidProbProton()*PidFractionProton(track->P().Mag());
369 float ipidmax = 0.0;
370
76ce4b5b 371 //****N Sigma Method****
372 if(fPIDMethod==0){
373 // Looking for pions
374 if (fMostProbable == 2) {
c9b0c11d 375 if (IsPionNSigma(track->P().Mag(), track->NSigmaTPCPi(), track->NSigmaTOFPi()))
76ce4b5b 376 imost = 2;
377
378 }
87ede832 379 else if (fMostProbable == 3) {
380
c9b0c11d 381
e52a5f82 382 if (IsKaonNSigma(track->P().Mag(), track->NSigmaTPCK(), track->NSigmaTOFK())){
87ede832 383
76ce4b5b 384 imost = 3;
385 }
87ede832 386
76ce4b5b 387 }
e52a5f82 388 else if (fMostProbable == 4) { // proton nsigma-PID required contour adjusting (in LHC10h)
389 if ( IsProtonNSigma(track->P().Mag(), track->NSigmaTPCP(), track->NSigmaTOFP()) // && (TMath::Abs(track->NSigmaTPCP()) < TMath::Abs(track->NSigmaTPCPi())) && (TMath::Abs(track->NSigmaTPCP()) < TMath::Abs(track->NSigmaTPCK())) && (TMath::Abs(track->NSigmaTOFP()) < TMath::Abs(track->NSigmaTOFPi())) && (TMath::Abs(track->NSigmaTOFP()) < TMath::Abs(track->NSigmaTOFK()))
390 // && IsProtonTPCdEdx(track->P().Mag(), track->TPCsignal())
391 )
76ce4b5b 392 imost = 4;
393 }
e52a5f82 394 else if (fMostProbable == 5) { // no-protons
395 if ( !IsProtonNSigma(track->P().Mag(), track->NSigmaTPCP(), track->NSigmaTOFP()) )
af797f5b 396 imost = 5;
397 }
e52a5f82 398 else if (fMostProbable == 6) { //pions OR kaons OR protons
399 if (IsPionNSigma(track->P().Mag(), track->NSigmaTPCPi(), track->NSigmaTOFPi()))
400 imost = 6;
401 else if (IsKaonNSigma(track->P().Mag(), track->NSigmaTPCK(), track->NSigmaTOFK()))
402 imost = 6;
403 else if (IsProtonNSigma(track->P().Mag(), track->NSigmaTPCP(), track->NSigmaTOFP()) )
404 imost = 6;
405 }
406 else if (fMostProbable == 7) { // pions OR kaons OR protons OR electrons
407 if (IsPionNSigma(track->P().Mag(), track->NSigmaTPCPi(), track->NSigmaTOFPi()))
408 imost = 7;
409 else if (IsKaonNSigma(track->P().Mag(), track->NSigmaTPCK(), track->NSigmaTOFK()))
410 imost = 7;
411 else if (IsProtonNSigma(track->P().Mag(), track->NSigmaTPCP(), track->NSigmaTOFP()) )
412 imost = 7;
413 else if (TMath::Abs(track->NSigmaTPCE())<3)
414 imost = 7;
76ce4b5b 415
e52a5f82 416 }
76ce4b5b 417 }
87ede832 418
419
76ce4b5b 420
421 //****Contour Method****
422 if(fPIDMethod==1){
423 for (int ip=0; ip<5; ip++)
424 if (tMost[ip] > ipidmax) { ipidmax = tMost[ip]; imost = ip; };
425
426 // Looking for pions
427 if (fMostProbable == 2) {
428 if (imost == 2) {
429 // Using the TPC to reject non-pions
430 if (!(IsPionTPCdEdx(track->P().Mag(), track->TPCsignal())))
431 imost = 0;
432 if (0) {
433 // Using the TOF to reject non-pions
434 if (track->P().Mag() < 0.6) {
435 if (tTOFPidIn)
436 if (!IsPionTOFTime(track->P().Mag(), track->TOFpionTime()))
437 imost = 0;
438 }
439 else {
440 if (tTOFPidIn) {
441 if (!IsPionTOFTime(track->P().Mag(), track->TOFpionTime()))
442 imost = 0;
443 }
444 else {
445 imost = 0;
446 }
447 }
448 }
449 }
450 }
451
452 // Looking for kaons
453 else if (fMostProbable == 3) {
454 // if (imost == 3) {
455 // Using the TPC to reject non-kaons
456 if (track->P().Mag() < 0.6) {
457 if (!(IsKaonTPCdEdx(track->P().Mag(), track->TPCsignal())))
458 imost = 0;
459 else imost = 3;
460 if (1) {
461 // Using the TOF to reject non-kaons
462 if (tTOFPidIn)
463 if (!IsKaonTOFTime(track->P().Mag(), track->TOFkaonTime()))
464 imost = 0;
465 }
466 }
467 else {
468 if (1) {
469 if (tTOFPidIn) {
470 if (!IsKaonTOFTime(track->P().Mag(), track->TOFkaonTime()))
471 imost = 0;
472 else
473 imost = 3;
474 }
475 else {
476 if (!(IsKaonTPCdEdx(track->P().Mag(), track->TPCsignal())))
477 imost = 0;
87ede832 478 else
76ce4b5b 479 imost = 3;
480 }
481 }
482 }
483 // }
484 }
87ede832 485
76ce4b5b 486 // Looking for protons
487 else if (fMostProbable == 4) {
488 // if (imost == 3) {
489 // Using the TPC to reject non-kaons
490 if (track->P().Mag() < 0.8) {
491 if (!(IsProtonTPCdEdx(track->P().Mag(), track->TPCsignal())))
492 imost = 0;
493 else imost = 4;
494 if (0) {
495 // Using the TOF to reject non-kaons
496 if (tTOFPidIn)
497 if (!IsKaonTOFTime(track->P().Mag(), track->TOFkaonTime()))
498 imost = 0;
499 }
500 }
501 else {
502 if (0) {
503 if (tTOFPidIn) {
504 if (!IsKaonTOFTime(track->P().Mag(), track->TOFkaonTime()))
505 imost = 0;
506 else
507 imost = 3;
508 }
509 else {
510 if (!(IsKaonTPCdEdx(track->P().Mag(), track->TPCsignal())))
511 imost = 0;
87ede832 512 else
76ce4b5b 513 imost = 3;
514 }
515 }
516 }
517 // }
518 }
519 }
520 if (imost != fMostProbable) return false;
521 }
87ede832 522
76ce4b5b 523 //fan
524 //cout<<"****** Go Through the cut ******"<<endl;
525 // cout<<fLabel<<" Label="<<track->Label()<<endl;
526 // cout<<fCharge<<" Charge="<<track->Charge()<<endl;
527 // cout<<fPt[0]<<" < Pt ="<<Pt<<" <"<<fPt[1]<<endl;
528 //cout<<fRapidity[0]<<" < Rapidity ="<<tRapidity<<" <"<<fRapidity[1]<<endl;
529 //cout<<fPidProbElectron[0]<<" < e="<<track->PidProbElectron()<<" <"<<fPidProbElectron[1]<<endl;
530 //cout<<fPidProbPion[0]<<" < pi="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
531 //cout<<fPidProbKaon[0]<<" < k="<<track->PidProbKaon()<<" <"<<fPidProbKaon[1]<<endl;
532 //cout<<fPidProbProton[0]<<" < p="<<track->PidProbProton()<<" <"<<fPidProbProton[1]<<endl;
533 //cout<<fPidProbMuon[0]<<" < mi="<<track->PidProbMuon()<<" <"<<fPidProbMuon[1]<<endl;
534 fNTracksPassed++ ;
535 return true;
87ede832 536
537
76ce4b5b 538}
539//------------------------------
540AliFemtoString AliFemtoESDTrackCut::Report()
541{
542 // Prepare report from the execution
543 string tStemp;
544 char tCtemp[100];
545 snprintf(tCtemp , 100, "Particle mass:\t%E\n",this->Mass());
546 tStemp=tCtemp;
547 snprintf(tCtemp , 100, "Particle charge:\t%d\n",fCharge);
548 tStemp+=tCtemp;
549 snprintf(tCtemp , 100, "Particle pT:\t%E - %E\n",fPt[0],fPt[1]);
550 tStemp+=tCtemp;
551 snprintf(tCtemp , 100, "Particle rapidity:\t%E - %E\n",fRapidity[0],fRapidity[1]);
87ede832 552 tStemp+=tCtemp;
76ce4b5b 553 snprintf(tCtemp , 100, "Particle eta:\t%E - %E\n",fEta[0],fEta[1]);
554 tStemp+=tCtemp;
555 snprintf(tCtemp , 100, "Number of tracks which passed:\t%ld Number which failed:\t%ld\n",fNTracksPassed,fNTracksFailed);
556 tStemp += tCtemp;
557 AliFemtoString returnThis = tStemp;
558 return returnThis;
559}
560TList *AliFemtoESDTrackCut::ListSettings()
561{
562 // return a list of settings in a writable form
563 TList *tListSetttings = new TList();
564 char buf[200];
565 snprintf(buf, 200, "AliFemtoESDTrackCut.mass=%f", this->Mass());
566 tListSetttings->AddLast(new TObjString(buf));
567
568 snprintf(buf, 200, "AliFemtoESDTrackCut.charge=%i", fCharge);
569 tListSetttings->AddLast(new TObjString(buf));
570 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobpion.minimum=%f", fPidProbPion[0]);
571 tListSetttings->AddLast(new TObjString(buf));
572 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobpion.maximum=%f", fPidProbPion[1]);
573 tListSetttings->AddLast(new TObjString(buf));
574 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobkaon.minimum=%f", fPidProbKaon[0]);
575 tListSetttings->AddLast(new TObjString(buf));
576 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobkaon.maximum=%f", fPidProbKaon[1]);
577 tListSetttings->AddLast(new TObjString(buf));
578 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobproton.minimum=%f", fPidProbProton[0]);
579 tListSetttings->AddLast(new TObjString(buf));
580 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobproton.maximum=%f", fPidProbProton[1]);
581 tListSetttings->AddLast(new TObjString(buf));
582 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobelectron.minimum=%f", fPidProbElectron[0]);
583 tListSetttings->AddLast(new TObjString(buf));
584 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobelectron.maximum=%f", fPidProbElectron[1]);
585 tListSetttings->AddLast(new TObjString(buf));
586 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobMuon.minimum=%f", fPidProbMuon[0]);
587 tListSetttings->AddLast(new TObjString(buf));
588 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobMuon.maximum=%f", fPidProbMuon[1]);
589 tListSetttings->AddLast(new TObjString(buf));
590 snprintf(buf, 200, "AliFemtoESDTrackCut.minimumtpcclusters=%i", fminTPCclsF);
591 tListSetttings->AddLast(new TObjString(buf));
592 snprintf(buf, 200, "AliFemtoESDTrackCut.minimumitsclusters=%i", fminTPCclsF);
593 tListSetttings->AddLast(new TObjString(buf));
594 snprintf(buf, 200, "AliFemtoESDTrackCut.pt.minimum=%f", fPt[0]);
595 tListSetttings->AddLast(new TObjString(buf));
596 snprintf(buf, 200, "AliFemtoESDTrackCut.pt.maximum=%f", fPt[1]);
597 tListSetttings->AddLast(new TObjString(buf));
598 snprintf(buf, 200, "AliFemtoESDTrackCut.rapidity.minimum=%f", fRapidity[0]);
599 tListSetttings->AddLast(new TObjString(buf));
600 snprintf(buf, 200, "AliFemtoESDTrackCut.rapidity.maximum=%f", fRapidity[1]);
601 tListSetttings->AddLast(new TObjString(buf));
602 snprintf(buf, 200, "AliFemtoESDTrackCut.removekinks=%i", fRemoveKinks);
603 tListSetttings->AddLast(new TObjString(buf));
604 snprintf(buf, 200, "AliFemtoESDTrackCut.maxitschindof=%f", fMaxITSchiNdof);
605 tListSetttings->AddLast(new TObjString(buf));
606 snprintf(buf, 200, "AliFemtoESDTrackCut.maxtpcchindof=%f", fMaxTPCchiNdof);
607 tListSetttings->AddLast(new TObjString(buf));
608 snprintf(buf, 200, "AliFemtoESDTrackCut.maxsigmatovertex=%f", fMaxSigmaToVertex);
609 tListSetttings->AddLast(new TObjString(buf));
610 snprintf(buf, 200, "AliFemtoESDTrackCut.maximpactxy=%f", fMaxImpactXY);
611 tListSetttings->AddLast(new TObjString(buf));
612 snprintf(buf, 200, "AliFemtoESDTrackCut.maximpactz=%f", fMaxImpactZ);
613 tListSetttings->AddLast(new TObjString(buf));
614 if (fMostProbable) {
615 if (fMostProbable == 2)
616 snprintf(buf, 200, "AliFemtoESDTrackCut.mostprobable=%s", "Pion");
617 if (fMostProbable == 3)
618 snprintf(buf, 200, "AliFemtoESDTrackCut.mostprobable=%s", "Kaon");
619 if (fMostProbable == 4)
620 snprintf(buf, 200, "AliFemtoESDTrackCut.mostprobable=%s", "Proton");
621 tListSetttings->AddLast(new TObjString(buf));
622 }
623 return tListSetttings;
624}
625void AliFemtoESDTrackCut::SetRemoveKinks(const bool& flag)
626{
627 fRemoveKinks = flag;
628}
87ede832 629
76ce4b5b 630void AliFemtoESDTrackCut::SetRemoveITSFake(const bool& flag)
631{
632 fRemoveITSFake = flag;
633}
87ede832 634
76ce4b5b 635// electron
636// 0.13 - 1.8
637// 0 7.594129e-02 8.256141e-03
638// 1 -5.535827e-01 8.170825e-02
639// 2 1.728591e+00 3.104210e-01
640// 3 -2.827893e+00 5.827802e-01
641// 4 2.503553e+00 5.736207e-01
642// 5 -1.125965e+00 2.821170e-01
643// 6 2.009036e-01 5.438876e-02
644float AliFemtoESDTrackCut::PidFractionElectron(float mom) const
645{
646 // Provide a parameterized fraction of electrons dependent on momentum
87ede832 647 if (mom<0.13)
648 return (7.594129e-02
649 -5.535827e-01*0.13
650 +1.728591e+00*0.13*0.13
651 -2.827893e+00*0.13*0.13*0.13
652 +2.503553e+00*0.13*0.13*0.13*0.13
653 -1.125965e+00*0.13*0.13*0.13*0.13*0.13
654 +2.009036e-01*0.13*0.13*0.13*0.13*0.13*0.13);
76ce4b5b 655
656 if (mom>1.8)
87ede832 657 return (7.594129e-02
658 -5.535827e-01*1.8
659 +1.728591e+00*1.8*1.8
660 -2.827893e+00*1.8*1.8*1.8
661 +2.503553e+00*1.8*1.8*1.8*1.8
662 -1.125965e+00*1.8*1.8*1.8*1.8*1.8
663 +2.009036e-01*1.8*1.8*1.8*1.8*1.8*1.8);
664 return (7.594129e-02
665 -5.535827e-01*mom
666 +1.728591e+00*mom*mom
667 -2.827893e+00*mom*mom*mom
668 +2.503553e+00*mom*mom*mom*mom
669 -1.125965e+00*mom*mom*mom*mom*mom
670 +2.009036e-01*mom*mom*mom*mom*mom*mom);
76ce4b5b 671}
672
673// pion
674// 0.13 - 2.0
675// 0 1.063457e+00 8.872043e-03
676// 1 -4.222208e-01 2.534402e-02
677// 2 1.042004e-01 1.503945e-02
678float AliFemtoESDTrackCut::PidFractionPion(float mom) const
679{
680 // Provide a parameterized fraction of pions dependent on momentum
87ede832 681 if (mom<0.13)
76ce4b5b 682 return ( 1.063457e+00
683 -4.222208e-01*0.13
684 +1.042004e-01*0.0169);
87ede832 685 if (mom>2.0)
76ce4b5b 686 return ( 1.063457e+00
687 -4.222208e-01*2.0
688 +1.042004e-01*4.0);
689 return ( 1.063457e+00
690 -4.222208e-01*mom
691 +1.042004e-01*mom*mom);
692}
693
694// kaon
695// 0.18 - 2.0
696// 0 -7.289406e-02 1.686074e-03
697// 1 4.415666e-01 1.143939e-02
698// 2 -2.996790e-01 1.840964e-02
699// 3 6.704652e-02 7.783990e-03
700float AliFemtoESDTrackCut::PidFractionKaon(float mom) const
701{
702 // Provide a parameterized fraction of kaons dependent on momentum
87ede832 703 if (mom<0.18)
76ce4b5b 704 return (-7.289406e-02
87ede832 705 +4.415666e-01*0.18
706 -2.996790e-01*0.18*0.18
76ce4b5b 707 +6.704652e-02*0.18*0.18*0.18);
87ede832 708 if (mom>2.0)
76ce4b5b 709 return (-7.289406e-02
87ede832 710 +4.415666e-01*2.0
711 -2.996790e-01*2.0*2.0
76ce4b5b 712 +6.704652e-02*2.0*2.0*2.0);
713 return (-7.289406e-02
87ede832 714 +4.415666e-01*mom
715 -2.996790e-01*mom*mom
76ce4b5b 716 +6.704652e-02*mom*mom*mom);
717}
718
719// proton
720// 0.26 - 2.0
721// 0 -3.730200e-02 2.347311e-03
722// 1 1.163684e-01 1.319316e-02
723// 2 8.354116e-02 1.997948e-02
724// 3 -4.608098e-02 8.336400e-03
725float AliFemtoESDTrackCut::PidFractionProton(float mom) const
726{
727 // Provide a parameterized fraction of protons dependent on momentum
728 if (mom<0.26) return 0.0;
87ede832 729 if (mom>2.0)
730 return (-3.730200e-02
731 +1.163684e-01*2.0
732 +8.354116e-02*2.0*2.0
76ce4b5b 733 -4.608098e-02*2.0*2.0*2.0);
87ede832 734 return (-3.730200e-02
735 +1.163684e-01*mom
736 +8.354116e-02*mom*mom
737 -4.608098e-02*mom*mom*mom);
76ce4b5b 738}
739
740void AliFemtoESDTrackCut::SetMomRangeTOFpidIs(const float& minp, const float& maxp)
741{
742 fMinPforTOFpid = minp;
743 fMaxPforTOFpid = maxp;
744}
745
746void AliFemtoESDTrackCut::SetMomRangeTPCpidIs(const float& minp, const float& maxp)
747{
748 fMinPforTPCpid = minp;
749 fMaxPforTPCpid = maxp;
750}
751
752void AliFemtoESDTrackCut::SetMomRangeITSpidIs(const float& minp, const float& maxp)
753{
754 fMinPforITSpid = minp;
755 fMaxPforITSpid = maxp;
756}
757
758bool AliFemtoESDTrackCut::IsPionTPCdEdx(float mom, float dEdx)
759{
760 // double a1 = -95.4545, b1 = 86.5455;
761 // double a2 = 0.0, b2 = 56.0;
762 double a1 = -343.75, b1 = 168.125;
763 double a2 = 0.0, b2 = 65.0;
764
765 if (mom < 0.32) {
766 if (dEdx < a1*mom+b1) return true;
767 }
768 if (dEdx < a2*mom+b2) return true;
769
770 return false;
771}
772
773bool AliFemtoESDTrackCut::IsKaonTPCdEdx(float mom, float dEdx)
774{
775
776// double a1 = -547.0; double b1 = 297.0;
777// double a2 = -125.0; double b2 = 145.0;
778// double a3 = -420.0; double b3 = 357.0;
779// double a4 = -110.0; double b4 = 171.0;
780// double b5 = 72.0;
781
782// if (mom<0.2) return false;
783
784// if (mom<0.36) {
785// if (dEdx < a1*mom+b1) return false;
786// if (dEdx > a3*mom+b3) return false;
787// }
788// else if (mom<0.6) {
789// if (dEdx < a2*mom+b2) return false;
790// if (dEdx > a3*mom+b3) return false;
791// }
792// else if (mom<0.9) {
793// if (dEdx > a4*mom+b4) return false;
794// if (dEdx < b5) return false;
795// }
87ede832 796// else
76ce4b5b 797// return false;
798// // else {
799// // if (dEdx > b5) return false;
800// // }
87ede832 801
76ce4b5b 802// return true;
803
804 double a1 = -268.896; double b1 = 198.669;
805 double a2 = -49.0012; double b2 = 88.7214;
806
807 if (mom<0.2) return false;
808
809 if (mom>0.3 && mom<0.5) {
810 if (dEdx < a1*mom+b1) return false;
811 }
812 else if (mom<1.2) {
813 if (dEdx < a2*mom+b2) return false;
814 }
815
816 return true;
817
818}
819
820bool AliFemtoESDTrackCut::IsProtonTPCdEdx(float mom, float dEdx)
821{
822 double a1 = -1800.0; double b1 = 940.0;
823 double a2 = -500.0; double b2 = 420.0;
824 double a3 = -216.7; double b3 = 250.0;
825
826 if (mom<0.2) return false;
827
828 if (mom>0.3 && mom<0.4) {
829 if (dEdx < a1*mom+b1) return false;
830 }
831 else if (mom<0.6) {
832 if (dEdx < a2*mom+b2) return false;
833 }
834 else if (mom<0.9) {
835 if (dEdx < a3*mom+b3) return false;
836 }
837
838 return true;
87ede832 839
76ce4b5b 840}
841
842bool AliFemtoESDTrackCut::IsPionTOFTime(float mom, float ttof)
843{
844 double a1 = -427.0; double b1 = 916.0;
845 double a2 = 327.0; double b2 = -888.0;
846 if (mom<0.3) return kFALSE;
847 if (mom>2.0) return kFALSE;
848 if (ttof > a1*mom+b1) return kFALSE;
849 if (ttof < a2*mom+b2) return kFALSE;
850
851 return kTRUE;
852}
853
854bool AliFemtoESDTrackCut::IsKaonTOFTime(float mom, float ttof)
855{
856 double a1 = 000.0; double b1 = -500.0;
857 double a2 = 000.0; double b2 = 500.0;
858 double a3 = 850.0; double b3 = -1503.0;
859 double a4 = -1637.0; double b4 = 3621.0;
860
861 if (mom<0.3) return kFALSE;
862 if (mom>2.06) return kFALSE;
863 if (mom<1.2) {
864 if (ttof > a2*mom+b2) return kFALSE;
865 if (ttof < a1*mom+b1) return kFALSE;
866 }
867 if (mom<1.9) {
868 if (ttof > a2*mom+b2) return kFALSE;
869 if (ttof < a3*mom+b3) return kFALSE;
870 }
871 if (mom<2.06) {
872 if (ttof > a4*mom+b4) return kFALSE;
873 if (ttof < a3*mom+b3) return kFALSE;
874 }
875 return kTRUE;
876}
877
878bool AliFemtoESDTrackCut::IsProtonTOFTime(float mom, float ttof)
879{
880 double a1 = 000.0; double b1 = -915.0;
881 double a2 = 000.0; double b2 = 600.0;
882 double a3 = 572.0; double b3 = -1715.0;
883
884 if (mom<0.3) return kFALSE;
885 if (mom>3.0) return kFALSE;
886 if (mom<1.4) {
887 if (ttof > a2*mom+b2) return kFALSE;
888 if (ttof < a1*mom+b1) return kFALSE;
889 }
890 if (mom<3.0) {
891 if (ttof > a2*mom+b2) return kFALSE;
892 if (ttof < a3*mom+b3) return kFALSE;
893 }
894 return kTRUE;
895}
896
897
898
899
900bool AliFemtoESDTrackCut::IsKaonTPCdEdxNSigma(float mom, float nsigmaK)
901{
c9b0c11d 902// cout<<" AliFemtoESDTrackCut::IsKaonTPCdEdxNSigma "<<mom<<" "<<nsigmaK<<endl;
76ce4b5b 903
904
905 if(mom<0.35 && TMath::Abs(nsigmaK)<5.0)return true;
87ede832 906 if(mom>=0.35 && mom<0.5 && TMath::Abs(nsigmaK)<3.0)return true;
76ce4b5b 907 if(mom>=0.5 && mom<0.7 && TMath::Abs(nsigmaK)<2.0)return true;
908
909 return false;
910}
911
76ce4b5b 912bool AliFemtoESDTrackCut::IsKaonTOFNSigma(float mom, float nsigmaK)
913{
c9b0c11d 914// cout<<" AliFemtoESDTrackCut::IsKaonTPCdEdxNSigma "<<mom<<" "<<nsigmaK<<endl;
76ce4b5b 915 //fan
916 // if(mom<1.5 && TMath::Abs(nsigmaK)<3.0)return true;
87ede832 917 if(mom>=1.5 && TMath::Abs(nsigmaK)<2.0)return true;
76ce4b5b 918 return false;
919}
920
c9b0c11d 921/*
cbc2bfd8 922bool AliFemtoESDTrackCut::IsKaonNSigma(float mom, float nsigmaTPCK, float nsigmaTOFK)
923{
924
925
926 if(mom<0.5)
927 {
928 if(TMath::Abs(nsigmaTPCK)<2.0)
87ede832 929 {
cbc2bfd8 930 return true;
87ede832 931 }
932 else
cbc2bfd8 933 {
934 return false;
935 }
936 }
87ede832 937
938
cbc2bfd8 939 if(mom>=0.5)
940 {
87ede832 941 if(TMath::Abs(nsigmaTOFK)<3.0 && TMath::Abs(nsigmaTPCK)<3.0)
cbc2bfd8 942 {
943 return true;
944 }
945 else
946 {
947 return false;
948 }
949 }
87ede832 950
cbc2bfd8 951// if(mom>1.5 || mom<0.15)return false;
87ede832 952
c9b0c11d 953
cbc2bfd8 954}
955
c9b0c11d 956*/
957
958//old
76ce4b5b 959bool AliFemtoESDTrackCut::IsKaonNSigma(float mom, float nsigmaTPCK, float nsigmaTOFK)
960{
5b39ee58 961 if (fNsigmaTPCTOF) {
962 if (mom > 0.5) {
963 // if (TMath::Hypot( nsigmaTOFP, nsigmaTPCP )/TMath::Sqrt(2) < 3.0)
964 if (TMath::Hypot( nsigmaTOFK, nsigmaTPCK ) < fNsigma)
965 return true;
ce7b3d98 966 }
5b39ee58 967 else {
968 if (TMath::Abs(nsigmaTPCK) < fNsigma)
969 return true;
ce7b3d98 970 }
5b39ee58 971 }
972 else {
76ce4b5b 973
5b39ee58 974 if(mom<0.4)
975 {
976 if(nsigmaTOFK<-999.)
977 {
978 if(TMath::Abs(nsigmaTPCK)<2.0) return true;
979 }
980 else if(TMath::Abs(nsigmaTOFK)<3.0 && TMath::Abs(nsigmaTPCK)<3.0) return true;
981 }
982 else if(mom>=0.4 && mom<=0.6)
983 {
984 if(nsigmaTOFK<-999.)
985 {
986 if(TMath::Abs(nsigmaTPCK)<2.0) return true;
987 }
988 else if(TMath::Abs(nsigmaTOFK)<3.0 && TMath::Abs(nsigmaTPCK)<3.0) return true;
989 }
990 else if(nsigmaTOFK<-999.)
991 {
992 return false;
993 }
994 else if(TMath::Abs(nsigmaTOFK)<3.0 && TMath::Abs(nsigmaTPCK)<3.0) return true;
995 }
76ce4b5b 996 return false;
997}
c9b0c11d 998
76ce4b5b 999
1000
76ce4b5b 1001bool AliFemtoESDTrackCut::IsPionNSigma(float mom, float nsigmaTPCPi, float nsigmaTOFPi)
1002{
5b39ee58 1003 if (fNsigmaTPCTOF) {
1004 if (mom > 0.5) {
1005 // if (TMath::Hypot( nsigmaTOFP, nsigmaTPCP )/TMath::Sqrt(2) < 3.0)
1006 if (TMath::Hypot( nsigmaTOFPi, nsigmaTPCPi ) < fNsigma)
1007 return true;
ce7b3d98 1008 }
5b39ee58 1009 else {
1010 if (TMath::Abs(nsigmaTPCPi) < fNsigma)
1011 return true;
ce7b3d98 1012 }
5b39ee58 1013 }
1014 else {
1015 if(mom<0.65)
1016 {
1017 if(nsigmaTOFPi<-999.)
1018 {
1019 if(mom<0.35 && TMath::Abs(nsigmaTPCPi)<3.0) return true;
1020 else if(mom<0.5 && mom>=0.35 && TMath::Abs(nsigmaTPCPi)<3.0) return true;
1021 else if(mom>=0.5 && TMath::Abs(nsigmaTPCPi)<2.0) return true;
1022 else return false;
1023 }
1024 else if(TMath::Abs(nsigmaTOFPi)<3.0 && TMath::Abs(nsigmaTPCPi)<3.0) return true;
1025 }
1026 else if(nsigmaTOFPi<-999.)
1027 {
1028 return false;
1029 }
1030 else if(mom<1.5 && TMath::Abs(nsigmaTOFPi)<3.0 && TMath::Abs(nsigmaTPCPi)<5.0) return true;
1031 else if(mom>=1.5 && TMath::Abs(nsigmaTOFPi)<2.0 && TMath::Abs(nsigmaTPCPi)<5.0) return true;
1032 }
76ce4b5b 1033 return false;
1034}
1035
1036
1037bool AliFemtoESDTrackCut::IsProtonNSigma(float mom, float nsigmaTPCP, float nsigmaTOFP)
1038{
12a3e650 1039
1040 if (fNsigmaTPCTOF) {
5b39ee58 1041 if (mom > 0.5) {
87ede832 1042// if (TMath::Hypot( nsigmaTOFP, nsigmaTPCP )/TMath::Sqrt(2) < 3.0)
1043 if (TMath::Hypot( nsigmaTOFP, nsigmaTPCP ) < fNsigma)
ceeb8ab7 1044 return true;
ce7b3d98 1045 }
ceeb8ab7 1046 else {
87ede832 1047 if (TMath::Abs(nsigmaTPCP) < fNsigma)
ceeb8ab7 1048 return true;
ce7b3d98 1049 }
12a3e650 1050 }
87ede832 1051 else if (fNsigmaTPConly) {
1052 if (TMath::Abs(nsigmaTPCP) < fNsigma)
1053 return true;
1054 }
12a3e650 1055 else {
1056 if (mom > 0.8 && mom < 2.5) {
1057 if ( TMath::Abs(nsigmaTPCP) < 3.0 && TMath::Abs(nsigmaTOFP) < 3.0)
1058 return true;
1059 }
1060 else if (mom > 2.5) {
1061 if ( TMath::Abs(nsigmaTPCP) < 3.0 && TMath::Abs(nsigmaTOFP) < 2.0)
1062 return true;
1063 }
1064 else {
1065 if (TMath::Abs(nsigmaTPCP) < 3.0)
1066 return true;
1067 }
1068 }
76ce4b5b 1069
1070 return false;
1071}
1072
1073
1074void AliFemtoESDTrackCut::SetPIDMethod(ReadPIDMethodType newMethod)
1075{
1076 fPIDMethod = newMethod;
1077}
4eac0b05 1078
1079
12a3e650 1080void AliFemtoESDTrackCut::SetNsigmaTPCTOF(Bool_t nsigma)
1081{
1082 fNsigmaTPCTOF = nsigma;
1083}
87ede832 1084
1085void AliFemtoESDTrackCut::SetNsigmaTPConly(Bool_t nsigma)
1086{
1087 fNsigmaTPConly = nsigma;
1088}
1089
1090void AliFemtoESDTrackCut::SetNsigma(Double_t nsigma)
1091{
1092 fNsigma = nsigma;
1093}
1094
2e04885f 1095
87ede832 1096void AliFemtoESDTrackCut::SetClusterRequirementITS(AliESDtrackCuts::Detector det, AliESDtrackCuts::ITSClusterRequirement req)
1097{
1098 fCutClusterRequirementITS[det] = req;
4eac0b05 1099}
1100
1101Bool_t AliFemtoESDTrackCut::CheckITSClusterRequirement(AliESDtrackCuts::ITSClusterRequirement req, Bool_t clusterL1, Bool_t clusterL2)
1102{
1103 // checks if the cluster requirement is fullfilled (in this case: return kTRUE)
87ede832 1104
4eac0b05 1105 switch (req)
1106 {
1107 case AliESDtrackCuts::kOff: return kTRUE;
1108 case AliESDtrackCuts::kNone: return !clusterL1 && !clusterL2;
1109 case AliESDtrackCuts::kAny: return clusterL1 || clusterL2;
1110 case AliESDtrackCuts::kFirst: return clusterL1;
1111 case AliESDtrackCuts::kOnlyFirst: return clusterL1 && !clusterL2;
1112 case AliESDtrackCuts::kSecond: return clusterL2;
1113 case AliESDtrackCuts::kOnlySecond: return clusterL2 && !clusterL1;
1114 case AliESDtrackCuts::kBoth: return clusterL1 && clusterL2;
1115 }
87ede832 1116
4eac0b05 1117 return kFALSE;
1118}
2e04885f 1119
1120bool AliFemtoESDTrackCut::IsElectron(float nsigmaTPCE, float nsigmaTPCPi,float nsigmaTPCK, float nsigmaTPCP)
1121{
5ee52df3 1122 if(TMath::Abs(nsigmaTPCE)<3 && TMath::Abs(nsigmaTPCPi)>3 && TMath::Abs(nsigmaTPCK)>3 && TMath::Abs(nsigmaTPCP)>3)
2e04885f 1123 return false;
1124 else
1125 return true;
1126}