1 #ifndef ALIMUONREALDIGIT_H
2 #define ALIMUONREALDIGIT_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONRealDigit
11 /// \brief Implementation of AliMUONVDigit for real (i.e. not simulated) digits
13 // author Laurent Aphecetche
15 #ifndef ALIMUONVDIGIT_H
16 # include "AliMUONVDigit.h"
19 class AliMUONRealDigit : public AliMUONVDigit
23 AliMUONRealDigit(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode);
24 virtual ~AliMUONRealDigit();
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()); }
33 /// Charge (should be non zero if calibrated)
34 virtual Float_t Charge() const { return fCharge; }
36 /// ADC value (it is the real raw adc value, not pedestal subtracted)
37 virtual Int_t ADC() const { return fADC; }
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()); }
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); }
49 /// We have no idea whether a real digit is noise only or not ;-)
50 virtual Bool_t IsNoiseOnly() const { return kFALSE; }
52 /// Again, this is for simulation only
53 virtual Bool_t IsEfficiencyApplied() const { return kFALSE; }
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); }
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); }
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; }
70 /// Set the ADC value (should be between 0 and 4095)
71 virtual void SetADC(Int_t adc) { fADC = adc; }
72 virtual void SetPadXY(Int_t padx, Int_t pady);
74 virtual void SetCharge(Float_t q) { fCharge=q; }
76 virtual Bool_t MergeWith(const AliMUONVDigit& other);
78 /// No, this digit is not a Monte-Carlo one, sorry.
79 virtual Bool_t HasMCInformation() const { return kFALSE; }
82 Float_t fCharge; ///< Charge on pad
83 UInt_t fPadXY; ///< Pad number along x and Y (packed)
84 Int_t fADC; ///< Raw ADC value
85 UInt_t fStatusMap; ///< Neighbouring pad status (whether ped, gains, hv were ok or not)
87 /// Various statuses of the digit
90 kSaturated = BIT(20), ///< to indicate that manas amplifier has saturated
91 kUsed = BIT(21), ///< whether the digit is used (e.g. in a cluster)
92 kCalibrated = BIT(22) ///< whether the digit has been calibrated or not
95 ClassDef(AliMUONRealDigit,1) // Implementation of AliMUONVDigit