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.2 2000/06/15 07:58:49 morsch
19 Code from MUON-dev joined
21 Revision 1.1.2.3 2000/06/12 10:11:45 morsch
22 Dummy copy constructor and assignment operator added
24 Revision 1.1.2.2 2000/06/09 12:58:05 gosset
25 Removed comment beginnings in Log sections of .cxx files
26 Suppressed most violations of coding rules
28 Revision 1.1.2.1 2000/06/07 14:44:53 gosset
29 Addition of files for track reconstruction in C++
32 //__________________________________________________________________________
34 // Reconstructed track hit in ALICE dimuon spectrometer
35 //__________________________________________________________________________
37 #include "AliMUONTrackHit.h"
39 #include "AliMUONHitForRec.h"
41 ClassImp(AliMUONTrackHit) // Class implementation in ROOT context
43 //__________________________________________________________________________
44 AliMUONTrackHit::AliMUONTrackHit(AliMUONHitForRec* Hit)
46 // Constructor from the HitForRec pointed to by "Hit"
47 fHitForRecPtr = Hit; // pointer to HitForRec
48 // links from/to HitForRec
49 if (Hit->GetNTrackHits() == 0) {
50 fPrevTrackHitWithSameHitForRec = NULL;
51 Hit->SetFirstTrackHitPtr(this);
54 fPrevTrackHitWithSameHitForRec = Hit->GetLastTrackHitPtr();
55 fNextTrackHitWithSameHitForRec = NULL;
57 Hit->SetLastTrackHitPtr(this);
58 fNextTrackHitWithSameHitForRec = NULL;
59 Hit->SetNTrackHits(Hit->GetNTrackHits() + 1);
63 AliMUONTrackHit::AliMUONTrackHit (const AliMUONTrackHit& MUONTrackHit)
65 // Dummy copy constructor
68 AliMUONTrackHit & AliMUONTrackHit::operator=(const AliMUONTrackHit& MUONTrackHit)
70 // Dummy assignment operator
75 //__________________________________________________________________________
76 Int_t AliMUONTrackHit::Compare(TObject* TrackHit)
78 // "Compare" function to sort with increasing Z.
79 // Returns -1 (0, +1) if Z of current TrackHit
80 // is smaller than (equal to, larger than) Z of TrackHit
81 if (fHitForRecPtr->GetZ() <
82 ((AliMUONTrackHit*)TrackHit)->fHitForRecPtr->GetZ()) return(-1);
83 else if (fHitForRecPtr->GetZ() ==
84 ((AliMUONTrackHit*)TrackHit)->fHitForRecPtr->GetZ()) return( 0);