]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FASTSIM/AliFastMuonTrackingAcc.cxx
Conversion photons to photoelectrons moved to AliSTARTv1
[u/mrichter/AliRoot.git] / FASTSIM / AliFastMuonTrackingAcc.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$ */
6255180c 17
a42548b0 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
6255180c 25#include "AliFastMuonTrackingAcc.h"
26#include "AliMUONFastTracking.h"
27
28ClassImp(AliFastMuonTrackingAcc)
29
30
31AliFastMuonTrackingAcc::AliFastMuonTrackingAcc() :
e6e76983 32 AliFastResponse("Acceptance", "Muon Tracking Acceptance"),
33 fBackground(1.),
34 fCharge(1.),
35 fFastTracking(0)
6255180c 36{
e6e76983 37 // Default Constructor
6255180c 38}
39
a42548b0 40AliFastMuonTrackingAcc::AliFastMuonTrackingAcc(const AliFastMuonTrackingAcc & acc)
e6e76983 41 :AliFastResponse(acc),
42 fBackground(1.),
43 fCharge(1.),
44 fFastTracking(0)
a42548b0 45{
46// Copy constructor
47 acc.Copy(*this);
48}
49
6255180c 50void AliFastMuonTrackingAcc::Init()
51{
52 fFastTracking = AliMUONFastTracking::Instance();
53 fFastTracking->Init(fBackground);
54}
55
56
57
20432218 58Float_t AliFastMuonTrackingAcc::Evaluate(Float_t /*charge*/, Float_t pt, Float_t theta, Float_t phi)
6255180c 59{
a42548b0 60// Evaluate the tracking acceptance for 3-vector pt, theta, phi
6255180c 61 Float_t p = pt / TMath::Sin(theta*TMath::Pi()/180.);
62 Float_t eff = fFastTracking->Acceptance(p, theta, phi, Int_t(fCharge));
63 return eff;
64}
a42548b0 65
66AliFastMuonTrackingAcc& AliFastMuonTrackingAcc::operator=(const AliFastMuonTrackingAcc& rhs)
67{
68// Assignment operator
69 rhs.Copy(*this);
70 return *this;
71}