]>
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 | // Realisation of AliFastResponse for the | |
19 | // fast simulation of the muon spectrometer acceptance. | |
20 | // The acceptance depends on the muon 3-vector which can be passed as (pt, theta, phi), | |
21 | // where pt is the transverse momentum, theta the polar angle and phi the azimuthal angle. | |
22 | // Author: Andreas Morsch | |
23 | // andreas.morsch@cern.ch | |
24 | ||
25 | #include <TMath.h> | |
26 | ||
27 | #include "AliFastMuonTrackingAcc.h" | |
28 | #include "AliMUONFastTracking.h" | |
29 | ||
30 | ClassImp(AliFastMuonTrackingAcc) | |
31 | ||
32 | ||
33 | AliFastMuonTrackingAcc::AliFastMuonTrackingAcc() : | |
34 | AliFastResponse("Acceptance", "Muon Tracking Acceptance"), | |
35 | fBackground(1.), | |
36 | fCharge(1.), | |
37 | fFastTracking(0) | |
38 | { | |
39 | // Default Constructor | |
40 | } | |
41 | ||
42 | AliFastMuonTrackingAcc::AliFastMuonTrackingAcc(const AliFastMuonTrackingAcc & acc) | |
43 | :AliFastResponse(acc), | |
44 | fBackground(1.), | |
45 | fCharge(1.), | |
46 | fFastTracking(0) | |
47 | { | |
48 | // Copy constructor | |
49 | acc.Copy(*this); | |
50 | } | |
51 | ||
52 | void AliFastMuonTrackingAcc::Init() | |
53 | { | |
54 | fFastTracking = AliMUONFastTracking::Instance(); | |
55 | fFastTracking->Init(fBackground); | |
56 | } | |
57 | ||
58 | ||
59 | ||
60 | Float_t AliFastMuonTrackingAcc::Evaluate(Float_t /*charge*/, Float_t pt, Float_t theta, Float_t phi) | |
61 | { | |
62 | // Evaluate the tracking acceptance for 3-vector pt, theta, phi | |
63 | Float_t p = pt / TMath::Sin(theta*TMath::Pi()/180.); | |
64 | Float_t eff = fFastTracking->Acceptance(p, theta, phi, Int_t(fCharge)); | |
65 | return eff; | |
66 | } | |
67 | ||
68 | AliFastMuonTrackingAcc& AliFastMuonTrackingAcc::operator=(const AliFastMuonTrackingAcc& rhs) | |
69 | { | |
70 | // Assignment operator | |
71 | rhs.Copy(*this); | |
72 | return *this; | |
73 | } |