]>
Commit | Line | Data |
---|---|---|
de957967 | 1 | // |
2 | // All cuts for single pions in phi analysis 2010, | |
3 | // based on track quality and particle identification | |
4 | // with TPC and TOF. | |
5 | // Author: Serguey Kiselev. | |
6 | // | |
7 | // | |
8 | ||
9 | #include <Riostream.h> | |
10 | ||
11 | #include "AliPID.h" | |
12 | #include "AliPIDResponse.h" | |
13 | #include "AliRsnCutDaughterKStar2010PP.h" | |
14 | ||
15 | ClassImp(AliRsnCutDaughterKStar2010PP) | |
16 | ||
17 | //__________________________________________________________________________________________________ | |
18 | AliRsnCutDaughterKStar2010PP::AliRsnCutDaughterKStar2010PP(const char *name, AliPID::EParticleType pid) : | |
19 | AliRsnCut(name, AliRsnTarget::kDaughter), | |
c31027eb | 20 | fNoPID(kFALSE), |
de957967 | 21 | fPID(pid), |
22 | fCutQuality(Form("%sQuality", name)) | |
23 | { | |
24 | // | |
25 | // Constructor | |
26 | // Initialize track quality cuts to 2010 defaults | |
27 | // | |
28 | ||
29 | fCutQuality.SetPtRange(0.15, 1E+20); | |
30 | fCutQuality.SetEtaRange(-0.8, 0.8); | |
31 | fCutQuality.SetDCARPtFormula("0.0182+0.0350/pt^1.01"); | |
32 | fCutQuality.SetDCAZmax(2.0); | |
33 | fCutQuality.SetSPDminNClusters(1); | |
34 | fCutQuality.SetITSminNClusters(0); | |
35 | fCutQuality.SetITSmaxChi2(1E+20); | |
36 | fCutQuality.SetTPCminNClusters(70); | |
37 | fCutQuality.SetTPCmaxChi2(4.0); | |
38 | fCutQuality.SetRejectKinkDaughters(); | |
39 | fCutQuality.SetAODTestFilterBit(5); | |
40 | } | |
41 | ||
42 | //__________________________________________________________________________________________________ | |
43 | Bool_t AliRsnCutDaughterKStar2010PP::IsSelected(TObject *obj) | |
44 | { | |
45 | // | |
46 | // Global check | |
47 | // | |
48 | ||
49 | // coherence check | |
50 | if (!TargetOK(obj)) return kFALSE; | |
61f275d1 | 51 | |
de957967 | 52 | // check track |
61f275d1 | 53 | AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef()); |
c31027eb | 54 | if (!track) return kFALSE; |
61f275d1 | 55 | |
de957967 | 56 | // check flags |
57 | if ((track->GetStatus() & AliESDtrack::kTPCin ) == 0) return kFALSE; | |
58 | if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE; | |
59 | if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE; | |
61f275d1 | 60 | |
de957967 | 61 | // quality |
62 | if (!fCutQuality.IsSelected(obj)) return kFALSE; | |
61f275d1 | 63 | |
c31027eb | 64 | // if no PID is required, accept |
65 | if (fNoPID) return kTRUE; | |
61f275d1 | 66 | |
de957967 | 67 | // check initialization of PID object |
68 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
69 | if (!pid) { | |
70 | AliFatal("NULL PID response"); | |
71 | return kFALSE; | |
72 | } | |
61f275d1 | 73 | |
de957967 | 74 | // check if TOF is matched |
75 | // and computes all values used in the PID cut | |
76 | Bool_t isTOF = MatchTOF(track); | |
77 | Double_t pTPC = track->GetTPCmomentum(); | |
78 | Double_t p = track->P(); | |
79 | Double_t nsTPC = TMath::Abs(pid->NumberOfSigmasTPC(track, fPID)); | |
c31027eb | 80 | Double_t nsTOF = isTOF ? TMath::Abs(pid->NumberOfSigmasTOF(track, fPID)) : 1E20; |
de957967 | 81 | Double_t maxTPC = 1E20; |
82 | Double_t maxTOF = 1E20; | |
61f275d1 | 83 | |
de957967 | 84 | // applies the cut differently depending on the PID and the momentum |
85 | if (isTOF) { | |
86 | // TPC: 5sigma cut for all | |
87 | if (nsTPC > 5.0) return kFALSE; | |
88 | // TOF: 3sigma below 1.5 GeV, 2sigma above | |
89 | if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0; | |
90 | return (nsTOF <= maxTOF); | |
91 | } else { | |
61f275d1 | 92 | // TPC: |
c31027eb | 93 | // all below 350 MeV: 5sigma |
94 | // all between 350 and 500 MeV: 3sigma | |
95 | // pions above 500 MeV: 2sigma | |
de957967 | 96 | // kaons between 500 and 700 MeV: 2sigma |
c31027eb | 97 | // kaons above 700 MeV: rejected |
61f275d1 | 98 | if (pTPC <= 0.35) |
de957967 | 99 | maxTPC = 5.0; |
c31027eb | 100 | else if (pTPC > 0.35 && pTPC <= 0.5) |
de957967 | 101 | maxTPC = 3.0; |
61f275d1 | 102 | else { |
103 | if (fPID == AliPID::kPion) | |
c31027eb | 104 | maxTPC = 2.0; |
105 | else if (fPID == AliPID::kKaon) { | |
106 | if (pTPC <= 0.7) | |
107 | maxTPC = 2.0; | |
108 | else | |
109 | return kFALSE; | |
110 | } | |
111 | } | |
de957967 | 112 | return (nsTPC <= maxTPC); |
113 | } | |
114 | } |