Adding StatusMap data member (Laurent)
[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);
a450cfad 20 virtual ~AliMUONDigit();
61adb9bd 21
d694b6f6 22 AliMUONDigit& operator=(const AliMUONDigit& rhs);
a450cfad 23
5398f946 24 virtual Bool_t IsSortable() const {return kTRUE;} ///< Return true if sortable
8a92eee6 25 virtual Int_t Compare(const TObject *obj) const;
a713db22 26
5398f946 27 virtual Int_t DetElemId()const {return fDetElemId;} ///< Return detection element ID
28 virtual Int_t PadX() const {return fPadX;} ///< Return pad number along x
29 virtual Int_t PadY() const {return fPadY;} ///< Return pad number along y
30 virtual Int_t Cathode() const {return fCathode;} ///< Return cathode number
81b31073 31
8a92eee6 32 virtual Float_t Signal() const {return fSignal;} ///< Return signal amplitude
81b31073 33
8a92eee6 34 virtual Float_t Physics() const {return fPhysics;} ///< Return MC physics contribution to signal
81b31073 35
5398f946 36 virtual Int_t Hit() const {return fHit;} ///< Return MC hit number
5350e3a6 37
5398f946 38 virtual Int_t Ntracks() const { return fNtracks; } ///< Return MC tracks making to this digit
8a92eee6 39 virtual void AddTrack(Int_t trackNumber, Float_t trackCharge);
5350e3a6 40 virtual Int_t Track(Int_t i) const;
8a92eee6 41 virtual Float_t TrackCharge(Int_t i) const;
81b31073 42
5398f946 43 virtual Int_t ADC() const { return fADC; } ///< Return ADC value
44 virtual Int_t ManuId() const { return fManuId; } ///< Return Id of the MANU chip
45 virtual Int_t ManuChannel() const { return fManuChannel; } ///< Return Channel within the MANU chip
81b31073 46 virtual Bool_t IsSaturated() const;
b1d79ad7 47 virtual Bool_t IsNoiseOnly() const;
aaf7adc0 48 virtual UInt_t StatusMap() const { return fStatusMap; }
81b31073 49
b1d79ad7 50 virtual void NoiseOnly(Bool_t value=kTRUE);
81b31073 51 virtual void Saturated(Bool_t saturated=kTRUE);
52 virtual void SetElectronics(Int_t manuId, Int_t manuChannel);
5350e3a6 53 virtual void SetADC(Int_t adc) { fADC=adc; }
5398f946 54 virtual void SetDetElemId(Int_t id) {fDetElemId = id;} ///< Set detection element ID
55 virtual void SetPadX(Int_t pad) {fPadX = pad;} ///< Set pad number along x
56 virtual void SetPadY(Int_t pad) {fPadY = pad;} ///< Set pad number along y
8a92eee6 57 virtual void SetSignal(Float_t q) {fSignal = q;} ///< Set signal amplitude
58 virtual void AddSignal(Float_t q) {fSignal += q;} ///< Add signal amplitude
59 virtual void AddPhysicsSignal(Float_t q) {fPhysics += q;} ///< Add MC physics contribution to signal
5398f946 60 virtual void SetHit(Int_t n) {fHit = n;} ///< Set MC hit number
61 virtual void SetCathode(Int_t c) {fCathode = c;} ///< Set cathode number
8a92eee6 62 virtual void SetPhysicsSignal(Float_t q) {fPhysics = q; } ///< Set MC physics contribution to signal
aaf7adc0 63 virtual void SetStatusMap(UInt_t statusMap) { fStatusMap = statusMap; }
81b31073 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
5398f946 75 // Add mask to the track numbers.
5350e3a6 76 virtual void PatchTracks(Int_t mask);
77
78private:
18b6b8c7 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.
8a92eee6 82 Float_t fSignal; ///< Signal amplitude
5350e3a6 83
18b6b8c7 84 Int_t fPadX; ///< Pad number along x
85 Int_t fPadY; ///< Pad number along y
86 Int_t fCathode; ///< Cathode number
87 Int_t fADC; ///< ADC value
88 UInt_t fFlags; ///< Special flags (e.g. is the signal an overflow ?)
a450cfad 89
18b6b8c7 90 Int_t fNtracks; ///< MC tracks making to this digit.
91
92 /// charges of MC track making this digit
8a92eee6 93 Float_t* fTcharges; //[fNtracks] charges of MC track making this digit
18b6b8c7 94
95 /// primary MC tracks making this digit
96 Int_t* fTracks; //[fNtracks] primary MC tracks making this digit
97
8a92eee6 98 Float_t fPhysics; ///< MC physics contribution to signal
18b6b8c7 99 Int_t fHit; ///< MC hit number - temporary solution
5350e3a6 100
aaf7adc0 101 UInt_t fStatusMap; ///< Neighbouring pad status (whether ped, gains, hv were ok or not)
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
aaf7adc0 106 ClassDef(AliMUONDigit,6) //Digits for MUON
a9e2aefa 107};
108#endif