]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FASTSIM/AliMUONFastTracking.h
Redefinition of ptMin and ptMax corrrected.
[u/mrichter/AliRoot.git] / FASTSIM / AliMUONFastTracking.h
1 #ifndef ALIMUONFASTTRACKING
2 #define ALIMUONFASTTRACKING
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7 class TF1;
8 class TSpline3;
9 class TFile;
10 class AliMUONFastTrackingEntry;
11
12
13 #include <TObject.h>
14
15 enum LUTClusterType {kOld, kNew};
16
17 class AliMUONFastTracking :  public TObject {
18  public:
19     static  AliMUONFastTracking* Instance();
20     ~AliMUONFastTracking(){;}
21     void Init(Float_t bkg);
22     void ReadLUT(TFile *file);
23     void GetBinning(Int_t &nbinp, Float_t &pmin, Float_t &pmax,
24                     Int_t &nbintheta, Float_t &thetamin, Float_t &thetamax,
25                     Int_t &nbinphi, Float_t &phimin, Float_t &phimax);
26     void GetIpIthetaIphi(Float_t p, Float_t theta, Float_t phi, Int_t charge,
27                          Int_t &ip, Int_t &itheta, Int_t &iphi);
28     void GetSplit(Int_t ip, Int_t itheta, Int_t &nSplitP, Int_t &nSplitTheta);
29     Float_t Efficiency(Float_t p, Float_t theta, Float_t phi, Int_t charge);
30     Float_t Acceptance(Float_t p, Float_t theta, Float_t phi, Int_t charge);
31     Float_t MeanP(Float_t p, Float_t theta, Float_t phi, Int_t charge);
32     Float_t SigmaP(Float_t p, Float_t theta, Float_t phi, Int_t charge);
33     Float_t Sigma1P(Float_t p, Float_t theta, Float_t phi, Int_t charge);
34     Float_t NormG2(Float_t p, Float_t theta, Float_t phi, Int_t charge);
35     Float_t MeanG2(Float_t p, Float_t theta, Float_t phi, Int_t charge);
36     Float_t SigmaG2(Float_t p, Float_t theta, Float_t phi, Int_t charge);
37     Float_t MeanTheta(Float_t p, Float_t theta, Float_t phi, Int_t charge);
38     Float_t SigmaTheta(Float_t p, Float_t theta, Float_t phi, Int_t charge);  
39     Float_t MeanPhi(Float_t p, Float_t theta, Float_t phi, Int_t charge);
40     Float_t SigmaPhi(Float_t p, Float_t theta, Float_t phi, Int_t charge);
41
42     void SetSpline();
43     Float_t GetBackground() {return fBkg;}
44     void SetLUTClusterFinder(LUTClusterType clusterFinder) { fClusterFinder = clusterFinder;}
45     void SetBackground(Float_t bkg);
46     void UseSpline (Int_t splineSwitch=1) {fSpline = splineSwitch;}
47     TF1* GetFitP(Int_t ip, Int_t itheta, Int_t iphi); 
48  private:
49     AliMUONFastTracking();
50     AliMUONFastTracking(Float_t bkg){;}
51  protected:
52     Int_t   fNentries;
53     Int_t   fNbinp; 
54     Float_t fPmin;
55     Float_t fPmax;
56     Float_t fDeltaP;
57     Int_t   fNbintheta;
58     Float_t fThetamin;
59     Float_t fThetamax;
60     Float_t fDeltaTheta;
61     Int_t   fNbinphi;
62     Float_t fPhimin;
63     Float_t fPhimax;
64     Float_t fDeltaPhi;
65     Int_t   fPrintLevel;
66     Float_t fBkg;
67     TF1 *fFitp[20][20][20];                    // func for psmear-pgen distr
68     AliMUONFastTrackingEntry *fEntry[20][20][20][4]; // array of LUT parameters
69     AliMUONFastTrackingEntry *fCurrentEntry[20][20][20]; // array of LUT parameters
70  public:
71     TSpline3 *fSplineEff[200][3];                 // spline funcs for efficiency
72     TSpline3 *fSplineAcc[200][3];                 // spline funcs for acceptance
73     TSpline3 *fSplineSigmap[200][3];              // 
74     TSpline3 *fSplineSigma1p[200][3];             //!
75     TSpline3 *fSplineSigmatheta[200][3];          //!
76     TSpline3 *fSplineSigmaphi[200][3];            //!
77  protected: 
78     Int_t fSpline;
79     LUTClusterType fClusterFinder; 
80     static AliMUONFastTracking*    fgMUONFastTracking; //!Pointer to single instance
81     ClassDef(AliMUONFastTracking,1)                    // Fast MUON Tracking Data Handler
82 };
83
84 #endif
85