]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FASTSIM/AliFastMuonTriggerEff.h
Bug fix (Gustavo)
[u/mrichter/AliRoot.git] / FASTSIM / AliFastMuonTriggerEff.h
1 #ifndef ALIFASTMUONTRIGGEREFF_H
2 #define ALIFASTMUONTRIGGEREFF_H
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 for the fast simulation of the muon trigger efficiency
8 // The trigger parametrization is computed for background levels 0., 0.5 and 1.
9 // In order to set a background level different from 0 it is necessary to 
10 // explicitly force it with:
11 // ForceBkgLevel(BkgLevel).
12 // For intermediate background levels, the trigger response is linearly 
13 // interpolated between these values.
14 // There is increased granularity in the pT region below 3 GeV. Although
15 // it does not seem to be necessary it is also possible to interpolate
16 // between pT bins using SetInt().
17
18 #include <AliFastResponse.h>
19 #include <TString.h>
20
21 class TH3F;
22 class TAxis;
23
24 // Debugging flag
25 //#define MYTRIGDEBUG
26
27 enum CutTupe {kLow, kHigh, kAny};
28
29 class AliFastMuonTriggerEff : public AliFastResponse {
30     
31  public:
32     AliFastMuonTriggerEff();
33     AliFastMuonTriggerEff(const char* /*Name*/, const char* /*Title*/);
34     AliFastMuonTriggerEff(const AliFastMuonTriggerEff& eff);
35     virtual ~AliFastMuonTriggerEff(){;}
36     virtual void    Init();
37     virtual void    Evaluate(Float_t charge, Float_t pt, Float_t theta, Float_t phi,
38                              Float_t& effLow, Float_t& effHigh, Float_t& effAny);
39     virtual void    Evaluate(Float_t pt, Float_t theta, Float_t phi,
40                              Float_t& effLow, Float_t& effHigh, Float_t& effAny)
41         {Evaluate(1., pt, theta, phi, effLow, effHigh, effAny);}
42     virtual Float_t Evaluate(Float_t charge, Float_t pt, Float_t theta, Float_t phi);
43     
44     virtual void    SetCut(Int_t cut = kLow);
45     virtual Float_t Cut() const {return fCut;}
46     virtual Int_t   SetBkgLevel(Float_t Bkg=0.);
47     virtual Int_t   ForceBkgLevel(Float_t Bkg=0.);
48     virtual Float_t GetBkgLevel() const {return fBkg;}
49     Int_t LoadTables(Char_t *namet);  // Load trigger response tables
50     void SetInt() {fInt=1;}
51     void UnsetInt() {fInt=0;}
52     Int_t GetInt() const {return fInt;}
53     // Copy
54     AliFastMuonTriggerEff& operator=(const AliFastMuonTriggerEff& rhs);
55   protected:
56     Double_t fPtMin;               // Minimun pt
57     Double_t fPtMax;               // Maximum pt
58     Double_t fDpt;                 // Delta_pt
59     Int_t    fnptb;                // Number of bins
60     Double_t fPhiMin;              // Lower limit for phi 
61     Double_t fPhiMax;              // Upper limit for phi
62     Double_t fDphi;                // Delta_phi
63     Int_t    fnphib;               // Number of bins   
64     Double_t fThetaMin;            // lower limit for theta
65     Double_t fThetaMax;            // upper limit for theta
66     Double_t fDtheta;              // Delta_theta
67     Int_t    fnthetab;             // Number of bins 
68     Int_t   fCut;                  // Cut type (low/high)
69     Int_t   fZones;                // Total number of zones
70     TH3F*   fhEffAPt;              // Trig. prob. for Any Pt
71     TH3F*   fhEffLPt;              // Trig. prob. for Low Pt
72     TH3F*   fhEffHPt;              // Trig. prob. for High Pt
73     TAxis*  fhLX;                  // x-axis 
74     TAxis*  fhLY;                  // y-axis
75     TAxis*  fhLZ;                  // z-axis
76     Float_t fBkg;                  // Background level
77     TString fTableTitle;           // Title of the LUT
78     TString fDescription;          // Description of the table content
79     Int_t fInt;                    // Interpolation flag (1 to interpolate)
80   private:
81     Int_t fibx;                    // index x 
82     Int_t fiby;                    // index y
83     Int_t fibz;                    // index z
84     ClassDef(AliFastMuonTriggerEff,1)    // Fast Muon Trigger response
85 };
86
87 #endif 
88
89
90