]>
Commit | Line | Data |
---|---|---|
572b0139 | 1 | #ifndef ALIDIELECTRONSIGNALFUNC_H |
2 | #define ALIDIELECTRONSIGNALFUNC_H | |
3 | ||
4 | /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | //############################################################# | |
8 | //# # | |
9 | //# Class AliDielectronSignalFunc # | |
10 | //# # | |
11 | //# Authors: # | |
12 | //# Anton Andronic, GSI / A.Andronic@gsi.de # | |
13 | //# Ionut C. Arsene, GSI / I.C.Arsene@gsi.de # | |
14 | //# Julian Book, Uni Ffm / Julian.Book@cern.ch # | |
15 | //# Frederick Kramer, Uni Ffm, / Frederick.Kramer@cern.ch # | |
16 | //# Magnus Mager, CERN / Magnus.Mager@cern.ch # | |
17 | //# WooJin J. Park, GSI / W.J.Park@gsi.de # | |
18 | //# Jens Wiechula, Uni HD / Jens.Wiechula@cern.ch # | |
19 | //# # | |
20 | //############################################################# | |
21 | ||
22 | #include <TVectorT.h> | |
23 | #include <TString.h> | |
bc75eeb5 | 24 | #include <TH1F.h> |
572b0139 | 25 | |
37a6f270 | 26 | #include "AliDielectronSignalExt.h" |
572b0139 | 27 | |
37a6f270 | 28 | class AliDielectronSignalFunc : public AliDielectronSignalExt { |
572b0139 | 29 | public: |
30 | AliDielectronSignalFunc(); | |
31 | AliDielectronSignalFunc(const char*name, const char* title); | |
bc75eeb5 | 32 | AliDielectronSignalFunc(const AliDielectronSignalFunc &c); |
33 | AliDielectronSignalFunc &operator=(const AliDielectronSignalFunc &c); | |
572b0139 | 34 | |
35 | virtual ~AliDielectronSignalFunc(); | |
36 | ||
572b0139 | 37 | virtual void Process(TObjArray * const arrhist); |
bc75eeb5 | 38 | void ProcessFit(TObjArray * const arrhist); // fit the SE +- distribution |
37a6f270 | 39 | void ProcessFitLS(TObjArray * const arrhist); // substract the fitted SE like-sign background |
40 | void ProcessFitEM(TObjArray * const arrhist); // substract the fitted SE+ME like-sign background | |
e43f22fb | 41 | |
37a6f270 | 42 | // void SetMCSignalShape(TH1F* hist) { fgHistSimPM=hist; } |
bc75eeb5 | 43 | void SetUseIntegral(Bool_t flag=kTRUE) {fUseIntegral = flag;}; |
44 | void SetFunctions(TF1 * const combined, TF1 * const sig=0, TF1 * const back=0, Int_t parM=1, Int_t parMres=2); | |
e43f22fb | 45 | void CombineFunc(TF1 * const peak=0, TF1 * const bgnd=0); |
bc75eeb5 | 46 | void SetFitOption(const char* opt) { |
47 | fFitOpt=opt; | |
48 | fFitOpt.ToLower(); | |
49 | if(!fFitOpt.Contains("s")) fFitOpt += "s"; | |
50 | } | |
572b0139 | 51 | void SetDefaults(Int_t type); |
bc75eeb5 | 52 | |
3505bfad | 53 | TF1* GetSignalFunction() const { return fFuncSignal; } |
54 | TF1* GetBackgroundFunction() const { return fFuncBackground; } | |
55 | TF1* GetCombinedFunction() const { return fFuncSigBack; } | |
572b0139 | 56 | |
37a6f270 | 57 | // Int_t GetPolDeg() const { return fPolDeg; } |
e43f22fb | 58 | Int_t GetDof() const { return fDof; } |
5720c765 | 59 | Double_t GetChi2Dof() const { return fChi2Dof; } |
60 | ||
572b0139 | 61 | virtual void Draw(const Option_t* option = ""); |
8df8e382 | 62 | |
e43f22fb | 63 | // peak functions |
64 | static Double_t PeakFunMC(const Double_t *x, const Double_t *par); // peak function from a mc histo | |
65 | static Double_t PeakFunCB(const Double_t *x, const Double_t *par); // crystal ball function | |
66 | static Double_t PeakFunGaus(const Double_t *x, const Double_t *par); // gaussian | |
67 | ||
37a6f270 | 68 | protected: |
69 | ||
e43f22fb | 70 | static Double_t PeakBgndFun(const Double_t *x, const Double_t *par); // combine any bgrd and any peak function |
71 | ||
72 | static TF1 *fFuncSignal; // Function for the signal description | |
73 | static TF1 *fFuncBackground; // Function for the background description | |
bc75eeb5 | 74 | TF1 *fFuncSigBack; // Combined function signal plus background |
75 | Int_t fParMass; // the index of the parameter corresponding to the resonance mass | |
76 | Int_t fParMassWidth; // the index of the parameter corresponding to the resonance mass width | |
572b0139 | 77 | |
bc75eeb5 | 78 | TString fFitOpt; // fit option used |
79 | Bool_t fUseIntegral; // use the integral of the fitted functions to extract signal and background | |
572b0139 | 80 | |
37a6f270 | 81 | // Int_t fPolDeg; // polynomial degree of the background function |
e43f22fb | 82 | Int_t fDof; // degrees of freedom |
5720c765 | 83 | Double_t fChi2Dof; // chi2/dof of the fitted inv mass spectra |
e43f22fb | 84 | |
85 | static Int_t fNparPeak; // number of parameters for peak function | |
86 | static Int_t fNparBgnd; // number of parameters for background function | |
87 | ||
37a6f270 | 88 | // static TH1F* fgHistSimPM; // simulated peak shape |
5720c765 | 89 | |
927480a1 | 90 | ClassDef(AliDielectronSignalFunc,3) // class for signal extraction using a combined bgrd+signal fit |
572b0139 | 91 | }; |
92 | ||
572b0139 | 93 | #endif |