ROOT logo
#ifndef ALIMUONRAWCLUSTERV2_H
#define ALIMUONRAWCLUSTERV2_H

/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */
// Revision of includes 07/05/2004

/// \ingroup base
/// \class AliMUONRawClusterV2
/// \brief MUON raw cluster
///
//  Author Philippe Pillot, Subatech

#include "AliMUONVCluster.h"
#include <TMath.h>

class AliMUONRawClusterV2 : public AliMUONVCluster {

 public:
  AliMUONRawClusterV2();
  AliMUONRawClusterV2(Int_t chamberId, Int_t detElemId, Int_t clusterIndex);
  virtual ~AliMUONRawClusterV2();
  AliMUONRawClusterV2(const AliMUONRawClusterV2& cluster);
  AliMUONRawClusterV2 & operator=(const AliMUONRawClusterV2& cluster);
  
  virtual void Clear(Option_t* = "");
  
	   /// Create a copy of the current cluster
  virtual AliMUONRawClusterV2* Clone(const char* = "") const {return new AliMUONRawClusterV2(*this);}
  
           /// Set coordinates (cm)
  virtual void     SetXYZ(Double_t x, Double_t y, Double_t z) {fX = x; fY = y; fZ = z;}
	   /// Return coordinate X (cm)
  virtual Double_t GetX() const {return fX;}
	   /// Return coordinate Y (cm)
  virtual Double_t GetY() const {return fY;}
	   /// Return coordinate Z (cm)
  virtual Double_t GetZ() const {return fZ;}
  
	   /// Set resolution (cm) on coordinates (X,Y)
  virtual void     SetErrXY(Double_t errX, Double_t errY) {fErrX2 = errX * errX; fErrY2 = errY * errY;}
           /// Return resolution (cm) on coordinate X
  virtual Double_t GetErrX() const {return TMath::Sqrt(fErrX2);}
           /// Return resolution**2 (cm**2) on coordinate X
  virtual Double_t GetErrX2() const {return fErrX2;}
           /// Return resolution (cm) on coordinate Y
  virtual Double_t GetErrY() const {return TMath::Sqrt(fErrY2);}
           /// Return resolution**2 (cm**2) on coordinate Y
  virtual Double_t GetErrY2() const {return fErrY2;}
  
           /// Set the cluster charge
  virtual void     SetCharge(Double_t q) {fQ = q;}
           /// Set the cluster charge
  virtual Double_t GetCharge() const {return fQ;}
  
           /// Return chamber Id
  virtual Int_t    GetChamberId() const {return AliMUONVCluster::GetChamberId(GetUniqueID());}
           /// Return detection element id
  virtual Int_t    GetDetElemId() const {return AliMUONVCluster::GetDetElemId(GetUniqueID());}
  
  virtual void     SetDigitsId(Int_t nDigits, const UInt_t *digitsId);
           /// Add a digit Id to the array of associated digits
  virtual void     AddDigitId(UInt_t id);
           /// Return number of associated digits
  virtual Int_t    GetNDigits() const {return fNDigits;}
           /// Return Id of digits i
  virtual UInt_t   GetDigitId(Int_t i) const {return (i < fNDigits && fDigitsId) ? fDigitsId[i] : 0;}
           /// Return the array of digits'id
  virtual const UInt_t* GetDigitsId() const {return fDigitsId;}
  
           /// Set chi2 of cluster
  virtual void     SetChi2( Double_t chi2) {fChi2 = chi2;}
           /// Return chi2 of cluster
  virtual Double_t GetChi2() const {return fChi2;}
  
           /// Set the corresponding MC track number
  virtual void     SetMCLabel(Int_t label) {fMCLabel = label;}
           /// Return the corresponding MC track number
  virtual Int_t    GetMCLabel() const {return fMCLabel;}
  
           /// Return true as the function Compare() is implemented
  Bool_t       IsSortable() const {return kTRUE;}
  Int_t        Compare(const TObject *obj) const;
  
  
private:
  
  Double32_t fX;	///< X of cluster
  Double32_t fY;	///< Y of cluster
  Double32_t fZ;	///< Z of cluster
  
  Double32_t fErrX2;	///< X coordinate error square
  Double32_t fErrY2;	///< Y coordinate error square
  
  Double32_t fQ;	///< Q of cluster (in ADC counts)
  
  Double32_t fChi2;	///< Chi2 of cluster
  
  Int_t    fNDigits;	///< Number of digits attached to the cluster
  /// Indices of digits attached to the cluster
  UInt_t   *fDigitsId;	//[fNDigits] Indices of digits attached to the cluster
  
  Int_t fMCLabel;       ///< Point to the corresponding MC track
  
  
  ClassDef(AliMUONRawClusterV2,2)  //Cluster class for MUON
};

