]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/SPECTRA/PiKaPr/TestAOD/AliSpectraAODHistoManager.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / PiKaPr / TestAOD / AliSpectraAODHistoManager.h
index 2fdc208b33b358d018abe0a08e2636a456c01145..8ae32a23861173fafbb6ce5b9382adf8d43ed4a4 100644 (file)
@@ -1,4 +1,3 @@
-
 #ifndef ALISPECTRAAODHISTOMANAGER_H
 #define ALISPECTRAAODHISTOMANAGER_H
 
 class AliAODEvent;
 class TH1F;
 class TH2F;
-class TList;
+class TH1;
+class TH2;
+//class TList;
 #include "TNamed.h"
+#include "TList.h"
 #include "Histograms.h" // Change this file if you want to add an histogram
-#include "HistogramNames.h"
+#include "HistogramNames.h" // generate this automatically running createNames.py 
 
 namespace AliSpectraNameSpace
 {
@@ -31,26 +33,23 @@ namespace AliSpectraNameSpace
      kSpKaon,
      kSpProton,
      kNSpecies,
+     kSpUndefined,
    }; // Particle species used in plotting
 
-   const char * kParticleSpecies[] =
-   {
-       "PionPlus",
-       "KaonPlus",
-       "ProtonPlus",
-       "PionMinus",
-       "KaonMinus",
-       "ProtonMinus",
-   };
+   extern const char * kParticleSpecies[];
 
    enum AODHistoType_t
    {
      kHistPtGenTruePrimary,
      kHistPtRecSigma,
+     kHistPtRecTrue,
      kHistPtRecTruePrimary,
      kHistPtRecSigmaPrimary,
      kHistPtRecSigmaSecondaryMaterial,
      kHistPtRecSigmaSecondaryWeakDecay,
+     kHistNSigTPC,
+     kHistNSigTOF,
+     kHistNSigTPCTOF,
      kNHistoTypes
    }; // Types of histos
 
@@ -68,20 +67,21 @@ using namespace AliSpectraNameSpace;
 class AliSpectraAODHistoManager : public TNamed
 {
 public:
-   AliSpectraAODHistoManager() :  TNamed(), fOutputList(0) {}
-   AliSpectraAODHistoManager(const char *name);
+   AliSpectraAODHistoManager() :  TNamed(), fOutputList(0), fNRebin(0) {}
+  AliSpectraAODHistoManager(const char *name,Int_t nrebin);
    virtual  ~AliSpectraAODHistoManager() {}
 
 
    TH2F*   BookPtGenHistogram(const char * name);
+   TH2F*   BookPtGenAllChHistogram(const char * name);
    TH2F*   BookPtRecHistogram(const char * name);
+   TH2F*   BookPtRecAllChHistogram(const char * name);
    TH2F*   BookPIDHistogram(const char * name);
    TH2F*   BookNSigHistogram(const char * name);
-   TH2F*   BookqVecHistogram(const char * name);
    TH1F*   GetPtHistogram1D(const char * name,Double_t minDCA,Double_t maxDCA);
    TH1F*   GetDCAHistogram1D(const char * name,Double_t minPt,Double_t maxPt);
    TH2*     GetHistogram(UInt_t id)      {      return (TH2*) fOutputList->At(id);   }
-  //   TH1*     GetHistogram(AODHistoType_t histoType, AODParticleSpecies_t particleType, UInt_t charge);
+   //   TH1*     GetHistogram(AODHistoType_t histoType, AODParticleSpecies_t particleType, UInt_t charge);
    TH1*     GetHistogram1D(UInt_t histoType, UInt_t particleType, UInt_t charge);
    TH2*     GetHistogram2D(UInt_t histoType, UInt_t particleType, UInt_t charge);
    TH2*     GetPtHistogram(UInt_t id)    {      return (TH2*) fOutputList->At(id);   }
@@ -93,21 +93,20 @@ public:
    TH2*     GetNSigHistogram(UInt_t id)   {      return (TH2*) fOutputList->At(id);   }
    TH2*     GetNSigHistogram(const char * name)  {      return (TH2*) fOutputList->FindObject(name);   }
    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
-   TH2*     GetqVecHistogram(UInt_t id)   {      return (TH2*) fOutputList->At(id);   }
-   TH2*     GetqVecHistogram(const char * name)  {      return (TH2*) fOutputList->FindObject(name);   }
-   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
-  
+
    //TH1F*   GetTH1F(UInt_t id)            {      return (TH1F*) GetPtHistogram(id);   }
    //TH2F*   GetTH2F(UInt_t id)            {      return (TH2F*) GetPIDHistogram(id);   }
 
   TList * GetOutputList() {return fOutputList;}
+  void    SetNRebin(Int_t nreb){fNRebin=nreb;}
+  Int_t   GetNRebin() {return fNRebin;}
 
   Long64_t Merge(TCollection* list);
 
 
 private:
    TList     *fOutputList;  // List of Pt Histo's
-
+   Int_t      fNRebin; //rebin of histos
    AliSpectraAODHistoManager(const AliSpectraAODHistoManager&);
    AliSpectraAODHistoManager& operator=(const AliSpectraAODHistoManager&);