]>
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" |
251a2c81 | 15 | |
1f516476 | 16 | class AliFlatTPCCluster |
251a2c81 | 17 | { |
8fcd8556 | 18 | public: |
6a33e0e9 | 19 | |
bbddf50f | 20 | AliFlatTPCCluster() : fX(0.), fY(0.), fZ(0.), fSector(0), fPadRow(0), fSigmaY2(0.), fSigmaZ2(0.), fCharge(0), fQMax(0) {} |
21 | ||
22 | AliFlatTPCCluster(AliVConstructorReinitialisationFlag ); // do nothing | |
23 | ||
24 | void Reinitialize(){} // do nothing | |
25 | ||
6a33e0e9 | 26 | ~AliFlatTPCCluster() {} |
27 | ||
251a2c81 | 28 | void SetX(Float_t x) {fX = x;} |
29 | void SetY(Float_t y) {fY = y;} | |
30 | void SetZ(Float_t z) {fZ = z;} | |
bbddf50f | 31 | void SetSector(UShort_t sector) {fSector = sector;} |
32 | void SetPadRow(UShort_t padrow) {fPadRow = padrow;} | |
251a2c81 | 33 | void SetSigmaY2(Float_t sigmaY2) {fSigmaY2 = sigmaY2;} |
34 | void SetSigmaZ2(Float_t sigmaZ2) {fSigmaZ2 = sigmaZ2;} | |
35 | void SetCharge(UShort_t charge) {fCharge = charge;} | |
36 | void SetQMax(UShort_t qmax) {fQMax = qmax;} | |
ec9af14e | 37 | |
bbddf50f | 38 | |
251a2c81 | 39 | Float_t GetX() const {return fX;} |
40 | Float_t GetY() const {return fY;} | |
41 | Float_t GetZ() const {return fZ;} | |
bbddf50f | 42 | UShort_t GetSector() const {return fSector;} |
251a2c81 | 43 | UShort_t GetPadRow() const {return fPadRow;} |
44 | Float_t GetSigmaY2() const {return fSigmaY2;} | |
45 | Float_t GetSigmaZ2() const {return fSigmaZ2;} | |
46 | UShort_t GetCharge() const {return fCharge;} | |
47 | UShort_t GetQMax() const {return fQMax;} | |
48 | ||
bbddf50f | 49 | void SetTPCCluster( const AliTPCclusterMI *c ); |
50 | void GetTPCCluster( AliTPCclusterMI *c ) const; | |
251a2c81 | 51 | |
f009a562 | 52 | private: |
6a33e0e9 | 53 | |
f009a562 | 54 | Float_t fX; // X coordinate in local coordinates |
55 | Float_t fY; // Y coordinate in local coordinates | |
56 | Float_t fZ; // Z coordinate in local coordinates | |
bbddf50f | 57 | UChar_t fSector; // TPC sector |
58 | UChar_t fPadRow; // Pad row number withing the sector | |
f009a562 | 59 | Float_t fSigmaY2; // error (former width) of the clusters |
60 | Float_t fSigmaZ2; // error (former width) of the clusters | |
61 | UInt_t fCharge; // total charge of cluster | |
62 | UInt_t fQMax; // QMax of cluster | |
63 | ||
251a2c81 | 64 | }; |
65 | ||
bbddf50f | 66 | #pragma GCC diagnostic ignored "-Weffc++" |
67 | inline AliFlatTPCCluster::AliFlatTPCCluster(AliVConstructorReinitialisationFlag ){} | |
68 | #pragma GCC diagnostic warning "-Weffc++" | |
69 | ||
70 | inline void AliFlatTPCCluster::SetTPCCluster( const AliTPCclusterMI *c ) | |
71 | { | |
72 | SetX( c->GetX() ); | |
73 | SetY( c->GetY() ); | |
74 | SetZ( c->GetZ() ); | |
75 | SetSector( c->GetDetector() ); | |
76 | SetPadRow( c->GetRow() ); | |
77 | SetSigmaY2( c->GetSigmaY2() ); | |
78 | SetSigmaZ2( c->GetSigmaZ2() ); | |
79 | SetCharge( c->GetQ() ); | |
80 | SetQMax( c->GetMax() ); | |
81 | } | |
82 | ||
83 | inline void AliFlatTPCCluster::GetTPCCluster( AliTPCclusterMI *c ) const | |
84 | { | |
85 | if( !c ) return; | |
86 | c->SetX( GetX() ); | |
87 | c->SetY( GetY() ); | |
88 | c->SetZ( GetZ() ); | |
89 | c->SetDetector( GetSector() ); | |
90 | c->SetRow( GetPadRow() ); | |
91 | c->SetSigmaY2( GetSigmaY2() ); | |
92 | c->SetSigmaZ2( GetSigmaZ2() ); | |
93 | c->SetQ( GetCharge() ); | |
94 | c->SetMax( GetQMax() ); | |
95 | } | |
96 | ||
251a2c81 | 97 | #endif |