ROOT logo
#ifndef ALIFASTMUONTRIGGEREFF_H
#define ALIFASTMUONTRIGGEREFF_H
/*  Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */
// Class for the fast simulation of the muon trigger efficiency
// The trigger parametrization is computed for background levels 0., 0.5 and 1.
// In order to set a background level different from 0 it is necessary to 
// explicitly force it with:
// ForceBkgLevel(BkgLevel).
// For intermediate background levels, the trigger response is linearly 
// interpolated between these values.
// There is increased granularity in the pT region below 3 GeV. Although
// it does not seem to be necessary it is also possible to interpolate
// between pT bins using SetInt().
// Author: Pietro Cortese (Universita' del Piemonte Orientale - Alessandria 
// and INFN of Torino)

#include <AliFastResponse.h>
#include <TString.h>

class TH3F;
class TAxis;

// Debugging flag
//#define MYTRIGDEBUG

enum CutTupe {kLow, kHigh, kAny};

class AliFastMuonTriggerEff : public AliFastResponse {
    
 public:
    AliFastMuonTriggerEff();
    AliFastMuonTriggerEff(const char* /*Name*/, const char* /*Title*/);
    AliFastMuonTriggerEff(const AliFastMuonTriggerEff& eff);
    virtual ~AliFastMuonTriggerEff(){;}
    virtual void    Init();
    virtual void    Evaluate(Float_t charge, Float_t pt, Float_t theta, Float_t phi,
			     Float_t& effLow, Float_t& effHigh, Float_t& effAny);
    virtual void    Evaluate(Float_t pt, Float_t theta, Float_t phi,
			     Float_t& effLow, Float_t& effHigh, Float_t& effAny)
	{Evaluate(1., pt, theta, phi, effLow, effHigh, effAny);}
    virtual Float_t Evaluate(Float_t charge, Float_t pt, Float_t theta, Float_t phi);
    
    virtual void    SetCut(Int_t cut = kLow);
    virtual Float_t Cut() const {return fCut;}
    virtual Int_t   SetBkgLevel(Float_t Bkg=0.);
    virtual Int_t   ForceBkgLevel(Float_t Bkg=0.);
    virtual Float_t GetBkgLevel() const {return fBkg;}
    Int_t LoadTables(const Char_t *namet);  // Load trigger response tables
    void SetInt() {fInt=1;}
    void UnsetInt() {fInt=0;}
    Int_t GetInt() const {return fInt;}
    // Copy
    AliFastMuonTriggerEff& operator=(const AliFastMuonTriggerEff& rhs);
  protected:
    Double_t fPtMin;               // Minimun pt
    Double_t fPtMax;               // Maximum pt
    Double_t fDpt;                 // Delta_pt
    Int_t    fnptb;                // Number of bins
    Double_t fPhiMin;              // Lower limit for phi 
    Double_t fPhiMax;              // Upper limit for phi
    Double_t fDphi;                // Delta_phi
    Int_t    fnphib;               // Number of bins   
    Double_t fThetaMin;            // lower limit for theta
    Double_t fThetaMax;            // upper limit for theta
    Double_t fDtheta;              // Delta_theta
    Int_t    fnthetab;             // Number of bins 
    Int_t   fCut;                  // Cut type (low/high)
    Int_t   fZones;                // Total number of zones
    TH3F*   fhEffAPt;              // Trig. prob. for Any Pt
    TH3F*   fhEffLPt;              // Trig. prob. for Low Pt
    TH3F*   fhEffHPt;              // Trig. prob. for High Pt
    TAxis*  fhLX;                  // x-axis 
    TAxis*  fhLY;                  // y-axis
    TAxis*  fhLZ;                  // z-axis
    Float_t fBkg;                  // Background level
    TString fTableTitle;           // Title of the LUT
    TString fDescription;          // Description of the table content
    Int_t fInt;                    // Interpolation flag (1 to interpolate)
  private:
    Int_t fibx;                    // index x 
    Int_t fiby;                    // index y
    Int_t fibz;                    // index z
    ClassDef(AliFastMuonTriggerEff,1)    // Fast Muon Trigger response
};

