StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AliHLTTPCCAGBHit.h
1 //-*- Mode: C++ -*-
2 // $Id: AliHLTTPCCAGBHit.h,v 1.1 2016/02/05 23:27:27 fisyak Exp $
3 // ************************************************************************
4 // This file is property of and copyright by the ALICE HLT Project *
5 // ALICE Experiment at CERN, All rights reserved. *
6 // See cxx source for full Copyright notice *
7 // *
8 //*************************************************************************
9 
10 #ifndef ALIHLTTPCCAGBHIT_H
11 #define ALIHLTTPCCAGBHIT_H
12 
13 #include "AliHLTTPCCADef.h"
14 
15 #include <iostream>
16 using std::ostream;
17 using std::istream;
18 
19 
28 {
29  public:
31  : fX( 0 ), fY( 0 ), fZ( 0 ), fErrX( 0 ), fErrY( 0 ), fErrZ( 0 ), fAmp( 0 ),
32  fISlice( 0 ), fIRow( 0 ), fID( 0 ), fIsUsed( 0 ) {}
33 
34  float X() const { return fX; }
35  float Y() const { return fY; }
36  float Z() const { return fZ; }
37 
38  float ErrX() const { return fErrX; }
39  float ErrY() const { return fErrY; }
40  float ErrZ() const { return fErrZ; }
41  float Amp() const { return fAmp; }
42 
43  int ISlice() const { return fISlice; }
44  int IRow() const { return fIRow; }
45  int ID() const { return fID; }
46  bool IsUsed() const { return fIsUsed; };
47 
48  void SetX( float v ) { fX = v; }
49  void SetY( float v ) { fY = v; }
50  void SetZ( float v ) { fZ = v; }
51  void SetErrX( float v ) { fErrX = v; }
52  void SetErrY( float v ) { fErrY = v; }
53  void SetErrZ( float v ) { fErrZ = v; }
54  void SetAmp( float v ) { fAmp = v; }
55  void SetISlice( int v ) { fISlice = v; }
56  void SetIRow( int v ) { fIRow = v; }
57  void SetID( int v ) { fID = v; }
58  void SetIsUsed( bool v ) { fIsUsed = v; };
59 
60  static bool Compare( const AliHLTTPCCAGBHit &a, const AliHLTTPCCAGBHit &b );
61 
64 
65  static bool CompareRowDown( const AliHLTTPCCAGBHit &a, const AliHLTTPCCAGBHit &b ) {
66  return ( a.fIRow > b.fIRow );
67 
69  }
70  static bool ComparePRowDown( const AliHLTTPCCAGBHit *a, const AliHLTTPCCAGBHit *b ) {
71  return ( a->fIRow > b->fIRow );
73  }
74 
75  friend ostream& operator<<(ostream& out, const AliHLTTPCCAGBHit &a);
76  friend istream& operator>>(istream& in, AliHLTTPCCAGBHit &a);
77 
78  protected:
79 
80  float fX; //* X position
81  float fY; //* Y position
82  float fZ; //* Z position
83 
84  float fErrX; //* X position error
85  float fErrY; //* Y position error
86  float fErrZ; //* Z position error
87 
88  float fAmp; //* Maximal amplitude
89  int fISlice; //* slice number
90  int fIRow; //* row number
91  int fID; //* external ID (id of AliTPCcluster)
92  bool fIsUsed; //* is used by GBTracks
93 
94  //ClassDef(AliHLTTPCCAGBHit,1);
95 
96 };
97 
99 
100 
103 
104 
105 {
106  //* Comparison function for sorting hits
107  if ( a.fISlice < b.fISlice ) return 1;
108  if ( a.fISlice > b.fISlice ) return 0;
109  if ( a.fIRow < b.fIRow ) return 1;
110  if ( a.fIRow > b.fIRow ) return 0;
111  return ( a.fZ < b.fZ );
112 }
113 
114 #endif
static bool ComparePRowDown(const AliHLTTPCCAGBHit *a, const AliHLTTPCCAGBHit *b)
static bool Compare(const AliHLTTPCCAGBHit &a, const AliHLTTPCCAGBHit &b)
Hits reordering in accordance with the geometry and the track-finder needs: Hits are sorted by sector...
static bool CompareRowDown(const AliHLTTPCCAGBHit &a, const AliHLTTPCCAGBHit &b)
Hits reordering in accordance with the geometry and the track-finder needs: Hits are sorted by sector...