]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/AliRsnCutDaughterD0.h
Adding macro to plot <Ncoll>
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutDaughterD0.h
CommitLineData
3e6c5c16 1#ifndef ALIRSNCUTDAUGHTERD0_H
2#define ALIRSNCUTDAUGHTERD0_H
3
4//
5// Cuts for selecting good pion candidates for D0 analysis
6// with the data samples from pp/PbPb/pPb runs in 2010/2011/2012/2013.
7// Applies track quality selection plus PID selection,
8// with different tolerance ranges depending on the momentum.
9//
10
11#include "AliVTrack.h"
12#include "AliRsnCut.h"
13#include "AliRsnCutTrackQuality.h"
14
15class AliRsnCutDaughterD0 : public AliRsnCut {
16
17 public:
18
19 AliRsnCutDaughterD0(const char *name = "", AliPID::EParticleType pid = AliPID::kPion);
20 AliRsnCutDaughterD0(const AliRsnCutDaughterD0 &copy);
21 AliRsnCutDaughterD0 &operator=(const AliRsnCutDaughterD0 &copy);
22 virtual ~AliRsnCutDaughterD0() { }
23
24 void SetNoPID(Bool_t yn = kTRUE) {fNoPID = yn;}
670857a6 25 void SetPtDependentPIDCut(Bool_t yn = kTRUE) {fPtDepPIDCut = yn;}
3e6c5c16 26 void SetPID(AliPID::EParticleType type) {fPID = type;}
27
28 void SetTPCPionPIDCut(Double_t value) {fPionTPCPIDCut = value;}
29 void SetTPCKaonPIDCut(Double_t value) {fKaonTPCPIDCut = value;}
30
31 void SetTOFPionPIDCut(Double_t value) {fPionTOFPIDCut = value;}
32 void SetTOFKaonPIDCut(Double_t value) {fKaonTOFPIDCut = value;}
33
34 AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;}
35 Bool_t MatchTOF(const AliVTrack *vtrack);
36 virtual Bool_t IsSelected(TObject *obj);
37
38 private:
39 Bool_t fNoPID; // flag to switch off PID check
40 AliPID::EParticleType fPID; // PID for track
41 AliRsnCutTrackQuality fCutQuality; // track quality cut
42
43 protected:
44 Double_t fPionTPCPIDCut; // TPC nsigmas for pions
45 Double_t fKaonTPCPIDCut; // TPC nsigmas for kaons
46 Double_t fPionTOFPIDCut; // TOF nsigmas for pions
47 Double_t fKaonTOFPIDCut; // TOF nsigmas for kaons
670857a6 48 Bool_t fPtDepPIDCut; // flag for setting a pt dependent or independent PID cut
3e6c5c16 49
670857a6 50 ClassDef(AliRsnCutDaughterD0, 2) // cut definitions for D0
3e6c5c16 51 };
52
53//__________________________________________________________________________________________________
54inline Bool_t AliRsnCutDaughterD0::MatchTOF(const AliVTrack *vtrack)
55{
56 //
57 // Checks if the track has matched the TOF detector
58 //
59
60 if (!vtrack) {
61 AliWarning("NULL argument: impossible to check status");
62 return kFALSE;
63 }
64
65 if (!(vtrack->GetStatus() & AliESDtrack::kTOFout)) return kFALSE;
66 if (!(vtrack->GetStatus() & AliESDtrack::kTIME )) return kFALSE;
67
68 return kTRUE;
69}
70
71#endif