]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGDQ/dielectron/AliDielectronBtoJPSItoEleCDFfitHandler.h
Add Muon Corrections
[u/mrichter/AliRoot.git] / PWGDQ / dielectron / AliDielectronBtoJPSItoEleCDFfitHandler.h
CommitLineData
c683985a 1#ifndef ALIDIELECTRONBTOJPSITOELECDFFITHANDLER_H
2#define ALIDIELECTRONBTOJPSITOELECDFFITHANDLER_H
3/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6//___________________________________________________________________________
7// Class AliDielectronBtoJPSItoEleCDFfitHandler
8// Class to perform unbinned log-likelihood fit
9//
10// Origin: C. Di Giglio
11// Contact: Carmelo.Digiglio@ba.infn.it; Giuseppe.Bruno@ba.infn.it
12//____________________________________________________________________________
13
14#include <TNamed.h>
15#include <TBits.h>
16#include <TGraph.h>
17#include <TFitter.h>
18
19class AliDielectronBtoJPSItoEleCDFfitFCN ;
20
21class AliDielectronBtoJPSItoEleCDFfitHandler : public TNamed {
22 public:
23 //
24 AliDielectronBtoJPSItoEleCDFfitHandler();
25 AliDielectronBtoJPSItoEleCDFfitHandler& operator= (const AliDielectronBtoJPSItoEleCDFfitHandler& c);
26 AliDielectronBtoJPSItoEleCDFfitHandler(const AliDielectronBtoJPSItoEleCDFfitHandler& c);
27 AliDielectronBtoJPSItoEleCDFfitHandler(Double_t* decaytime, Double_t* invariantmass, Double_t *pt, Int_t *type, Int_t ncand);
28 ~AliDielectronBtoJPSItoEleCDFfitHandler();
29 Double_t Up() const { return fUp; }
30 void SetErrorDef(Double_t up) {fUp = up;}
31 void SetPrintStatus(Bool_t okPrintStatus) { fPrintStatus = okPrintStatus; }
32 Bool_t GetPrintStatus() const { return fPrintStatus ; }
33 void SetParamStartValues (Double_t*);
34 Double_t* GetStartParamValues() { return fParamStartValues; }
35 TBits GetFixedParamList() const { return fIsParamFixed; }
36 TFitter *GetFitter() const {return fitter;}
37 Double_t GetParameter(Int_t numPar) const {return fitter->GetParameter(numPar);}
38 Double_t GetParameterError(Int_t numPar) const {return fitter->GetParError(numPar);}
39
40 void FixParam(UInt_t param, Bool_t value) { fIsParamFixed.SetBitNumber(param,value); }
41 void FixAllParam(Bool_t value) { for(UInt_t par=0;par<49;par++) fIsParamFixed.SetBitNumber(par,value); }
42 Bool_t IsParamFixed(UInt_t param) { return fIsParamFixed.TestBitNumber(param); }
43 void SetResolutionConstants(Double_t* resolutionConst, Int_t type);
44 void SetCrystalBallFunction(Bool_t okCB);
45 void SetExponentialFunction(Bool_t okEpx);
46 void SetMassWndHigh(Double_t limit);
47 void SetMassWndLow(Double_t limit);
48
49 Double_t operator()(const Double_t* par) const ;
50 void CdfFCN(Int_t & /* npar */, Double_t * /* gin */, Double_t &f, Double_t *par, Int_t /* iflag */);
51
52 Double_t* Decaytime() const { return fX; }
53 Double_t* InvariantMass() const { return fM; }
54 Double_t* TransverseMom() const { return fPt; }
55 Int_t* TypeCand() const { return fType;}
56 AliDielectronBtoJPSItoEleCDFfitFCN* LikelihoodPointer() const { return fLikely; }
57 Int_t DoMinimization(Int_t step = 0);
58
59
60 private:
61 //
62 TBits fIsParamFixed; //array of bits: 0 = param free; 1 = param fixed;
63 Bool_t fPrintStatus; //flag to enable the prit out of the algorithm at each step
64 Double_t fParamStartValues[49]; //array of parameters input value
65 Double_t fUp; //error definition
66 Double_t* fX; //pseudo-proper decay time X
67 Double_t* fM; //invariant mass M
68 Double_t* fPt; //invariant mass M
69 Int_t* fType; //candidate type
70 AliDielectronBtoJPSItoEleCDFfitFCN* fLikely; //Log likelihood function
71 Int_t fNcand; //number of candidates
72 TGraph* fContPlot1; //contour plot
73 TGraph* fContPlot2; //contour plot
74 TGraph* fContPlot3; //contour plot
75 TFitter *fitter; //pointer to TFitter object
76 //
77 ClassDef(AliDielectronBtoJPSItoEleCDFfitHandler,1);
78
79};
80#endif