X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=FASTSIM%2FAliFastMuonTrackingAcc.cxx;h=dd5462ede07e2858d51ef76ddc8e7e3ca796fa56;hb=2bfbc28dfdaa536df22c1ac612afe2adf588ae27;hp=0c1d62ed1bdf3aaf807df6ea60d672b34ef666ab;hpb=6255180c42f3db23fd55e13a1a4f37a977550e6f;p=u%2Fmrichter%2FAliRoot.git diff --git a/FASTSIM/AliFastMuonTrackingAcc.cxx b/FASTSIM/AliFastMuonTrackingAcc.cxx index 0c1d62ed1bd..dd5462ede07 100644 --- a/FASTSIM/AliFastMuonTrackingAcc.cxx +++ b/FASTSIM/AliFastMuonTrackingAcc.cxx @@ -13,9 +13,16 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -*/ +/* $Id$ */ + +// Realisation of AliFastResponse for the +// fast simulation of the muon spectrometer acceptance. +// The acceptance depends on the muon 3-vector which can be passed as (pt, theta, phi), +// where pt is the transverse momentum, theta the polar angle and phi the azimuthal angle. +// Author: Andreas Morsch +// andreas.morsch@cern.ch + +#include #include "AliFastMuonTrackingAcc.h" #include "AliMUONFastTracking.h" @@ -24,9 +31,22 @@ ClassImp(AliFastMuonTrackingAcc) AliFastMuonTrackingAcc::AliFastMuonTrackingAcc() : - AliFastResponse("Acceptance", "Muon Tracking Acceptance") + AliFastResponse("Acceptance", "Muon Tracking Acceptance"), + fBackground(1.), + fCharge(1.), + fFastTracking(0) +{ + // Default Constructor +} + +AliFastMuonTrackingAcc::AliFastMuonTrackingAcc(const AliFastMuonTrackingAcc & acc) + :AliFastResponse(acc), + fBackground(1.), + fCharge(1.), + fFastTracking(0) { - SetBackground(); +// Copy constructor + acc.Copy(*this); } void AliFastMuonTrackingAcc::Init() @@ -37,9 +57,17 @@ void AliFastMuonTrackingAcc::Init() -Float_t AliFastMuonTrackingAcc::Evaluate(Float_t pt, Float_t theta, Float_t phi) +Float_t AliFastMuonTrackingAcc::Evaluate(Float_t /*charge*/, Float_t pt, Float_t theta, Float_t phi) { +// Evaluate the tracking acceptance for 3-vector pt, theta, phi Float_t p = pt / TMath::Sin(theta*TMath::Pi()/180.); Float_t eff = fFastTracking->Acceptance(p, theta, phi, Int_t(fCharge)); return eff; } + +AliFastMuonTrackingAcc& AliFastMuonTrackingAcc::operator=(const AliFastMuonTrackingAcc& rhs) +{ +// Assignment operator + rhs.Copy(*this); + return *this; +}