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