]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONHit.cxx
Compliance to AliSimulation framework
[u/mrichter/AliRoot.git] / MUON / AliMUONHit.cxx
index 2438d04f39069e4150d2089dddc1e664b606b49d..b4182227457bd7592360d31ca545c944b4f8e02d 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.3  2001/03/17 10:07:20  morsch
-Correct inconsistent variable name / method name / comments.
+/* $Id$ */
 
-Revision 1.2  2000/06/15 07:58:48  morsch
-Code from MUON-dev joined
+// 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.
+//
 
-Revision 1.1.2.1  2000/06/09 22:02:14  morsch
-Was before in DataStructures.cxx
+#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)
@@ -50,9 +58,14 @@ AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
     fPy        = hits[12];
     fPz        = hits[13];
     fAge       = hits[14];
+    fXref      = 0.;
+    fYref      = 0.;
+    fZref      = 0.;
 }
 //___________________________________________
-AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t iChamber, Int_t idpart, Float_t X, Float_t Y, Float_t Z, Float_t tof, Float_t momentum, Float_t theta, Float_t phi, Float_t length, Float_t destep):
+AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t iChamber, Int_t idpart, 
+                      Float_t X, Float_t Y, Float_t Z, Float_t tof, Float_t momentum, 
+                      Float_t theta, Float_t phi, Float_t length, Float_t destep):
        AliHit(shunt, track)
 {
 // Constructor
@@ -68,13 +81,41 @@ AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t iChamber, Int_t idpart, F
     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.;
+    fZref      = 0.;
 }
-
-
-
-
-
-
-
+//-----------------------------------------------------------------------------------------------
+AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t iChamber, Int_t idpart, 
+                      Float_t X, Float_t Y, Float_t Z, Float_t tof, Float_t momentum, 
+                      Float_t theta, Float_t phi, Float_t length, Float_t destep,
+                      Float_t Xref,Float_t Yref,Float_t Zref):
+       AliHit(shunt, track)
+{
+// Constructor
+    fChamber   = iChamber;
+    fParticle  = idpart;
+    fX         = X;
+    fY         = Y;
+    fZ         = Z;
+    fTheta     = theta;
+    fPhi       = phi;
+    fTlength   = length;
+    fEloss     = destep;
+    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;
+    fZref      = Zref;
+}
+//-----------------------------------------------------------------------------------------------