]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/AliRsnCutDaughterSigmaStar2010PP.cxx
Added generalisation of y-cut for pairs
[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),
92932daf 23 fMinTPCcluster(70),
24 fDCARptFormula("")
bd74a0e6 25{
26//
27// Constructor
28// Initialize track quality cuts to 2010 defaults
29//
30
31 fCutQuality.SetPtRange(0.15, 1E+20);
32 fCutQuality.SetEtaRange(-0.8, 0.8);
92932daf 33 fCutQuality.SetDCARPtFormula(fDCARptFormula);
bd74a0e6 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:
92932daf 106
3da8cef7 107 maxTPC = fPIDCut;
108 return (nsTPC <= maxTPC);
61f275d1 109
bd74a0e6 110 AliDebugClass(2, "Good Pion (hallelujah)");
111 return kTRUE;
61f275d1 112}