Made a couple of methods const, and starting to add iteration capability
[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);
5350e3a6 20 /// \deprecated
a450cfad 21 AliMUONDigit(Int_t *digits);
5350e3a6 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
a713db22 28 virtual Bool_t IsSortable() const {return kTRUE;}
29 virtual int Compare(const TObject *obj) const;
30
5350e3a6 31 virtual Int_t DetElemId()const {return fDetElemId;}
81b31073 32 virtual Int_t PadX() const {return fPadX;}
33 virtual Int_t PadY() const {return fPadY;}
34 virtual Int_t Cathode() const {return fCathode;}
35
36 virtual Int_t Signal() const {return fSignal;}
37
38 virtual Int_t Physics() const {return fPhysics;}
39
5350e3a6 40 virtual Int_t Hit() const {return fHit;}
41
42 virtual Int_t Ntracks() const { return fNtracks; }
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
5350e3a6 47 virtual Int_t ADC() const { return fADC; }
48 virtual Int_t ManuId() const { return fManuId; }
49 virtual Int_t ManuChannel() const { return fManuChannel; }
81b31073 50 virtual Bool_t IsSaturated() const;
51
52 virtual void Saturated(Bool_t saturated=kTRUE);
53 virtual void SetElectronics(Int_t manuId, Int_t manuChannel);
5350e3a6 54 virtual void SetADC(Int_t adc) { fADC=adc; }
81b31073 55 virtual void SetDetElemId(Int_t id) {fDetElemId = id;}
56 virtual void SetPadX(Int_t pad) {fPadX = pad;}
57 virtual void SetPadY(Int_t pad) {fPadY = pad;}
58 virtual void SetSignal(Int_t q) {fSignal = q;}
59 virtual void AddSignal(Int_t q) {fSignal += q;}
60 virtual void AddPhysicsSignal(Int_t q) {fPhysics += q;}
61 virtual void SetHit(Int_t n) {fHit = n;}
62 virtual void SetCathode(Int_t c) {fCathode = c;}
63 virtual void SetPhysicsSignal(Int_t q) {fPhysics = q; }
64
65 virtual void Print(Option_t* opt="") const;
66
67 virtual void Copy(TObject& digit) const;
68
5350e3a6 69 /** Delete the internal track arrays (which are dynamically allocated).
70 * This is to insure we can put those digits in e.g. TClonesArray
71 * w/o leaking memory.
72 */
73 virtual void Clear(Option_t*);
74
75 /// Add mask to the track numbers.
76 virtual void PatchTracks(Int_t mask);
77
78private:
79 Int_t fDetElemId; // Detection element ID
80 Int_t fManuId; // Id of the MANU chip.
81 Int_t fManuChannel; // Channel within the MANU chip.
82 Int_t fSignal; // Signal amplitude
83
81b31073 84 Int_t fPadX; // Pad number along x
85 Int_t fPadY; // Pad number along y
86 Int_t fCathode; // Cathode number
5350e3a6 87 Int_t fADC; // ADC value
88 UInt_t fFlags; // Special flags (e.g. is the signal an overflow ?)
a450cfad 89
5350e3a6 90 Int_t fNtracks; // MC tracks making to this digit.
91 Int_t* fTcharges; //[fNtracks] charges of MC track making this digit
92 Int_t* fTracks; //[fNtracks] primary MC tracks making this digit
93 Int_t fPhysics; // MC physics contribution to signal
94 Int_t fHit; // MC hit number - temporary solution
95
96 ClassDef(AliMUONDigit,4) //Digits for MUON
a9e2aefa 97};
98#endif