]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIMUONDIGIT_H | |
2 | #define ALIMUONDIGIT_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | // Revision of includes 07/05/2004 | |
8 | ||
9 | /// \ingroup base | |
10 | /// \class AliMUONDigit | |
11 | /// \brief MUON digit | |
12 | ||
13 | #ifndef ALIMUONVDIGIT_H | |
14 | # include "AliMUONVDigit.h" | |
15 | #endif | |
16 | ||
17 | class AliMUONDigit : public AliMUONVDigit | |
18 | { | |
19 | public: | |
20 | AliMUONDigit(); | |
21 | AliMUONDigit(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode); | |
22 | ||
23 | AliMUONDigit(const AliMUONDigit& rhs); | |
24 | virtual ~AliMUONDigit(); | |
25 | ||
26 | AliMUONDigit& operator=(const AliMUONDigit& rhs); | |
27 | ||
28 | /// Own clone methods (as the default TObject::Clone turned out to be pretty slow !) | |
29 | virtual TObject* Clone(const char* /*newname*/ = "") const { return new AliMUONDigit(*this); } | |
30 | ||
31 | virtual Bool_t HasMCInformation() const { return kTRUE; } | |
32 | ||
33 | virtual Int_t DetElemId()const {return fDetElemId;} ///< Return detection element ID | |
34 | virtual Int_t PadX() const {return fPadX;} ///< Return pad number along x | |
35 | virtual Int_t PadY() const {return fPadY;} ///< Return pad number along y | |
36 | virtual Int_t Cathode() const {return fCathode;} ///< Return cathode number | |
37 | ||
38 | virtual Float_t Charge() const {return fSignal;} ///< Return signal amplitude | |
39 | ||
40 | virtual Int_t Hit() const {return fHit;} ///< Return MC hit number | |
41 | ||
42 | virtual Float_t Time() const {return fTime;} /// Return MC hit age | |
43 | ||
44 | virtual Int_t Ntracks() const { return fNtracks; } ///< Return MC tracks making to this digit | |
45 | virtual void AddTrack(Int_t trackNumber, Float_t trackCharge); | |
46 | virtual Int_t Track(Int_t i) const; | |
47 | virtual Float_t TrackCharge(Int_t i) const; | |
48 | ||
49 | virtual Int_t ADC() const { return fADC; } ///< Return ADC value | |
50 | virtual Int_t ManuId() const { return fManuId; } ///< Return Id of the MANU chip | |
51 | virtual Int_t ManuChannel() const { return fManuChannel; } ///< Return Channel within the MANU chip | |
52 | virtual Bool_t IsSaturated() const; | |
53 | virtual Bool_t IsNoiseOnly() const; | |
54 | virtual Bool_t IsEfficiencyApplied() const; | |
55 | virtual Bool_t IsConverted() const; | |
56 | virtual Bool_t IsChargeInFC() const; | |
57 | virtual UInt_t StatusMap() const { return fStatusMap; } ///< Return Neighbouring pad status | |
58 | ||
59 | virtual void NoiseOnly(Bool_t value=kTRUE); | |
60 | virtual void Saturated(Bool_t saturated=kTRUE); | |
61 | virtual void EfficiencyApplied(Bool_t value=kTRUE); | |
62 | virtual void Converted(Bool_t value=kTRUE); | |
63 | virtual void ChargeInFC(Bool_t value=kTRUE); | |
64 | ||
65 | virtual void SetADC(Int_t adc) {fADC=adc; } ///< Set ADC value | |
66 | virtual void SetPadXY(Int_t padx, Int_t pady) {fPadX = padx; fPadY=pady; } ///< Set pad number along x | |
67 | virtual void SetCharge(Float_t q) {fSignal = q;} ///< Set charge | |
68 | virtual void SetHit(Int_t n) {fHit = n;} ///< Set MC hit number | |
69 | virtual void SetTime(Float_t t) {fTime = t;} ///< Set MC hit age | |
70 | virtual void SetStatusMap(UInt_t statusMap) { fStatusMap = statusMap; } ///< Set status map | |
71 | ||
72 | virtual void Copy(TObject& digit) const; | |
73 | ||
74 | /** Delete the internal track arrays (which are dynamically allocated). | |
75 | * This is to insure we can put those digits in e.g. TClonesArray | |
76 | * w/o leaking memory. | |
77 | */ | |
78 | virtual void Clear(Option_t*); | |
79 | ||
80 | // Add mask to the track numbers. | |
81 | virtual void PatchTracks(Int_t mask); | |
82 | ||
83 | virtual Bool_t MergeWith(const AliMUONVDigit& other); | |
84 | ||
85 | virtual Bool_t IsUsed() const; | |
86 | virtual void Used(Bool_t value); | |
87 | ||
88 | virtual Bool_t IsCalibrated() const; | |
89 | virtual void Calibrated(Bool_t value); | |
90 | ||
91 | virtual UInt_t GetUniqueID() const; | |
92 | ||
93 | private: | |
94 | Int_t fDetElemId; ///< Detection element ID | |
95 | Int_t fManuId; ///< Id of the MANU chip. | |
96 | Int_t fManuChannel; ///< Channel within the MANU chip. | |
97 | Float_t fSignal; ///< Signal amplitude | |
98 | ||
99 | Int_t fPadX; ///< Pad number along x | |
100 | Int_t fPadY; ///< Pad number along y | |
101 | Int_t fCathode; ///< Cathode number | |
102 | Int_t fADC; ///< ADC value | |
103 | UInt_t fFlags; ///< Special flags (e.g. is the signal an overflow ?) | |
104 | ||
105 | Int_t fNtracks; ///< MC tracks making to this digit. | |
106 | ||
107 | /// charges of MC track making this digit | |
108 | Float_t* fTcharges; //[fNtracks] charges of MC track making this digit | |
109 | ||
110 | /// primary MC tracks making this digit | |
111 | Int_t* fTracks; //[fNtracks] primary MC tracks making this digit | |
112 | ||
113 | Int_t fHit; ///< MC hit number - temporary solution | |
114 | Float_t fTime; ///< MC hit age | |
115 | ||
116 | UInt_t fStatusMap; ///< Neighbouring pad status (whether ped, gains, hv were ok or not) | |
117 | ||
118 | static const UInt_t fgkSaturatedMask = 0x1; ///< the mask (part of fFlags) to indicate this digit is saturated | |
119 | static const UInt_t fgkUsedMask = 0x10; ///< whether this digit is used by whatever other object (typically a cluster, though) | |
120 | static const UInt_t fgkCalibratedMask = 0x100; ///< whether this digits has been calibrated | |
121 | static const UInt_t fgkNoiseOnlyMask = 0x1000; ///< indicate a simulated digit due to noise only | |
122 | static const UInt_t fgkEfficiencyMask = 0x2000; ///< indicate chamber efficiency has been applied to a simulated digit | |
123 | static const UInt_t fgkConverted = 0x4000; ///< has been converted from a real digit | |
124 | static const UInt_t fgkChargeInFC = 0x8000; ///< charge unit are femto coulomb | |
125 | ||
126 | ClassDef(AliMUONDigit,12) //Digits for MUON | |
127 | }; | |
128 | ||
129 | #endif |