updated macros for Sigma* analysis (M- Venaruzzo)
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutDaughterSigmaStar2010PP.cxx
CommitLineData
bd74a0e6 1//
2// All cuts for single pions in Sigma* analysis 2010,
3// based on track quality and particle identification
4// with TPC and TOF.
5// Author: Massimo Venaruzzo.
6//
7//
8
9#include <Riostream.h>
10
11#include "AliPID.h"
12#include "AliPIDResponse.h"
13#include "AliRsnCutDaughterSigmaStar2010PP.h"
14
15ClassImp(AliRsnCutDaughterSigmaStar2010PP)
16
17//__________________________________________________________________________________________________
18AliRsnCutDaughterSigmaStar2010PP::AliRsnCutDaughterSigmaStar2010PP(const char *name, AliPID::EParticleType pid) :
19 AliRsnCut(name, AliRsnTarget::kDaughter),
20 fPID(pid),
3da8cef7 21 fCutQuality(Form("%sQuality", name)),
9d4bb6d8 22 fPIDCut(3.0),
23 fMinTPCcluster(70)
bd74a0e6 24{
25//
26// Constructor
27// Initialize track quality cuts to 2010 defaults
28//
29
30 fCutQuality.SetPtRange(0.15, 1E+20);
31 fCutQuality.SetEtaRange(-0.8, 0.8);
32 fCutQuality.SetDCARmax(0.05);
33 //fCutQuality.SetDCARPtFormula("0.0182+0.0350/pt^1.01");
34 fCutQuality.SetDCAZmax(2.0);
35 fCutQuality.SetSPDminNClusters(1);
36 fCutQuality.SetITSminNClusters(0);
37 fCutQuality.SetITSmaxChi2(1E+20);
9d4bb6d8 38 fCutQuality.SetTPCminNClusters(fMinTPCcluster);
bd74a0e6 39 fCutQuality.SetTPCmaxChi2(4.0);
40 fCutQuality.SetRejectKinkDaughters();
41 fCutQuality.SetAODTestFilterBit(5);
42}
43
44//__________________________________________________________________________________________________
45Bool_t AliRsnCutDaughterSigmaStar2010PP::IsSelected(TObject *obj)
46{
47//
48// Global check
49//
50
51 // coherence check
52 if (!TargetOK(obj)) return kFALSE;
61f275d1 53
bd74a0e6 54 // check track
55 AliVTrack *track = fDaughter->Ref2Vtrack();
56 if (!track) {
57 if (!fDaughter->GetRef()) AliWarning("NULL ref");
58 return kFALSE;
59 }
61f275d1 60
76d89202 61 AliDebugClass(2, "Checking status");
62
63
bd74a0e6 64 // check flags
65 if ((track->GetStatus() & AliESDtrack::kTPCin ) == 0) return kFALSE;
66 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
67 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
61f275d1 68
76d89202 69 AliDebugClass(2, "Checking quality cuts");
70
bd74a0e6 71 // quality
72 if (!fCutQuality.IsSelected(obj)) return kFALSE;
61f275d1 73
76d89202 74 AliDebugClass(2, "...passed");
75
76
bd74a0e6 77 // check initialization of PID object
78 AliPIDResponse *pid = fEvent->GetPIDResponse();
79 if (!pid) {
80 AliFatal("NULL PID response");
81 return kFALSE;
82 }
61f275d1 83
bd74a0e6 84 // check if TOF is matched
85 // and computes all values used in the PID cut
86 //Bool_t isTOF = MatchTOF(track);
87 //Double_t pTPC = track->GetTPCmomentum();
88 //Double_t p = track->P();
3da8cef7 89 Double_t nsTPC = TMath::Abs(pid->NumberOfSigmasTPC(track, fPID));
bd74a0e6 90 //Double_t nsTOF = TMath::Abs(pid->NumberOfSigmasTOF(track, fPID));
3da8cef7 91 Double_t maxTPC = 1E20;
bd74a0e6 92 //Double_t maxTOF = 1E20;
61f275d1 93
bd74a0e6 94 // applies the cut differently depending on the PID and the momentum
95 //if (isTOF) {
61f275d1 96 // TPC: 5sigma cut for all
97 //if (nsTPC > 5.0) return kFALSE;
98 // TOF: 3sigma below 1.5 GeV, 2sigma above
99 //if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0;
100 //return (nsTOF <= maxTOF);
bd74a0e6 101 //} else {
61f275d1 102
bd74a0e6 103 //For the moment TOF is not used - PID ONLY WITH TPC - 3 sigmas in the whole range
61f275d1 104
105 // TPC:
106 // below 350 MeV: 5sigma
107 // between 350 and 500 MeV: 3sigma
108 // pions above 500 MeV: 2sigma
109 // kaons between 500 and 700 MeV: 2sigma
110 // kaons above 700 MeV: rejected
111 /*if (pTPC <= 0.35)
112 maxTPC = 5.0;
113 else if (pTPC <= 0.5)
114 maxTPC = 3.0;
115 else if (pTPC > 0.5 && fPID == AliPID::kPion)
116 maxTPC = 2.0;
117 else if (pTPC > 0.5 && pTPC <= 0.7 && fPID == AliPID::kKaon)
118 maxTPC = 2.0;
119 else
120 return kFALSE;*/
3da8cef7 121 //maxTPC = 3.0;
122 maxTPC = fPIDCut;
123 return (nsTPC <= maxTPC);
61f275d1 124
bd74a0e6 125 AliDebugClass(2, "Good Pion (hallelujah)");
126 return kTRUE;
61f275d1 127}