add possibility to smear cluster energy, only for MC, some stetic changes in header...
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutPIDITS.h
CommitLineData
659ef4f0 1//
2// *** Class AliRsnCutPIDITS ***
3//
4// This class implements all cuts which have to be used for the 2010 runs
5// for phi and generic resonance analysis.
6// It contains an AliESDtrackCuts object for track quality selection
7// and some criteria for particle identification with ITS, ITS and TOF.
8//
9// authors: Martin Vala (martin.vala@cern.ch)
10// Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
11//
12
13#ifndef ALIRSNCUTPIDITS_H
14#define ALIRSNCUTPIDITS_H
15
16#include "AliPID.h"
80e49c8b 17
18#include "AliESDtrack.h"
19#include "AliESDtrackCuts.h"
659ef4f0 20#include "AliESDpid.h"
80e49c8b 21
659ef4f0 22#include "AliAODpidUtil.h"
80e49c8b 23
24#include "AliRsnDaughter.h"
659ef4f0 25#include "AliRsnCut.h"
26
27class AliRsnCutPIDITS : public AliRsnCut
28{
29 public:
30
80e49c8b 31 AliRsnCutPIDITS(const char *name = "cutITS",
32 EPARTYPE ref = AliPID::kKaon,
33 Double_t nSigmaMin = -3.,
34 Double_t nSigmaMax = 3.,
35 Bool_t rejectOutside = kTRUE);
36
659ef4f0 37 AliRsnCutPIDITS(const AliRsnCutPIDITS& copy);
38 AliRsnCutPIDITS& operator=(const AliRsnCutPIDITS& copy);
39 virtual ~AliRsnCutPIDITS() { }
40
80e49c8b 41 AliESDpid* ESDpid() {return &fESDpid;}
42 AliAODpidUtil* AODpid() {return &fAODpid;}
43
44 void SetMC(Bool_t mc = kTRUE);
45 void SetRejectOutside(Bool_t yn = kTRUE) {fRejectOutside = yn;}
46 void SetMomentumRange(Double_t min, Double_t max) {fMomMin = min; fMomMax = max;}
47 void SetNSigmaRange(Double_t min, Double_t max) {fMinD = min; fMaxD = max;}
48 void SetRefType(EPARTYPE type) {fRefType = type;}
49
50 Bool_t IsTPC(AliVTrack *vtrack);
51 Bool_t IsSA(AliVTrack *vtrack);
659ef4f0 52 virtual Bool_t IsSelected(TObject *object);
53 virtual void Print(const Option_t *option = "") const;
54
80e49c8b 55 private:
56
223b8750 57 void Initialize();
58
59 Bool_t fInitialized; // a mono-usage flag which initializes the ESD pid object
80e49c8b 60 Bool_t fRejectOutside; // choose if tracks outside momentum range are rejected or not
61 Double_t fMomMin; // min p in range where this cut is checked
62 Double_t fMomMax; // max p in range where this cut is checked
63 EPARTYPE fRefType; // particle type for which PID is checked
64 AliESDpid fESDpid; // ESD PID object
65 AliAODpidUtil fAODpid; // AOD PID object
659ef4f0 66
67 ClassDef(AliRsnCutPIDITS, 1)
68};
69
80e49c8b 70inline Bool_t AliRsnCutPIDITS::IsTPC(AliVTrack *vtrack)
659ef4f0 71{
72//
73// Checks if the track has the status flags required for a global track
74//
75
76 if (!vtrack)
77 {
78 AliWarning("NULL argument: impossible to check status");
79 return kFALSE;
80 }
81
82 Bool_t isTPCin = ((vtrack->GetStatus() & AliESDtrack::kTPCin) != 0);
83 Bool_t isITSrefit = ((vtrack->GetStatus() & AliESDtrack::kITSrefit) != 0);
84 Bool_t isITSpid = ((vtrack->GetStatus() & AliESDtrack::kITSpid) != 0);
85
86 return ( isTPCin && isITSrefit && isITSpid );
87
88 return kTRUE;
89}
90
80e49c8b 91inline Bool_t AliRsnCutPIDITS::IsSA(AliVTrack *vtrack)
659ef4f0 92{
93//
94// Checks if the track has the status flags required for an ITS standalone track
95//
96
97 if (!vtrack)
98 {
99 AliWarning("NULL argument: impossible to check status");
100 return kFALSE;
101 }
102
103 Bool_t isTPCin = ((vtrack->GetStatus() & AliESDtrack::kTPCin) != 0);
104 Bool_t isITSrefit = ((vtrack->GetStatus() & AliESDtrack::kITSrefit) != 0);
105 Bool_t isITSpureSA = ((vtrack->GetStatus() & AliESDtrack::kITSpureSA) != 0);
106 Bool_t isITSpid = ((vtrack->GetStatus() & AliESDtrack::kITSpid) != 0);
107
108 return ( (!isTPCin) && isITSrefit && (!isITSpureSA) && isITSpid );
109
110 return kTRUE;
111}
112
113#endif