1 #ifndef ALILNSECONDARIES_H
2 #define ALILNSECONDARIES_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 // removal of secondaries using DCA distributions
8 // author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
20 class TFractionFitter;
22 class AliLnSecondaries: public TObject
26 AliLnSecondaries(const TString& particle, const TString& dataFilename, const TString& simuFilename, const TString& outputFilename, const TString& otag);
27 virtual ~AliLnSecondaries();
29 const TString* GetOutputFilename() const { return &fOutputFilename; }
33 void SetParticle(const TString& particle) { fParticle = particle; }
35 void SetOutputTag(const TString& tag) { fOutputTag = tag; }
37 void SetCorBins(Int_t lowbin, Int_t hibin) { fLowBin = lowbin; fHiBin = hibin; }
38 void SetDCAxyInterval(Double_t lowdca, Double_t hidca) { fMinDCAxy = lowdca; fMaxDCAxy = hidca; }
40 void SetNBin(Int_t nbin) { fNbin = nbin; }
42 void SetProcedure(Int_t prod) { fFracProc=prod; }
43 void SetMatDCAxyModel(Int_t model) { fMatDCAxyMod = model; }
44 void SetScalingFactors(Double_t mat, Double_t fd) { fScMat=mat; fScFd=fd; }
46 enum { kTFractionFitter=0, kRooFit, kMonteCarlo };
47 enum { kGeantDCAxy=0, kFlatDCAxy, kGaussianDCAxy};
51 AliLnSecondaries(const AliLnSecondaries& other);
52 AliLnSecondaries& operator=(const AliLnSecondaries& other);
54 void GetFraction(TH1D* hPrimPt) const;
55 void GetFraction(TH1D* hPrimFracPt, TH1D* hSecFracPt, const TH2D* hDCAxyPt, const TH2D* hMCDCAxyPt, const TH2D* hPrimDCAxyPt, const TH2D* hSecDCAxyPt, const TString& secName) const;
56 void GetFraction(TH1D* hFracPt[3], const TH2D* hDCAxyPt, const TH2D* hMCDCAxyPt, const TH2D* hPrimDCAxyPt, const TH2D* hMatDCAxyPt, const TH2D* hFdwnDCAxyPt) const;
58 Int_t GetTFFfractions(Double_t* frac, Double_t* err, TH1D* hData, TH1D* hPrim, TH1D* hMat, TH1D* hFdwn, Int_t ibin) const;
59 Int_t GetTFFfractions(Double_t* frac, Double_t* err, TH1D* hData, TH1D* hPrim, TH1D* hSec, Int_t ibin, const char* secName) const;
61 void GetRooFitFractions(Double_t* frac, Double_t* err, const TH1D* hData, const TH1D* hPrim, const TH1D* hSec, Int_t ibin, const char* sec) const;
62 void GetRooFitFractions(Double_t* frac, Double_t* err, const TH1D* hData, const TH1D* hPrim, const TH1D* hMat, const TH1D* hFdwn, Int_t ibin) const;
64 TH2D* GetFlatDCAxyPt(Double_t norm, const TH2D* hDCAxyPt, const TString& name) const;
65 //TH2D* GetGaussianDCAxyPt(Double_t norm, Double_t mean, Double_t sigma, const TH2D* hDCAxyPt, const char* name) const;
67 TF1* GetMatFraction(const TString& name) const;
68 TF1* GetFdwnFraction(const TString& name) const;
70 TH1D* ZeroClone(TH1D* h, const char* name) const;
71 void WriteTFFdebug(TH1D* hData, TFractionFitter* fit, Int_t status, Int_t ibin, const char* contrib[], Double_t* frac, Int_t kmax) const;
75 TString fParticle; // particle
77 TString fDataFilename; // data filename
78 TString fSimuFilename; // simulation filename
79 TString fOutputFilename; // output filename
80 TString fOutputTag; // tag for the ouput
82 Int_t fLowBin; // low bin for the corrections
83 Int_t fHiBin ; // high bin for the corrections
85 Int_t fNbin; // for rebinning DCA distributions
87 Double_t fMinDCAxy; // low DCAxy value
88 Double_t fMaxDCAxy; // high DCAxy value
90 Int_t fFracProc; // procedure for estimating the fractions
91 Int_t fMatDCAxyMod; // DCAxy model for secondaries from materials
93 Double_t fScMat; // scaling factor for material fraction
94 Double_t fScFd; // scaling factor for feed-down fraction
96 ClassDef(AliLnSecondaries,1)
99 #endif // ALILNSECONDARIES_H