]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/Nuclei/B2/AliLnSpectra.h
1c84c2e3e92b5038356e90f0bd398300d225f57b
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / Nuclei / B2 / AliLnSpectra.h
1 #ifndef ALILNSPECTRA_H
2 #define ALILNSPECTRA_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 // invariant differential yields and cross sections
8 // author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
9
10 #include <TObject.h>
11
12 class TGraphErrors;
13 class TF1;
14
15 class AliLnSpectra: public TObject
16 {
17   public:
18         
19         AliLnSpectra(const TString& particle, const TString& ptFilename, const TString& tag, const TString& outputFilename, const TString& otag, const Double_t xsec[3]);
20         
21         virtual ~AliLnSpectra();
22         
23         TGraphErrors* GetDiffYieldPt(const TH1D* hPt, Int_t nEvent, const TString& name) const;
24         TGraphErrors* GetInvDiffYieldPt(const TH1D* hPt, Int_t nEvent, const TString& name) const;
25         TGraphErrors* GetInvDiffYieldPt(const TGraphErrors* grDYieldPt, const TString& name) const;
26         TGraphErrors* GetInvDiffXsectionPt(const TGraphErrors* grInvDYieldPt, const Double_t* sigma, const TString& name) const;
27         
28         TGraphErrors* AddSystError(const TGraphErrors* gr, Double_t percent, const TString& name) const;
29         
30         Int_t Exec();
31         
32         void SetRapidityInterval(Double_t ymin, Double_t ymax) { fYMin = ymin; fYMax = ymax; }
33         void SetNormalizeToINEL(Bool_t flag=1) { fNormToInel = flag; }
34         
35         void SetOnlyGeneration(Bool_t flag=1) { fIsOnlyGen = flag; }
36         
37         void SetScalingFactor(Double_t syserr=1) { fSysErr = syserr; }
38         
39         void SetInelXSection(Double_t xsec, Double_t statErr, Double_t systErr) { fInelXsec[0] = xsec; fInelXsec[1] = statErr; fInelXsec[2] = systErr; }
40         
41         TF1* Tsallis(Double_t m0, const TString& name, Double_t xmin=0., Double_t xmax=10.) const;
42         TF1* Tsallis(Double_t m0, Double_t xsect, const TString& name, Double_t xmin=0., Double_t xmax=10.) const;
43         TF1* TsallisDiffYield(Double_t m0, const TString& name, Double_t xmin=0., Double_t xmax=10.) const;
44         
45   private:
46  
47         AliLnSpectra(const AliLnSpectra& other);
48         AliLnSpectra& operator=(const AliLnSpectra& other);
49         
50   private:
51  
52         TString fParticle; // particle name
53         
54         TString fPtFilename; // pt filename
55         TString fTag; // tag for pt file
56         
57         TString fOutputFilename; // output filename
58         TString fOutputTag; // tag for output file
59         
60         Double_t fYMin; // rapidity low limit
61         Double_t fYMax; // rapidity high limit
62         
63         Bool_t fNormToInel; // normalize to inelastic events
64         Bool_t fIsOnlyGen; // if no need for correction
65         
66         Double_t fSysErr; // variation for systematics
67         Double_t fInelXsec[3]; // total inelastic cross section, syst. and stat. errors (mb)
68         
69         ClassDef(AliLnSpectra,1)
70 };
71
72 #endif // ALILNSPECTRA_H