3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 //-------------------------------------------------------------------------
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
16 // cvetan.cheshkov@cern.ch & jouri.belikov@cern.ch 5/3/2007
17 //-------------------------------------------------------------------------
24 class AliCluster : public TObject {
27 AliCluster(UShort_t volId, const Float_t *hit, Float_t x = 0, Float_t sigyz = 0, const Int_t *lab = NULL);
28 AliCluster(UShort_t volId,
29 Float_t x, Float_t y, Float_t z,
30 Float_t sy2, Float_t sz2, Float_t syz,
31 const Int_t *lab = NULL);
32 AliCluster(const AliCluster& cluster);
33 AliCluster &operator=(const AliCluster& cluster);
34 virtual ~AliCluster() {;}
36 Int_t GetLabel(Int_t i) const {return fTracks[i];}
37 Float_t GetX() const {return fX;}
38 Float_t GetY() const {return fY;}
39 Float_t GetZ() const {return fZ;}
40 Float_t GetSigmaY2() const {return fSigmaY2;}
41 Float_t GetSigmaZ2() const {return fSigmaZ2;}
42 Float_t GetSigmaYZ() const {return fSigmaYZ;}
43 UShort_t GetVolumeId() const {return fVolumeId;}
45 virtual void Use(Int_t = 0) {;}
47 Bool_t GetGlobalXYZ(Float_t xyz[3]) const;
48 virtual Bool_t GetGlobalCov(Float_t cov[6]) const;
49 Bool_t GetXRefPlane(Float_t &xref) const;
53 void SetLabel(Int_t lab,Int_t i)
54 { if (i>=0 && i<3) fTracks[i] = lab;}
55 void SetX(Float_t x) {fX = x;}
56 void SetY(Float_t y) {fY = y;}
57 void SetZ(Float_t z) {fZ = z;}
58 void SetSigmaY2(Float_t sigy2) {fSigmaY2 = sigy2;}
59 void SetSigmaZ2(Float_t sigz2) {fSigmaZ2 = sigz2;}
60 void SetVolumeId(UShort_t id) {fVolumeId = id;}
64 const TGeoHMatrix* GetTracking2LocalMatrix() const;
65 TGeoHMatrix* GetMatrix(Bool_t original = kFALSE) const;
69 TGeoPNEntry* GetPNEntry() const;
71 Int_t fTracks[3];//MC labels
72 Float_t fX; // X of the cluster in the tracking c.s.
73 Float_t fY; // Y of the cluster in the tracking c.s.
74 Float_t fZ; // Z of the cluster in the tracking c.s.
75 Float_t fSigmaY2; // Sigma Y square of cluster
76 Float_t fSigmaZ2; // Sigma Z square of cluster
77 Float_t fSigmaYZ; // Non-diagonal element of cov.matrix
78 UShort_t fVolumeId; // Volume ID of the detector element
79 Bool_t fIsMisaligned; // Cluster was misagned or not?
81 ClassDef(AliCluster,3) // Barrel detectors cluster