AddTimeStamp was always increasing track length but accounting
[u/mrichter/AliRoot.git] / MFT / AliMFTCluster.h
CommitLineData
820b4d9e 1#ifndef AliMFTCluster_H
2#define AliMFTCluster_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7//====================================================================================================================================================
8//
9// Class for the description of the clusters of the ALICE Muon Forward Tracker
10//
11// Contact author: antonio.uras@cern.ch
12//
13//====================================================================================================================================================
14
15#include "AliMUONRawCluster.h"
16#include "AliMUONVCluster.h"
d4643a10 17#include "AliMFTDigit.h"
18#include "TClonesArray.h"
820b4d9e 19#include "TObject.h"
d4643a10 20#include "AliMFTConstants.h"
820b4d9e 21
22//====================================================================================================================================================
23
24class AliMFTCluster : public TObject {
25
26public:
27
28 AliMFTCluster();
d4643a10 29 AliMFTCluster(const AliMFTCluster&);
30 AliMFTCluster& operator=(const AliMFTCluster&);
820b4d9e 31
ff80c017 32 virtual ~AliMFTCluster() { ; } // destructor
820b4d9e 33
34 void SetXYZ(Double_t x, Double_t y, Double_t z) { fX=x; fY=y; fZ=z; }
35
d4643a10 36 void SetX(Double_t x) { if(fIsClusterEditable) fX = x; }
37 void SetY(Double_t y) { if(fIsClusterEditable) fY = y; }
38 void SetZ(Double_t z) { if(fIsClusterEditable) fZ = z; }
820b4d9e 39
40 Double_t GetX() const { return fX; }
41 Double_t GetY() const { return fY; }
42 Double_t GetZ() const { return fZ; }
43
d4643a10 44 void SetErrXYZ(Double_t errX, Double_t errY, Double_t errZ) { if(fIsClusterEditable) { fErrX = errX; fErrY = errY; fErrZ = errZ; } }
820b4d9e 45
d4643a10 46 void SetErrX(Double_t errX) { if(fIsClusterEditable) fErrX = errX; }
47 void SetErrY(Double_t errY) { if(fIsClusterEditable) fErrY = errY; }
48 void SetErrZ(Double_t errZ) { if(fIsClusterEditable) fErrZ = errZ; }
820b4d9e 49
50 Double_t GetErrX() const { return fErrX; }
51 Double_t GetErrY() const { return fErrY; }
52 Double_t GetErrZ() const { return fErrZ; }
53 Double_t GetErrX2() const { return fErrX*fErrX; }
54 Double_t GetErrY2() const { return fErrY*fErrY; }
55 Double_t GetErrZ2() const { return fErrZ*fErrZ; }
56
d4643a10 57 void SetNElectrons(Double_t nElectrons) { if(fIsClusterEditable) fNElectrons = nElectrons; }
820b4d9e 58 Double_t GetNElectrons() const { return fNElectrons; }
59
d4643a10 60 void AddMCLabel(Int_t label);
820b4d9e 61 Int_t GetNMCTracks() const { return fNMCTracks; }
62 Int_t GetMCLabel(Int_t track) const { if (track<fNMCTracks && track>=0) return fMCLabel[track]; else return -1; }
d4643a10 63 void SetMCLabel(Int_t track, Int_t labelMC) { if (track<fNMCTracks && track>=0) fMCLabel[track]=labelMC; }
820b4d9e 64
d4643a10 65 void SetPlane(Int_t plane) { if(fIsClusterEditable) fPlane = plane; }
820b4d9e 66 Int_t GetPlane() const { return fPlane; }
67
d4643a10 68 void SetDetElemID(Int_t detElemID) { fDetElemID = detElemID; }
69 Int_t GetDetElemID() { return fDetElemID; }
70
71 void SetSize(Int_t size) { if(fIsClusterEditable) fSize = size; }
820b4d9e 72 Int_t GetSize() const { return fSize; }
73
74 void SetLocalChi2(Double_t chi2) { fLocalChi2 = chi2; }
75 void SetTrackChi2(Double_t chi2) { fTrackChi2 = chi2; }
76
77 Double_t GetLocalChi2() { return fLocalChi2; }
78 Double_t GetTrackChi2() { return fTrackChi2; }
79
d4643a10 80 Bool_t AddPixel(AliMFTDigit *pixel);
81
82 Bool_t IsClusterEditable() { return fIsClusterEditable; }
83 void SetClusterEditable(Bool_t isClusterEditable) { fIsClusterEditable = isClusterEditable; }
84 void TerminateCluster();
85
86 Double_t GetDistanceFromPixel(AliMFTDigit *pixel);
87
820b4d9e 88 AliMUONRawCluster* CreateMUONCluster();
89
90private:
91
d4643a10 92 static const Int_t fNMaxMCTracks = AliMFTConstants::fNMaxMCTracksPerCluster;
93 static const Int_t fNMaxDigitsPerCluster = AliMFTConstants::fNMaxDigitsPerCluster;
94
820b4d9e 95 Double_t fX, fY, fZ; // cluster global coordinates
96 Double_t fErrX, fErrY, fErrZ;
97
98 Double_t fNElectrons;
99 Int_t fNMCTracks;
d4643a10 100 Int_t fPlane, fDetElemID;
820b4d9e 101 Int_t fMCLabel[fNMaxMCTracks];
102
103 Int_t fSize; // the number of digits composing the cluster
104
105 Double_t fTrackChi2; // Chi2 of the track when the associated cluster was attached
106 Double_t fLocalChi2; // Local chi2 of the associated cluster with respect to the track
107
d4643a10 108 TClonesArray *fDigitsInCluster; //! (Temporary) Array of the digits composing the cluster
109
110 Bool_t fIsClusterEditable;
111
820b4d9e 112 ClassDef(AliMFTCluster, 1)
113
114};
115
116//====================================================================================================================================================
117
118#endif
119