]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/SPECTRA/PiKaPr/TestAOD/AliSpectraAODHistoManager.h
Coverity fix 20210
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / PiKaPr / TestAOD / AliSpectraAODHistoManager.h
CommitLineData
c88234ad 1#ifndef ALISPECTRAAODHISTOMANAGER_H
2#define ALISPECTRAAODHISTOMANAGER_H
3
4/* See cxx source for full Copyright notice */
5
6//-------------------------------------------------------------------------
7// AliSpectraAODHistoManager
8//
9//
10//
11//
12// Authors: Michele Floris, CERN, Philip Versteeg, UU, Redmer Bertens, UU
13//-------------------------------------------------------------------------
14
15class AliAODEvent;
16class TH1F;
17class TH2F;
e8b0fe64 18class TH1;
19class TH2;
20//class TList;
c88234ad 21#include "TNamed.h"
e8b0fe64 22#include "TList.h"
4290905b 23#include "Histograms.h" // Change this file if you want to add an histogram
c13dd339 24#include "HistogramNames.h" // generate this automatically running createNames.py
c88234ad 25
26namespace AliSpectraNameSpace
27{
c88234ad 28
823864bf 29
c88234ad 30 enum AODParticleSpecies_t
31 {
c79cb435 32 kSpPion,
33 kSpKaon,
34 kSpProton,
35 kNSpecies,
e8b0fe64 36 kSpUndefined,
c88234ad 37 }; // Particle species used in plotting
38
c13dd339 39 extern const char * kParticleSpecies[];
c79cb435 40
c88234ad 41 enum AODHistoType_t
42 {
c79cb435 43 kHistPtGenTruePrimary,
44 kHistPtRecSigma,
6da07d74 45 kHistPtRecTrue,
c79cb435 46 kHistPtRecTruePrimary,
47 kHistPtRecSigmaPrimary,
48 kHistPtRecSigmaSecondaryMaterial,
49 kHistPtRecSigmaSecondaryWeakDecay,
e8b0fe64 50 kHistNSigTPC,
51 kHistNSigTOF,
52 kHistNSigTPCTOF,
c79cb435 53 kNHistoTypes
c88234ad 54 }; // Types of histos
55
c79cb435 56 enum AODCharge_t
57 {
58 kChPos = 0,
59 kChNeg,
60 kNCharge
61 };
62
c88234ad 63}
64
65using namespace AliSpectraNameSpace;
66
67class AliSpectraAODHistoManager : public TNamed
68{
69public:
10a8ccbe 70 AliSpectraAODHistoManager() : TNamed(), fOutputList(0), fNRebin(0) {}
71 AliSpectraAODHistoManager(const char *name,Int_t nrebin);
c88234ad 72 virtual ~AliSpectraAODHistoManager() {}
73
74
823864bf 75 TH2F* BookPtGenHistogram(const char * name);
194d6dce 76 TH2F* BookPtGenAllChHistogram(const char * name);
823864bf 77 TH2F* BookPtRecHistogram(const char * name);
194d6dce 78 TH2F* BookPtRecAllChHistogram(const char * name);
c88234ad 79 TH2F* BookPIDHistogram(const char * name);
823864bf 80 TH2F* BookNSigHistogram(const char * name);
81 TH2F* BookqVecHistogram(const char * name);
82 TH1F* GetPtHistogram1D(const char * name,Double_t minDCA,Double_t maxDCA);
83 TH1F* GetDCAHistogram1D(const char * name,Double_t minPt,Double_t maxPt);
84 TH2* GetHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
00493191 85 // TH1* GetHistogram(AODHistoType_t histoType, AODParticleSpecies_t particleType, UInt_t charge);
c79cb435 86 TH1* GetHistogram1D(UInt_t histoType, UInt_t particleType, UInt_t charge);
87 TH2* GetHistogram2D(UInt_t histoType, UInt_t particleType, UInt_t charge);
823864bf 88 TH2* GetPtHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
89 TH2* GetPtHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
90 TH2* GetPtHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistName[id]); } // Use this if you want to read a file saved with a different histo list
c88234ad 91 TH2* GetPIDHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
92 TH2* GetPIDHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
93 TH2* GetPIDHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistName[id]); }// Use this if you want to read a file saved with a different histo list
823864bf 94 TH2* GetNSigHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
95 TH2* GetNSigHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
96 TH2* GetNSigHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistName[id]); }// Use this if you want to read a file saved with a different histo list
97 TH2* GetqVecHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
98 TH2* GetqVecHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
99 TH2* GetqVecHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistName[id]); }// Use this if you want to read a file saved with a different histo list
100
101 //TH1F* GetTH1F(UInt_t id) { return (TH1F*) GetPtHistogram(id); }
102 //TH2F* GetTH2F(UInt_t id) { return (TH2F*) GetPIDHistogram(id); }
c88234ad 103
104 TList * GetOutputList() {return fOutputList;}
10a8ccbe 105 void SetNRebin(Int_t nreb){fNRebin=nreb;}
106 Int_t GetNRebin() {return fNRebin;}
c88234ad 107
108 Long64_t Merge(TCollection* list);
109
110
111private:
112 TList *fOutputList; // List of Pt Histo's
10a8ccbe 113 Int_t fNRebin; //rebin of histos
c88234ad 114 AliSpectraAODHistoManager(const AliSpectraAODHistoManager&);
115 AliSpectraAODHistoManager& operator=(const AliSpectraAODHistoManager&);
116
117 ClassDef(AliSpectraAODHistoManager, 1);
118
119};
120#endif
121