]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnCutDaughterKStar2010PP.cxx
Minor upgrades to the cut and to the mini-event. Added a non-streamed temp data membe...
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutDaughterKStar2010PP.cxx
CommitLineData
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
15ClassImp(AliRsnCutDaughterKStar2010PP)
16
17//__________________________________________________________________________________________________
18AliRsnCutDaughterKStar2010PP::AliRsnCutDaughterKStar2010PP(const char *name, AliPID::EParticleType pid) :
19 AliRsnCut(name, AliRsnTarget::kDaughter),
20 fPID(pid),
21 fCutQuality(Form("%sQuality", name))
22{
23//
24// Constructor
25// Initialize track quality cuts to 2010 defaults
26//
27
28 fCutQuality.SetPtRange(0.15, 1E+20);
29 fCutQuality.SetEtaRange(-0.8, 0.8);
30 fCutQuality.SetDCARPtFormula("0.0182+0.0350/pt^1.01");
31 fCutQuality.SetDCAZmax(2.0);
32 fCutQuality.SetSPDminNClusters(1);
33 fCutQuality.SetITSminNClusters(0);
34 fCutQuality.SetITSmaxChi2(1E+20);
35 fCutQuality.SetTPCminNClusters(70);
36 fCutQuality.SetTPCmaxChi2(4.0);
37 fCutQuality.SetRejectKinkDaughters();
38 fCutQuality.SetAODTestFilterBit(5);
39}
40
41//__________________________________________________________________________________________________
42Bool_t AliRsnCutDaughterKStar2010PP::IsSelected(TObject *obj)
43{
44//
45// Global check
46//
47
48 // coherence check
49 if (!TargetOK(obj)) return kFALSE;
50
51 // check track
52 AliVTrack *track = fDaughter->Ref2Vtrack();
53 if (!track) {
54 if (!fDaughter->GetRef()) AliWarning("NULL ref");
55 return kFALSE;
56 }
57
58 // check flags
59 if ((track->GetStatus() & AliESDtrack::kTPCin ) == 0) return kFALSE;
60 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
61 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
62
63 // quality
64 if (!fCutQuality.IsSelected(obj)) return kFALSE;
65
66 // check initialization of PID object
67 AliPIDResponse *pid = fEvent->GetPIDResponse();
68 if (!pid) {
69 AliFatal("NULL PID response");
70 return kFALSE;
71 }
72
73 // check if TOF is matched
74 // and computes all values used in the PID cut
75 Bool_t isTOF = MatchTOF(track);
76 Double_t pTPC = track->GetTPCmomentum();
77 Double_t p = track->P();
78 Double_t nsTPC = TMath::Abs(pid->NumberOfSigmasTPC(track, fPID));
79 Double_t nsTOF = TMath::Abs(pid->NumberOfSigmasTOF(track, fPID));
80 Double_t maxTPC = 1E20;
81 Double_t maxTOF = 1E20;
82
83 // applies the cut differently depending on the PID and the momentum
84 if (isTOF) {
85 // TPC: 5sigma cut for all
86 if (nsTPC > 5.0) return kFALSE;
87 // TOF: 3sigma below 1.5 GeV, 2sigma above
88 if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0;
89 return (nsTOF <= maxTOF);
90 } else {
91 // TPC:
92 // below 350 MeV: 5sigma
93 // between 350 and 500 MeV: 3sigma
94 // pions above 500 MeV: 2sigma
95 // kaons between 500 and 700 MeV: 2sigma
96 // kaons above 700 MeV: rejected
97 if (pTPC <= 0.35)
98 maxTPC = 5.0;
99 else if (pTPC <= 0.5)
100 maxTPC = 3.0;
101 else if (pTPC > 0.5 && fPID == AliPID::kPion)
102 maxTPC = 2.0;
103 else if (pTPC > 0.5 && pTPC <= 0.7 && fPID == AliPID::kKaon)
104 maxTPC = 2.0;
105 else
106 return kFALSE;
107 return (nsTPC <= maxTPC);
108 }
109}