]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FASTSIM/AliFastMuonTrackingEff.cxx
More EffC++ warnings corrected.
[u/mrichter/AliRoot.git] / FASTSIM / AliFastMuonTrackingEff.cxx
CommitLineData
6255180c 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
803d1ab0 16/* $Id$ */
a42548b0 17//
18// Class for fast simulation of the ALICE Muon Spectrometer
19// Tracking Efficiency.
20// The efficiency depends on trasverse momentum pt, polar angle theta and azimuthal angle phi.
21//
22// Author: Alessandro de Falco
23// alessandro.de.falco@ca.infn.it
24//
6255180c 25#include "AliFastMuonTrackingEff.h"
26#include "AliMUONFastTracking.h"
27
28ClassImp(AliFastMuonTrackingEff)
29
30
31AliFastMuonTrackingEff::AliFastMuonTrackingEff() :
32 AliFastResponse("Efficiency", "Muon Tracking Efficiency")
33{
a42548b0 34//
35// Constructor
6255180c 36 SetBackground();
37}
38
a42548b0 39AliFastMuonTrackingEff::AliFastMuonTrackingEff(const AliFastMuonTrackingEff& eff)
40 :AliFastResponse(eff)
41{
42// Copy constructor
43 eff.Copy(*this);
44}
45
6255180c 46void AliFastMuonTrackingEff::Init()
47{
a42548b0 48//
49// Initialization
6255180c 50 fFastTracking = AliMUONFastTracking::Instance();
51 fFastTracking->Init(fBackground);
52}
53
54
55
20432218 56Float_t AliFastMuonTrackingEff::Evaluate(Float_t /*charge*/, Float_t pt, Float_t theta, Float_t phi)
6255180c 57{
a42548b0 58//
59// Evaluate the efficience for muon with 3-vector (pt, theta, phi)
6255180c 60 Float_t p = pt / TMath::Sin(theta*TMath::Pi()/180.);
61 Float_t eff = fFastTracking->Efficiency(p, theta, phi, Int_t(fCharge));
62 return eff;
63}
a42548b0 64
20432218 65
a42548b0 66AliFastMuonTrackingEff& AliFastMuonTrackingEff::operator=(const AliFastMuonTrackingEff& rhs)
67{
68// Assignment operator
69 rhs.Copy(*this);
70 return *this;
71}
72