]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONDigit.h
New versions of GDC and CDH raw data headers. Some CDH getters are added
[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
a9e2aefa 13#include <TObject.h>
14
5350e3a6 15class AliMUONDigit : public TObject
16{
a9e2aefa 17 public:
30178c30 18 AliMUONDigit();
d694b6f6 19 AliMUONDigit(const AliMUONDigit& rhs);
5398f946 20 // deprecated
a450cfad 21 AliMUONDigit(Int_t *digits);
5398f946 22 // deprecated
a450cfad 23 AliMUONDigit(Int_t *tracks, Int_t *charges, Int_t *digits);
24 virtual ~AliMUONDigit();
61adb9bd 25
d694b6f6 26 AliMUONDigit& operator=(const AliMUONDigit& rhs);
a450cfad 27
5398f946 28 virtual Bool_t IsSortable() const {return kTRUE;} ///< Return true if sortable
a713db22 29 virtual int Compare(const TObject *obj) const;
30
5398f946 31 virtual Int_t DetElemId()const {return fDetElemId;} ///< Return detection element ID
32 virtual Int_t PadX() const {return fPadX;} ///< Return pad number along x
33 virtual Int_t PadY() const {return fPadY;} ///< Return pad number along y
34 virtual Int_t Cathode() const {return fCathode;} ///< Return cathode number
81b31073 35
5398f946 36 virtual Int_t Signal() const {return fSignal;} ///< Return signal amplitude
81b31073 37
5398f946 38 virtual Int_t Physics() const {return fPhysics;} ///< Return MC physics contribution to signal
81b31073 39
5398f946 40 virtual Int_t Hit() const {return fHit;} ///< Return MC hit number
5350e3a6 41
5398f946 42 virtual Int_t Ntracks() const { return fNtracks; } ///< Return MC tracks making to this digit
5350e3a6 43 virtual void AddTrack(Int_t trackNumber, Int_t trackCharge);
44 virtual Int_t Track(Int_t i) const;
45 virtual Int_t TrackCharge(Int_t i) const;
81b31073 46
5398f946 47 virtual Int_t ADC() const { return fADC; } ///< Return ADC value
48 virtual Int_t ManuId() const { return fManuId; } ///< Return Id of the MANU chip
49 virtual Int_t ManuChannel() const { return fManuChannel; } ///< Return Channel within the MANU chip
81b31073 50 virtual Bool_t IsSaturated() const;
b1d79ad7 51 virtual Bool_t IsNoiseOnly() const;
81b31073 52
b1d79ad7 53 virtual void NoiseOnly(Bool_t value=kTRUE);
81b31073 54 virtual void Saturated(Bool_t saturated=kTRUE);
55 virtual void SetElectronics(Int_t manuId, Int_t manuChannel);
5350e3a6 56 virtual void SetADC(Int_t adc) { fADC=adc; }
5398f946 57 virtual void SetDetElemId(Int_t id) {fDetElemId = id;} ///< Set detection element ID
58 virtual void SetPadX(Int_t pad) {fPadX = pad;} ///< Set pad number along x
59 virtual void SetPadY(Int_t pad) {fPadY = pad;} ///< Set pad number along y
60 virtual void SetSignal(Int_t q) {fSignal = q;} ///< Set signal amplitude
61 virtual void AddSignal(Int_t q) {fSignal += q;} ///< Add signal amplitude
62 virtual void AddPhysicsSignal(Int_t q) {fPhysics += q;} ///< Add MC physics contribution to signal
63 virtual void SetHit(Int_t n) {fHit = n;} ///< Set MC hit number
64 virtual void SetCathode(Int_t c) {fCathode = c;} ///< Set cathode number
65 virtual void SetPhysicsSignal(Int_t q) {fPhysics = q; } ///< Set MC physics contribution to signal
81b31073 66
67 virtual void Print(Option_t* opt="") const;
68
69 virtual void Copy(TObject& digit) const;
70
5350e3a6 71 /** Delete the internal track arrays (which are dynamically allocated).
72 * This is to insure we can put those digits in e.g. TClonesArray
73 * w/o leaking memory.
74 */
75 virtual void Clear(Option_t*);
76
5398f946 77 // Add mask to the track numbers.
5350e3a6 78 virtual void PatchTracks(Int_t mask);
79
80private:
18b6b8c7 81 Int_t fDetElemId; ///< Detection element ID
82 Int_t fManuId; ///< Id of the MANU chip.
83 Int_t fManuChannel; ///< Channel within the MANU chip.
84 Int_t fSignal; ///< Signal amplitude
5350e3a6 85
18b6b8c7 86 Int_t fPadX; ///< Pad number along x
87 Int_t fPadY; ///< Pad number along y
88 Int_t fCathode; ///< Cathode number
89 Int_t fADC; ///< ADC value
90 UInt_t fFlags; ///< Special flags (e.g. is the signal an overflow ?)
a450cfad 91
18b6b8c7 92 Int_t fNtracks; ///< MC tracks making to this digit.
93
94 /// charges of MC track making this digit
95 Int_t* fTcharges; //[fNtracks] charges of MC track making this digit
96
97 /// primary MC tracks making this digit
98 Int_t* fTracks; //[fNtracks] primary MC tracks making this digit
99
100 Int_t fPhysics; ///< MC physics contribution to signal
101 Int_t fHit; ///< MC hit number - temporary solution
5350e3a6 102
18b6b8c7 103 static const UInt_t fgkSaturatedMask = 0x1; ///< the mask (part of fFlags) to indicate this digit is saturated
104 static const UInt_t fgkNoiseOnlyMask = 0x1000; ///< indicate a simulated digit due to noise only
b1d79ad7 105
5350e3a6 106 ClassDef(AliMUONDigit,4) //Digits for MUON
a9e2aefa 107};
108#endif