]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGPP/EVCHAR/AliCentralityBy1D.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGPP / EVCHAR / AliCentralityBy1D.h
1 #ifndef ALICENTRALITYBY1D_H
2 #define ALICENTRALITYBY1D_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6 /*   Origin: Alberica Toia, CERN, Alberica.Toia@cern.ch                   */
7
8 ///////////////////////////////////////////////////////////////////////////////
9 //                                                                           //
10 //  class to determine centrality percentiles from 1D distributions          // 
11 //                                                                           //
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #include "TObject.h"
15
16 class AliCentralityBy1D : public TObject {
17
18  public:
19   
20   AliCentralityBy1D();
21   virtual ~AliCentralityBy1D();
22
23   void SetInputFile(TString filename)                 { fInrootfilename = filename;   }
24   void SetOutputFile(TString filename)                { fOutrootfilename = filename;  }
25
26   void SetPercentileCrossSection(Float_t xsec)        { fPercentXsec = xsec;  }
27   void SetMultLowBound(Float_t mult )                 { fMultLowBound = mult; }
28
29   void AddHisto(TString name) { fHistnames.push_back(name); }
30   void MakePercentiles();
31
32  private:
33   TString fInrootfilename;          // input root file
34   TString fOutrootfilename;         // output root file
35   std::vector<TString> fHistnames;  // histogram names
36   
37   Float_t fPercentXsec;
38   Float_t fMultLowBound;
39
40   void  SaveHisto(TH1F *hist1, TH1F *hist2, TFile *outrootfile);
41
42   ClassDef(AliCentralityBy1D, 1)  
43 };
44 #endif
45
46