don't lie in the log!
[u/mrichter/AliRoot.git] / PWGPP / EvTrkSelection / AliSingleTrackEffCuts.h
CommitLineData
c0757458 1#ifndef ALISINGLETRACKEFFICUTS_H
2#define ALISINGLETRACKEFFICUTS_H
3
4#include <TString.h>
5#include "TObject.h"
6
7#include "AliVEvent.h"
8#include "AliMCEvent.h"
9#include "AliAnalysisCuts.h"
10#include "AliPID.h"
11#include "AliAODTrack.h"
5cc7b66d 12
c0757458 13
14
15class AliSingleTrackEffCuts : public AliAnalysisCuts
16{
17 public:
18
19 AliSingleTrackEffCuts();
20 AliSingleTrackEffCuts(const char* name, const char* title);
21
22 AliSingleTrackEffCuts(const AliSingleTrackEffCuts& source);
23 AliSingleTrackEffCuts& operator=(const AliSingleTrackEffCuts& source);
24
25 virtual ~AliSingleTrackEffCuts();
26
b20d8c8c 27 Bool_t IsSelected(TList* list) {
f7487ae0 28 AliWarning(Form(" Function not implemented, list having %d entries",list->GetEntries()));
29 return kFALSE;
30 } // not implemented
c0757458 31
32 //
33 // Event and track selections
34 //
35 // Event selection at MC level (z-vtx)
36 Bool_t IsMCEventSelected(TObject *obj);
37 // Event selection at reconstructed level (trigger, zvtx)
38 Bool_t IsRecoEventSelected(TObject *obj);
39 //
40 // Check generated particles (primary, charged, pdgcode)
41 Bool_t IsMCParticleGenerated(TObject *obj);
42 // Check generated particles (eta, pt)
43 Bool_t IsMCParticleInKineAcceptance(TObject *obj);
44 // Check if particle has left enough hits in the detectors (only at ESD level)
45 Bool_t IsMCParticleInReconstructable(TObject *obj);
46 // Check if reconstructed particle is in the acceptance (eta, pt)
47 Bool_t IsRecoParticleKineAcceptance(TObject *obj);
48 // Check if reconstructed particle passes the PID selections
49 // (only at AOD level for now) if TPC or TOF accept
50 Bool_t IsRecoParticlePID(TObject *obj);
51
52 //
53 // Setters
54 //
55 // Set eta range for acceptance cut (both MC and reco level)
56 void SetEtaRange(Float_t etamin, Float_t etamax){ fEtaMin=etamin; fEtaMax=etamax; }
57 // Set rapidity range for acceptance cut (both MC and reco level)
58 void SetYRange(Float_t ymin, Float_t ymax){ fYMin=ymin; fYMax=ymax; }
59 // Set pt range for acceptance cut (both MC and reco level)
60 void SetPtRange(Float_t ptmin, Float_t ptmax){ fPtMin=ptmin; fPtMax=ptmax; }
61 // Set PDG code to be checked (by default =0, no check)
62 void SetPdgCode(Int_t pdgCode){ fPdgCode = pdgCode; fIsPdgCode=kTRUE; }
63 Int_t GetPdgCode() { return fPdgCode; }
64 // Set if check for charged particle
65 void SetIsCharged(Bool_t charge){ fIsCharged=charge; }
66
67 // Set/get for AOD/ESD analysis
68 void SetIsAOD(Bool_t flag){ fisAOD = flag; }
69 Bool_t IsAOD(){ return fisAOD; }
70
71 // Set for vertex type (0: not cut; 1: SPDZ; 2: SPD3D; 3: Tracks)
72 void SetMinVtxType(Int_t type=3) { fMinVtxType=type; }
73 void SetUseEventsWithOnlySPDVertex(Bool_t flag=kTRUE){
74 if(flag) fMinVtxType=1;
75 else fMinVtxType=3;
76 }
77 // Set minimum vertex contributors
78 void SetMinVtxContr(Int_t contr=1) { fMinVtxContr=contr; }
79 // Set maximum z-vtx cut
80 void SetMaxVtxZ(Float_t z=1e6) { fMaxVtxZ=z; }
81 // Appky or not cut on difference SPD-TPC vtx (0: no cut, 1: |zvtx-SPD - zvtx-TPC|<0.5cm)
82 void SetCutOnZVertexSPD(Int_t cut) { fCutOnZVertexSPD=cut; }
83
84 // Select event trigger mask
85 void SetTriggerMask(ULong64_t mask=0) { fTriggerMask=mask; }
86 UInt_t GetTriggerMask(){ return fTriggerMask; }
87
88 // Set minimum number of ITS, TPC, TOF or MUON clusters
89 void SetNumberOfClusters(Int_t nITS, Int_t nTPC, Int_t nTOF, Int_t nMUON){
90 fnClusITS = nITS; fnClusTPC = nTPC; fnClusTOF = nTOF; fnClusMUON = nMUON;
91 }
92
93 // PID setters (flag, particle specie, detector, limits)
94 void SetUsePid(Bool_t flag=kTRUE) { fusePid=flag; }
95 void SetParticleSpecie(AliPID::EParticleType type=AliPID::kPion) { fParticlePid=type; }
96 void SetUseTPCPid(Bool_t flag=kTRUE) { fuseTPCPid=flag; }
97 void SetUseTOFPid(Bool_t flag=kTRUE) { fuseTOFPid=flag; }
98 // set given number of sigma cut per P bin
99 void SetTPCSigmaPtBins(Int_t nPtBins, Float_t *pBinLimits, Float_t *sigmaBin);
100 void SetTOFSigmaPtBins(Int_t nPtBins, Float_t *pBinLimits, Float_t *sigmaBin);
101 // maximum momentum to use PID
102 void SetMaximumPTPC(Float_t p) { fPmaxTPC=p; }
103 void SetMaximumPTOF(Float_t p) { fPmaxTOF=p; }
104
105
106 //
107 // Getters
108 //
109 Bool_t GetUsePid() const{ return fusePid; }
110 Int_t GetParticleSpecie() const { return fParticlePid; }
111 Float_t *GetPTPCBinLimits() const { return fPTPCBinLimits; }
112 Int_t GetNPTPCBins() const {return fnPTPCBins; }
113 Float_t *GetPTOFBinLimits() const { return fPTOFBinLimits; }
114 Int_t GetNPTOFBins() const { return fnPTOFBins; }
115
116
117 protected:
118
119 Bool_t IsVertexSelected(AliVEvent *event);
120 Bool_t CheckTPCPIDStatus(AliAODTrack *track) const;
121 Bool_t CheckTOFPIDStatus(AliAODTrack *track) const;
122
123 Bool_t fisAOD; // flag wether it is AOD:1 or ESD:0 analysis
124
125 Bool_t fIsPdgCode; // flag to check pdg code
126 Int_t fPdgCode; // particle pdg code
127
128 Float_t fEtaMin; // minimum eta cut
129 Float_t fEtaMax; // maximum eta cut
130 Float_t fYMin; // minimum Y cut
131 Float_t fYMax; // maximum Y cut
132 Float_t fPtMin; // minimum Pt cut
133 Float_t fPtMax; // maximum Pt cut
134 Bool_t fIsCharged; // check if particle is charged (MC level)
135
136 UInt_t fTriggerMask; // event trigger mask
137 Int_t fMinVtxType; // 0: not cut; 1: SPDZ; 2: SPD3D; 3: Tracks
138 Int_t fMinVtxContr; // minimum vertex contributors
139 Float_t fMaxVtxZ; // maximum |z| of primary vertex
140 Int_t fCutOnZVertexSPD; // 0: no cut, 1: |zvtx-SPD - zvtx-TPC|<0.5cm
141
142 Int_t fnClusITS; // minimum number of ITS clusters
143 Int_t fnClusTPC; // minimum number of TPC clusters
144 Int_t fnClusTOF; // minimum number of TOF clusters
145 Int_t fnClusMUON; // minimum number of MUON clusters
146
147 Bool_t fusePid; // flag to use or not Pid
148 Int_t fParticlePid; // integer to define the particle specie to check
149 //
150 Bool_t fuseTPCPid; // flag to use TPC Pid
151 Int_t fnPTPCBins; // "number of limits", that is fnPBins+1
152 Int_t fnPTPCBinLimits; // "number of limits", that is fnPBins+1
153 Float_t* fPTPCBinLimits; //[fnPTPCBinLimits] p bins
154 Float_t* fnSigmaTPC; //[fnPTPCBins]
155 Float_t fPmaxTPC; // maximum TPC P to use Pid
156 //
157 Bool_t fuseTOFPid; // flag to use TOF Pid
158 Int_t fnPTOFBins; // "number of limits", that is fnPBins+1
159 Int_t fnPTOFBinLimits; // "number of limits", that is fnPBins+1
160 Float_t* fPTOFBinLimits; //[fnPTOFBinLimits] p bins
161 Float_t* fnSigmaTOF; //[fnPTOFBins]
162 Float_t fPmaxTOF; // maximum TOF P to use Pid
163
164
165 ClassDef(AliSingleTrackEffCuts,1) // base class for cuts on AOD reconstructed heavy-flavour decays
166 };
167
168#endif