]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONDigit.h
Useful macros for the shifter
[u/mrichter/AliRoot.git] / MUON / AliMUONDigit.h
CommitLineData
a9e2aefa 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$ */
30178c30 7// Revision of includes 07/05/2004
a9e2aefa 8
692de412 9/// \ingroup base
10/// \class AliMUONDigit
11/// \brief MUON digit
12
5a91ea86 13#ifndef ALIMUONVDIGIT_H
14# include "AliMUONVDigit.h"
15#endif
a9e2aefa 16
5a91ea86 17class AliMUONDigit : public AliMUONVDigit
5350e3a6 18{
a9e2aefa 19 public:
5a91ea86 20 AliMUONDigit();
21 AliMUONDigit(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode);
22
d694b6f6 23 AliMUONDigit(const AliMUONDigit& rhs);
a450cfad 24 virtual ~AliMUONDigit();
61adb9bd 25
d694b6f6 26 AliMUONDigit& operator=(const AliMUONDigit& rhs);
a450cfad 27
a25ae7b5 28 /// Own clone methods (as the default TObject::Clone turned out to be pretty slow !)
4554058b 29 virtual TObject* Clone(const char* /*newname*/ = "") const { return new AliMUONDigit(*this); }
a25ae7b5 30
5a91ea86 31 virtual Bool_t HasMCInformation() const { return kTRUE; }
32
5398f946 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
81b31073 37
5a91ea86 38 virtual Float_t Charge() const {return fSignal;} ///< Return signal amplitude
81b31073 39
5398f946 40 virtual Int_t Hit() const {return fHit;} ///< Return MC hit number
5350e3a6 41
ea232c10 42 virtual Float_t Time() const {return fTime;} /// Return MC hit age
43
5398f946 44 virtual Int_t Ntracks() const { return fNtracks; } ///< Return MC tracks making to this digit
8a92eee6 45 virtual void AddTrack(Int_t trackNumber, Float_t trackCharge);
5350e3a6 46 virtual Int_t Track(Int_t i) const;
8a92eee6 47 virtual Float_t TrackCharge(Int_t i) const;
81b31073 48
5398f946 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
81b31073 52 virtual Bool_t IsSaturated() const;
b1d79ad7 53 virtual Bool_t IsNoiseOnly() const;
1d4e6965 54 virtual Bool_t IsEfficiencyApplied() const;
71a2d3aa 55 virtual UInt_t StatusMap() const { return fStatusMap; } ///< Return Neighbouring pad status
81b31073 56
b1d79ad7 57 virtual void NoiseOnly(Bool_t value=kTRUE);
81b31073 58 virtual void Saturated(Bool_t saturated=kTRUE);
1d4e6965 59 virtual void EfficiencyApplied(Bool_t value=kTRUE);
60
71a2d3aa 61 virtual void SetADC(Int_t adc) {fADC=adc; } ///< Set ADC value
5a91ea86 62 virtual void SetPadXY(Int_t padx, Int_t pady) {fPadX = padx; fPadY=pady; } ///< Set pad number along x
63 virtual void SetCharge(Float_t q) {fSignal = q;} ///< Set charge
5398f946 64 virtual void SetHit(Int_t n) {fHit = n;} ///< Set MC hit number
ea232c10 65 virtual void SetTime(Float_t t) {fTime = t;} ///< Set MC hit age
71a2d3aa 66 virtual void SetStatusMap(UInt_t statusMap) { fStatusMap = statusMap; } ///< Set status map
81b31073 67
81b31073 68 virtual void Copy(TObject& digit) const;
69
5350e3a6 70 /** Delete the internal track arrays (which are dynamically allocated).
71 * This is to insure we can put those digits in e.g. TClonesArray
72 * w/o leaking memory.
73 */
74 virtual void Clear(Option_t*);
75
5398f946 76 // Add mask to the track numbers.
5350e3a6 77 virtual void PatchTracks(Int_t mask);
78
5a91ea86 79 virtual Bool_t MergeWith(const AliMUONVDigit& other);
80
81 virtual Bool_t IsUsed() const;
82 virtual void Used(Bool_t value);
83
84 virtual Bool_t IsCalibrated() const;
85 virtual void Calibrated(Bool_t value);
86
87 virtual UInt_t GetUniqueID() const;
88
5350e3a6 89private:
18b6b8c7 90 Int_t fDetElemId; ///< Detection element ID
91 Int_t fManuId; ///< Id of the MANU chip.
92 Int_t fManuChannel; ///< Channel within the MANU chip.
8a92eee6 93 Float_t fSignal; ///< Signal amplitude
5350e3a6 94
18b6b8c7 95 Int_t fPadX; ///< Pad number along x
96 Int_t fPadY; ///< Pad number along y
97 Int_t fCathode; ///< Cathode number
98 Int_t fADC; ///< ADC value
99 UInt_t fFlags; ///< Special flags (e.g. is the signal an overflow ?)
a450cfad 100
18b6b8c7 101 Int_t fNtracks; ///< MC tracks making to this digit.
102
103 /// charges of MC track making this digit
8a92eee6 104 Float_t* fTcharges; //[fNtracks] charges of MC track making this digit
18b6b8c7 105
106 /// primary MC tracks making this digit
107 Int_t* fTracks; //[fNtracks] primary MC tracks making this digit
108
18b6b8c7 109 Int_t fHit; ///< MC hit number - temporary solution
ea232c10 110 Float_t fTime; ///< MC hit age
5350e3a6 111
aaf7adc0 112 UInt_t fStatusMap; ///< Neighbouring pad status (whether ped, gains, hv were ok or not)
113
18b6b8c7 114 static const UInt_t fgkSaturatedMask = 0x1; ///< the mask (part of fFlags) to indicate this digit is saturated
5a91ea86 115 static const UInt_t fgkUsedMask = 0x10; ///< whether this digit is used by whatever other object (typically a cluster, though)
116 static const UInt_t fgkCalibratedMask = 0x100; ///< whether this digits has been calibrated
18b6b8c7 117 static const UInt_t fgkNoiseOnlyMask = 0x1000; ///< indicate a simulated digit due to noise only
1d4e6965 118 static const UInt_t fgkEfficiencyMask = 0x2000; ///< indicate chamber efficiency has been applied to a simulated digit
b1d79ad7 119
ea232c10 120 ClassDef(AliMUONDigit,10) //Digits for MUON
a9e2aefa 121};
5a91ea86 122
a9e2aefa 123#endif