]>
Commit | Line | Data |
---|---|---|
c34d2b8c | 1 | #ifndef ALIESDMUONPAD_H |
2 | #define ALIESDMUONPAD_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 | /// \class AliESDMuonPad | |
10 | /// \brief Class to describe the MUON pads in the Event Summary Data | |
11 | // Author Philippe Pillot, Subatech | |
12 | ||
13 | ||
14 | #include <TObject.h> | |
15 | ||
16 | class AliESDMuonPad : public TObject { | |
17 | public: | |
18 | AliESDMuonPad(); // Constructor | |
19 | virtual ~AliESDMuonPad() {} ///< Destructor | |
20 | AliESDMuonPad(const AliESDMuonPad& pad); | |
21 | AliESDMuonPad& operator=(const AliESDMuonPad& pad); | |
0ca5f1d4 | 22 | virtual void Copy(TObject &obj) const; |
c34d2b8c | 23 | |
24 | /// Clear method (used by TClonesArray) | |
25 | virtual void Clear(Option_t* = "") {} | |
26 | ||
27 | /// Set the raw charge | |
12186235 | 28 | void SetADC(Int_t adc) {fADC = adc;} |
c34d2b8c | 29 | /// Return the raw charge |
12186235 | 30 | Int_t GetADC() const {return fADC;} |
c34d2b8c | 31 | |
32 | /// Set the calibrated charge | |
33 | void SetCharge(Double_t charge) {fCharge = charge;} | |
34 | /// Return the calibrated charge | |
35 | Double_t GetCharge() const {return fCharge;} | |
36 | ||
37 | /// Return detection element id, part of the uniqueID | |
38 | Int_t GetDetElemId() const {return (GetUniqueID() & 0x00000FFF);} | |
39 | /// Return electronic card id, part of the uniqueID | |
40 | Int_t GetManuId() const {return (GetUniqueID() & 0x00FFF000) >> 12;} | |
41 | /// Return the channel within ManuId(), part of the uniqueID | |
42 | Int_t GetManuChannel() const {return (GetUniqueID() & 0x3F000000) >> 24;} | |
43 | /// Return the cathode number, part of the uniqueID | |
44 | Int_t GetCathode() const {return (GetUniqueID() & 0x40000000) >> 30;} | |
45 | ||
12186235 | 46 | /// Set the pad as being calibrated or not |
47 | void SetCalibrated(Bool_t calibrated = kTRUE) {SetBit(BIT(14),calibrated);} | |
48 | /// return kTRUE if the pad is calibrated | |
49 | Bool_t IsCalibrated() const {return TestBit(BIT(14));} | |
50 | /// Set the pad as being saturated or not | |
51 | void SetSaturated(Bool_t saturated = kTRUE) {SetBit(BIT(15),saturated);} | |
52 | /// return kTRUE if the pad is saturated | |
53 | Bool_t IsSaturated() const {return TestBit(BIT(15));} | |
54 | ||
c34d2b8c | 55 | void Print(Option_t */*option*/ = "") const; |
56 | ||
57 | ||
58 | protected: | |
59 | Int_t fADC; ///< ADC value | |
60 | Double32_t fCharge; ///< Calibrated charge | |
61 | ||
62 | ||
63 | ClassDef(AliESDMuonPad, 1) // MUON ESD pad class | |
64 | }; | |
65 | ||
66 | #endif | |
67 |