* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-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).
+/* $Id$ */
+// 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)
-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().
-
-$Log$
-*/
#include "AliFastMuonTriggerEff.h"
+#include "TROOT.h"
+#include "TFile.h"
+#include "stdlib.h"
+#include "TH3.h"
+#include "TObjString.h"
+
#define PLIN printf("%s: %d: ",__FILE__,__LINE__)
-ClassImp(AliFastMuonTriggerEff);
+ClassImp(AliFastMuonTriggerEff)
AliFastMuonTriggerEff::AliFastMuonTriggerEff():
- AliFastResponse("Efficiency", "Muon Trigger Efficiency")
+ AliFastResponse("Efficiency", "Muon Trigger Efficiency"),
+ fPtMin(0.),
+ fPtMax(0.),
+ fDpt(0.),
+ fnptb(0),
+ fPhiMin(0.),
+ fPhiMax(0.),
+ fDphi(0.),
+ fnphib(0),
+ fThetaMin(0.),
+ fThetaMax(0.),
+ fDtheta(0.),
+ fnthetab(0),
+ fCut(kLow),
+ fZones(0),
+ fhEffAPt(0),
+ fhEffLPt(0),
+ fhEffHPt(0),
+ fhLX(0),
+ fhLY(0),
+ fhLZ(0),
+ fBkg(0.),
+ fTableTitle(0),
+ fDescription(0),
+ fInt(0),
+ fibx(0),
+ fiby(0),
+ fibz(0)
{
//
// Default constructor
//
- SetCut(kLow);
- fZones=0;
- SetBkgLevel(0.);
- UnsetInt();
+}
+
+AliFastMuonTriggerEff::AliFastMuonTriggerEff(const char* Name, const char* Title):
+ AliFastResponse(Name, Title),
+ fPtMin(0.),
+ fPtMax(0.),
+ fDpt(0.),
+ fnptb(0),
+ fPhiMin(0.),
+ fPhiMax(0.),
+ fDphi(0.),
+ fnphib(0),
+ fThetaMin(0.),
+ fThetaMax(0.),
+ fDtheta(0.),
+ fnthetab(0),
+ fCut(kLow),
+ fZones(0),
+ fhEffAPt(0),
+ fhEffLPt(0),
+ fhEffHPt(0),
+ fhLX(0),
+ fhLY(0),
+ fhLZ(0),
+ fBkg(0.),
+ fTableTitle(0),
+ fDescription(0),
+ fInt(0),
+ fibx(0),
+ fiby(0),
+ fibz(0)
+{
+// Another constructor
+}
+
+AliFastMuonTriggerEff::AliFastMuonTriggerEff(const AliFastMuonTriggerEff& eff)
+ :AliFastResponse(eff),
+ fPtMin(0.),
+ fPtMax(0.),
+ fDpt(0.),
+ fnptb(0),
+ fPhiMin(0.),
+ fPhiMax(0.),
+ fDphi(0.),
+ fnphib(0),
+ fThetaMin(0.),
+ fThetaMax(0.),
+ fDtheta(0.),
+ fnthetab(0),
+ fCut(kLow),
+ fZones(0),
+ fhEffAPt(0),
+ fhEffLPt(0),
+ fhEffHPt(0),
+ fhLX(0),
+ fhLY(0),
+ fhLZ(0),
+ fBkg(0.),
+ fTableTitle(0),
+ fDescription(0),
+ fInt(0),
+ fibx(0),
+ fiby(0),
+ fibz(0)
+{
+// Copy constructor
+ eff.Copy(*this);
}
void AliFastMuonTriggerEff::SetCut(Int_t cut)
{
+ //
+ // Set the pt cut
if(cut==kLow){
printf("Selecting Low Pt cut\n");
}else if(cut==kHigh){
Int_t AliFastMuonTriggerEff::SetBkgLevel(Float_t Bkg)
{
+ //
+ // Set the background level
+ //
if((Bkg!=0.)) {
printf("%s: Warning: requested Bkg: %f\n",
__FILE__,Bkg);
Int_t AliFastMuonTriggerEff::ForceBkgLevel(Float_t Bkg)
{
+ //
+ // Check and enforce consistency of the background level
+ //
if((Bkg!=0.)) {
printf("%s: Warning: requested Bkg: %f\n",
__FILE__,Bkg);
}
Int_t AliFastMuonTriggerEff::LoadTables(Char_t *namet=""){
+ //
+ // Load the trigger tables
+ //
Char_t hNameA[100],hNameL[100],hNameH[100];
sprintf(hNameA,"hEffAPt%s",namet);
sprintf(hNameL,"hEffLPt%s",namet);
fnptb=fhEffLPt->GetNbinsZ();
fDpt = (fPtMax-fPtMin)/fnptb;
+ printf("***** This version of AliFastMuonTriggerEff can use both *****\n");
+ printf("***** new and old ALICE reference frames depending on *****\n");
+ printf("***** which LUT has been loaded. You can find below some *****\n");
+ printf("***** information on the current parametrization: *****\n");
printf("%4d bins in theta [%f:%f]\n",fnthetab,fThetaMin,fThetaMax);
printf("%4d bins in phi [%f:%f]\n",fnphib,fPhiMin,fPhiMax);
printf("%4d bins in pt [%f:%f]\n",fnptb,fPtMin,fPtMax);
return;
}
-void AliFastMuonTriggerEff::Evaluate(Float_t charge, Float_t pt, Float_t theta,
- Float_t phi, Float_t& effLow, Float_t& effHigh)
-{
- //
- // Trigger efficiency for pt, theta, phi (low and high cut)
- //
- Float_t effAny;
- Evaluate(charge,pt,theta,phi,effLow,effHigh,effAny);
-}
+
Float_t AliFastMuonTriggerEff::Evaluate(Float_t charge, Float_t pt,
Float_t theta, Float_t phi)
return eff;
}
+
+AliFastMuonTriggerEff& AliFastMuonTriggerEff::operator=(const AliFastMuonTriggerEff& rhs)
+{
+// Assignment operator
+ rhs.Copy(*this);
+ return *this;
+}
+