X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=FASTSIM%2FAliFastMuonTrackingAcc.cxx;h=dd5462ede07e2858d51ef76ddc8e7e3ca796fa56;hb=9a5c8f9cb846f64186c86a2d8533e9c0a0cbc97c;hp=7bad84ece91da9ad0a70881f32f68ada175242e1;hpb=803d1ab0e2c9c9a8116c05954c3d3cdcf1f33759;p=u%2Fmrichter%2FAliRoot.git diff --git a/FASTSIM/AliFastMuonTrackingAcc.cxx b/FASTSIM/AliFastMuonTrackingAcc.cxx index 7bad84ece91..dd5462ede07 100644 --- a/FASTSIM/AliFastMuonTrackingAcc.cxx +++ b/FASTSIM/AliFastMuonTrackingAcc.cxx @@ -15,6 +15,15 @@ /* $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" @@ -22,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() @@ -35,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; +}