- Adding check and flagging for HG present
[u/mrichter/AliRoot.git] / MUON / AliMUONRealDigit.h
CommitLineData
97d7844b 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
19class AliMUONRealDigit : public AliMUONVDigit
20{
21public:
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
97d7844b 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);
73 /// Set the charge
74 virtual void SetCharge(Float_t q) { fCharge=q; }
75
76 virtual Bool_t MergeWith(const AliMUONVDigit& other);
77
78 /// No, this digit is not a Monte-Carlo one, sorry.
79 virtual Bool_t HasMCInformation() const { return kFALSE; }
80
81private:
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)
86
277e35c1 87 /// Various statuses of the digit
97d7844b 88 enum EStatusBit
89 {
277e35c1 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)
7332f213 92 kCalibrated = BIT(22) ///< whether the digit has been calibrated or not
97d7844b 93 };
94
95 ClassDef(AliMUONRealDigit,1) // Implementation of AliMUONVDigit
96};
97
98#endif