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