1 #ifndef ALISPECTRABOTHHISTOMANAGER_H
2 #define ALISPECTRABOTHHISTOMANAGER_H
4 /* See cxx source for full Copyright notice */
6 //-------------------------------------------------------------------------
7 // AliSpectraBothHistoManager
12 // Authors: Michele Floris, CERN, Philip Versteeg, UU, Redmer Bertens, UU
13 //-------------------------------------------------------------------------
24 #include "HistogramsBoth.h" // Change this file if you want to add an histogram
25 #include "HistogramNamesBoth.h" // generate this automatically running createNames.py
27 namespace AliSpectraNameSpaceBoth
31 enum BothParticleSpecies_t
38 }; // Particle species used in plotting
40 //extern const char * kParticleSpecies[];
44 kHistPtGenTruePrimary,
47 kHistPtRecTruePrimary,
49 kHistPtRecSigmaPrimary,
50 kHistPtRecSigmaSecondaryMaterial,
51 kHistPtRecSigmaSecondaryWeakDecay,
67 using namespace AliSpectraNameSpaceBoth;
69 class AliSpectraBothHistoManager : public TNamed
72 AliSpectraBothHistoManager() : TNamed(), fOutputList(0), fNRebin(0) {}
73 AliSpectraBothHistoManager(const char *name,Int_t nrebin,Bool_t pidqa=kTRUE);
74 virtual ~AliSpectraBothHistoManager() ;
77 TH2F* BookPtGenHistogram(const char * name);
78 TH2F* BookPtGenAllChHistogram(const char * name);
79 TH2F* BookPtRecHistogram(const char * name);
80 TH2F* BookPtRecAllChHistogram(const char * name);
81 TH2F* BookPIDHistogram(const char * name);
82 TH2F* BookNSigHistogram(const char * name);
83 TH2F* BookGenMulvsRawMulHistogram(const char * name);
84 TH2F* BookDoubleCountsHistogram(const char * name);
85 TH1F* BookEventStatHist(); // due to zip bug in merging it is good to store in one list everything
87 TH1F* GetPtHistogram1D(const char * name,Double_t minDCA,Double_t maxDCA);
88 TH1F* GetDCAHistogram1D(const char * name,Double_t minPt,Double_t maxPt);
89 TH2* GetHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
90 // TH1* GetHistogram(BothHistoType_t histoType, BothParticleSpecies_t particleType, UInt_t charge);
91 TH1* GetHistogram1D(UInt_t histoType, UInt_t particleType, UInt_t charge);
92 TH2* GetHistogram2D(UInt_t histoType, UInt_t particleType, UInt_t charge);
93 TH2* GetPtHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
94 TH2* GetPtHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
95 TH2* GetPtHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistNameBoth[id]); } // Use this if you want to read a file saved with a different histo list
96 TH2* GetPIDHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
97 TH2* GetPIDHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
98 TH2* GetPIDHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistNameBoth[id]); }// Use this if you want to read a file saved with a different histo list
99 TH2* GetNSigHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
100 TH2* GetNSigHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
101 TH2* GetNSigHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistNameBoth[id]); }// Use this if you want to read a file saved with a different histo list
102 TH2* GetqVecHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
103 TH2* GetqVecHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
104 TH2* GetqVecHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistNameBoth[id]); }// Use this if you want to read a file saved with a different histo list
105 TH2* GetGenMulvsRawMulHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
106 TH2* GetGenMulvsRawMulHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistNameBoth[id]); }// Use this if you want to read a file saved with a different histo list
107 TH1F* GetEventStatHist() { return (TH1F*) fOutputList->FindObject("EventStatHisto"); }
108 //TH1F* GetTH1F(UInt_t id) { return (TH1F*) GetPtHistogram(id); }
109 //TH2F* GetTH2F(UInt_t id) { return (TH2F*) GetPIDHistogram(id); }
111 TList * GetOutputList() {return fOutputList;}
112 void SetNRebin(Int_t nreb){fNRebin=nreb;}
113 Int_t GetNRebin() {return fNRebin;}
115 Long64_t Merge(TCollection* list);
119 TList *fOutputList; // List of Pt Histo's
120 Int_t fNRebin; //rebin of histos
121 AliSpectraBothHistoManager(const AliSpectraBothHistoManager&);
122 AliSpectraBothHistoManager& operator=(const AliSpectraBothHistoManager&);
124 ClassDef(AliSpectraBothHistoManager, 2);