]>
Commit | Line | Data |
---|---|---|
87594435 | 1 | #ifndef ALICLUSTER_H |
2 | #define ALICLUSTER_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | //------------------------------------------------------------------------- | |
75fb37cc | 7 | // Class AliCluster |
8 | // This is the future base for managing the clusters in barrel detectors. | |
9 | // It is fully interfaced with the ROOT geometrical modeller TGeo. | |
10 | // Each cluster contains XYZ coordinates in the local tracking c.s. and | |
11 | // the unique ID of the sensitive detector element which continas the | |
12 | // cluster. The coordinates in global c.s. are computed using the interface | |
13 | // to TGeo and will be not overwritten by the derived sub-detector cluster | |
14 | // classes. | |
15 | // | |
16 | // cvetan.cheshkov@cern.ch & jouri.belikov@cern.ch 5/3/2007 | |
87594435 | 17 | //------------------------------------------------------------------------- |
18 | ||
19 | #include <TObject.h> | |
20 | ||
75fb37cc | 21 | class TGeoHMatrix; |
22 | class TGeoPNEntry; | |
23 | ||
87594435 | 24 | class AliCluster : public TObject { |
75fb37cc | 25 | public: |
375f676a | 26 | enum { |
27 | kUsed = BIT(14), | |
28 | kShared = BIT(15) | |
29 | }; | |
30 | ||
87594435 | 31 | AliCluster(); |
75fb37cc | 32 | AliCluster(UShort_t volId, const Float_t *hit, Float_t x = 0, Float_t sigyz = 0, const Int_t *lab = NULL); |
33 | AliCluster(UShort_t volId, | |
34 | Float_t x, Float_t y, Float_t z, | |
35 | Float_t sy2, Float_t sz2, Float_t syz, | |
36 | const Int_t *lab = NULL); | |
37 | AliCluster(const AliCluster& cluster); | |
38 | AliCluster &operator=(const AliCluster& cluster); | |
be9c5115 | 39 | virtual ~AliCluster() {;} |
75fb37cc | 40 | |
c47d9105 | 41 | virtual void Print(Option_t* option = "") const; |
42 | ||
75fb37cc | 43 | Int_t GetLabel(Int_t i) const {return fTracks[i];} |
44 | Float_t GetX() const {return fX;} | |
45 | Float_t GetY() const {return fY;} | |
46 | Float_t GetZ() const {return fZ;} | |
47 | Float_t GetSigmaY2() const {return fSigmaY2;} | |
48 | Float_t GetSigmaZ2() const {return fSigmaZ2;} | |
49 | Float_t GetSigmaYZ() const {return fSigmaYZ;} | |
50 | UShort_t GetVolumeId() const {return fVolumeId;} | |
51 | ||
375f676a | 52 | void IncreaseClusterUsage() { if (TestBit(kUsed)) SetBit(kShared); else SetBit(kUsed); } |
53 | Bool_t IsClusterUsed() const { return TestBit(kUsed); } | |
54 | Bool_t IsClusterShared() const { return TestBit(kShared); } | |
55 | ||
b8f166bb | 56 | virtual void Use(Int_t = 0) {;} |
be9c5115 | 57 | |
75fb37cc | 58 | Bool_t GetGlobalXYZ(Float_t xyz[3]) const; |
39d4ae58 | 59 | virtual Bool_t GetGlobalCov(Float_t cov[6]) const; |
75fb37cc | 60 | Bool_t GetXRefPlane(Float_t &xref) const; |
87594435 | 61 | |
75fb37cc | 62 | Bool_t Misalign(); |
63 | ||
64 | void SetLabel(Int_t lab,Int_t i) | |
65 | { if (i>=0 && i<3) fTracks[i] = lab;} | |
66 | void SetX(Float_t x) {fX = x;} | |
67 | void SetY(Float_t y) {fY = y;} | |
68 | void SetZ(Float_t z) {fZ = z;} | |
69 | void SetSigmaY2(Float_t sigy2) {fSigmaY2 = sigy2;} | |
70 | void SetSigmaZ2(Float_t sigz2) {fSigmaZ2 = sigz2;} | |
00b554f2 | 71 | void SetSigmaYZ(Float_t sigyz) {fSigmaYZ = sigyz;}; |
75fb37cc | 72 | void SetVolumeId(UShort_t id) {fVolumeId = id;} |
87594435 | 73 | |
75fb37cc | 74 | protected: |
87594435 | 75 | |
75fb37cc | 76 | const TGeoHMatrix* GetTracking2LocalMatrix() const; |
39d4ae58 | 77 | TGeoHMatrix* GetMatrix(Bool_t original = kFALSE) const; |
75fb37cc | 78 | |
79 | private: | |
80 | ||
75fb37cc | 81 | Int_t fTracks[3];//MC labels |
82 | Float_t fX; // X of the cluster in the tracking c.s. | |
83 | Float_t fY; // Y of the cluster in the tracking c.s. | |
84 | Float_t fZ; // Z of the cluster in the tracking c.s. | |
85 | Float_t fSigmaY2; // Sigma Y square of cluster | |
86 | Float_t fSigmaZ2; // Sigma Z square of cluster | |
87 | Float_t fSigmaYZ; // Non-diagonal element of cov.matrix | |
88 | UShort_t fVolumeId; // Volume ID of the detector element | |
89 | Bool_t fIsMisaligned; // Cluster was misagned or not? | |
90 | ||
91 | ClassDef(AliCluster,3) // Barrel detectors cluster | |
92 | }; | |
93 | ||
94 | #endif |