]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FASTSIM/AliMUONFastTracking.h
MUON specific classes added.
[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 class AliMUONFastTracking :  public TObject {
16  public:
17     static  AliMUONFastTracking* Instance();
18     ~AliMUONFastTracking(){;}
19     void Init(Float_t bkg);
20     void ReadLUT(TFile *file);
21     void GetBinning(Int_t &nbinp, Float_t &pmin, Float_t &pmax,
22                     Int_t &nbintheta, Float_t &thetamin, Float_t &thetamax,
23                     Int_t &nbinphi, Float_t &phimin, Float_t &phimax);
24     void GetIpIthetaIphi(Float_t p, Float_t theta, Float_t phi, Int_t charge,
25                          Int_t &ip, Int_t &itheta, Int_t &iphi);
26     void GetSplit(Int_t ip, Int_t itheta, Int_t &nSplitP, Int_t &nSplitTheta);
27     Float_t Efficiency(Float_t p, Float_t theta, Float_t phi, Int_t charge);
28     Float_t Acceptance(Float_t p, Float_t theta, Float_t phi, Int_t charge);
29     Float_t MeanP(Float_t p, Float_t theta, Float_t phi, Int_t charge);
30     Float_t SigmaP(Float_t p, Float_t theta, Float_t phi, Int_t charge);
31     Float_t Sigma1P(Float_t p, Float_t theta, Float_t phi, Int_t charge);
32     Float_t NormG2(Float_t p, Float_t theta, Float_t phi, Int_t charge);
33     Float_t MeanG2(Float_t p, Float_t theta, Float_t phi, Int_t charge);
34     Float_t SigmaG2(Float_t p, Float_t theta, Float_t phi, Int_t charge);
35     Float_t MeanTheta(Float_t p, Float_t theta, Float_t phi, Int_t charge);
36     Float_t SigmaTheta(Float_t p, Float_t theta, Float_t phi, Int_t charge);  
37     Float_t MeanPhi(Float_t p, Float_t theta, Float_t phi, Int_t charge);
38     Float_t SigmaPhi(Float_t p, Float_t theta, Float_t phi, Int_t charge);
39
40     void SetSpline();
41     Float_t GetBackground() {return fBkg;}
42     void SetBackground(Float_t bkg);
43     void UseSpline (Int_t splineSwitch=1) {fSpline = splineSwitch;}
44     void SmearMuon(Float_t pgen, Float_t thetagen, Float_t phigen, Int_t charge,
45                    Float_t &psmear, Float_t &thetasmear, Float_t &phismear,
46                    Float_t &eff, Float_t &acc);
47     TF1* GetFitP() {return fFitp;}
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;                                   // 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     static AliMUONFastTracking*    fgMUONFastTracking; //!Pointer to single instance
80     ClassDef(AliMUONFastTracking,1)                    // Fast MUON Tracking Data Handler
81 };
82
83 #endif
84