]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONHit.cxx
Compliance to AliSimulation framework
[u/mrichter/AliRoot.git] / MUON / AliMUONHit.cxx
index 00d6d90fde398f3b39756a90bbe38c9df48aa311..b4182227457bd7592360d31ca545c944b4f8e02d 100644 (file)
 
 /* $Id$ */
 
+// MUON classe for MonteCarlo Hits, inherited from AliHit for the 
+// In addition to the ALiHit data member fX, fY, fZ and fTrack, AliMUONHit contains some info about the particle crossing the chamber:
+// Impulsion: fPtot, fPx, fPy and fPz
+// Reference position at the center of the chamber (wire plane) fXref, fYref and fZref
+// Cumulated path along the active volume fTlength for spliting of hits for very inclined tracks 
+// Energy loss of the particle inside the gas active volume.
+// Incident fTheta and fPhi angle with respect of the wire plane of the chamber.
+//
+
+#include <TMath.h>
+
 #include "AliMUONHit.h"
 
 ClassImp(AliMUONHit)
  
+//___________________________________________
+AliMUONHit::AliMUONHit()
+  : AliHit() 
+{
+// Default constructor
+}
+
 //___________________________________________
 AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
        AliHit(shunt, track)
@@ -63,6 +81,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 +109,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;