]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FASTSIM/AliFastMuonTrackingRes.cxx
Update in cuts for Sigma* and update for lego_train macros (M.Vala)
[u/mrichter/AliRoot.git] / FASTSIM / AliFastMuonTrackingRes.cxx
index 2ea30abdb6cbecca45dd7b51b00ff3a85fcc8e66..c3bd5136423be03958b33745185cc812a48a2923 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.5  2003/08/13 17:37:29  hristov
-Bug fix (Alpha)
-
-Revision 1.4  2003/08/05 16:14:20  morsch
-Some problems with too big fluctuations corrected. (A. de Falco)
-
-Revision 1.1  2003/01/06 10:13:09  morsch
-First commit.
-
-*/
+/* $Id: */
 
 // Implementation of AliFastResponse for the Muon Spectrometer resolution.
 // The response depends on the charge of the muon and
@@ -42,10 +31,22 @@ ClassImp(AliFastMuonTrackingRes)
 
 
 AliFastMuonTrackingRes::AliFastMuonTrackingRes() :
-    AliFastResponse("Resolution", "Muon Tracking Resolution")
+    AliFastResponse("Resolution", "Muon Tracking Resolution"),
+    fBackground(0.),
+    fCharge(1.),
+    fFastTracking(0)
 {
-// Deafault constructor
-    SetBackground();
+// Default constructor
+}
+
+AliFastMuonTrackingRes::AliFastMuonTrackingRes(const AliFastMuonTrackingRes & res)
+    :AliFastResponse(res),
+    fBackground(0.),
+    fCharge(1.),
+    fFastTracking(0)
+{
+// Copy constructor
+    res.Copy(*this);
 }
 
 void AliFastMuonTrackingRes::Init()
@@ -105,8 +106,8 @@ void AliFastMuonTrackingRes::Evaluate(Float_t   p,  Float_t  theta , Float_t   p
     //    Float_t dpmax = 5. + ip * 2.5; 
     //    Float_t dpmax = 5. + ip * 2; 
     Float_t dpmax;
-    if (sigmag2<999.) dpmax = 5. * (sigmap + sigmag2); 
-    else dpmax = 5. * sigmap;
+    if (sigmag2<999.) dpmax = 5. * TMath::Abs(sigmap + sigmag2); 
+    else dpmax = 5. * TMath::Abs(sigmap);
     Float_t dp = 100;
     while (pS<0 || TMath::Abs(dp)>dpmax) { 
       pS = p + fitp->GetRandom();
@@ -128,7 +129,12 @@ void AliFastMuonTrackingRes::Evaluate(Float_t   p,  Float_t  theta , Float_t   p
     thetaS = theta + gRandom->Gaus(meantheta,sigmatheta);
 }
 
-
+AliFastMuonTrackingRes& AliFastMuonTrackingRes::operator=(const  AliFastMuonTrackingRes& rhs)
+{
+// Assignment operator
+    rhs.Copy(*this);
+    return *this;
+}