#endif 



 AliFastMuonTriggerEff.h:1
 AliFastMuonTriggerEff.h:2
 AliFastMuonTriggerEff.h:3
 AliFastMuonTriggerEff.h:4
 AliFastMuonTriggerEff.h:5
 AliFastMuonTriggerEff.h:6
 AliFastMuonTriggerEff.h:7
 AliFastMuonTriggerEff.h:8
 AliFastMuonTriggerEff.h:9
 AliFastMuonTriggerEff.h:10
 AliFastMuonTriggerEff.h:11
 AliFastMuonTriggerEff.h:12
 AliFastMuonTriggerEff.h:13
 AliFastMuonTriggerEff.h:14
 AliFastMuonTriggerEff.h:15
 AliFastMuonTriggerEff.h:16
 AliFastMuonTriggerEff.h:17
 AliFastMuonTriggerEff.h:18
 AliFastMuonTriggerEff.h:19
 AliFastMuonTriggerEff.h:20
 AliFastMuonTriggerEff.h:21
 AliFastMuonTriggerEff.h:22
 AliFastMuonTriggerEff.h:23
 AliFastMuonTriggerEff.h:24
 AliFastMuonTriggerEff.h:25
 AliFastMuonTriggerEff.h:26
 AliFastMuonTriggerEff.h:27
 AliFastMuonTriggerEff.h:28
 AliFastMuonTriggerEff.h:29
 AliFastMuonTriggerEff.h:30
 AliFastMuonTriggerEff.h:31
 AliFastMuonTriggerEff.h:32
 AliFastMuonTriggerEff.h:33
 AliFastMuonTriggerEff.h:34
 AliFastMuonTriggerEff.h:35
 AliFastMuonTriggerEff.h:36
 AliFastMuonTriggerEff.h:37
 AliFastMuonTriggerEff.h:38
 AliFastMuonTriggerEff.h:39
 AliFastMuonTriggerEff.h:40
 AliFastMuonTriggerEff.h:41
 AliFastMuonTriggerEff.h:42
 AliFastMuonTriggerEff.h:43
 AliFastMuonTriggerEff.h:44
 AliFastMuonTriggerEff.h:45
 AliFastMuonTriggerEff.h:46
 AliFastMuonTriggerEff.h:47
 AliFastMuonTriggerEff.h:48
 AliFastMuonTriggerEff.h:49
 AliFastMuonTriggerEff.h:50
 AliFastMuonTriggerEff.h:51
 AliFastMuonTriggerEff.h:52
 AliFastMuonTriggerEff.h:53
 AliFastMuonTriggerEff.h:54
 AliFastMuonTriggerEff.h:55
 AliFastMuonTriggerEff.h:56
 AliFastMuonTriggerEff.h:57
 AliFastMuonTriggerEff.h:58
 AliFastMuonTriggerEff.h:59
 AliFastMuonTriggerEff.h:60
 AliFastMuonTriggerEff.h:61
 AliFastMuonTriggerEff.h:62
 AliFastMuonTriggerEff.h:63
 AliFastMuonTriggerEff.h:64
 AliFastMuonTriggerEff.h:65
 AliFastMuonTriggerEff.h:66
 AliFastMuonTriggerEff.h:67
 AliFastMuonTriggerEff.h:68
 AliFastMuonTriggerEff.h:69
 AliFastMuonTriggerEff.h:70
 AliFastMuonTriggerEff.h:71
 AliFastMuonTriggerEff.h:72
 AliFastMuonTriggerEff.h:73
 AliFastMuonTriggerEff.h:74
 AliFastMuonTriggerEff.h:75
 AliFastMuonTriggerEff.h:76
 AliFastMuonTriggerEff.h:77
 AliFastMuonTriggerEff.h:78
 AliFastMuonTriggerEff.h:79
 AliFastMuonTriggerEff.h:80
 AliFastMuonTriggerEff.h:81
 AliFastMuonTriggerEff.h:82
 AliFastMuonTriggerEff.h:83
 AliFastMuonTriggerEff.h:84
 AliFastMuonTriggerEff.h:85
 AliFastMuonTriggerEff.h:86
 AliFastMuonTriggerEff.h:87
 AliFastMuonTriggerEff.h:88
 AliFastMuonTriggerEff.h:89
 AliFastMuonTriggerEff.h:90
 AliFastMuonTriggerEff.h:91
 AliFastMuonTriggerEff.h:92