]>
Commit | Line | Data |
---|---|---|
251a2c81 | 1 | #ifndef ALIFLATTPCCLUSTER_H |
2 | #define ALIFLATTPCCLUSTER_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice * | |
6 | * Primary Authors : Sergey Gorbunov, Jochen Thaeder, Chiara Zampolli */ | |
7 | ||
8 | /** | |
9 | * >> Flat structure representing a TPC cluster << | |
10 | */ | |
11 | ||
12 | #include "Rtypes.h" | |
1f516476 | 13 | #include "AliVMisc.h" |
bbddf50f | 14 | #include "AliTPCclusterMI.h" |
bbac6f91 | 15 | #include "AliComplexCluster.h" |
251a2c81 | 16 | |
1f516476 | 17 | class AliFlatTPCCluster |
251a2c81 | 18 | { |
8fcd8556 | 19 | public: |
6a33e0e9 | 20 | |
bbac6f91 | 21 | AliFlatTPCCluster() : fX(0.), fY(0.), fZ(0.), fSector(0), fPadRow(0), fSigmaY2(0.), fSigmaZ2(0.), fCharge(0), fQMax(0), fTrackAngleY(0), fTrackAngleZ(0) {} |
bbddf50f | 22 | |
23 | AliFlatTPCCluster(AliVConstructorReinitialisationFlag ); // do nothing | |
24 | ||
25 | void Reinitialize(){} // do nothing | |
26 | ||
6a33e0e9 | 27 | ~AliFlatTPCCluster() {} |
28 | ||
251a2c81 | 29 | void SetX(Float_t x) {fX = x;} |
30 | void SetY(Float_t y) {fY = y;} | |
31 | void SetZ(Float_t z) {fZ = z;} | |
bbddf50f | 32 | void SetSector(UShort_t sector) {fSector = sector;} |
33 | void SetPadRow(UShort_t padrow) {fPadRow = padrow;} | |
251a2c81 | 34 | void SetSigmaY2(Float_t sigmaY2) {fSigmaY2 = sigmaY2;} |
35 | void SetSigmaZ2(Float_t sigmaZ2) {fSigmaZ2 = sigmaZ2;} | |
36 | void SetCharge(UShort_t charge) {fCharge = charge;} | |
37 | void SetQMax(UShort_t qmax) {fQMax = qmax;} | |
bbac6f91 | 38 | void SetTrackAngleY( Float_t angY ) {fTrackAngleY = angY;} |
39 | void SetTrackAngleZ( Float_t angZ ) {fTrackAngleZ = angZ;} | |
bbddf50f | 40 | |
251a2c81 | 41 | Float_t GetX() const {return fX;} |
42 | Float_t GetY() const {return fY;} | |
43 | Float_t GetZ() const {return fZ;} | |
bbddf50f | 44 | UShort_t GetSector() const {return fSector;} |
251a2c81 | 45 | UShort_t GetPadRow() const {return fPadRow;} |
46 | Float_t GetSigmaY2() const {return fSigmaY2;} | |
47 | Float_t GetSigmaZ2() const {return fSigmaZ2;} | |
48 | UShort_t GetCharge() const {return fCharge;} | |
49 | UShort_t GetQMax() const {return fQMax;} | |
bbac6f91 | 50 | |
51 | Float_t GetTrackAngleY() const {return fTrackAngleY;} | |
52 | Float_t GetTrackAngleZ() const {return fTrackAngleZ;} | |
251a2c81 | 53 | |
bbac6f91 | 54 | void SetTPCCluster( const AliTPCclusterMI *c, const AliTPCTrackerPoint *p ); |
55 | void GetTPCCluster( AliTPCclusterMI *c, AliTPCTrackerPoint *p ) const; | |
251a2c81 | 56 | |
f009a562 | 57 | private: |
6a33e0e9 | 58 | |
f009a562 | 59 | Float_t fX; // X coordinate in local coordinates |
60 | Float_t fY; // Y coordinate in local coordinates | |
61 | Float_t fZ; // Z coordinate in local coordinates | |
bbddf50f | 62 | UChar_t fSector; // TPC sector |
63 | UChar_t fPadRow; // Pad row number withing the sector | |
f009a562 | 64 | Float_t fSigmaY2; // error (former width) of the clusters |
65 | Float_t fSigmaZ2; // error (former width) of the clusters | |
66 | UInt_t fCharge; // total charge of cluster | |
67 | UInt_t fQMax; // QMax of cluster | |
bbac6f91 | 68 | Float_t fTrackAngleY; // tracker point angle Y |
69 | Float_t fTrackAngleZ; // tracker point angle Z | |
251a2c81 | 70 | }; |
71 | ||
bbddf50f | 72 | #pragma GCC diagnostic ignored "-Weffc++" |
73 | inline AliFlatTPCCluster::AliFlatTPCCluster(AliVConstructorReinitialisationFlag ){} | |
74 | #pragma GCC diagnostic warning "-Weffc++" | |
75 | ||
bbac6f91 | 76 | inline void AliFlatTPCCluster::SetTPCCluster( const AliTPCclusterMI *c, const AliTPCTrackerPoint *p ) |
bbddf50f | 77 | { |
bbac6f91 | 78 | if( !c ) return; |
bbddf50f | 79 | SetX( c->GetX() ); |
80 | SetY( c->GetY() ); | |
81 | SetZ( c->GetZ() ); | |
82 | SetSector( c->GetDetector() ); | |
83 | SetPadRow( c->GetRow() ); | |
84 | SetSigmaY2( c->GetSigmaY2() ); | |
85 | SetSigmaZ2( c->GetSigmaZ2() ); | |
86 | SetCharge( c->GetQ() ); | |
87 | SetQMax( c->GetMax() ); | |
bbac6f91 | 88 | if( p ){ |
89 | SetTrackAngleY( p->GetAngleY() ); | |
90 | SetTrackAngleZ( p->GetAngleZ() ); | |
91 | } else { | |
92 | SetTrackAngleY( 0. ); | |
93 | SetTrackAngleZ( 0. ); | |
94 | } | |
bbddf50f | 95 | } |
bbac6f91 | 96 | |
97 | inline void AliFlatTPCCluster::GetTPCCluster( AliTPCclusterMI *c, AliTPCTrackerPoint *p ) const | |
bbddf50f | 98 | { |
bbac6f91 | 99 | if( c ){ |
100 | c->SetX( GetX() ); | |
101 | c->SetY( GetY() ); | |
102 | c->SetZ( GetZ() ); | |
103 | c->SetDetector( GetSector() ); | |
104 | c->SetRow( GetPadRow() ); | |
105 | c->SetSigmaY2( GetSigmaY2() ); | |
106 | c->SetSigmaZ2( GetSigmaZ2() ); | |
107 | c->SetQ( GetCharge() ); | |
108 | c->SetMax( GetQMax() ); | |
109 | } | |
110 | if( p ){ | |
111 | p->SetAngleY( GetTrackAngleY() ); | |
112 | p->SetAngleZ( GetTrackAngleZ() ); | |
113 | } | |
bbddf50f | 114 | } |
115 | ||
251a2c81 | 116 | #endif |