]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Defining properly momentum components in AliMUONHit constructors (thanks Artur)
authormartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Mar 2004 15:33:57 +0000 (15:33 +0000)
committermartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Mar 2004 15:33:57 +0000 (15:33 +0000)
MUON/AliMUONHit.cxx

index 00d6d90fde398f3b39756a90bbe38c9df48aa311..e39a385f5398473622e4d642336f00309db1dce1 100644 (file)
@@ -15,6 +15,7 @@
 
 /* $Id$ */
 
+#include "TMath.h"
 #include "AliMUONHit.h"
 
 ClassImp(AliMUONHit)
@@ -63,6 +64,9 @@ AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t iChamber, Int_t idpart,
     fPHfirst   = 0;
     fPHlast    = 0;
     fPTot      = momentum;
+    fPx        = momentum * TMath::Sin(theta) * TMath::Cos(phi);
+    fPy        = momentum * TMath::Sin(theta) * TMath::Sin(phi);
+    fPx        = momentum * TMath::Cos(theta) ;
     fAge       = tof;
     fXref      = 0.;
     fYref      = 0.;
@@ -88,6 +92,9 @@ AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t iChamber, Int_t idpart,
     fPHfirst   = 0;
     fPHlast    = 0;
     fPTot      = momentum;
+    fPx        = momentum * TMath::Sin(theta) * TMath::Cos(phi);
+    fPy        = momentum * TMath::Sin(theta) * TMath::Sin(phi);
+    fPx        = momentum * TMath::Cos(theta) ;
     fAge       = tof;
     fXref      = Xref;
     fYref      = Yref;