]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/Nuclei/B2/AliLnDriver.h
B2 analysis code
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / Nuclei / B2 / AliLnDriver.h
1 #ifndef ALILNDRIVER_H
2 #define ALILNDRIVER_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 // driver for computing the pt and spectra
8 // author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
9
10 #include <TObject.h>
11 #include <TString.h>
12
13 class TString;
14 class TFileMerger;
15
16 class AliLnDriver: public TObject
17 {
18   public:
19         
20         AliLnDriver();
21         virtual ~AliLnDriver();
22         
23         void MakePtCorr() const;
24         void MakePt() const;
25         void MakeRatio() const;
26         void MakeSpectra() const;
27         
28         void PrintFilenames() const;
29         
30         Int_t Run() const;
31         
32         TString GetSpecies() const { return fSpecies; }
33         TString GetOutputTag() const { return fOutputTag; }
34         TString GetOutputCorrTag() const { return fOutputCorTag; }
35         
36         TString GetPtCorrDebugFilename() const { return fOutputPtCorrDebug; }
37         TString GetPtDebugFilename() const { return fOutputPtDebug; }
38         
39         void SetInputFilenames(const TString& data, const TString& simu, const TString& simuFix, const TString& ptcorr);
40         void SetOutputFilenames(const TString& pt, const TString& ratio, const TString& spectra);
41         void SetDebugFilenames(const TString& corrdebug, const TString& ptdebug) { fOutputPtCorrDebug = corrdebug; fOutputPtDebug = ptdebug; }
42         
43         void SetSpecies(const TString& species) { fSpecies = species; }
44         
45         void SetOutputTag(const TString& tag) { fOutputTag = tag; }
46         void SetOutputCorTag(const TString& tag) { fOutputCorTag = tag; }
47         
48         void SetTriggerEfficiency(Double_t eff[3]);
49         void SetInelXSection(Double_t xsec[3]);
50         void SetNormalizeToINEL(Bool_t flag=1) { fNormToInel = flag; }
51         void SetOnlyGeneration(Bool_t flag=1) { fIsOnlyGen = flag; }
52         
53         void SetMakeCorrections(Bool_t flag=1) { fMakeCorr = flag; }
54         void SetMakePt(Bool_t flag=1) { fMakePt = flag; }
55         void SetMakeRatio(Bool_t flag=1) { fMakeRatio = flag; }
56         void SetMakeSpectra(Bool_t flag=1) { fMakeSpectra = flag; }
57         void SetMakeStats(Bool_t flag=1) { fMakeStats = flag; }
58         
59         void SetRapidityInterval(Double_t ymin, Double_t ymax) { fYMin = ymin; fYMax = ymax; }
60         
61         void SetPtBinInterval(Int_t lowbin, Int_t hibin) { fLowPtBin = lowbin; fHighPtBin = hibin; }
62         void SetM2BinInterval(Int_t lowbin, Int_t hibin) { fLowM2Bin = lowbin; fHighM2Bin = hibin; }
63         void SetM2BkgInterval(Double_t min, Double_t max) { fMinM2Bkg = min; fMaxM2Bkg = max; }
64         void SetM2TPCInterval(Double_t min, Double_t max) { fMinM2tpc = min; fMaxM2tpc = max; }
65         void SetPidM2(Bool_t flag=1) { fPidM2 = flag; }
66         void SetUnfolding(Bool_t flag=1, Int_t niter=4) { fUnfolding = flag; fNIter=niter; }
67         void SetFakeTracks(Bool_t flag=1) { fFakeTracks = flag; }
68         void SetSecondaries(Bool_t flag=1) { fSecondaries = flag; }
69         void SetSecProd(Int_t prod) { fSecProd = prod; }
70         void SetMatDCAxyModel(Int_t model=1) { fMatDCAxyMod = model; }
71         void SetNBin(Int_t nbin) { fNbin = nbin; }
72         void SetDCAxyInterval(Double_t dcamin, Double_t dcamax) { fMinDCAxy = dcamin; fMaxDCAxy = dcamax; }
73         void SetEfficiency(Bool_t flag=1, Bool_t g3Fluka=0) { fEfficiency = flag; fG3Fluka=g3Fluka; }
74         void SetScalingFactors(Double_t mat, Double_t fd) { fScMat=mat; fScFd=fd; }
75         
76         void SetVertexCorrection(Bool_t flag=1, Double_t val=1) { fVtxCorr = flag; fVtxCorrVal=val; }
77         void SetFitFractionCorr(Bool_t flag=1) { fFitFrac=flag; }
78         void SetSameFeedDownCorr(Bool_t flag=1) { fSameFdwn = flag; }
79         
80         void SetSysErr( Double_t pos, Double_t neg) { fSysPos = pos; fSysNeg = neg; }
81         
82   private:
83  
84         AliLnDriver(const AliLnDriver& other);
85         AliLnDriver& operator=(const AliLnDriver& other);
86         
87   private:
88  
89         TString fSpecies;       // particle species
90         TString fOutputTag;     // tag for output file
91         TString fOutputCorTag;        // tag for correction file
92         
93         Double_t fTrigEff[3];   // trigger efficiency, stat. and syst. errors
94         Double_t fXsec[3];      // total inelastic cross section, stat. and syst. errors
95         Bool_t  fIsOnlyGen;     // if it is only generation
96         Bool_t  fNormToInel;    // normalize to inelastic events
97         
98         Bool_t  fMakeCorr;      // make corrections
99         Bool_t  fMakePt;        // make pt
100         Bool_t  fMakeRatio;     // make antiparticle/particle ratio
101         Bool_t  fMakeSpectra;   // make spectra
102         Bool_t  fMakeStats;     // make event stats
103         
104         Int_t    fLowPtBin;     // low pt bin
105         Int_t    fHighPtBin;    // high pt bin
106         Bool_t   fPidM2;        // enable m2 pid correction
107         Int_t    fLowM2Bin;     // low m2 bin for pid contamination
108         Int_t    fHighM2Bin;    // high m2 bin for pid contamination
109         Bool_t   fUnfolding;    // unfolding correction
110         Int_t    fNIter;        // number of iterations for Bayesian unfolding
111         Bool_t   fFakeTracks;   // fake tracks correction
112         Bool_t   fSecondaries;  // correction of secondaries
113         Int_t    fSecProd;      // procedure for estimating fractions
114         Int_t    fMatDCAxyMod;  // DCAxy model for correction of secondaries
115         Int_t    fNbin;         // rebin of DCAxy distribution
116         Double_t fYMin;         // min rapidity
117         Double_t fYMax;         // max rapidity
118         Double_t fMinDCAxy;     // min DCAxy
119         Double_t fMaxDCAxy;     // max DCAxy
120         Double_t fMinM2Bkg;     // min M2 for removing background
121         Double_t fMaxM2Bkg;     // max M2 for removing background
122         Double_t fMinM2tpc;     // min M2 for integration
123         Double_t fMaxM2tpc;     // max M2 for integration
124         Bool_t   fEfficiency;   // efficiency correction
125         Bool_t   fG3Fluka;      // enable G3/Fluka correction
126         Double_t fScMat;        // scaling factor for material fraction
127         Double_t fScFd;         // scaling factor for feed-down fraction
128         
129         Double_t fSysPos;       // variation for positives
130         Double_t fSysNeg;       // variation for negatives
131         
132         TString fInputData;     // input data filename
133         TString fInputSimu;     // input simulation filename
134         TString fInputSimuFix;  // input fixed simulation filename
135         
136         TString fOutputPtCorr;  // output filename for pt corrections
137         TString fOutputPt;      // output filename for pt
138         TString fOutputRatio;   // output filename for antiparticle/particle ratio
139         TString fOutputSpectra; // output filename for differential yields
140         
141         TString fOutputPtCorrDebug; // output filename for debugging pt corrections
142         TString fOutputPtDebug;     // output filename for debugging pt
143         
144         Bool_t fFitFrac;        // fit for fraction of secondaries
145         Bool_t fSameFdwn;       // same feed-down correction for positives and negatives
146         Bool_t fVtxCorr;        // enable vertex correction from simulation
147         Double_t fVtxCorrVal;   // vertex correction value
148         
149         ClassDef(AliLnDriver,3)
150 };
151
152 #endif // ALILNDRIVER_H