]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/PiKaPr/TestAOD/AliSpectraAODHistoManager.h
Added possibility to do cut on TPCnSigma and rapidity in the task.
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / PiKaPr / TestAOD / AliSpectraAODHistoManager.h
1
2 #ifndef ALISPECTRAAODHISTOMANAGER_H
3 #define ALISPECTRAAODHISTOMANAGER_H
4
5 /*  See cxx source for full Copyright notice */
6
7 //-------------------------------------------------------------------------
8 //                      AliSpectraAODHistoManager
9 //
10 //
11 //
12 //
13 // Authors: Michele Floris, CERN, Philip Versteeg, UU, Redmer Bertens, UU
14 //-------------------------------------------------------------------------
15
16 class AliAODEvent;
17 class TH1F;
18 class TH2F;
19 class TH1;
20 class TH2;
21 //class TList;
22 #include "TNamed.h"
23 #include "TList.h"
24 #include "Histograms.h" // Change this file if you want to add an histogram
25 #include "HistogramNames.h"
26
27 namespace AliSpectraNameSpace
28 {
29
30    
31    enum AODParticleSpecies_t
32    {
33      kSpPion,
34      kSpKaon,
35      kSpProton,
36      kNSpecies,
37      kSpUndefined,
38    }; // Particle species used in plotting
39
40    const char * kParticleSpecies[] =
41    {
42        "PionPlus",
43        "KaonPlus",
44        "ProtonPlus",
45        "PionMinus",
46        "KaonMinus",
47        "ProtonMinus",
48    };
49
50    enum AODHistoType_t
51    {
52      kHistPtGenTruePrimary,
53      kHistPtRecSigma,
54      kHistPtRecTruePrimary,
55      kHistPtRecSigmaPrimary,
56      kHistPtRecSigmaSecondaryMaterial,
57      kHistPtRecSigmaSecondaryWeakDecay,
58      kHistNSigTPC,
59      kHistNSigTOF,
60      kHistNSigTPCTOF,
61      kNHistoTypes
62    }; // Types of histos
63
64    enum AODCharge_t
65    {
66        kChPos = 0,
67        kChNeg,
68        kNCharge
69    };
70
71 }
72
73 using namespace AliSpectraNameSpace;
74
75 class AliSpectraAODHistoManager : public TNamed
76 {
77 public:
78    AliSpectraAODHistoManager() :  TNamed(), fOutputList(0) {}
79    AliSpectraAODHistoManager(const char *name);
80    virtual  ~AliSpectraAODHistoManager() {}
81
82
83    TH2F*   BookPtGenHistogram(const char * name);
84    TH2F*   BookPtRecHistogram(const char * name);
85    TH2F*   BookPIDHistogram(const char * name);
86    TH2F*   BookNSigHistogram(const char * name);
87    TH2F*   BookqVecHistogram(const char * name);
88    TH1F*   GetPtHistogram1D(const char * name,Double_t minDCA,Double_t maxDCA);
89    TH1F*   GetDCAHistogram1D(const char * name,Double_t minPt,Double_t maxPt);
90    TH2*     GetHistogram(UInt_t id)      {      return (TH2*) fOutputList->At(id);   }
91   //   TH1*     GetHistogram(AODHistoType_t histoType, AODParticleSpecies_t particleType, UInt_t charge);
92    TH1*     GetHistogram1D(UInt_t histoType, UInt_t particleType, UInt_t charge);
93    TH2*     GetHistogram2D(UInt_t histoType, UInt_t particleType, UInt_t charge);
94    TH2*     GetPtHistogram(UInt_t id)    {      return (TH2*) fOutputList->At(id);   }
95    TH2*     GetPtHistogram(const char * name)   {      return (TH2*) fOutputList->FindObject(name);   }
96    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   
97    TH2*     GetPIDHistogram(UInt_t id)   {      return (TH2*) fOutputList->At(id);   }
98    TH2*     GetPIDHistogram(const char * name)  {      return (TH2*) fOutputList->FindObject(name);   }
99    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
100    TH2*     GetNSigHistogram(UInt_t id)   {      return (TH2*) fOutputList->At(id);   }
101    TH2*     GetNSigHistogram(const char * name)  {      return (TH2*) fOutputList->FindObject(name);   }
102    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
103    TH2*     GetqVecHistogram(UInt_t id)   {      return (TH2*) fOutputList->At(id);   }
104    TH2*     GetqVecHistogram(const char * name)  {      return (TH2*) fOutputList->FindObject(name);   }
105    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
106   
107    //TH1F*   GetTH1F(UInt_t id)            {      return (TH1F*) GetPtHistogram(id);   }
108    //TH2F*   GetTH2F(UInt_t id)            {      return (TH2F*) GetPIDHistogram(id);   }
109
110   TList * GetOutputList() {return fOutputList;}
111
112   Long64_t Merge(TCollection* list);
113
114
115 private:
116    TList     *fOutputList;  // List of Pt Histo's
117
118    AliSpectraAODHistoManager(const AliSpectraAODHistoManager&);
119    AliSpectraAODHistoManager& operator=(const AliSpectraAODHistoManager&);
120
121    ClassDef(AliSpectraAODHistoManager, 1);
122
123 };
124 #endif
125