]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FASTSIM/AliFastMuonTrackingEff.cxx
Front absorber geometry as built.
[u/mrichter/AliRoot.git] / FASTSIM / AliFastMuonTrackingEff.cxx
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
16 /* $Id$ */
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 // 
25 #include "AliFastMuonTrackingEff.h"
26 #include "AliMUONFastTracking.h"
27
28 ClassImp(AliFastMuonTrackingEff)
29
30
31 AliFastMuonTrackingEff::AliFastMuonTrackingEff() :
32     AliFastResponse("Efficiency", "Muon Tracking Efficiency")
33 {
34 //
35 // Constructor
36     SetBackground();
37 }
38
39 AliFastMuonTrackingEff::AliFastMuonTrackingEff(const AliFastMuonTrackingEff& eff)
40     :AliFastResponse(eff)
41 {
42 // Copy constructor
43     eff.Copy(*this);
44 }
45
46 void AliFastMuonTrackingEff::Init()
47 {
48 //
49 // Initialization
50     fFastTracking = AliMUONFastTracking::Instance();
51     fFastTracking->Init(fBackground);
52 }
53
54
55
56 Float_t AliFastMuonTrackingEff::Evaluate(Float_t /*charge*/, Float_t pt, Float_t theta, Float_t phi)
57 {
58 //
59 // Evaluate the efficience for muon with 3-vector (pt, theta, phi)
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 }
64
65
66 AliFastMuonTrackingEff& AliFastMuonTrackingEff::operator=(const  AliFastMuonTrackingEff& rhs)
67 {
68 // Assignment operator
69     rhs.Copy(*this);
70     return *this;
71 }
72