]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/Nuclei/B2/AliLnSecondaries.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / Nuclei / B2 / AliLnSecondaries.h
1 #ifndef ALILNSECONDARIES_H
2 #define ALILNSECONDARIES_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 // removal of secondaries using DCA templates
8 // author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
9
10 #include <TObject.h>
11 #include <TString.h>
12
13 class TString;
14 class TH1D;
15 class TH2D;
16 class RooWorkspace;
17 class RooDataSet;
18 class RooRealVar;
19 class TF1;
20 class TFractionFitter;
21
22 class AliLnSecondaries: public TObject
23 {
24   public:
25         
26         AliLnSecondaries(const TString& particle, const TString& dataFilename, const TString& simuFilename, const TString& outputFilename, const TString& otag);
27         virtual ~AliLnSecondaries();
28         
29         const TString* GetOutputFilename() const { return &fOutputFilename; }
30         
31         Int_t Exec();
32         
33         void SetParticle(const TString& particle) { fParticle = particle; }
34         
35         void SetOutputTag(const TString& tag) { fOutputTag = tag; }
36         
37         void SetCorBins(Double_t min, Double_t max) { fPtMin = min; fPtMax = max; }
38         void SetDCAxyInterval(Double_t lowdca, Double_t hidca) { fMinDCAxy = lowdca; fMaxDCAxy = hidca; }
39         
40         void SetNBin(Int_t nbin) { fNbin = nbin; }
41         
42         void SetProcedure(Int_t prod) { fFracProc=prod; }
43         void SetAntiNucleusAsTemplate(Bool_t flag=1) { fANucTemplate = flag; }
44         void SetMatDCAxyModel(Int_t model) { fMatDCAxyMod = model; }
45         void SetScalingFactors(Double_t mat, Double_t fd) { fScMat=mat; fScFd=fd; }
46         
47         void SetAddFakeTracks(Bool_t flag=1) { fAddFakeTracks = flag; }
48         
49         enum { kTFractionFitter=0, kMonteCarlo };
50         enum { kGeantDCAxy=0, kFlatDCAxy };
51         
52   private:
53  
54         AliLnSecondaries(const AliLnSecondaries& other);
55         AliLnSecondaries& operator=(const AliLnSecondaries& other);
56         
57         void GetFraction(TH1D* hPrimPt) const;
58         void GetFraction(TH1D* hPrimFracPt, TH1D* hSecFracPt, const TH2D* hDCAxyPt, const TH2D* hMCDCAxyPt, const TH2D* hPrimDCAxyPt, const TH2D* hSecDCAxyPt, const TString& secName) const;
59         void GetFraction(TH1D* hFracPt[3], const TH2D* hDCAxyPt, const TH2D* hMCDCAxyPt, const TH2D* hPrimDCAxyPt, const TH2D* hMatDCAxyPt, const TH2D* hFdwnDCAxyPt) const;
60         
61         Int_t GetTFFfractions(Double_t* frac, Double_t* err, TH1D* hData, TH1D* hPrim, TH1D* hMat, TH1D* hFdwn, Int_t ibin) const;
62         Int_t GetTFFfractions(Double_t* frac, Double_t* err, TH1D* hData, TH1D* hPrim, TH1D* hSec, Int_t ibin, const TString& secName) const;
63         
64         TH2D* GetFlatDCAxyPt(Double_t norm, const TH2D* hDCAxyPt, const TString& name) const;
65         
66         TF1* GetMatFraction(const TString& name) const;
67         TF1* GetFdwnFraction(const TString& name) const;
68         
69         TH1D* ZeroClone(const TH1D* h, const TString& name) const;
70         void WriteTFFdebug(const TH1D* hData, TFractionFitter* fit, Int_t status, Int_t ibin, const char* contrib[], Double_t* frac, Int_t kmax) const;
71         
72   private:
73   
74         TString fParticle; // particle
75         
76         TString fDataFilename; // data filename
77         TString fSimuFilename; // simulation filename
78         TString fOutputFilename; // output filename
79         TString fOutputTag; // tag for the ouput
80         
81         Double_t fPtMin; // minimum pt value for the corrections
82         Double_t fPtMax ; // maximum pt value for the corrections
83         
84         Int_t fNbin; // for rebinning DCA distributions
85         
86         Double_t fMinDCAxy; // low DCAxy value
87         Double_t fMaxDCAxy; // high DCAxy value
88         
89         Int_t fFracProc;  // procedure for estimating the fractions
90         Int_t fMatDCAxyMod; // DCAxy model for secondaries from materials
91         Bool_t fANucTemplate; // enable antinucleus as template for primaries
92         
93         Double_t fScMat; // scaling factor for material fraction
94         Double_t fScFd; // scaling factor for feed-down fraction
95         
96         Bool_t fAddFakeTracks; // add fake tracks to the templates
97         
98         ClassDef(AliLnSecondaries,1)
99 };
100
101 #endif // ALILNSECONDARIES_H