]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONTrackHit.cxx
Add threshold for primary particles participating to a digit
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackHit.cxx
CommitLineData
a9e2aefa 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/*
17$Log$
9b03f36b 18Revision 1.2 2000/06/15 07:58:49 morsch
19Code from MUON-dev joined
20
a9e2aefa 21Revision 1.1.2.3 2000/06/12 10:11:45 morsch
22Dummy copy constructor and assignment operator added
23
24Revision 1.1.2.2 2000/06/09 12:58:05 gosset
25Removed comment beginnings in Log sections of .cxx files
26Suppressed most violations of coding rules
27
28Revision 1.1.2.1 2000/06/07 14:44:53 gosset
29Addition of files for track reconstruction in C++
30*/
31
32//__________________________________________________________________________
33//
34// Reconstructed track hit in ALICE dimuon spectrometer
35//__________________________________________________________________________
36
37#include "AliMUONTrackHit.h"
38
39#include "AliMUONHitForRec.h"
40
41ClassImp(AliMUONTrackHit) // Class implementation in ROOT context
42
43 //__________________________________________________________________________
44AliMUONTrackHit::AliMUONTrackHit(AliMUONHitForRec* Hit)
45{
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);
52 }
53 else {
54 fPrevTrackHitWithSameHitForRec = Hit->GetLastTrackHitPtr();
55 fNextTrackHitWithSameHitForRec = NULL;
56 }
57 Hit->SetLastTrackHitPtr(this);
58 fNextTrackHitWithSameHitForRec = NULL;
59 Hit->SetNTrackHits(Hit->GetNTrackHits() + 1);
60}
61
62
63AliMUONTrackHit::AliMUONTrackHit (const AliMUONTrackHit& MUONTrackHit)
64{
65// Dummy copy constructor
66}
67
68AliMUONTrackHit & AliMUONTrackHit::operator=(const AliMUONTrackHit& MUONTrackHit)
69{
70// Dummy assignment operator
71 return *this;
72}
73
a9e2aefa 74
75 //__________________________________________________________________________
76Int_t AliMUONTrackHit::Compare(TObject* TrackHit)
77{
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);
85 else return(+1);
86}