Main changes:
[u/mrichter/AliRoot.git] / MUON / AliMUONVCluster.h
CommitLineData
2060b217 1#ifndef ALIMUONVCLUSTER_H
2#define ALIMUONVCLUSTER_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5* See cxx source for full Copyright notice */
6
7// $Id$
8
9/// \ingroup base
10/// \class AliMUONVCluster
11/// \brief abstract base class for clusters
12///
13// Author Philippe Pillot, Subatech
14
15
16#include <TObject.h>
17
18class AliMUONVCluster : public TObject {
19 public:
20 AliMUONVCluster(); // Constructor
21 AliMUONVCluster(Int_t chamberId, Int_t detElemId, Int_t clusterIndex);
22 virtual ~AliMUONVCluster(); // Destructor
23
24 /// Clear method (used by TClonesArray)
25 virtual void Clear(Option_t*) = 0;
96ebe67e 26
27 /// Create a copy of the current cluster
28 virtual AliMUONVCluster* CreateCopy() const = 0;
2060b217 29
30 /// Set coordinates (cm)
31 virtual void SetXYZ(Double_t x, Double_t y, Double_t z) = 0;
32 /// Return coordinate X (cm)
33 virtual Double_t GetX() const = 0;
34 /// Return coordinate Y (cm)
35 virtual Double_t GetY() const = 0;
36 /// Return coordinate Z (cm)
37 virtual Double_t GetZ() const = 0;
38
39 /// Set resolution (cm) on coordinates (X,Y)
40 virtual void SetErrXY(Double_t errX, Double_t errY) = 0;
41 /// Return resolution (cm) on coordinate X
42 virtual Double_t GetErrX() const = 0;
43 /// Return resolution**2 (cm**2) on coordinate X
44 virtual Double_t GetErrX2() const = 0;
45 /// Return resolution (cm) on coordinate Y
46 virtual Double_t GetErrY() const = 0;
47 /// Return resolution**2 (cm**2) on coordinate Y
48 virtual Double_t GetErrY2() const = 0;
49
50 /// Set the cluster charge
51 virtual void SetCharge(Double_t charge) = 0;
52 /// Set the cluster charge
53 virtual Double_t GetCharge() const = 0;
54
55 /// Build a single integer with id information
56 static UInt_t BuildUniqueID(Int_t chamberId, Int_t detElemId, Int_t clusterIndex)
57 {return ((chamberId << 28) | (detElemId << 17) | (clusterIndex));}
58 /// Return chamber id (0..), part of the uniqueID
59 static Int_t GetChamberId(UInt_t uniqueID) {return (uniqueID & 0xF0000000) >> 28;}
60 /// Return detection element id, part of the uniqueID
61 static Int_t GetDetElemId(UInt_t uniqueID) {return (uniqueID & 0x0FFE0000) >> 17;}
62 /// The index of this cluster (0..), part of the uniqueID
63 static Int_t GetClusterIndex(UInt_t uniqueID) {return (uniqueID & 0x0001FFFF);}
64 /// Return chamber Id
65 virtual Int_t GetChamberId() const = 0;
66 /// Return detection element Id
67 virtual Int_t GetDetElemId() const = 0;
68
69 /// Set Id of associated digits
70 virtual void SetDigitsId(Int_t nDigits, const UInt_t *digitsId) = 0;
71 /// Add a digit Id to the array of associated digits
72 virtual void AddDigitId(UInt_t id) = 0;
73 /// Return number of associated digits
74 virtual Int_t GetNDigits() const = 0;
75 /// Return Id of digits i
76 virtual UInt_t GetDigitId(Int_t i) const = 0;
77
78 /// Set chi2 of cluster
79 virtual void SetChi2(Double_t chi2) = 0;
80 /// Return chi2 of cluster
81 virtual Double_t GetChi2() const = 0;
82
83 virtual void Print(Option_t *option = "") const;
84
2060b217 85
86 ClassDef(AliMUONVCluster, 1) // abstract base class for cluster
87};
88
89#endif