]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONRealDigit.h
Removed usage of removed class AliMpManuList
[u/mrichter/AliRoot.git] / MUON / AliMUONRealDigit.h
1 #ifndef ALIMUONREALDIGIT_H
2 #define ALIMUONREALDIGIT_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 AliMUONRealDigit
11 /// \brief Implementation of AliMUONVDigit for real (i.e. not simulated) digits
12 /// 
13 // author Laurent Aphecetche
14
15 #ifndef ALIMUONVDIGIT_H
16 #  include "AliMUONVDigit.h"
17 #endif
18
19 class AliMUONRealDigit : public AliMUONVDigit
20 {
21 public:
22   AliMUONRealDigit();
23   AliMUONRealDigit(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode);
24   virtual ~AliMUONRealDigit();
25   
26   /// Return the detection element this digit belongs to
27   virtual Int_t DetElemId() const { return AliMUONVDigit::DetElemId(GetUniqueID()); }
28   virtual Int_t PadX() const;
29   virtual Int_t PadY() const;
30   /// Return the cathode this digit belongs to
31   virtual Int_t Cathode() const { return AliMUONVDigit::Cathode(GetUniqueID()); }
32   
33   /// Charge (should be non zero if calibrated)
34   virtual Float_t Charge() const { return fCharge; }
35   
36   /// ADC value (it is the real raw adc value, not pedestal subtracted)
37   virtual Int_t ADC() const { return fADC; }
38   
39   /// Return the manu chip this digit belongs to
40   virtual Int_t ManuId() const  { return AliMUONVDigit::ManuId(GetUniqueID()); }
41   /// Return the manu channel this digits is connected to
42   virtual Int_t ManuChannel() const  { return AliMUONVDigit::ManuChannel(GetUniqueID()); }
43   
44   /// Whether this digit's charge has saturated the electronics
45   virtual Bool_t IsSaturated() const { return TestBit(kSaturated); }
46   /// Set the saturation status
47   virtual void Saturated(Bool_t saturated=kTRUE) { SetBit(kSaturated,saturated); }
48   
49   /// We have no idea whether a real digit is noise only or not ;-)
50   virtual Bool_t IsNoiseOnly() const { return kFALSE; }
51   
52   /// Again, this is for simulation only
53   virtual Bool_t IsEfficiencyApplied() const { return kFALSE; }
54   
55   /// Whether this digit is calibrated or not
56   virtual Bool_t IsCalibrated() const { return TestBit(kCalibrated); }
57   /// Set the calibration status
58   virtual void Calibrated(Bool_t value) { SetBit(kCalibrated,value); }
59   
60   /// Whether this digit is part of a cluster or something else
61   virtual Bool_t IsUsed() const { return TestBit(kUsed); }
62   /// Set the used status
63   virtual void Used(Bool_t value) { SetBit(kUsed,value); }
64   
65   /// The status map (i.e. the status of the neighbours) of this digit
66   virtual UInt_t StatusMap() const { return fStatusMap; }
67   /// Set the status map value
68   virtual void SetStatusMap(UInt_t statusMap) { fStatusMap = statusMap; }
69   
70   /// Whether this digit is real or virtual (a clustering detail...)
71   virtual Bool_t IsVirtual() const { return TestBit(kVirtual); }
72   /// Set the virtual status
73   virtual void SetVirtual(Bool_t value) { SetBit(kVirtual,value); }
74
75   /// Set the ADC value (should be between 0 and 4095)
76   virtual void SetADC(Int_t adc) { fADC = adc; }
77   virtual void SetPadXY(Int_t padx, Int_t pady);
78   /// Set the charge
79   virtual void SetCharge(Float_t q) { fCharge=q; }
80   
81   virtual Bool_t MergeWith(const AliMUONVDigit& other);
82   
83   /// No, this digit is not a Monte-Carlo one, sorry.
84   virtual Bool_t HasMCInformation() const { return kFALSE; }
85   
86 private:
87   Float_t fCharge; ///< Charge on pad  
88   UInt_t fPadXY; ///< Pad number along x and Y (packed)
89   Int_t fADC; ///< Raw ADC value
90   UInt_t fStatusMap; ///< Neighbouring pad status (whether ped, gains, hv were ok or not)
91   
92   /// Various statuses of the digit
93   enum EStatusBit 
94   {
95     kSaturated = BIT(20),  ///< to indicate that manas amplifier has saturated 
96     kUsed = BIT(21),       ///< whether the digit is used (e.g. in a cluster)
97     kCalibrated = BIT(22), ///< whether the digit has been calibrated or not 
98     kVirtual = BIT(23)     ///< whether the digit is virtual or not (see AZ) 
99   };
100   
101   ClassDef(AliMUONRealDigit,1) // Implementation of AliMUONVDigit
102 };
103
104 #endif