1 #ifndef AliMFTCluster_H
2 #define AliMFTCluster_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 //====================================================================================================================================================
9 // Class for the description of the clusters of the ALICE Muon Forward Tracker
11 // Contact author: antonio.uras@cern.ch
13 //====================================================================================================================================================
15 #include "AliMUONRawCluster.h"
16 #include "AliMUONVCluster.h"
17 #include "AliMFTDigit.h"
18 #include "TClonesArray.h"
20 #include "AliMFTConstants.h"
22 //====================================================================================================================================================
24 class AliMFTCluster : public TObject {
29 AliMFTCluster(const AliMFTCluster&);
30 AliMFTCluster& operator=(const AliMFTCluster&);
31 virtual ~AliMFTCluster() { fDigitsInCluster->Delete(); delete fDigitsInCluster; }
33 virtual void Clear(const Option_t* /*opt*/) { fDigitsInCluster->Delete(); delete fDigitsInCluster; fDigitsInCluster = 0x0; }
35 void SetXYZ(Double_t x, Double_t y, Double_t z) { fX=x; fY=y; fZ=z; }
37 void SetX(Double_t x) { if(fIsClusterEditable) fX = x; }
38 void SetY(Double_t y) { if(fIsClusterEditable) fY = y; }
39 void SetZ(Double_t z) { if(fIsClusterEditable) fZ = z; }
41 Double_t GetX() const { return fX; }
42 Double_t GetY() const { return fY; }
43 Double_t GetZ() const { return fZ; }
45 void SetErrXYZ(Double_t errX, Double_t errY, Double_t errZ) { if(fIsClusterEditable) { fErrX = errX; fErrY = errY; fErrZ = errZ; } }
47 void SetErrX(Double_t errX) { if(fIsClusterEditable) fErrX = errX; }
48 void SetErrY(Double_t errY) { if(fIsClusterEditable) fErrY = errY; }
49 void SetErrZ(Double_t errZ) { if(fIsClusterEditable) fErrZ = errZ; }
51 Double_t GetErrX() const { return fErrX; }
52 Double_t GetErrY() const { return fErrY; }
53 Double_t GetErrZ() const { return fErrZ; }
54 Double_t GetErrX2() const { return fErrX*fErrX; }
55 Double_t GetErrY2() const { return fErrY*fErrY; }
56 Double_t GetErrZ2() const { return fErrZ*fErrZ; }
58 void SetNElectrons(Double_t nElectrons) { if(fIsClusterEditable) fNElectrons = nElectrons; }
59 Double_t GetNElectrons() const { return fNElectrons; }
61 void AddMCLabel(Int_t label);
62 Int_t GetNMCTracks() const { return fNMCTracks; }
63 Int_t GetMCLabel(Int_t track) const { if (track<fNMCTracks && track>=0) return fMCLabel[track]; else return -1; }
64 void SetMCLabel(Int_t track, Int_t labelMC) { if (track<fNMCTracks && track>=0) fMCLabel[track]=labelMC; }
66 void SetPlane(Int_t plane) { if(fIsClusterEditable) fPlane = plane; }
67 Int_t GetPlane() const { return fPlane; }
69 void SetDetElemID(Int_t detElemID) { fDetElemID = detElemID; }
70 Int_t GetDetElemID() { return fDetElemID; }
72 void SetSize(Int_t size) { if(fIsClusterEditable) fSize = size; }
73 Int_t GetSize() const { return fSize; }
75 void SetLocalChi2(Double_t chi2) { fLocalChi2 = chi2; }
76 void SetTrackChi2(Double_t chi2) { fTrackChi2 = chi2; }
78 Double_t GetLocalChi2() { return fLocalChi2; }
79 Double_t GetTrackChi2() { return fTrackChi2; }
81 Bool_t AddPixel(AliMFTDigit *pixel);
83 Bool_t IsClusterEditable() { return fIsClusterEditable; }
84 void SetClusterEditable(Bool_t isClusterEditable) { fIsClusterEditable = isClusterEditable; }
85 void TerminateCluster();
87 Double_t GetDistanceFromPixel(AliMFTDigit *pixel);
89 AliMUONRawCluster* CreateMUONCluster();
93 static const Int_t fNMaxMCTracks = AliMFTConstants::fNMaxMCTracksPerCluster;
94 static const Int_t fNMaxDigitsPerCluster = AliMFTConstants::fNMaxDigitsPerCluster;
96 Double_t fX, fY, fZ; // cluster global coordinates
97 Double_t fErrX, fErrY, fErrZ;
101 Int_t fPlane, fDetElemID;
102 Int_t fMCLabel[fNMaxMCTracks];
104 Int_t fSize; // the number of digits composing the cluster
106 Double_t fTrackChi2; // Chi2 of the track when the associated cluster was attached
107 Double_t fLocalChi2; // Local chi2 of the associated cluster with respect to the track
109 TClonesArray *fDigitsInCluster; //! (Temporary) Array of the digits composing the cluster
111 Bool_t fIsClusterEditable;
113 ClassDef(AliMFTCluster, 1)
117 //====================================================================================================================================================