ROOT logo
/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

/* $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 <TMath.h>

#include "AliFastMuonTrackingAcc.h"
#include "AliMUONFastTracking.h"

ClassImp(AliFastMuonTrackingAcc)


AliFastMuonTrackingAcc::AliFastMuonTrackingAcc() :
    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)
{
// Copy constructor
    acc.Copy(*this);
}

void AliFastMuonTrackingAcc::Init()
{
    fFastTracking = AliMUONFastTracking::Instance();
    fFastTracking->Init(fBackground);
}



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;
}
 AliFastMuonTrackingAcc.cxx:1
 AliFastMuonTrackingAcc.cxx:2
 AliFastMuonTrackingAcc.cxx:3
 AliFastMuonTrackingAcc.cxx:4
 AliFastMuonTrackingAcc.cxx:5
 AliFastMuonTrackingAcc.cxx:6
 AliFastMuonTrackingAcc.cxx:7
 AliFastMuonTrackingAcc.cxx:8
 AliFastMuonTrackingAcc.cxx:9
 AliFastMuonTrackingAcc.cxx:10
 AliFastMuonTrackingAcc.cxx:11
 AliFastMuonTrackingAcc.cxx:12
 AliFastMuonTrackingAcc.cxx:13
 AliFastMuonTrackingAcc.cxx:14
 AliFastMuonTrackingAcc.cxx:15
 AliFastMuonTrackingAcc.cxx:16
 AliFastMuonTrackingAcc.cxx:17
 AliFastMuonTrackingAcc.cxx:18
 AliFastMuonTrackingAcc.cxx:19
 AliFastMuonTrackingAcc.cxx:20
 AliFastMuonTrackingAcc.cxx:21
 AliFastMuonTrackingAcc.cxx:22
 AliFastMuonTrackingAcc.cxx:23
 AliFastMuonTrackingAcc.cxx:24
 AliFastMuonTrackingAcc.cxx:25
 AliFastMuonTrackingAcc.cxx:26
 AliFastMuonTrackingAcc.cxx:27
 AliFastMuonTrackingAcc.cxx:28
 AliFastMuonTrackingAcc.cxx:29
 AliFastMuonTrackingAcc.cxx:30
 AliFastMuonTrackingAcc.cxx:31
 AliFastMuonTrackingAcc.cxx:32
 AliFastMuonTrackingAcc.cxx:33
 AliFastMuonTrackingAcc.cxx:34
 AliFastMuonTrackingAcc.cxx:35
 AliFastMuonTrackingAcc.cxx:36
 AliFastMuonTrackingAcc.cxx:37
 AliFastMuonTrackingAcc.cxx:38
 AliFastMuonTrackingAcc.cxx:39
 AliFastMuonTrackingAcc.cxx:40
 AliFastMuonTrackingAcc.cxx:41
 AliFastMuonTrackingAcc.cxx:42
 AliFastMuonTrackingAcc.cxx:43
 AliFastMuonTrackingAcc.cxx:44
 AliFastMuonTrackingAcc.cxx:45
 AliFastMuonTrackingAcc.cxx:46
 AliFastMuonTrackingAcc.cxx:47
 AliFastMuonTrackingAcc.cxx:48
 AliFastMuonTrackingAcc.cxx:49
 AliFastMuonTrackingAcc.cxx:50
 AliFastMuonTrackingAcc.cxx:51
 AliFastMuonTrackingAcc.cxx:52
 AliFastMuonTrackingAcc.cxx:53
 AliFastMuonTrackingAcc.cxx:54
 AliFastMuonTrackingAcc.cxx:55
 AliFastMuonTrackingAcc.cxx:56
 AliFastMuonTrackingAcc.cxx:57
 AliFastMuonTrackingAcc.cxx:58
 AliFastMuonTrackingAcc.cxx:59
 AliFastMuonTrackingAcc.cxx:60
 AliFastMuonTrackingAcc.cxx:61
 AliFastMuonTrackingAcc.cxx:62
 AliFastMuonTrackingAcc.cxx:63
 AliFastMuonTrackingAcc.cxx:64
 AliFastMuonTrackingAcc.cxx:65
 AliFastMuonTrackingAcc.cxx:66
 AliFastMuonTrackingAcc.cxx:67
 AliFastMuonTrackingAcc.cxx:68
 AliFastMuonTrackingAcc.cxx:69
 AliFastMuonTrackingAcc.cxx:70
 AliFastMuonTrackingAcc.cxx:71
 AliFastMuonTrackingAcc.cxx:72
 AliFastMuonTrackingAcc.cxx:73