]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/SPECTRA/AliProtonQAAnalysis.h
2D correlation plots for the PID efficiency
[u/mrichter/AliRoot.git] / PWG2 / SPECTRA / AliProtonQAAnalysis.h
CommitLineData
3e6c06f4 1#ifndef ALIPROTONQAANALYSIS_H
2#define ALIPROTONQAANALYSIS_H
3
4/* See cxx source for full Copyright notice */
5
6
7/* $Id: AliProtonQAAnalysis.h 29114 2008-10-03 16:49:02Z pchrist $ */
8
9//-------------------------------------------------------------------------
10// Class AliProtonQAAnalysis
11// This is the class for the baryon (proton) analysis
12//
dd3fa486 13// Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch
3e6c06f4 14//-------------------------------------------------------------------------
15
16#include "TObject.h"
3e6c06f4 17#include "TList.h"
9c0b9f24 18#include "TArrayI.h"
3e6c06f4 19
3e6c06f4 20class TF1;
3e6c06f4 21class TH1F;
d4733690 22class TH3F;
3e6c06f4 23
73aba974 24class AliPID;
3e6c06f4 25class AliESDEvent;
26class AliESDtrack;
27class AliStack;
75decd62 28class AliGenEventHeader;
6667f3a7 29class AliESDVertex;
4042c3a2 30class AliMCEvent;
e7df5638 31class AliProtonAnalysisBase;
3e6c06f4 32
33class AliProtonQAAnalysis : public TObject {
34 public:
35 AliProtonQAAnalysis();
36 virtual ~AliProtonQAAnalysis();
37
73aba974 38 void SetBaseAnalysis(AliProtonAnalysisBase *const baseAnalysis) {
e7df5638 39 fProtonAnalysisBase = baseAnalysis;}
73aba974 40 AliProtonAnalysisBase *GetProtonAnalysisBaseObject() const {
e7df5638 41 return fProtonAnalysisBase;}
3e6c06f4 42
75decd62 43 //Vertex QA
44 void RunVertexQA(AliGenEventHeader *header,
45 AliStack *stack,
46 AliESDEvent *esd);
73aba974 47 TList *GetVertexQAList() const {return fQAVertexList;}
75decd62 48
9c0b9f24 49 //QA histograms
50 void SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY,
51 Int_t nbinsPt, Double_t minPt, Double_t maxPt);
6667f3a7 52 void RunQAAnalysis(AliStack *stack,
53 AliESDEvent *esd,
54 const AliESDVertex *vertex);
9c0b9f24 55 void SetRunQAAnalysis();
73aba974 56 TList *GetGlobalQAList() const {return fGlobalQAList;}
9c0b9f24 57
58 //Efficiency plots (reconstruction & PID)
c20898de 59 void RunReconstructionEfficiencyAnalysis(AliMCEvent *mcEvent,
60 AliESDEvent *esd,
61 const AliESDVertex *vertex);
62 void RunPIDEfficiencyAnalysis(AliStack *stack,
d488527a 63 AliESDEvent *esd,
64 const AliESDVertex *vertex);
6667f3a7 65 void RunEfficiencyAnalysis(AliStack *stack,
66 AliESDEvent *esd,
67 const AliESDVertex *vertex);
dd3fa486 68 void SetRunEfficiencyAnalysis(Bool_t gUseCuts) {
e13bbda6 69 fRunEfficiencyAnalysis = kTRUE;
e13bbda6 70 fUseCutsInEfficiency = gUseCuts;
71 }
73aba974 72 TList *GetEfficiencyQAList() const {return fEfficiencyList;}
9c0b9f24 73
d4733690 74 //MC analysis
75 void RunMCAnalysis(AliStack* stack);
76 void SetRunMCAnalysis() {fRunMCAnalysis = kTRUE;}
5b8133c7 77 void SetMCProcessId(Int_t id) {
78 fMCProcessIdFlag = kTRUE;
79 fMCProcessId = id;
80 }
81 void SetMotherParticlePDGCode(Int_t pdgCode) {
82 fMotherParticlePDGCodeFlag = kTRUE;
83 fMotherParticlePDGCode = pdgCode;
84 }
73aba974 85 TList *GetPDGList() const {return fPDGList;}
86 TList *GetMCProcessesList() const {return fMCProcessesList;}
d4733690 87
73aba974 88 TList *GetAcceptedCutList() const {return fAcceptedCutList;}
89 TList *GetRejectedCutList() const {return fRejectedCutList;}
90 TList *GetAcceptedDCAList() const {return fAcceptedDCAList;}
91 TList *GetRejectedDCAList() const {return fRejectedDCAList;}
5b8133c7 92
3e6c06f4 93 private:
94 AliProtonQAAnalysis(const AliProtonQAAnalysis&); // Not implemented
9c0b9f24 95 AliProtonQAAnalysis& operator=(const AliProtonQAAnalysis&);// Not implemented
3e6c06f4 96
75decd62 97 void InitVertexQA();
9c0b9f24 98 void InitQA();
d4733690 99 void InitMCAnalysis();
5b8133c7 100 void InitCutLists();
9c0b9f24 101 void InitEfficiencyAnalysis();
e7df5638 102 void FillQA(AliStack *stack,
103 AliESDEvent *esd,
104 const AliESDVertex *vertex,
105 AliESDtrack* track);
106
9c0b9f24 107 Bool_t IsLabelUsed(TArrayI array, Int_t label);
73aba974 108 Int_t ConvertPDGToInt(Int_t pdgCode) const;
3e6c06f4 109
e7df5638 110 AliProtonAnalysisBase *fProtonAnalysisBase;//base analysis object
dd3fa486 111
112 Int_t fNBinsY; //number of bins in eta or y
113 Float_t fMinY, fMaxY; //min & max value of eta or y
3e6c06f4 114 Int_t fNBinsPt; //number of bins in pT
115 Float_t fMinPt, fMaxPt; //min & max value of pT
116
3e6c06f4 117 //QA histograms
118 //Bool_t fQAHistograms; //Boolean to activate the QA histograms
119 TList *fGlobalQAList; //TList storing the directories for the QA histograms
75decd62 120 TList *fQAVertexList; //TList storing the vertex QA plots
3e6c06f4 121 TList *fQA2DList; //TList storing the accepted primary/secondary (anti)protons
122 TList *fQAPrimaryProtonsAcceptedList; //list of the QA histos for accepted primary protons
123 TList *fQAPrimaryProtonsRejectedList; //list of the QA histos for rejected primary protons
124 TList *fQASecondaryProtonsAcceptedList; //list of the QA histos for accepted secondary protons
125 TList *fQASecondaryProtonsRejectedList; //list of the QA histos for rejected secondary protons
126 TList *fQAPrimaryAntiProtonsAcceptedList; //list of the QA histos for accepted primary antiprotons
127 TList *fQAPrimaryAntiProtonsRejectedList; //list of the QA histos for rejected primary antiprotons
128 TList *fQASecondaryAntiProtonsAcceptedList; //list of the QA histos for accepted secondary antiprotons
129 TList *fQASecondaryAntiProtonsRejectedList; //list of the QA histos for rejected secondary antiprotons
130
d4733690 131 //MC analysis
132 TList *fPDGList; //list with the 3D histograms: y-pt-pdg (anti)protons
133 TList *fMCProcessesList; //list with the MC processes for every secondary (anti)proton
134 Bool_t fRunMCAnalysis; //run this part or not
5b8133c7 135 Bool_t fMCProcessIdFlag; //flag to see if we should check the process id
136 UInt_t fMCProcessId; //process id based on the TMCProcess
137 Bool_t fMotherParticlePDGCodeFlag; //flag to see if we should check the pdg code of the mother particle
138 Int_t fMotherParticlePDGCode; //pdg code of the mother particle
139
140 TList *fAcceptedCutList;// list of the cut parameters' histograms
141 TList *fRejectedCutList;// list of the cut parameters' histograms
142 TList *fAcceptedDCAList;// list of the DCA histograms
143 TList *fRejectedDCAList;// list of the DCA histograms
d4733690 144
9c0b9f24 145 //Efficiency (reconstruction & PID)
146 Bool_t fRunEfficiencyAnalysis; //run this part or not
e13bbda6 147 Bool_t fUseCutsInEfficiency;//use the cuts in the reco and pid efficiency
148
9c0b9f24 149 TList *fEfficiencyList;// list of the efficiency histograms
150
e7df5638 151 ClassDef(AliProtonQAAnalysis,1);
3e6c06f4 152};
153
154#endif