Adding the code for a spectra task which can run on ESD and AOD files
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / PiKaPr / TestAOD / AliSpectraBothTrackCuts.h
CommitLineData
239a080a 1#ifndef ALISPECTRABOTHTRACKCUTS_H
2#define ALISPECTRABOTHTRACKCUTS_H
3
4/* See cxx source for full Copyright notice */
5
6//-------------------------------------------------------------------------
7// AliSpectraBothTrackCuts
8//
9//
10//
11//
12// Authors: Michele Floris, CERN, Philip Versteeg, UU, Redmer Bertens, UU
13//-------------------------------------------------------------------------
14
15class AliAODEvent;
16//class AliSpectraBothHistoManager;
17class TH1I;
18class AliAODMCParticle;
19class AliAODTrack;
20class AliESDtrackCuts;
21#include "AliSpectraBothHistoManager.h"
22#include "TNamed.h"
23#include "AliESDtrackCuts.h"
24
25using namespace AliSpectraNameSpaceBoth;
26
27class AliSpectraBothTrackCuts : public TNamed
28{
29 public:
30
31 enum { kTrkBit = 0, kTrkCuts, kTrkEta, kTrkDCA, kTrkP, kTrkPt,kTrkPtTOF,kTOFMatching,kTrTOFout,kTrTIME,kTrTOFpid,kAccepted,kNTrkCuts};
32 enum {kAODobject=0,kESDobject,kotherobject};
33
34 AliSpectraBothTrackCuts() : TNamed(), fIsSelected(0), fTrackBits(0), fMinTPCcls(0), fEtaCutMin(0), fEtaCutMax(0),fDCACut(0) ,fPCut(0), fPtCut(0),fYCut(0), fPtCutTOFMatching(0),fAODtrack(0), fHashitinSPD1(0),fHistoCuts(0), fHistoNSelectedPos(0), fHistoNSelectedNeg(0), fHistoNMatchedPos(0), fHistoNMatchedNeg(0), fHistoEtaPhiHighPt(0), fHistoNclustersITS(0),fTrack(0),fCuts(0) {}
35
36 AliSpectraBothTrackCuts(const char *name);
37 virtual ~AliSpectraBothTrackCuts() {} // To be implemented
38
39 Bool_t IsSelected(AliVTrack * track,Bool_t FillHistStat);
40
41 void SetTrackType(UInt_t bit);
42 Bool_t CheckTrackType();
43 Bool_t CheckTrackCuts();
44 Bool_t CheckEtaCut();
45 Bool_t CheckYCut(BothParticleSpecies_t specie); // not included in standard cuts
46 Bool_t CheckDCACut();
47 Bool_t CheckPCut();
48 Bool_t CheckPtCut();
49 Bool_t CheckTOFMatching(Bool_t FillHistStat);
50 void PrintCuts() const;
51
52 UInt_t GetTrackType() const { return fTrackBits;}
53 TH1I * GetHistoCuts() { return fHistoCuts; }
54 TH1F * GetHistoNSelectedPos() { return fHistoNSelectedPos; }
55 TH1F * GetHistoNSelectedNeg() { return fHistoNSelectedNeg; }
56 TH1F * GetHistoNMatchedPos() { return fHistoNMatchedPos; }
57 TH1F * GetHistoNMatchedNeg() { return fHistoNMatchedNeg; }
58 TH2F * GetHistoEtaPhiHighPt() { return fHistoEtaPhiHighPt; }
59 TH1F * GetHistoNclustersITS() {return fHistoNclustersITS;}
60 void SetEta(Float_t etamin,Float_t etamax) { fEtaCutMin = etamin;fEtaCutMax = etamax; }
61 void SetDCA(Float_t dca) { fDCACut = dca; }
62 void SetP(Float_t p) { fPCut = p; }
63 void SetPt(Float_t pt) { fPtCut = pt; }
64 void SetY(Float_t y) { fYCut = y;}
65 void SetPtTOFMatching(Float_t pt) { fPtCutTOFMatching = pt; }
66 void SetTrackBits(UInt_t TrackBits) {fTrackBits=TrackBits;}
67 void SetMinTPCcls(UInt_t MinTPCcls) {fMinTPCcls=MinTPCcls;}
68 void SetHashitinSPD1 (Bool_t value) {fHashitinSPD1=value;}
69 Float_t GetEtaMin() const { return fEtaCutMin; }
70 Float_t GetEtaMax() const { return fEtaCutMax; }
71 Float_t GetY() const { return fYCut; }
72 Float_t GetDCA() const { return fDCACut; }
73 Float_t GetP() const { return fPCut; }
74 Float_t GetPt() const { return fPtCut; }
75 Float_t GetPtTOFMatching() const { return fPtCutTOFMatching; }
76 Long64_t Merge(TCollection* list);
77 void SetAliESDtrackCuts(AliESDtrackCuts* cuts ){fCuts=cuts;}
78
79 private:
80
81 Bool_t fIsSelected; // True if cuts are selected
82 UInt_t fTrackBits; // Type of track to be used
83 UInt_t fMinTPCcls; // min number of clusters in the TPC
84 Float_t fEtaCutMin; // Allowed absolute maximum value of Eta
85 Float_t fEtaCutMax; // Allowed absolute maximum value of Eta
86 Float_t fDCACut; // Maximum value of DCA
87 Float_t fPCut; // Maximum value of P
88 Float_t fPtCut; // Maximum value of Pt
89 Float_t fYCut; // Maximum value of Y
90 Float_t fPtCutTOFMatching; // TOF Matching
91 Int_t fAODtrack; // 0 ESD track connected , 1 AOD track conected , else nothing
92 Bool_t fHashitinSPD1; // Check if SPD1 has a hit
93 TH1I *fHistoCuts; // Cuts statistics
94 TH1F *fHistoNSelectedPos; // Selected positive tracks
95 TH1F *fHistoNSelectedNeg; // Selected negative tracks
96 TH1F *fHistoNMatchedPos; // Matched positive tracks
97 TH1F *fHistoNMatchedNeg; // Matched negative tracks
98 TH2F *fHistoEtaPhiHighPt; // EtaPhi distr at high pt (>1.5 GeV/c)
99 TH1F *fHistoNclustersITS; // Number of clusters in ITS
100 AliVTrack *fTrack; //! Track pointer
101 AliESDtrackCuts *fCuts; //! cuts
102 static const char * kBinLabel[]; // labels of stat histo
103
104
105 AliSpectraBothTrackCuts(const AliSpectraBothTrackCuts&);
106 AliSpectraBothTrackCuts& operator=(const AliSpectraBothTrackCuts&);
107
108 ClassDef(AliSpectraBothTrackCuts, 3);
109};
110#endif
111