]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONHitForRec.cxx
Removing quick code hack and unnecessary methods. Now have a much cleaner implementat...
[u/mrichter/AliRoot.git] / MUON / AliMUONHitForRec.cxx
index a5fbcee4365c7fc60979413026c924abda764908..f47d9483edbb9d73eb7ce4c84b3a69dc1c0c579a 100644 (file)
 
 /* $Id$ */
 
-// ------------------------
+//-----------------------------------------------------------------------------
 // Class AliMUONHitForRec
 // ------------------------
 // Hit for reconstruction in ALICE dimuon spectrometer
 // Author: J. Gosset
+//-----------------------------------------------------------------------------
 
 #include "AliTrackReference.h" 
 #include "AliMUONHitForRec.h" 
 #include "AliMUONRawCluster.h"
-#include "AliMUONHit.h"
 #include "AliMUONConstants.h"
 #include "AliLog.h"
 #include "Riostream.h"
 
+/// \cond CLASSIMP
 ClassImp(AliMUONHitForRec) // Class implementation in ROOT context
+/// \endcond
 
   //__________________________________________________________________________
 AliMUONHitForRec::AliMUONHitForRec()
@@ -44,10 +46,6 @@ AliMUONHitForRec::AliMUONHitForRec()
     fHitNumber(0),
     fTTRTrack(0),
     fTrackRefSignal(0),
-    fIndexOfFirstSegment(0),
-    fNSegments(0),
-    fFirstTrackHitPtr(0x0),
-    fLastTrackHitPtr(0x0),
     fNTrackHits(0)
 {
 /// Default Constructor
@@ -67,10 +65,6 @@ AliMUONHitForRec::AliMUONHitForRec(AliTrackReference* theGhit)
     fHitNumber(0),
     fTTRTrack(0),
     fTrackRefSignal(0),
-    fIndexOfFirstSegment(-1),
-    fNSegments(0),
-    fFirstTrackHitPtr(0x0),
-    fLastTrackHitPtr(0x0),
     fNTrackHits(0)
 {
 /// Constructor for AliMUONHitForRec from a track ref. hit.
@@ -117,10 +111,6 @@ AliMUONHitForRec::AliMUONHitForRec(AliMUONRawCluster* theRawCluster)
     fHitNumber(0),
     fTTRTrack(-1),
     fTrackRefSignal(-1),
-    fIndexOfFirstSegment(-1),
-    fNSegments(0),
-    fFirstTrackHitPtr(0x0),
-    fLastTrackHitPtr(0x0),
     fNTrackHits(0)
 {
 /// Constructor for AliMUONHitForRec from a raw cluster.
@@ -144,14 +134,16 @@ AliMUONHitForRec::AliMUONHitForRec (const AliMUONHitForRec& theMUONHitForRec)
     fHitNumber(theMUONHitForRec.fHitNumber),
     fTTRTrack(theMUONHitForRec.fTTRTrack),
     fTrackRefSignal(theMUONHitForRec.fTrackRefSignal),
-    fIndexOfFirstSegment(theMUONHitForRec.fIndexOfFirstSegment),
-    fNSegments(theMUONHitForRec.fNSegments),
-    fFirstTrackHitPtr(theMUONHitForRec.fFirstTrackHitPtr),
-    fLastTrackHitPtr(theMUONHitForRec.fLastTrackHitPtr),
     fNTrackHits(theMUONHitForRec.fNTrackHits)
 {
 /// Copy constructor
 
+}
+
+  //__________________________________________________________________________
+AliMUONHitForRec::~AliMUONHitForRec()
+{
+/// Destructor
 }
 
   //__________________________________________________________________________
@@ -169,10 +161,6 @@ AliMUONHitForRec & AliMUONHitForRec::operator=(const AliMUONHitForRec& theMUONHi
   fHitNumber = theMUONHitForRec.fHitNumber;
   fTTRTrack = theMUONHitForRec.fTTRTrack;
   fTrackRefSignal = theMUONHitForRec.fTrackRefSignal;
-  fIndexOfFirstSegment = theMUONHitForRec.fIndexOfFirstSegment;
-  fNSegments = theMUONHitForRec.fNSegments;
-  fFirstTrackHitPtr = theMUONHitForRec.fFirstTrackHitPtr;
-  fLastTrackHitPtr = theMUONHitForRec.fLastTrackHitPtr;
   fNTrackHits = theMUONHitForRec.fNTrackHits;
   return *this;
 }
@@ -203,29 +191,23 @@ Int_t AliMUONHitForRec::Compare(const TObject* Hit) const
   //__________________________________________________________________________
 Double_t AliMUONHitForRec::NormalizedChi2WithHitForRec(AliMUONHitForRec* hitForRec, Double_t Sigma2Cut) const
 {
-/// Calculate the normalized Chi2 between the current hitForRec (this)
-/// and the hitForRec pointed to by "hitForRec",
-/// i.e. the square deviations between the coordinates,
-/// in both the bending and the non bending plane,
+/// Calculate the normalized Chi2 between the current hitForRec (this) and the hitForRec pointed to by "hitForRec",
+/// i.e. the square deviations between the coordinates, in both the bending and the non bending plane,
 /// divided by the variance of the same quantities and by "Sigma2Cut".
-/// Returns 3 if none of the 2 quantities is OK,
-/// something smaller than or equal to 2 otherwise.
-/// Would it be more correct to use a real chi square
-/// including the non diagonal term ????
+/// Returns 3 if none of the 2 quantities is OK, something smaller than or equal to 2 otherwise.
+/// Would it be more correct to use a real chi square including the non diagonal term ????
 
   Double_t chi2, chi2Max, diff, normDiff;
   chi2 = 0.0;
   chi2Max = 3.0;
   // coordinate in bending plane
   diff = fBendingCoor - hitForRec->fBendingCoor;
-  normDiff = diff * diff /
-    (fBendingReso2 + hitForRec->fBendingReso2) / Sigma2Cut;
+  normDiff = diff * diff / (fBendingReso2 + hitForRec->fBendingReso2) / Sigma2Cut;
   if (normDiff > 1.0) return chi2Max;
   chi2 = chi2 + normDiff;
   // coordinate in non bending plane
   diff = fNonBendingCoor - hitForRec->fNonBendingCoor;
-  normDiff = diff * diff /
-    (fNonBendingReso2 + hitForRec->fNonBendingReso2) / Sigma2Cut;
+  normDiff = diff * diff / (fNonBendingReso2 + hitForRec->fNonBendingReso2) / Sigma2Cut;
   if (normDiff > 1.0) return chi2Max;
   chi2 = chi2 + normDiff;
   return chi2;
@@ -235,6 +217,8 @@ Double_t AliMUONHitForRec::NormalizedChi2WithHitForRec(AliMUONHitForRec* hitForR
 void
 AliMUONHitForRec::Print(Option_t* /*opt*/) const
 {
+/// Printing
+
   cout << "<AliMUONHitForRec> Coordinates (B,NB,Z) = (" 
   << setw(8) << setprecision(5) << fBendingCoor
   << "," << setw(8) << setprecision(5) << fNonBendingCoor << ","