From 204322181df0eb11c7c6943d3f6bd03a877c2e02 Mon Sep 17 00:00:00 2001 From: morsch Date: Thu, 27 Apr 2006 10:39:06 +0000 Subject: [PATCH] Warnings corrected. --- FASTSIM/AliFastMuonTrackingAcc.cxx | 2 +- FASTSIM/AliFastMuonTrackingAcc.h | 18 +++++++++--------- FASTSIM/AliFastMuonTrackingEff.cxx | 3 ++- FASTSIM/AliFastMuonTrackingEff.h | 18 +++++++++--------- FASTSIM/AliFastMuonTrackingRes.h | 19 ++++++++++--------- FASTSIM/AliFastMuonTriggerEff.h | 4 ++++ FASTSIM/AliFastResponse.cxx | 20 ++++++++++++++------ FASTSIM/AliFastResponse.h | 10 ++++++---- 8 files changed, 55 insertions(+), 39 deletions(-) diff --git a/FASTSIM/AliFastMuonTrackingAcc.cxx b/FASTSIM/AliFastMuonTrackingAcc.cxx index 5452347fc28..3712c170a9f 100644 --- a/FASTSIM/AliFastMuonTrackingAcc.cxx +++ b/FASTSIM/AliFastMuonTrackingAcc.cxx @@ -49,7 +49,7 @@ 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.); diff --git a/FASTSIM/AliFastMuonTrackingAcc.h b/FASTSIM/AliFastMuonTrackingAcc.h index 9d8f0122fb0..e4d7cb9761c 100644 --- a/FASTSIM/AliFastMuonTrackingAcc.h +++ b/FASTSIM/AliFastMuonTrackingAcc.h @@ -22,16 +22,16 @@ class AliFastMuonTrackingAcc : public AliFastResponse { virtual ~AliFastMuonTrackingAcc(){;} void SetBackground(Float_t bg = 1.) {fBackground = bg;} void SetCharge(Float_t charge = 1.) {fCharge = charge;} - virtual void Init(); - virtual Float_t Evaluate(Float_t pt, Float_t theta, Float_t phi); + virtual void Init(); + virtual Float_t Evaluate(Float_t charge, Float_t pt, Float_t theta, Float_t phi); + virtual void Evaluate(Float_t charge, Float_t p, Float_t theta , Float_t phi, + Float_t& pS, Float_t& thetaS, Float_t& phiS) + {AliFastResponse::Evaluate(charge, p, theta, phi, pS, thetaS, phiS);} virtual void Evaluate(Float_t p, Float_t theta , Float_t phi, - Float_t& pS, Float_t& thetaS, Float_t& phiS) { - AliFastResponse::Evaluate(p, theta, phi, pS, thetaS, phiS); - } - virtual Float_t Evaluate(AliFastParticle* part) { - return AliFastResponse::Evaluate(part); - } - // Copy + Float_t& pS, Float_t& thetaS, Float_t& phiS) + {AliFastResponse::Evaluate(p, theta, phi, pS, thetaS, phiS);} + + // Copy AliFastMuonTrackingAcc& operator=(const AliFastMuonTrackingAcc& rhs); protected: Float_t fBackground; // Background level diff --git a/FASTSIM/AliFastMuonTrackingEff.cxx b/FASTSIM/AliFastMuonTrackingEff.cxx index 053bcac350c..ce1ff34acad 100644 --- a/FASTSIM/AliFastMuonTrackingEff.cxx +++ b/FASTSIM/AliFastMuonTrackingEff.cxx @@ -53,7 +53,7 @@ void AliFastMuonTrackingEff::Init() -Float_t AliFastMuonTrackingEff::Evaluate(Float_t pt, Float_t theta, Float_t phi) +Float_t AliFastMuonTrackingEff::Evaluate(Float_t /*charge*/, Float_t pt, Float_t theta, Float_t phi) { // // Evaluate the efficience for muon with 3-vector (pt, theta, phi) @@ -62,6 +62,7 @@ Float_t AliFastMuonTrackingEff::Evaluate(Float_t pt, Float_t theta, Float_t phi) return eff; } + AliFastMuonTrackingEff& AliFastMuonTrackingEff::operator=(const AliFastMuonTrackingEff& rhs) { // Assignment operator diff --git a/FASTSIM/AliFastMuonTrackingEff.h b/FASTSIM/AliFastMuonTrackingEff.h index 087ce8b65c5..450489826d0 100644 --- a/FASTSIM/AliFastMuonTrackingEff.h +++ b/FASTSIM/AliFastMuonTrackingEff.h @@ -7,7 +7,7 @@ // // Class for fast simulation of the ALICE Muon Spectrometer // Tracking Efficiency. -// The efficiency depends on trasverse momentum pt, polar angle theta and azimuthal angle phi. +// The efficiency depends on transverse momentum pt, polar angle theta and azimuthal angle phi. // // Author: Alessandro de Falco // alessandro.de.falco@ca.infn.it @@ -23,15 +23,15 @@ class AliFastMuonTrackingEff : public AliFastResponse { void SetBackground(Float_t bg = 1.) {fBackground = bg;} void SetCharge(Float_t charge = 1.) {fCharge = charge;} virtual void Init(); - virtual Float_t Evaluate(Float_t pt, Float_t theta, Float_t phi); + virtual Float_t Evaluate(Float_t charge, Float_t pt, Float_t theta, Float_t phi); + virtual void Evaluate(Float_t charge, Float_t p, Float_t theta , Float_t phi, + Float_t& pS, Float_t& thetaS, Float_t& phiS) + {AliFastResponse::Evaluate(charge, p, theta, phi, pS, thetaS, phiS);} virtual void Evaluate(Float_t p, Float_t theta , Float_t phi, - Float_t& pS, Float_t& thetaS, Float_t& phiS) { - AliFastResponse::Evaluate(p, theta, phi, pS, thetaS, phiS); - } - virtual Float_t Evaluate(AliFastParticle* part) { - return AliFastResponse::Evaluate(part); - } - // Copy + Float_t& pS, Float_t& thetaS, Float_t& phiS) + {AliFastResponse::Evaluate(p, theta, phi, pS, thetaS, phiS);} + + // Copy AliFastMuonTrackingEff& operator=(const AliFastMuonTrackingEff& rhs); protected: Float_t fBackground; // Background level diff --git a/FASTSIM/AliFastMuonTrackingRes.h b/FASTSIM/AliFastMuonTrackingRes.h index 5f7ff8efee9..02d0641f2ca 100644 --- a/FASTSIM/AliFastMuonTrackingRes.h +++ b/FASTSIM/AliFastMuonTrackingRes.h @@ -23,15 +23,16 @@ class AliFastMuonTrackingRes : public AliFastResponse { void SetBackground(Float_t bg = 1.) {fBackground = bg;} void SetCharge(Float_t charge = 1.) {fCharge = charge;} virtual void Init(); - virtual void Evaluate(Float_t p, Float_t theta , Float_t phi, - Float_t& pS, Float_t& thetaS, Float_t& phiS); - virtual Float_t Evaluate(AliFastParticle* part) { - return AliFastResponse::Evaluate(part); - } - virtual Float_t Evaluate(Float_t pt, Float_t theta , Float_t phi) { - return AliFastResponse::Evaluate(pt,theta,phi); - } - // Copy + void Evaluate(Float_t p, Float_t theta , Float_t phi, + Float_t& pS, Float_t& thetaS, Float_t& phiS); + + void Evaluate(Float_t /*charge*/, Float_t p, Float_t theta , Float_t phi, + Float_t& pS, Float_t& thetaS, Float_t& phiS) + {Evaluate(p, theta, phi, pS, thetaS, phiS);} + virtual Float_t Evaluate(Float_t charge, Float_t pt, Float_t theta, Float_t phi) + {return AliFastResponse::Evaluate(charge, pt, theta, phi);} + + // Copy AliFastMuonTrackingRes& operator=(const AliFastMuonTrackingRes & rhs); protected: diff --git a/FASTSIM/AliFastMuonTriggerEff.h b/FASTSIM/AliFastMuonTriggerEff.h index 53651225720..94b2689524d 100644 --- a/FASTSIM/AliFastMuonTriggerEff.h +++ b/FASTSIM/AliFastMuonTriggerEff.h @@ -36,7 +36,11 @@ class AliFastMuonTriggerEff : public AliFastResponse { virtual void Init(); virtual void Evaluate(Float_t charge, Float_t pt, Float_t theta, Float_t phi, Float_t& effLow, Float_t& effHigh, Float_t& effAny); + virtual void Evaluate(Float_t pt, Float_t theta, Float_t phi, + Float_t& effLow, Float_t& effHigh, Float_t& effAny) + {Evaluate(1., pt, theta, phi, effLow, effHigh, effAny);} virtual Float_t Evaluate(Float_t charge, Float_t pt, Float_t theta, Float_t phi); + virtual void SetCut(Int_t cut = kLow); virtual Float_t Cut() const {return fCut;} virtual Int_t SetBkgLevel(Float_t Bkg=0.); diff --git a/FASTSIM/AliFastResponse.cxx b/FASTSIM/AliFastResponse.cxx index 60331e14c2d..e3191af1551 100644 --- a/FASTSIM/AliFastResponse.cxx +++ b/FASTSIM/AliFastResponse.cxx @@ -28,16 +28,24 @@ ClassImp(AliFastResponse) -Float_t AliFastResponse::Evaluate(AliFastParticle* part) +Float_t AliFastResponse::Evaluate(Float_t /*charge*/, Float_t /*pt*/, Float_t /*theta*/, Float_t /*phi*/) { // +// Dummy implementation of this method +// + return 0.; +} + + +void AliFastResponse::Evaluate(Float_t /*charge*/, Float_t p, Float_t theta , Float_t phi, + Float_t& pS, Float_t& thetaS, Float_t& phiS) +{ +// // Basic implementation of this method // - Float_t theta = part->Theta(); - Float_t phi = part->Phi(); - Float_t pt = part->Pt(); - Float_t eff = Evaluate(pt, theta, phi); - return eff; + pS = p; + thetaS = theta; + phiS = phi; } void AliFastResponse::Evaluate(Float_t p, Float_t theta , Float_t phi, diff --git a/FASTSIM/AliFastResponse.h b/FASTSIM/AliFastResponse.h index f2eed049e7c..97f167f05fa 100644 --- a/FASTSIM/AliFastResponse.h +++ b/FASTSIM/AliFastResponse.h @@ -21,12 +21,14 @@ class AliFastResponse : public TNamed { AliFastResponse(const char* Name, const char* Title): TNamed(Name, Title){} virtual ~AliFastResponse(){} virtual void Init() = 0; - virtual Float_t Evaluate(Float_t /*pt*/, Float_t /*theta*/ , Float_t /*phi*/) - {Fatal("Evaluate","Not implemented in base class !\n"); return (-1);} - + + virtual void Evaluate(Float_t charge, Float_t p, Float_t theta , Float_t phi, + Float_t& pS, Float_t& thetaS, Float_t& phiS); virtual void Evaluate(Float_t p, Float_t theta , Float_t phi, Float_t& pS, Float_t& thetaS, Float_t& phiS); - virtual Float_t Evaluate(AliFastParticle* part); + + virtual Float_t Evaluate(Float_t charge, Float_t pt, Float_t theta, Float_t phi); + void Copy(TObject&) const; protected: ClassDef(AliFastResponse,1) // Base class for fast response -- 2.39.3