]>
Commit | Line | Data |
---|---|---|
734d2c12 | 1 | #ifndef ALIPROTONANALYSIS_H |
2 | #define ALIPROTONANALYSIS_H | |
3 | ||
4 | /* See cxx source for full Copyright notice */ | |
5 | ||
6 | ||
7 | /* $Id$ */ | |
8 | ||
9 | //------------------------------------------------------------------------- | |
10 | // Class AliProtonAnalysis | |
11 | // This is the class for the baryon (proton) analysis | |
12 | // | |
13 | // Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch | |
14 | //------------------------------------------------------------------------- | |
15 | ||
16 | #include <TObject.h> | |
ee4ca40d | 17 | #include "AliPID.h" |
734d2c12 | 18 | |
aafecd8b | 19 | class TF1; |
734d2c12 | 20 | class TH2F; |
21 | class TH1D; | |
ee4ca40d | 22 | class AliAODEvent; |
23 | class AliAODtrack; | |
734d2c12 | 24 | class AliESDEvent; |
25 | class AliESDtrack; | |
2b748670 | 26 | class AliExternalTrackParam; |
734d2c12 | 27 | |
28 | class AliProtonAnalysis : public TObject { | |
29 | public: | |
30 | AliProtonAnalysis(); | |
31 | AliProtonAnalysis(Int_t nbinsY, Float_t fLowY, Float_t fHighY, | |
32 | Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt); | |
33 | virtual ~AliProtonAnalysis(); | |
2b748670 | 34 | |
35 | void UseTPCOnly() {fUseTPCOnly = kTRUE;} | |
734d2c12 | 36 | |
37 | void InitHistograms(Int_t nbinsY, Float_t fLowY, Float_t fHighY, | |
38 | Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt); | |
2b748670 | 39 | Bool_t ReadFromFile(const char* filename); |
734d2c12 | 40 | void Analyze(AliESDEvent* fESD); |
ee4ca40d | 41 | void Analyze(AliAODEvent* fAOD); |
734d2c12 | 42 | |
43 | TH2F *GetProtonYPtHistogram() {return fHistYPtProtons;} | |
44 | TH2F *GetAntiProtonYPtHistogram() {return fHistYPtAntiProtons;} | |
45 | TH1D *GetProtonYHistogram(); | |
46 | TH1D *GetAntiProtonYHistogram(); | |
47 | TH1D *GetProtonPtHistogram(); | |
48 | TH1D *GetAntiProtonPtHistogram(); | |
49 | TH1D *GetYRatioHistogram(); | |
50 | TH1D *GetPtRatioHistogram(); | |
51 | TH1D *GetYAsymmetryHistogram(); | |
52 | TH1D *GetPtAsymmetryHistogram(); | |
53 | ||
54 | //Cut functions | |
55 | void SetMinTPCClusters(Int_t minTPCClusters) { | |
56 | fMinTPCClusters = minTPCClusters; | |
57 | fMinTPCClustersFlag = kTRUE; | |
58 | } | |
59 | void SetMinITSClusters(Int_t minITSClusters) { | |
60 | fMinITSClusters = minITSClusters; | |
61 | fMinITSClustersFlag = kTRUE; | |
62 | } | |
63 | void SetMaxChi2PerTPCCluster(Double_t maxChi2PerTPCCluster) { | |
64 | fMaxChi2PerTPCCluster = maxChi2PerTPCCluster; | |
65 | fMaxChi2PerTPCClusterFlag = kTRUE; | |
66 | } | |
67 | void SetMaxChi2PerITSCluster(Double_t maxChi2PerITSCluster) { | |
68 | fMaxChi2PerITSCluster = maxChi2PerITSCluster; | |
69 | fMaxChi2PerITSClusterFlag = kTRUE; | |
70 | } | |
71 | void SetMaxCov11(Double_t maxCov11) {fMaxCov11 = maxCov11; fMaxCov11Flag = kTRUE;} | |
72 | void SetMaxCov22(Double_t maxCov22) {fMaxCov22 = maxCov22; fMaxCov22Flag = kTRUE;} | |
73 | void SetMaxCov33(Double_t maxCov33) {fMaxCov33 = maxCov33; fMaxCov33Flag = kTRUE;} | |
74 | void SetMaxCov44(Double_t maxCov44) {fMaxCov44 = maxCov44; fMaxCov44Flag = kTRUE;} | |
75 | void SetMaxCov55(Double_t maxCov55) {fMaxCov55 = maxCov55; fMaxCov55Flag = kTRUE;} | |
76 | void SetMaxSigmaToVertex(Double_t maxSigmaToVertex) { | |
77 | fMaxSigmaToVertex = maxSigmaToVertex; | |
78 | fMaxSigmaToVertexFlag = kTRUE; | |
79 | } | |
80 | void SetITSRefit() {fITSRefitFlag = kTRUE;} | |
81 | void SetTPCRefit() {fTPCRefitFlag = kTRUE;} | |
82 | ||
83 | //Prior probabilities | |
ee4ca40d | 84 | void SetPriorProbabilities(Double_t *partFrac) {for(Int_t i = 0; i < AliPID::kSPECIESN; i++) fPartFrac[i] = partFrac[i];} |
aafecd8b | 85 | void SetPriorProbabilityFunctions(TF1 *felectron, TF1 *fmuon, TF1 *fpion, TF1 *fkaon, TF1 *fproton) { |
86 | fFunctionProbabilityFlag = kTRUE; | |
87 | fElectronFunction = felectron; | |
88 | fMuonFunction = fmuon; | |
89 | fPionFunction = fpion; | |
90 | fKaonFunction = fkaon; | |
91 | fProtonFunction = fproton; | |
92 | } | |
93 | Double_t GetParticleFraction(Int_t i, Double_t p); | |
94 | ||
734d2c12 | 95 | private: |
8b8b0b7a | 96 | AliProtonAnalysis(const AliProtonAnalysis&); // Not implemented |
97 | AliProtonAnalysis& operator=(const AliProtonAnalysis&); // Not implemented | |
98 | ||
734d2c12 | 99 | Bool_t IsAccepted(AliESDtrack *track); |
100 | Float_t GetSigmaToVertex(AliESDtrack* esdTrack); | |
2b748670 | 101 | Double_t Rapidity(Double_t Px, Double_t Py, Double_t Pz); |
734d2c12 | 102 | |
103 | Int_t fNBinsY; //number of bins in y | |
104 | Float_t fMinY, fMaxY; //min & max value of y | |
105 | Int_t fNBinsPt; //number of bins in pT | |
106 | Float_t fMinPt, fMaxPt; //min & max value of pT | |
107 | ||
108 | //cuts | |
109 | Int_t fMinTPCClusters, fMinITSClusters; //min TPC & ITS clusters | |
110 | Double_t fMaxChi2PerTPCCluster, fMaxChi2PerITSCluster; //max chi2 per TPC & ITS cluster | |
111 | Double_t fMaxCov11, fMaxCov22, fMaxCov33, fMaxCov44, fMaxCov55; //max values of cov. matrix | |
112 | Double_t fMaxSigmaToVertex; //max sigma to vertex cut | |
113 | Bool_t fMinTPCClustersFlag, fMinITSClustersFlag; //shows if this cut is used or not | |
114 | Bool_t fMaxChi2PerTPCClusterFlag, fMaxChi2PerITSClusterFlag; //shows if this cut is used or not | |
115 | Bool_t fMaxCov11Flag, fMaxCov22Flag, fMaxCov33Flag, fMaxCov44Flag, fMaxCov55Flag; //shows if this cut is used or not | |
116 | Bool_t fMaxSigmaToVertexFlag; //shows if this cut is used or not | |
117 | Bool_t fITSRefitFlag, fTPCRefitFlag; //shows if this cut is used or not | |
118 | ||
119 | //pid | |
aafecd8b | 120 | Bool_t fFunctionProbabilityFlag; //flag: kTRUE if functions used |
ee4ca40d | 121 | Double_t fPartFrac[10]; //prior probabilities |
aafecd8b | 122 | TF1 *fElectronFunction; //momentum dependence of the prior probs |
123 | TF1 *fMuonFunction; //momentum dependence of the prior probs | |
124 | TF1 *fPionFunction; //momentum dependence of the prior probs | |
125 | TF1 *fKaonFunction; //momentum dependence of the prior probs | |
126 | TF1 *fProtonFunction; //momentum dependence of the prior probs | |
127 | ||
2b748670 | 128 | //Detectors |
129 | Bool_t fUseTPCOnly; //kTRUE if TPC only information is used | |
130 | ||
aafecd8b | 131 | TH2F *fHistYPtProtons; //Y-Pt of Protons |
132 | TH2F *fHistYPtAntiProtons; // Y-Pt of Antiprotons | |
734d2c12 | 133 | |
134 | ClassDef(AliProtonAnalysis,0); | |
135 | }; | |
136 | ||
137 | #endif |