]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONRawClusterV2.h
Add Config/HighVoltage directory and entry
[u/mrichter/AliRoot.git] / MUON / AliMUONRawClusterV2.h
CommitLineData
2060b217 1#ifndef ALIMUONRAWCLUSTERV2_H
2#define ALIMUONRAWCLUSTERV2_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// Revision of includes 07/05/2004
9
10/// \ingroup base
11/// \class AliMUONRawClusterV2
12/// \brief MUON raw cluster
13///
14// Author Philippe Pillot, Subatech
15
16#include "AliMUONVCluster.h"
17#include <TMath.h>
18
3448ba98 19class AliESDMuonCluster;
20
2060b217 21class AliMUONRawClusterV2 : public AliMUONVCluster {
22
23 public:
24 AliMUONRawClusterV2();
25 AliMUONRawClusterV2(Int_t chamberId, Int_t detElemId, Int_t clusterIndex);
3448ba98 26 AliMUONRawClusterV2(const AliESDMuonCluster& cluster);
2060b217 27 virtual ~AliMUONRawClusterV2();
28 AliMUONRawClusterV2(const AliMUONRawClusterV2& cluster);
29 AliMUONRawClusterV2 & operator=(const AliMUONRawClusterV2& cluster);
30
31 virtual void Clear(Option_t* = "");
32
96ebe67e 33 /// Create a copy of the current cluster
1467f4ba 34 virtual AliMUONRawClusterV2* Clone(const char* = "") const {return new AliMUONRawClusterV2(*this);}
96ebe67e 35
36 /// Set coordinates (cm)
2060b217 37 virtual void SetXYZ(Double_t x, Double_t y, Double_t z) {fX = x; fY = y; fZ = z;}
38 /// Return coordinate X (cm)
39 virtual Double_t GetX() const {return fX;}
40 /// Return coordinate Y (cm)
41 virtual Double_t GetY() const {return fY;}
42 /// Return coordinate Z (cm)
43 virtual Double_t GetZ() const {return fZ;}
44
45 /// Set resolution (cm) on coordinates (X,Y)
46 virtual void SetErrXY(Double_t errX, Double_t errY) {fErrX2 = errX * errX; fErrY2 = errY * errY;}
47 /// Return resolution (cm) on coordinate X
48 virtual Double_t GetErrX() const {return TMath::Sqrt(fErrX2);}
49 /// Return resolution**2 (cm**2) on coordinate X
50 virtual Double_t GetErrX2() const {return fErrX2;}
51 /// Return resolution (cm) on coordinate Y
52 virtual Double_t GetErrY() const {return TMath::Sqrt(fErrY2);}
53 /// Return resolution**2 (cm**2) on coordinate Y
54 virtual Double_t GetErrY2() const {return fErrY2;}
55
56 /// Set the cluster charge
57 virtual void SetCharge(Double_t q) {fQ = q;}
58 /// Set the cluster charge
59 virtual Double_t GetCharge() const {return fQ;}
60
61 /// Return chamber Id
62 virtual Int_t GetChamberId() const {return AliMUONVCluster::GetChamberId(GetUniqueID());}
63 /// Return detection element id
64 virtual Int_t GetDetElemId() const {return AliMUONVCluster::GetDetElemId(GetUniqueID());}
65
66 virtual void SetDigitsId(Int_t nDigits, const UInt_t *digitsId);
67 /// Add a digit Id to the array of associated digits
68 virtual void AddDigitId(UInt_t id);
69 /// Return number of associated digits
70 virtual Int_t GetNDigits() const {return fNDigits;}
71 /// Return Id of digits i
72 virtual UInt_t GetDigitId(Int_t i) const {return (i < fNDigits && fDigitsId) ? fDigitsId[i] : 0;}
73
74 /// Set chi2 of cluster
75 virtual void SetChi2( Double_t chi2) {fChi2 = chi2;}
76 /// Return chi2 of cluster
77 virtual Double_t GetChi2() const {return fChi2;}
78
79 /// Return true as the function Compare() is implemented
80 Bool_t IsSortable() const {return kTRUE;}
81 Int_t Compare(const TObject *obj) const;
82
83
84private:
85
86 Double32_t fX; ///< X of cluster
87 Double32_t fY; ///< Y of cluster
88 Double32_t fZ; ///< Z of cluster
89
90 Double32_t fErrX2; ///< X coordinate error square
91 Double32_t fErrY2; ///< Y coordinate error square
92
93 Double32_t fQ; ///< Q of cluster (in ADC counts)
94
95 Double32_t fChi2; ///< Chi2 of cluster
96
97 Int_t fNDigits; ///< Number of digits attached to the cluster
98 /// Indices of digits attached to the cluster
99 UInt_t *fDigitsId; //[fNDigits] Indices of digits attached to the cluster
100
101
102 ClassDef(AliMUONRawClusterV2,1) //Cluster class for MUON
103};
104
105#endif