#endif
 AliMUONRawClusterV2.h:1
 AliMUONRawClusterV2.h:2
 AliMUONRawClusterV2.h:3
 AliMUONRawClusterV2.h:4
 AliMUONRawClusterV2.h:5
 AliMUONRawClusterV2.h:6
 AliMUONRawClusterV2.h:7
 AliMUONRawClusterV2.h:8
 AliMUONRawClusterV2.h:9
 AliMUONRawClusterV2.h:10
 AliMUONRawClusterV2.h:11
 AliMUONRawClusterV2.h:12
 AliMUONRawClusterV2.h:13
 AliMUONRawClusterV2.h:14
 AliMUONRawClusterV2.h:15
 AliMUONRawClusterV2.h:16
 AliMUONRawClusterV2.h:17
 AliMUONRawClusterV2.h:18
 AliMUONRawClusterV2.h:19
 AliMUONRawClusterV2.h:20
 AliMUONRawClusterV2.h:21
 AliMUONRawClusterV2.h:22
 AliMUONRawClusterV2.h:23
 AliMUONRawClusterV2.h:24
 AliMUONRawClusterV2.h:25
 AliMUONRawClusterV2.h:26
 AliMUONRawClusterV2.h:27
 AliMUONRawClusterV2.h:28
 AliMUONRawClusterV2.h:29
 AliMUONRawClusterV2.h:30
 AliMUONRawClusterV2.h:31
 AliMUONRawClusterV2.h:32
 AliMUONRawClusterV2.h:33
 AliMUONRawClusterV2.h:34
 AliMUONRawClusterV2.h:35
 AliMUONRawClusterV2.h:36
 AliMUONRawClusterV2.h:37
 AliMUONRawClusterV2.h:38
 AliMUONRawClusterV2.h:39
 AliMUONRawClusterV2.h:40
 AliMUONRawClusterV2.h:41
 AliMUONRawClusterV2.h:42
 AliMUONRawClusterV2.h:43
 AliMUONRawClusterV2.h:44
 AliMUONRawClusterV2.h:45
 AliMUONRawClusterV2.h:46
 AliMUONRawClusterV2.h:47
 AliMUONRawClusterV2.h:48
 AliMUONRawClusterV2.h:49
 AliMUONRawClusterV2.h:50
 AliMUONRawClusterV2.h:51
 AliMUONRawClusterV2.h:52
 AliMUONRawClusterV2.h:53
 AliMUONRawClusterV2.h:54
 AliMUONRawClusterV2.h:55
 AliMUONRawClusterV2.h:56
 AliMUONRawClusterV2.h:57
 AliMUONRawClusterV2.h:58
 AliMUONRawClusterV2.h:59
 AliMUONRawClusterV2.h:60
 AliMUONRawClusterV2.h:61
 AliMUONRawClusterV2.h:62
 AliMUONRawClusterV2.h:63
 AliMUONRawClusterV2.h:64
 AliMUONRawClusterV2.h:65
 AliMUONRawClusterV2.h:66
 AliMUONRawClusterV2.h:67
 AliMUONRawClusterV2.h:68
 AliMUONRawClusterV2.h:69
 AliMUONRawClusterV2.h:70
 AliMUONRawClusterV2.h:71
 AliMUONRawClusterV2.h:72
 AliMUONRawClusterV2.h:73
 AliMUONRawClusterV2.h:74
 AliMUONRawClusterV2.h:75
 AliMUONRawClusterV2.h:76
 AliMUONRawClusterV2.h:77
 AliMUONRawClusterV2.h:78
 AliMUONRawClusterV2.h:79
 AliMUONRawClusterV2.h:80
 AliMUONRawClusterV2.h:81
 AliMUONRawClusterV2.h:82
 AliMUONRawClusterV2.h:83
 AliMUONRawClusterV2.h:84
 AliMUONRawClusterV2.h:85
 AliMUONRawClusterV2.h:86
 AliMUONRawClusterV2.h:87
 AliMUONRawClusterV2.h:88
 AliMUONRawClusterV2.h:89
 AliMUONRawClusterV2.h:90
 AliMUONRawClusterV2.h:91
 AliMUONRawClusterV2.h:92
 AliMUONRawClusterV2.h:93
 AliMUONRawClusterV2.h:94
 AliMUONRawClusterV2.h:95
 AliMUONRawClusterV2.h:96
 AliMUONRawClusterV2.h:97
 AliMUONRawClusterV2.h:98
 AliMUONRawClusterV2.h:99
 AliMUONRawClusterV2.h:100
 AliMUONRawClusterV2.h:101
 AliMUONRawClusterV2.h:102
 AliMUONRawClusterV2.h:103
 AliMUONRawClusterV2.h:104
 AliMUONRawClusterV2.h:105
 AliMUONRawClusterV2.h:106
 AliMUONRawClusterV2.h:107
 AliMUONRawClusterV2.h:108
 AliMUONRawClusterV2.h:109
 AliMUONRawClusterV2.h:110
 AliMUONRawClusterV2.h:111