2 ***************************************************************************
7 ***************************************************************************
12 ***************************************************************************
15 * Revision 1.3 2007/05/22 09:01:42 akisiel
16 * Add the possibiloity to save cut settings in the ROOT file
18 * Revision 1.2 2007/05/21 10:38:25 akisiel
19 * More coding rule conformance
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
24 * Revision 1.4 2007/05/03 09:46:10 akisiel
25 * Fixing Effective C++ warnings
27 * Revision 1.3 2007/04/27 07:25:59 akisiel
28 * Make revisions needed for compilation from the main AliRoot tree
30 * Revision 1.1.1.1 2007/04/25 15:38:41 panos
31 * Importing the HBT code dir
33 * Revision 1.4 2007-04-03 16:00:08 mchojnacki
34 * Changes to iprove memory managing
36 * Revision 1.3 2007/03/13 15:30:03 mchojnacki
37 * adding reader for simulated data
39 * Revision 1.2 2007/03/08 14:58:03 mchojnacki
40 * adding some alice stuff
42 * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki
43 * First version on CVS
45 **************************************************************************/
47 #include "AliFemtoESDTrackCut.h"
51 ClassImp(AliFemtoESDTrackCut)
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
67 // 0 1.063457e+00 8.872043e-03
68 // 1 -4.222208e-01 2.534402e-02
69 // 2 1.042004e-01 1.503945e-02
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
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
86 AliFemtoESDTrackCut::AliFemtoESDTrackCut() :
94 fMaxITSchiNdof(1000.0),
95 fMaxTPCchiNdof(1000.0),
96 fMaxSigmaToVertex(1000.0),
100 fRemoveITSFake(kFALSE),
102 fMaxImpactXY(1000.0),
104 fMaxImpactXYPtOff(1000.0),
105 fMaxImpactXYPtNrm(1000.0),
106 fMaxImpactXYPtPow(1000.0),
108 fMaxPforTOFpid(10000.0),
110 fMaxPforTPCpid(10000.0),
112 fMaxPforITSpid(10000.0)
114 // Default constructor
115 fNTracksPassed = fNTracksFailed = 0;
116 fCharge = 0; // takes both charges 0
117 fPt[0]=0.0; fPt[1] = 100.0;//100
118 fRapidity[0]=-2; fRapidity[1]=2;//-2 2
119 fEta[0]=-2; fEta[1]=2;//-2 2
120 fPidProbElectron[0]=-1;fPidProbElectron[1]=2;
121 fPidProbPion[0]=-1; fPidProbPion[1]=2;
122 fPidProbKaon[0]=-1;fPidProbKaon[1]=2;
123 fPidProbProton[0]=-1;fPidProbProton[1]=2;
124 fPidProbMuon[0]=-1;fPidProbMuon[1]=2;
131 //------------------------------
132 AliFemtoESDTrackCut::~AliFemtoESDTrackCut(){
135 //------------------------------
136 bool AliFemtoESDTrackCut::Pass(const AliFemtoTrack* track)
138 // test the particle and return
139 // true if it meets all the criteria
140 // false if it doesn't meet at least one of the criteria
143 //cout<<"AliFemtoESD cut"<<endl;
144 //cout<<fPidProbPion[0]<<" < pi ="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
147 //cout<<" status "<<track->Label()<<" "<<track->Flags()<<" "<<track->TPCnclsF()<<" "<<track->ITSncls()<<endl;
148 if ((track->Flags()&fStatus)!=fStatus)
150 // cout<<track->Flags()<<" "<<fStatus<<" no go through status"<<endl;
156 if ((track->KinkIndex(0)) || (track->KinkIndex(1)) || (track->KinkIndex(2)))
159 if (fRemoveITSFake) {
160 if (track->ITSncls() < 0)
163 if (fminTPCclsF>track->TPCnclsF())
165 //cout<<" No go because TPC Number of ClsF"<<fminTPCclsF<< " "<<track->TPCnclsF()<<endl;
168 if (fminTPCncls>track->TPCncls())
170 //cout<<" No go because TPC Number of ClsF"<<fminTPCclsF<< " "<<track->TPCnclsF()<<endl;
173 if (fminITScls>track->ITSncls())
175 //cout<<" No go because ITS Number of Cls"<<fminITScls<< " "<<track->ITSncls()<<endl;
179 if (fMaxImpactXY < TMath::Abs(track->ImpactD()))
182 if (fMaxImpactZ < TMath::Abs(track->ImpactZ()))
185 if (fMaxSigmaToVertex < track->SigmaToVertex()) {
189 if (track->ITSncls() > 0)
190 if ((track->ITSchi2()/track->ITSncls()) > fMaxITSchiNdof) {
194 if (track->TPCncls() > 0)
195 if ((track->TPCchi2()/track->TPCncls()) > fMaxTPCchiNdof) {
201 //cout<<"labels"<<endl;
205 // cout<<"No Go Through the cut"<<endl;
206 // cout<<fLabel<<" Label="<<track->Label()<<endl;
212 //cout<<"AliFemtoESD cut ch "<<endl;
213 //cout<<fCharge<<" Charge="<<track->Charge()<<endl;
214 if (track->Charge()!= fCharge)
217 // cout<<"No Go Through the cut"<<endl;
218 // cout<<fCharge<<" Charge="<<track->Charge()<<endl;
222 Bool_t tTPCPidIn = (track->Flags()&AliFemtoTrack::kTPCpid)>0;
223 Bool_t tITSPidIn = (track->Flags()&AliFemtoTrack::kITSpid)>0;
224 Bool_t tTOFPidIn = (track->Flags()&AliFemtoTrack::kTOFpid)>0;
226 if(fMinPforTOFpid > 0 && track->P().Mag() > fMinPforTOFpid &&
227 track->P().Mag() < fMaxPforTOFpid && !tTOFPidIn)
233 if(fMinPforTPCpid > 0 && track->P().Mag() > fMinPforTPCpid &&
234 track->P().Mag() < fMaxPforTPCpid && !tTPCPidIn)
240 if(fMinPforITSpid > 0 && track->P().Mag() > fMinPforITSpid &&
241 track->P().Mag() < fMaxPforITSpid && !tITSPidIn)
248 float tEnergy = ::sqrt(track->P().Mag2()+fMass*fMass);
249 float tRapidity = 0.5*::log((tEnergy+track->P().z())/(tEnergy-track->P().z()));
250 float tPt = ::sqrt((track->P().x())*(track->P().x())+(track->P().y())*(track->P().y()));
251 float tEta = track->P().PseudoRapidity();
253 if (fMaxImpactXYPtOff < 999.0) {
254 if ((fMaxImpactXYPtOff + fMaxImpactXYPtNrm*TMath::Power(tPt, fMaxImpactXYPtPow)) < TMath::Abs(track->ImpactD())) {
260 if ((tRapidity<fRapidity[0])||(tRapidity>fRapidity[1]))
263 //cout<<"No Go Through the cut"<<endl;
264 //cout<<fRapidity[0]<<" < Rapidity ="<<tRapidity<<" <"<<fRapidity[1]<<endl;
267 if ((tEta<fEta[0])||(tEta>fEta[1]))
270 //cout<<"No Go Through the cut"<<endl;
271 //cout<<fEta[0]<<" < Eta ="<<tEta<<" <"<<fEta[1]<<endl;
274 if ((tPt<fPt[0])||(tPt>fPt[1]))
277 //cout<<"No Go Through the cut"<<endl;
278 //cout<<fPt[0]<<" < Pt ="<<Pt<<" <"<<fPt[1]<<endl;
281 // cout << "Track has pids: "
282 // << track->PidProbElectron() << " "
283 // << track->PidProbMuon() << " "
284 // << track->PidProbPion() << " "
285 // << track->PidProbKaon() << " "
286 // << track->PidProbProton() << " "
287 // << track->PidProbElectron()+track->PidProbMuon()+track->PidProbPion()+track->PidProbKaon()+track->PidProbProton() << endl;
290 if ((track->PidProbElectron()<fPidProbElectron[0])||(track->PidProbElectron()>fPidProbElectron[1]))
293 //cout<<"No Go Through the cut"<<endl;
294 //cout<<fPidProbElectron[0]<<" < e ="<<track->PidProbElectron()<<" <"<<fPidProbElectron[1]<<endl;
297 if ((track->PidProbPion()<fPidProbPion[0])||(track->PidProbPion()>fPidProbPion[1]))
300 //cout<<"No Go Through the cut"<<endl;
301 //cout<<fPidProbPion[0]<<" < pi ="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
304 if ((track->PidProbKaon()<fPidProbKaon[0])||(track->PidProbKaon()>fPidProbKaon[1]))
307 //cout<<"No Go Through the cut"<<endl;
308 //cout<<fPidProbKaon[0]<<" < k ="<<track->PidProbKaon()<<" <"<<fPidProbKaon[1]<<endl;
311 if ((track->PidProbProton()<fPidProbProton[0])||(track->PidProbProton()>fPidProbProton[1]))
314 //cout<<"No Go Through the cut"<<endl;
315 //cout<<fPidProbProton[0]<<" < p ="<<track->PidProbProton()<<" <"<<fPidProbProton[1]<<endl;
318 if ((track->PidProbMuon()<fPidProbMuon[0])||(track->PidProbMuon()>fPidProbMuon[1]))
321 //cout<<"No Go Through the cut"<<endl;
322 //cout<<fPidProbMuon[0]<<" < mi="<<track->PidProbMuon()<<" <"<<fPidProbMuon[1]<<endl;
328 tMost[0] = track->PidProbElectron()*PidFractionElectron(track->P().Mag());
330 tMost[2] = track->PidProbPion()*PidFractionPion(track->P().Mag());
331 tMost[3] = track->PidProbKaon()*PidFractionKaon(track->P().Mag());
332 tMost[4] = track->PidProbProton()*PidFractionProton(track->P().Mag());
338 //****N Sigma Method****
341 if (fMostProbable == 2) {
342 if (IsPionNSigma(track->P().Mag(), track->NSigmaTPCPi(), track->NSigmaTOFPi()))
346 else if (fMostProbable == 3) {
347 if (IsKaonNSigma(track->P().Mag(), track->NSigmaTPCK(), track->NSigmaTOFK())){
352 else if (fMostProbable == 4) {
353 if (IsProtonNSigma(track->P().Mag(), track->NSigmaTPCP(), track->NSigmaTOFP()))
359 //****Contour Method****
361 for (int ip=0; ip<5; ip++)
362 if (tMost[ip] > ipidmax) { ipidmax = tMost[ip]; imost = ip; };
365 if (fMostProbable == 2) {
367 // Using the TPC to reject non-pions
368 if (!(IsPionTPCdEdx(track->P().Mag(), track->TPCsignal())))
371 // Using the TOF to reject non-pions
372 if (track->P().Mag() < 0.6) {
374 if (!IsPionTOFTime(track->P().Mag(), track->TOFpionTime()))
379 if (!IsPionTOFTime(track->P().Mag(), track->TOFpionTime()))
391 else if (fMostProbable == 3) {
393 // Using the TPC to reject non-kaons
394 if (track->P().Mag() < 0.6) {
395 if (!(IsKaonTPCdEdx(track->P().Mag(), track->TPCsignal())))
399 // Using the TOF to reject non-kaons
401 if (!IsKaonTOFTime(track->P().Mag(), track->TOFkaonTime()))
408 if (!IsKaonTOFTime(track->P().Mag(), track->TOFkaonTime()))
414 if (!(IsKaonTPCdEdx(track->P().Mag(), track->TPCsignal())))
424 // Looking for protons
425 else if (fMostProbable == 4) {
427 // Using the TPC to reject non-kaons
428 if (track->P().Mag() < 0.8) {
429 if (!(IsProtonTPCdEdx(track->P().Mag(), track->TPCsignal())))
433 // Using the TOF to reject non-kaons
435 if (!IsKaonTOFTime(track->P().Mag(), track->TOFkaonTime()))
442 if (!IsKaonTOFTime(track->P().Mag(), track->TOFkaonTime()))
448 if (!(IsKaonTPCdEdx(track->P().Mag(), track->TPCsignal())))
458 if (imost != fMostProbable) return false;
462 //cout<<"****** Go Through the cut ******"<<endl;
463 // cout<<fLabel<<" Label="<<track->Label()<<endl;
464 // cout<<fCharge<<" Charge="<<track->Charge()<<endl;
465 // cout<<fPt[0]<<" < Pt ="<<Pt<<" <"<<fPt[1]<<endl;
466 //cout<<fRapidity[0]<<" < Rapidity ="<<tRapidity<<" <"<<fRapidity[1]<<endl;
467 //cout<<fPidProbElectron[0]<<" < e="<<track->PidProbElectron()<<" <"<<fPidProbElectron[1]<<endl;
468 //cout<<fPidProbPion[0]<<" < pi="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
469 //cout<<fPidProbKaon[0]<<" < k="<<track->PidProbKaon()<<" <"<<fPidProbKaon[1]<<endl;
470 //cout<<fPidProbProton[0]<<" < p="<<track->PidProbProton()<<" <"<<fPidProbProton[1]<<endl;
471 //cout<<fPidProbMuon[0]<<" < mi="<<track->PidProbMuon()<<" <"<<fPidProbMuon[1]<<endl;
477 //------------------------------
478 AliFemtoString AliFemtoESDTrackCut::Report()
480 // Prepare report from the execution
483 snprintf(tCtemp , 100, "Particle mass:\t%E\n",this->Mass());
485 snprintf(tCtemp , 100, "Particle charge:\t%d\n",fCharge);
487 snprintf(tCtemp , 100, "Particle pT:\t%E - %E\n",fPt[0],fPt[1]);
489 snprintf(tCtemp , 100, "Particle rapidity:\t%E - %E\n",fRapidity[0],fRapidity[1]);
491 snprintf(tCtemp , 100, "Particle eta:\t%E - %E\n",fEta[0],fEta[1]);
493 snprintf(tCtemp , 100, "Number of tracks which passed:\t%ld Number which failed:\t%ld\n",fNTracksPassed,fNTracksFailed);
495 AliFemtoString returnThis = tStemp;
498 TList *AliFemtoESDTrackCut::ListSettings()
500 // return a list of settings in a writable form
501 TList *tListSetttings = new TList();
503 snprintf(buf, 200, "AliFemtoESDTrackCut.mass=%f", this->Mass());
504 tListSetttings->AddLast(new TObjString(buf));
506 snprintf(buf, 200, "AliFemtoESDTrackCut.charge=%i", fCharge);
507 tListSetttings->AddLast(new TObjString(buf));
508 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobpion.minimum=%f", fPidProbPion[0]);
509 tListSetttings->AddLast(new TObjString(buf));
510 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobpion.maximum=%f", fPidProbPion[1]);
511 tListSetttings->AddLast(new TObjString(buf));
512 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobkaon.minimum=%f", fPidProbKaon[0]);
513 tListSetttings->AddLast(new TObjString(buf));
514 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobkaon.maximum=%f", fPidProbKaon[1]);
515 tListSetttings->AddLast(new TObjString(buf));
516 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobproton.minimum=%f", fPidProbProton[0]);
517 tListSetttings->AddLast(new TObjString(buf));
518 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobproton.maximum=%f", fPidProbProton[1]);
519 tListSetttings->AddLast(new TObjString(buf));
520 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobelectron.minimum=%f", fPidProbElectron[0]);
521 tListSetttings->AddLast(new TObjString(buf));
522 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobelectron.maximum=%f", fPidProbElectron[1]);
523 tListSetttings->AddLast(new TObjString(buf));
524 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobMuon.minimum=%f", fPidProbMuon[0]);
525 tListSetttings->AddLast(new TObjString(buf));
526 snprintf(buf, 200, "AliFemtoESDTrackCut.pidprobMuon.maximum=%f", fPidProbMuon[1]);
527 tListSetttings->AddLast(new TObjString(buf));
528 snprintf(buf, 200, "AliFemtoESDTrackCut.minimumtpcclusters=%i", fminTPCclsF);
529 tListSetttings->AddLast(new TObjString(buf));
530 snprintf(buf, 200, "AliFemtoESDTrackCut.minimumitsclusters=%i", fminTPCclsF);
531 tListSetttings->AddLast(new TObjString(buf));
532 snprintf(buf, 200, "AliFemtoESDTrackCut.pt.minimum=%f", fPt[0]);
533 tListSetttings->AddLast(new TObjString(buf));
534 snprintf(buf, 200, "AliFemtoESDTrackCut.pt.maximum=%f", fPt[1]);
535 tListSetttings->AddLast(new TObjString(buf));
536 snprintf(buf, 200, "AliFemtoESDTrackCut.rapidity.minimum=%f", fRapidity[0]);
537 tListSetttings->AddLast(new TObjString(buf));
538 snprintf(buf, 200, "AliFemtoESDTrackCut.rapidity.maximum=%f", fRapidity[1]);
539 tListSetttings->AddLast(new TObjString(buf));
540 snprintf(buf, 200, "AliFemtoESDTrackCut.removekinks=%i", fRemoveKinks);
541 tListSetttings->AddLast(new TObjString(buf));
542 snprintf(buf, 200, "AliFemtoESDTrackCut.maxitschindof=%f", fMaxITSchiNdof);
543 tListSetttings->AddLast(new TObjString(buf));
544 snprintf(buf, 200, "AliFemtoESDTrackCut.maxtpcchindof=%f", fMaxTPCchiNdof);
545 tListSetttings->AddLast(new TObjString(buf));
546 snprintf(buf, 200, "AliFemtoESDTrackCut.maxsigmatovertex=%f", fMaxSigmaToVertex);
547 tListSetttings->AddLast(new TObjString(buf));
548 snprintf(buf, 200, "AliFemtoESDTrackCut.maximpactxy=%f", fMaxImpactXY);
549 tListSetttings->AddLast(new TObjString(buf));
550 snprintf(buf, 200, "AliFemtoESDTrackCut.maximpactz=%f", fMaxImpactZ);
551 tListSetttings->AddLast(new TObjString(buf));
553 if (fMostProbable == 2)
554 snprintf(buf, 200, "AliFemtoESDTrackCut.mostprobable=%s", "Pion");
555 if (fMostProbable == 3)
556 snprintf(buf, 200, "AliFemtoESDTrackCut.mostprobable=%s", "Kaon");
557 if (fMostProbable == 4)
558 snprintf(buf, 200, "AliFemtoESDTrackCut.mostprobable=%s", "Proton");
559 tListSetttings->AddLast(new TObjString(buf));
561 return tListSetttings;
563 void AliFemtoESDTrackCut::SetRemoveKinks(const bool& flag)
568 void AliFemtoESDTrackCut::SetRemoveITSFake(const bool& flag)
570 fRemoveITSFake = flag;
575 // 0 7.594129e-02 8.256141e-03
576 // 1 -5.535827e-01 8.170825e-02
577 // 2 1.728591e+00 3.104210e-01
578 // 3 -2.827893e+00 5.827802e-01
579 // 4 2.503553e+00 5.736207e-01
580 // 5 -1.125965e+00 2.821170e-01
581 // 6 2.009036e-01 5.438876e-02
582 float AliFemtoESDTrackCut::PidFractionElectron(float mom) const
584 // Provide a parameterized fraction of electrons dependent on momentum
588 +1.728591e+00*0.13*0.13
589 -2.827893e+00*0.13*0.13*0.13
590 +2.503553e+00*0.13*0.13*0.13*0.13
591 -1.125965e+00*0.13*0.13*0.13*0.13*0.13
592 +2.009036e-01*0.13*0.13*0.13*0.13*0.13*0.13);
597 +1.728591e+00*1.8*1.8
598 -2.827893e+00*1.8*1.8*1.8
599 +2.503553e+00*1.8*1.8*1.8*1.8
600 -1.125965e+00*1.8*1.8*1.8*1.8*1.8
601 +2.009036e-01*1.8*1.8*1.8*1.8*1.8*1.8);
604 +1.728591e+00*mom*mom
605 -2.827893e+00*mom*mom*mom
606 +2.503553e+00*mom*mom*mom*mom
607 -1.125965e+00*mom*mom*mom*mom*mom
608 +2.009036e-01*mom*mom*mom*mom*mom*mom);
613 // 0 1.063457e+00 8.872043e-03
614 // 1 -4.222208e-01 2.534402e-02
615 // 2 1.042004e-01 1.503945e-02
616 float AliFemtoESDTrackCut::PidFractionPion(float mom) const
618 // Provide a parameterized fraction of pions dependent on momentum
620 return ( 1.063457e+00
622 +1.042004e-01*0.0169);
624 return ( 1.063457e+00
627 return ( 1.063457e+00
629 +1.042004e-01*mom*mom);
634 // 0 -7.289406e-02 1.686074e-03
635 // 1 4.415666e-01 1.143939e-02
636 // 2 -2.996790e-01 1.840964e-02
637 // 3 6.704652e-02 7.783990e-03
638 float AliFemtoESDTrackCut::PidFractionKaon(float mom) const
640 // Provide a parameterized fraction of kaons dependent on momentum
642 return (-7.289406e-02
644 -2.996790e-01*0.18*0.18
645 +6.704652e-02*0.18*0.18*0.18);
647 return (-7.289406e-02
649 -2.996790e-01*2.0*2.0
650 +6.704652e-02*2.0*2.0*2.0);
651 return (-7.289406e-02
653 -2.996790e-01*mom*mom
654 +6.704652e-02*mom*mom*mom);
659 // 0 -3.730200e-02 2.347311e-03
660 // 1 1.163684e-01 1.319316e-02
661 // 2 8.354116e-02 1.997948e-02
662 // 3 -4.608098e-02 8.336400e-03
663 float AliFemtoESDTrackCut::PidFractionProton(float mom) const
665 // Provide a parameterized fraction of protons dependent on momentum
666 if (mom<0.26) return 0.0;
668 return (-3.730200e-02
670 +8.354116e-02*2.0*2.0
671 -4.608098e-02*2.0*2.0*2.0);
672 return (-3.730200e-02
674 +8.354116e-02*mom*mom
675 -4.608098e-02*mom*mom*mom);
678 void AliFemtoESDTrackCut::SetMomRangeTOFpidIs(const float& minp, const float& maxp)
680 fMinPforTOFpid = minp;
681 fMaxPforTOFpid = maxp;
684 void AliFemtoESDTrackCut::SetMomRangeTPCpidIs(const float& minp, const float& maxp)
686 fMinPforTPCpid = minp;
687 fMaxPforTPCpid = maxp;
690 void AliFemtoESDTrackCut::SetMomRangeITSpidIs(const float& minp, const float& maxp)
692 fMinPforITSpid = minp;
693 fMaxPforITSpid = maxp;
696 bool AliFemtoESDTrackCut::IsPionTPCdEdx(float mom, float dEdx)
698 // double a1 = -95.4545, b1 = 86.5455;
699 // double a2 = 0.0, b2 = 56.0;
700 double a1 = -343.75, b1 = 168.125;
701 double a2 = 0.0, b2 = 65.0;
704 if (dEdx < a1*mom+b1) return true;
706 if (dEdx < a2*mom+b2) return true;
711 bool AliFemtoESDTrackCut::IsKaonTPCdEdx(float mom, float dEdx)
713 // double a1 = -159.1, b1 = 145.9;
714 // double a2 = 0.0, b2 = 60.0;
715 // double a3 = -138.235, b3 = 166.44;
716 // double a4 = -2015.79, b4 = 973.789;
719 // if (dEdx > a1*mom+b1) return true;
721 // else if (mom < 0.43) {
722 // if ((dEdx > a1*mom+b1) && (dEdx < a4*mom+b4)) return true;
724 // else if (mom < 0.54) {
725 // if ((dEdx > a1*mom+b1) && (dEdx < a3*mom+b3)) return true;
727 // else if (mom < 0.77) {
728 // if ((dEdx > a2*mom+b2) && (dEdx < a3*mom+b3)) return true;
733 double a1 = -547.0; double b1 = 297.0;
734 double a2 = -125.0; double b2 = 145.0;
735 double a3 = -420.0; double b3 = 357.0;
736 double a4 = -110.0; double b4 = 171.0;
739 if (mom<0.2) return false;
742 if (dEdx < a1*mom+b1) return false;
743 if (dEdx > a3*mom+b3) return false;
746 if (dEdx < a2*mom+b2) return false;
747 if (dEdx > a3*mom+b3) return false;
750 if (dEdx > a4*mom+b4) return false;
751 if (dEdx < b5) return false;
756 // if (dEdx > b5) return false;
762 bool AliFemtoESDTrackCut::IsProtonTPCdEdx(float mom, float dEdx)
764 double a1 = -3000.0; double b1 = 1280.0;
765 double a2 = -312.5; double b2 = 312.5;
766 double a3 = -160.0; double b3 = 221.0;
767 // double a4 = -110.0; double b4 = 171.0;
770 if (mom<0.2) return false;
773 if (dEdx < a1*mom+b1) return false;
776 if (dEdx < a2*mom+b2) return false;
779 if (dEdx < a3*mom+b3) return false;
784 // if (dEdx > b5) return false;
791 bool AliFemtoESDTrackCut::IsPionTOFTime(float mom, float ttof)
793 double a1 = -427.0; double b1 = 916.0;
794 double a2 = 327.0; double b2 = -888.0;
795 if (mom<0.3) return kFALSE;
796 if (mom>2.0) return kFALSE;
797 if (ttof > a1*mom+b1) return kFALSE;
798 if (ttof < a2*mom+b2) return kFALSE;
803 bool AliFemtoESDTrackCut::IsKaonTOFTime(float mom, float ttof)
805 double a1 = 000.0; double b1 = -500.0;
806 double a2 = 000.0; double b2 = 500.0;
807 double a3 = 850.0; double b3 = -1503.0;
808 double a4 = -1637.0; double b4 = 3621.0;
810 if (mom<0.3) return kFALSE;
811 if (mom>2.06) return kFALSE;
813 if (ttof > a2*mom+b2) return kFALSE;
814 if (ttof < a1*mom+b1) return kFALSE;
817 if (ttof > a2*mom+b2) return kFALSE;
818 if (ttof < a3*mom+b3) return kFALSE;
821 if (ttof > a4*mom+b4) return kFALSE;
822 if (ttof < a3*mom+b3) return kFALSE;
827 bool AliFemtoESDTrackCut::IsProtonTOFTime(float mom, float ttof)
829 double a1 = 000.0; double b1 = -915.0;
830 double a2 = 000.0; double b2 = 600.0;
831 double a3 = 572.0; double b3 = -1715.0;
833 if (mom<0.3) return kFALSE;
834 if (mom>3.0) return kFALSE;
836 if (ttof > a2*mom+b2) return kFALSE;
837 if (ttof < a1*mom+b1) return kFALSE;
840 if (ttof > a2*mom+b2) return kFALSE;
841 if (ttof < a3*mom+b3) return kFALSE;
849 bool AliFemtoESDTrackCut::IsKaonTPCdEdxNSigma(float mom, float nsigmaK)
851 cout<<" AliFemtoESDTrackCut::IsKaonTPCdEdxNSigma "<<mom<<" "<<nsigmaK<<endl;
854 if(mom<0.35 && TMath::Abs(nsigmaK)<5.0)return true;
855 if(mom>=0.35 && mom<0.5 && TMath::Abs(nsigmaK)<3.0)return true;
856 if(mom>=0.5 && mom<0.7 && TMath::Abs(nsigmaK)<2.0)return true;
862 bool AliFemtoESDTrackCut::IsKaonTOFNSigma(float mom, float nsigmaK)
864 cout<<" AliFemtoESDTrackCut::IsKaonTPCdEdxNSigma "<<mom<<" "<<nsigmaK<<endl;
866 // if(mom<1.5 && TMath::Abs(nsigmaK)<3.0)return true;
867 if(mom>=1.5 && TMath::Abs(nsigmaK)<2.0)return true;
871 //ML according with Roberto Preghenella talk
873 bool AliFemtoESDTrackCut::IsKaonNSigma(float mom, float nsigmaTPCK, float nsigmaTOFK)
875 //cout<<"//////// AliFemtoESDTrackCut::IsKaonNSigma "<<mom<<" tpc "<<nsigmaTPCK<<" tof "<<nsigmaTOFK<<endl;
878 if(TMath::Abs(nsigmaTOFK)<3.0 && mom<1.5 && TMath::Abs(nsigmaTPCK)<5.0)return true;
879 if(TMath::Abs(nsigmaTOFK)<2.0 && mom>1.5 && TMath::Abs(nsigmaTPCK)<5.0)return true;
884 if(nsigmaTOFK<=-1000.){
885 //cout<<"//////// AliFemtoESDTrackCut::IsKaonNSigma P= "<<mom<<" tpc "<<nsigmaTPCK<<" tof "<<nsigmaTOFK<<endl;
886 //cout <<"/////////////// AliFemtoESDTrackCut::IsKaonNSigma NO TOF SIGNAL ////////////" <<endl;
887 if(mom<0.4 && TMath::Abs(nsigmaTPCK)<1.0)return true;
888 if(mom>=0.4 && mom<0.5 && TMath::Abs(nsigmaTPCK)<2.0)return true;
889 if(mom>=0.5 && mom<0.6 && TMath::Abs(nsigmaTPCK)<2.0)return true;
897 bool AliFemtoESDTrackCut::IsPionNSigma(float mom, float nsigmaTPCPi, float nsigmaTOFPi)
899 // cout<<" AliFemtoESDTrackCut::IsKaonNSigma "<<mom<<" tpc "<<nsigmaTPCK<<" tof "<<nsigmaTOFK<<endl;
901 if(TMath::Abs(nsigmaTOFPi)<3.0 && mom<1.5 && TMath::Abs(nsigmaTPCPi)<5.0)return true;
902 if(TMath::Abs(nsigmaTOFPi)<2.0 && mom>1.5 && TMath::Abs(nsigmaTPCPi)<5.0)return true;
906 if(nsigmaTOFPi<-999.){
907 if(mom<0.35 && TMath::Abs(nsigmaTPCPi)<5.0)return true;
908 if(mom>=0.35 && mom<0.5 && TMath::Abs(nsigmaTPCPi)<3.0)return true;
909 if(mom>=0.5 && TMath::Abs(nsigmaTPCPi)<2.0)return true;
915 bool AliFemtoESDTrackCut::IsProtonNSigma(float mom, float nsigmaTPCP, float nsigmaTOFP)
917 // cout<<" AliFemtoESDTrackCut::IsKaonNSigma "<<mom<<" tpc "<<nsigmaTPCK<<" tof "<<nsigmaTOFK<<endl;
919 if(TMath::Abs(nsigmaTOFP)<3.0 && mom<1.5 && TMath::Abs(nsigmaTPCP)<5.0)return true;
920 if(TMath::Abs(nsigmaTOFP)<2.0 && mom>1.5 && TMath::Abs(nsigmaTPCP)<5.0)return true;
924 if(nsigmaTOFP<-999.){
925 if(mom<0.35 && TMath::Abs(nsigmaTPCP)<5.0)return true;
926 if(mom>=0.35 && mom<0.5 && TMath::Abs(nsigmaTPCP)<3.0)return true;
927 if(mom>=0.5 && mom<1.0 && TMath::Abs(nsigmaTPCP)<2.0)return true; //? 1.0 ?
933 void AliFemtoESDTrackCut::SetPIDMethod(ReadPIDMethodType newMethod)
935 fPIDMethod = newMethod;