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