]> 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 4520629318a2357ad62666eb4e606c6d822becbf..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"
@@ -46,8 +46,6 @@ AliMUONHitForRec::AliMUONHitForRec()
     fHitNumber(0),
     fTTRTrack(0),
     fTrackRefSignal(0),
-    fIndexOfFirstSegment(0),
-    fNSegments(0),
     fNTrackHits(0)
 {
 /// Default Constructor
@@ -67,8 +65,6 @@ AliMUONHitForRec::AliMUONHitForRec(AliTrackReference* theGhit)
     fHitNumber(0),
     fTTRTrack(0),
     fTrackRefSignal(0),
-    fIndexOfFirstSegment(-1),
-    fNSegments(0),
     fNTrackHits(0)
 {
 /// Constructor for AliMUONHitForRec from a track ref. hit.
@@ -115,8 +111,6 @@ AliMUONHitForRec::AliMUONHitForRec(AliMUONRawCluster* theRawCluster)
     fHitNumber(0),
     fTTRTrack(-1),
     fTrackRefSignal(-1),
-    fIndexOfFirstSegment(-1),
-    fNSegments(0),
     fNTrackHits(0)
 {
 /// Constructor for AliMUONHitForRec from a raw cluster.
@@ -140,12 +134,16 @@ AliMUONHitForRec::AliMUONHitForRec (const AliMUONHitForRec& theMUONHitForRec)
     fHitNumber(theMUONHitForRec.fHitNumber),
     fTTRTrack(theMUONHitForRec.fTTRTrack),
     fTrackRefSignal(theMUONHitForRec.fTrackRefSignal),
-    fIndexOfFirstSegment(theMUONHitForRec.fIndexOfFirstSegment),
-    fNSegments(theMUONHitForRec.fNSegments),
     fNTrackHits(theMUONHitForRec.fNTrackHits)
 {
 /// Copy constructor
 
+}
+
+  //__________________________________________________________________________
+AliMUONHitForRec::~AliMUONHitForRec()
+{
+/// Destructor
 }
 
   //__________________________________________________________________________
@@ -163,8 +161,6 @@ AliMUONHitForRec & AliMUONHitForRec::operator=(const AliMUONHitForRec& theMUONHi
   fHitNumber = theMUONHitForRec.fHitNumber;
   fTTRTrack = theMUONHitForRec.fTTRTrack;
   fTrackRefSignal = theMUONHitForRec.fTrackRefSignal;
-  fIndexOfFirstSegment = theMUONHitForRec.fIndexOfFirstSegment;
-  fNSegments = theMUONHitForRec.fNSegments;
   fNTrackHits = theMUONHitForRec.fNTrackHits;
   return *this;
 }
@@ -195,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;