ESD file is added to the list of proof output files. It is then automatically merged...
[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
19class AliMUONRawClusterV2 : public AliMUONVCluster {
20
21 public:
22 AliMUONRawClusterV2();
23 AliMUONRawClusterV2(Int_t chamberId, Int_t detElemId, Int_t clusterIndex);
24 virtual ~AliMUONRawClusterV2();
25 AliMUONRawClusterV2(const AliMUONRawClusterV2& cluster);
26 AliMUONRawClusterV2 & operator=(const AliMUONRawClusterV2& cluster);
27
28 virtual void Clear(Option_t* = "");
29
96ebe67e 30 /// Create a copy of the current cluster
1467f4ba 31 virtual AliMUONRawClusterV2* Clone(const char* = "") const {return new AliMUONRawClusterV2(*this);}
96ebe67e 32
33 /// Set coordinates (cm)
2060b217 34 virtual void SetXYZ(Double_t x, Double_t y, Double_t z) {fX = x; fY = y; fZ = z;}
35 /// Return coordinate X (cm)
36 virtual Double_t GetX() const {return fX;}
37 /// Return coordinate Y (cm)
38 virtual Double_t GetY() const {return fY;}
39 /// Return coordinate Z (cm)
40 virtual Double_t GetZ() const {return fZ;}
41
42 /// Set resolution (cm) on coordinates (X,Y)
43 virtual void SetErrXY(Double_t errX, Double_t errY) {fErrX2 = errX * errX; fErrY2 = errY * errY;}
44 /// Return resolution (cm) on coordinate X
45 virtual Double_t GetErrX() const {return TMath::Sqrt(fErrX2);}
46 /// Return resolution**2 (cm**2) on coordinate X
47 virtual Double_t GetErrX2() const {return fErrX2;}
48 /// Return resolution (cm) on coordinate Y
49 virtual Double_t GetErrY() const {return TMath::Sqrt(fErrY2);}
50 /// Return resolution**2 (cm**2) on coordinate Y
51 virtual Double_t GetErrY2() const {return fErrY2;}
52
53 /// Set the cluster charge
54 virtual void SetCharge(Double_t q) {fQ = q;}
55 /// Set the cluster charge
56 virtual Double_t GetCharge() const {return fQ;}
57
58 /// Return chamber Id
59 virtual Int_t GetChamberId() const {return AliMUONVCluster::GetChamberId(GetUniqueID());}
60 /// Return detection element id
61 virtual Int_t GetDetElemId() const {return AliMUONVCluster::GetDetElemId(GetUniqueID());}
62
63 virtual void SetDigitsId(Int_t nDigits, const UInt_t *digitsId);
64 /// Add a digit Id to the array of associated digits
65 virtual void AddDigitId(UInt_t id);
66 /// Return number of associated digits
67 virtual Int_t GetNDigits() const {return fNDigits;}
68 /// Return Id of digits i
69 virtual UInt_t GetDigitId(Int_t i) const {return (i < fNDigits && fDigitsId) ? fDigitsId[i] : 0;}
70
71 /// Set chi2 of cluster
72 virtual void SetChi2( Double_t chi2) {fChi2 = chi2;}
73 /// Return chi2 of cluster
74 virtual Double_t GetChi2() const {return fChi2;}
75
76 /// Return true as the function Compare() is implemented
77 Bool_t IsSortable() const {return kTRUE;}
78 Int_t Compare(const TObject *obj) const;
79
80
81private:
82
83 Double32_t fX; ///< X of cluster
84 Double32_t fY; ///< Y of cluster
85 Double32_t fZ; ///< Z of cluster
86
87 Double32_t fErrX2; ///< X coordinate error square
88 Double32_t fErrY2; ///< Y coordinate error square
89
90 Double32_t fQ; ///< Q of cluster (in ADC counts)
91
92 Double32_t fChi2; ///< Chi2 of cluster
93
94 Int_t fNDigits; ///< Number of digits attached to the cluster
95 /// Indices of digits attached to the cluster
96 UInt_t *fDigitsId; //[fNDigits] Indices of digits attached to the cluster
97
98
99 ClassDef(AliMUONRawClusterV2,1) //Cluster class for MUON
100};
101
102#endif