adding proper destructors and some small changes in analysis macro
[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
8bb435b0 34 AliSpectraBothTrackCuts() : TNamed(), fIsSelected(0), fTrackBits(0), fMinTPCcls(0), fEtaCutMin(0), fEtaCutMax(0),fDCACut(0) ,fPCut(0), fPtCut(0),fYCutMax(0),fYCutMin(0), fPtCutTOFMatching(0),fAODtrack(0), fHashitinSPD1(0),fusedadditionalcuts(kTRUE),
35fHistoCuts(0), fHistoNSelectedPos(0), fHistoNSelectedNeg(0), fHistoNMatchedPos(0), fHistoNMatchedNeg(0), fHistoEtaPhiHighPt(0), fHistoNclustersITS(0),fTrack(0),fCuts(0) {}
239a080a 36
37 AliSpectraBothTrackCuts(const char *name);
8fda510f 38 virtual ~AliSpectraBothTrackCuts();
239a080a 39
40 Bool_t IsSelected(AliVTrack * track,Bool_t FillHistStat);
41
42 void SetTrackType(UInt_t bit);
43 Bool_t CheckTrackType();
44 Bool_t CheckTrackCuts();
45 Bool_t CheckEtaCut();
46 Bool_t CheckYCut(BothParticleSpecies_t specie); // not included in standard cuts
47 Bool_t CheckDCACut();
48 Bool_t CheckPCut();
49 Bool_t CheckPtCut();
50 Bool_t CheckTOFMatching(Bool_t FillHistStat);
51 void PrintCuts() const;
52
53 UInt_t GetTrackType() const { return fTrackBits;}
54 TH1I * GetHistoCuts() { return fHistoCuts; }
55 TH1F * GetHistoNSelectedPos() { return fHistoNSelectedPos; }
56 TH1F * GetHistoNSelectedNeg() { return fHistoNSelectedNeg; }
57 TH1F * GetHistoNMatchedPos() { return fHistoNMatchedPos; }
58 TH1F * GetHistoNMatchedNeg() { return fHistoNMatchedNeg; }
59 TH2F * GetHistoEtaPhiHighPt() { return fHistoEtaPhiHighPt; }
60 TH1F * GetHistoNclustersITS() {return fHistoNclustersITS;}
61 void SetEta(Float_t etamin,Float_t etamax) { fEtaCutMin = etamin;fEtaCutMax = etamax; }
62 void SetDCA(Float_t dca) { fDCACut = dca; }
63 void SetP(Float_t p) { fPCut = p; }
64 void SetPt(Float_t pt) { fPtCut = pt; }
b3ea73e1 65 void SetY(Float_t ymax,Float_t ymin) { fYCutMax = ymax;fYCutMin=ymin;}
239a080a 66 void SetPtTOFMatching(Float_t pt) { fPtCutTOFMatching = pt; }
67 void SetTrackBits(UInt_t TrackBits) {fTrackBits=TrackBits;}
68 void SetMinTPCcls(UInt_t MinTPCcls) {fMinTPCcls=MinTPCcls;}
69 void SetHashitinSPD1 (Bool_t value) {fHashitinSPD1=value;}
8bb435b0 70 void SetUsedAdditionalCuts (Bool_t value) {fusedadditionalcuts=value;}
239a080a 71 Float_t GetEtaMin() const { return fEtaCutMin; }
72 Float_t GetEtaMax() const { return fEtaCutMax; }
b3ea73e1 73 Float_t GetYMax() const { return fYCutMax; }
74 Float_t GetYMin() const { return fYCutMin; }
75 Float_t GetY() const { return 0.5*(fYCutMax-fYCutMin); }
239a080a 76 Float_t GetDCA() const { return fDCACut; }
77 Float_t GetP() const { return fPCut; }
78 Float_t GetPt() const { return fPtCut; }
79 Float_t GetPtTOFMatching() const { return fPtCutTOFMatching; }
80 Long64_t Merge(TCollection* list);
81 void SetAliESDtrackCuts(AliESDtrackCuts* cuts ){fCuts=cuts;}
82
83 private:
84
85 Bool_t fIsSelected; // True if cuts are selected
86 UInt_t fTrackBits; // Type of track to be used
87 UInt_t fMinTPCcls; // min number of clusters in the TPC
88 Float_t fEtaCutMin; // Allowed absolute maximum value of Eta
89 Float_t fEtaCutMax; // Allowed absolute maximum value of Eta
90 Float_t fDCACut; // Maximum value of DCA
91 Float_t fPCut; // Maximum value of P
92 Float_t fPtCut; // Maximum value of Pt
b3ea73e1 93 Float_t fYCutMax; // Maximum value of Y
94 Float_t fYCutMin; // Minimum value of Y
239a080a 95 Float_t fPtCutTOFMatching; // TOF Matching
96 Int_t fAODtrack; // 0 ESD track connected , 1 AOD track conected , else nothing
8bb435b0 97 Bool_t fHashitinSPD1; // Check if SPD1 has a hit
98 Bool_t fusedadditionalcuts; //If set to true the TPCrefit, ITSrefit, SPDany and Ncluster cut is check
239a080a 99 TH1I *fHistoCuts; // Cuts statistics
100 TH1F *fHistoNSelectedPos; // Selected positive tracks
101 TH1F *fHistoNSelectedNeg; // Selected negative tracks
102 TH1F *fHistoNMatchedPos; // Matched positive tracks
103 TH1F *fHistoNMatchedNeg; // Matched negative tracks
104 TH2F *fHistoEtaPhiHighPt; // EtaPhi distr at high pt (>1.5 GeV/c)
8bb435b0 105 TH1F *fHistoNclustersITS; // Number of clusters in ITS
106
107
239a080a 108 AliVTrack *fTrack; //! Track pointer
109 AliESDtrackCuts *fCuts; //! cuts
110 static const char * kBinLabel[]; // labels of stat histo
111
112
113 AliSpectraBothTrackCuts(const AliSpectraBothTrackCuts&);
114 AliSpectraBothTrackCuts& operator=(const AliSpectraBothTrackCuts&);
115
8bb435b0 116 ClassDef(AliSpectraBothTrackCuts, 5);
239a080a 117};
118#endif
119