]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONRealDigit.h
- Swap sign of the eta in case of LHC13f - Add histogram for tracks which are matched...
[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
05315e71 60 /// Whether this digit has its charge already in fC
61 virtual Bool_t IsChargeInFC() const { return TestBit(kChargeInFC); }
62 /// Set the charge unit value
63 virtual void ChargeInFC(Bool_t value=kTRUE) { SetBit(kChargeInFC,value); }
64
97d7844b 65 /// Whether this digit is part of a cluster or something else
66 virtual Bool_t IsUsed() const { return TestBit(kUsed); }
67 /// Set the used status
68 virtual void Used(Bool_t value) { SetBit(kUsed,value); }
69
70 /// The status map (i.e. the status of the neighbours) of this digit
71 virtual UInt_t StatusMap() const { return fStatusMap; }
72 /// Set the status map value
73 virtual void SetStatusMap(UInt_t statusMap) { fStatusMap = statusMap; }
74
97d7844b 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
86private:
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
277e35c1 92 /// Various statuses of the digit
97d7844b 93 enum EStatusBit
94 {
277e35c1 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)
05315e71 97 kCalibrated = BIT(22), ///< whether the digit has been calibrated or not
98 kChargeInFC = BIT(23) ///< whether the digit has a charge in fC or not
97d7844b 99 };
100
05315e71 101 ClassDef(AliMUONRealDigit,2) // Implementation of AliMUONVDigit
97d7844b 102};
103
104#endif