]>
Commit | Line | Data |
---|---|---|
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 | fBackground(1.), | |
34 | fCharge(1.), | |
35 | fFastTracking(0) | |
36 | { | |
37 | // | |
38 | // Constructor | |
39 | } | |
40 | ||
41 | AliFastMuonTrackingEff::AliFastMuonTrackingEff(const AliFastMuonTrackingEff& eff) | |
42 | :AliFastResponse(eff), | |
43 | fBackground(1.), | |
44 | fCharge(1.), | |
45 | fFastTracking(0) | |
46 | { | |
47 | // Copy constructor | |
48 | eff.Copy(*this); | |
49 | } | |
50 | ||
51 | void AliFastMuonTrackingEff::Init() | |
52 | { | |
53 | // | |
54 | // Initialization | |
55 | fFastTracking = AliMUONFastTracking::Instance(); | |
56 | fFastTracking->Init(fBackground); | |
57 | } | |
58 | ||
59 | ||
60 | ||
61 | Float_t AliFastMuonTrackingEff::Evaluate(Float_t /*charge*/, Float_t pt, Float_t theta, Float_t phi) | |
62 | { | |
63 | // | |
64 | // Evaluate the efficience for muon with 3-vector (pt, theta, phi) | |
65 | Float_t p = pt / TMath::Sin(theta*TMath::Pi()/180.); | |
66 | Float_t eff = fFastTracking->Efficiency(p, theta, phi, Int_t(fCharge)); | |
67 | return eff; | |
68 | } | |
69 | ||
70 | ||
71 | AliFastMuonTrackingEff& AliFastMuonTrackingEff::operator=(const AliFastMuonTrackingEff& rhs) | |
72 | { | |
73 | // Assignment operator | |
74 | rhs.Copy(*this); | |
75 | return *this; | |
76 | } | |
77 |