]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONDigit.h
Better selection between menus
[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
71a2d3aa 32 virtual Float_t Signal() const {return fSignal;} ///< Return signal amplitude
81b31073 33
71a2d3aa 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;
1d4e6965 48 virtual Bool_t IsEfficiencyApplied() const;
71a2d3aa 49 virtual UInt_t StatusMap() const { return fStatusMap; } ///< Return Neighbouring pad status
81b31073 50
b1d79ad7 51 virtual void NoiseOnly(Bool_t value=kTRUE);
81b31073 52 virtual void Saturated(Bool_t saturated=kTRUE);
1d4e6965 53 virtual void EfficiencyApplied(Bool_t value=kTRUE);
54
81b31073 55 virtual void SetElectronics(Int_t manuId, Int_t manuChannel);
71a2d3aa 56 virtual void SetADC(Int_t adc) {fADC=adc; } ///< Set ADC value
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
71a2d3aa 60 virtual void SetSignal(Float_t q) {fSignal = q;} ///< Set signal amplitude
61 virtual void AddSignal(Float_t q) {fSignal += q;} ///< Add signal amplitude
62 virtual void AddPhysicsSignal(Float_t q) {fPhysics += q;} ///< Add MC physics contribution to signal
5398f946 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
71a2d3aa 65 virtual void SetPhysicsSignal(Float_t q) {fPhysics = q; } ///< Set MC physics contribution to signal
66 virtual void SetStatusMap(UInt_t statusMap) { fStatusMap = statusMap; } ///< Set status map
81b31073 67
68 virtual void Print(Option_t* opt="") const;
69
70 virtual void Copy(TObject& digit) const;
71
5350e3a6 72 /** Delete the internal track arrays (which are dynamically allocated).
73 * This is to insure we can put those digits in e.g. TClonesArray
74 * w/o leaking memory.
75 */
76 virtual void Clear(Option_t*);
77
5398f946 78 // Add mask to the track numbers.
5350e3a6 79 virtual void PatchTracks(Int_t mask);
80
81private:
18b6b8c7 82 Int_t fDetElemId; ///< Detection element ID
83 Int_t fManuId; ///< Id of the MANU chip.
84 Int_t fManuChannel; ///< Channel within the MANU chip.
8a92eee6 85 Float_t fSignal; ///< Signal amplitude
5350e3a6 86
18b6b8c7 87 Int_t fPadX; ///< Pad number along x
88 Int_t fPadY; ///< Pad number along y
89 Int_t fCathode; ///< Cathode number
90 Int_t fADC; ///< ADC value
91 UInt_t fFlags; ///< Special flags (e.g. is the signal an overflow ?)
a450cfad 92
18b6b8c7 93 Int_t fNtracks; ///< MC tracks making to this digit.
94
95 /// charges of MC track making this digit
8a92eee6 96 Float_t* fTcharges; //[fNtracks] charges of MC track making this digit
18b6b8c7 97
98 /// primary MC tracks making this digit
99 Int_t* fTracks; //[fNtracks] primary MC tracks making this digit
100
8a92eee6 101 Float_t fPhysics; ///< MC physics contribution to signal
18b6b8c7 102 Int_t fHit; ///< MC hit number - temporary solution
5350e3a6 103
aaf7adc0 104 UInt_t fStatusMap; ///< Neighbouring pad status (whether ped, gains, hv were ok or not)
105
18b6b8c7 106 static const UInt_t fgkSaturatedMask = 0x1; ///< the mask (part of fFlags) to indicate this digit is saturated
107 static const UInt_t fgkNoiseOnlyMask = 0x1000; ///< indicate a simulated digit due to noise only
1d4e6965 108 static const UInt_t fgkEfficiencyMask = 0x2000; ///< indicate chamber efficiency has been applied to a simulated digit
b1d79ad7 109
1d4e6965 110 ClassDef(AliMUONDigit,7) //Digits for MUON
a9e2aefa 111};
112#endif