]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/AliRsnCutDaughterSigmaStar2010PP.cxx
Update in cuts for Sigma* and update for lego_train macros (M.Vala)
[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)),
22 fPIDCut(3.0)
bd74a0e6 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.SetDCARmax(0.05);
32 //fCutQuality.SetDCARPtFormula("0.0182+0.0350/pt^1.01");
33 fCutQuality.SetDCAZmax(2.0);
34 fCutQuality.SetSPDminNClusters(1);
35 fCutQuality.SetITSminNClusters(0);
36 fCutQuality.SetITSmaxChi2(1E+20);
37 fCutQuality.SetTPCminNClusters(70);
38 fCutQuality.SetTPCmaxChi2(4.0);
39 fCutQuality.SetRejectKinkDaughters();
40 fCutQuality.SetAODTestFilterBit(5);
41}
42
43//__________________________________________________________________________________________________
44Bool_t AliRsnCutDaughterSigmaStar2010PP::IsSelected(TObject *obj)
45{
46//
47// Global check
48//
49
50 // coherence check
51 if (!TargetOK(obj)) return kFALSE;
61f275d1 52
bd74a0e6 53 // check track
54 AliVTrack *track = fDaughter->Ref2Vtrack();
55 if (!track) {
56 if (!fDaughter->GetRef()) AliWarning("NULL ref");
57 return kFALSE;
58 }
61f275d1 59
bd74a0e6 60 // check flags
61 if ((track->GetStatus() & AliESDtrack::kTPCin ) == 0) return kFALSE;
62 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
63 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
61f275d1 64
bd74a0e6 65 // quality
66 if (!fCutQuality.IsSelected(obj)) return kFALSE;
61f275d1 67
bd74a0e6 68 // check initialization of PID object
69 AliPIDResponse *pid = fEvent->GetPIDResponse();
70 if (!pid) {
71 AliFatal("NULL PID response");
72 return kFALSE;
73 }
61f275d1 74
bd74a0e6 75 // check if TOF is matched
76 // and computes all values used in the PID cut
77 //Bool_t isTOF = MatchTOF(track);
78 //Double_t pTPC = track->GetTPCmomentum();
79 //Double_t p = track->P();
3da8cef7 80 Double_t nsTPC = TMath::Abs(pid->NumberOfSigmasTPC(track, fPID));
bd74a0e6 81 //Double_t nsTOF = TMath::Abs(pid->NumberOfSigmasTOF(track, fPID));
3da8cef7 82 Double_t maxTPC = 1E20;
bd74a0e6 83 //Double_t maxTOF = 1E20;
61f275d1 84
bd74a0e6 85 // applies the cut differently depending on the PID and the momentum
86 //if (isTOF) {
61f275d1 87 // TPC: 5sigma cut for all
88 //if (nsTPC > 5.0) return kFALSE;
89 // TOF: 3sigma below 1.5 GeV, 2sigma above
90 //if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0;
91 //return (nsTOF <= maxTOF);
bd74a0e6 92 //} else {
61f275d1 93
bd74a0e6 94 //For the moment TOF is not used - PID ONLY WITH TPC - 3 sigmas in the whole range
61f275d1 95
96 // TPC:
97 // below 350 MeV: 5sigma
98 // between 350 and 500 MeV: 3sigma
99 // pions above 500 MeV: 2sigma
100 // kaons between 500 and 700 MeV: 2sigma
101 // kaons above 700 MeV: rejected
102 /*if (pTPC <= 0.35)
103 maxTPC = 5.0;
104 else if (pTPC <= 0.5)
105 maxTPC = 3.0;
106 else if (pTPC > 0.5 && fPID == AliPID::kPion)
107 maxTPC = 2.0;
108 else if (pTPC > 0.5 && pTPC <= 0.7 && fPID == AliPID::kKaon)
109 maxTPC = 2.0;
110 else
111 return kFALSE;*/
3da8cef7 112 //maxTPC = 3.0;
113 maxTPC = fPIDCut;
114 return (nsTPC <= maxTPC);
61f275d1 115
bd74a0e6 116 AliDebugClass(2, "Good Pion (hallelujah)");
117 return kTRUE;
61f275d1 118}