1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.1.2.3 2000/06/12 10:11:45 morsch
19 Dummy copy constructor and assignment operator added
21 Revision 1.1.2.2 2000/06/09 12:58:05 gosset
22 Removed comment beginnings in Log sections of .cxx files
23 Suppressed most violations of coding rules
25 Revision 1.1.2.1 2000/06/07 14:44:53 gosset
26 Addition of files for track reconstruction in C++
29 //__________________________________________________________________________
31 // Reconstructed track hit in ALICE dimuon spectrometer
32 //__________________________________________________________________________
34 #include "AliMUONTrackHit.h"
36 #include "AliMUONHitForRec.h"
38 ClassImp(AliMUONTrackHit) // Class implementation in ROOT context
40 //__________________________________________________________________________
41 AliMUONTrackHit::AliMUONTrackHit(AliMUONHitForRec* Hit)
43 // Constructor from the HitForRec pointed to by "Hit"
44 fHitForRecPtr = Hit; // pointer to HitForRec
45 // links from/to HitForRec
46 if (Hit->GetNTrackHits() == 0) {
47 fPrevTrackHitWithSameHitForRec = NULL;
48 Hit->SetFirstTrackHitPtr(this);
51 fPrevTrackHitWithSameHitForRec = Hit->GetLastTrackHitPtr();
52 fNextTrackHitWithSameHitForRec = NULL;
54 Hit->SetLastTrackHitPtr(this);
55 fNextTrackHitWithSameHitForRec = NULL;
56 Hit->SetNTrackHits(Hit->GetNTrackHits() + 1);
60 AliMUONTrackHit::AliMUONTrackHit (const AliMUONTrackHit& MUONTrackHit)
62 // Dummy copy constructor
65 AliMUONTrackHit & AliMUONTrackHit::operator=(const AliMUONTrackHit& MUONTrackHit)
67 // Dummy assignment operator
71 // Inline functions for Get and Set
72 inline AliMUONHitForRec* AliMUONTrackHit::GetHitForRecPtr(void) {
74 return fHitForRecPtr;}
75 inline AliMUONTrackParam* AliMUONTrackHit::GetTrackParam(void) {
76 // Get pointer to fTrackParam
77 return &(fTrackParam);}
78 inline void AliMUONTrackHit::SetTrackParam(AliMUONTrackParam* TrackParam) {
80 fTrackParam = *TrackParam;}
82 //__________________________________________________________________________
83 Int_t AliMUONTrackHit::Compare(TObject* TrackHit)
85 // "Compare" function to sort with increasing Z.
86 // Returns -1 (0, +1) if Z of current TrackHit
87 // is smaller than (equal to, larger than) Z of TrackHit
88 if (fHitForRecPtr->GetZ() <
89 ((AliMUONTrackHit*)TrackHit)->fHitForRecPtr->GetZ()) return(-1);
90 else if (fHitForRecPtr->GetZ() ==
91 ((AliMUONTrackHit*)TrackHit)->fHitForRecPtr->GetZ()) return( 0);