]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONVDigit.h
Removing, as not used anymore (Laurent)
[u/mrichter/AliRoot.git] / MUON / AliMUONVDigit.h
CommitLineData
d6c3334d 1#ifndef ALIMUONVDIGIT_H
2#define ALIMUONVDIGIT_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5* See cxx source for full Copyright notice */
6
7// $Id$
8
9/// \ingroup base
10/// \class AliMUONVDigit
11/// \brief ABC of a MUON digit
12// Author Laurent Aphecetche, Subatech
13
14#ifndef ROOT_TObject
15# include "TObject.h"
16#endif
17
18class AliMUONVDigit : public TObject
19{
20public:
21 AliMUONVDigit();
22 AliMUONVDigit(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode);
23 virtual ~AliMUONVDigit();
24
25 virtual const char* GetName() const;
26
27 /// The detection element this digit belongs to
28 virtual Int_t DetElemId() const=0;
29 /// The x-index of this digit (>=0)
30 virtual Int_t PadX() const=0;
31 /// The y-index of this digit (>=0)
32 virtual Int_t PadY() const=0;
33 /// Cathode number this digit is on (0 or 1)
34 virtual Int_t Cathode() const=0;
35
36 /// The charge of this digit, calibrated or not depending on IsCalibrated()
37 virtual Float_t Charge() const=0;
38
39 /// Raw ADC value of this digit
40 virtual Int_t ADC() const = 0;
41
42 /// The electronic card id this digit belongs to (manuId for tracker, localboardId for trigger)
43 virtual Int_t ManuId() const = 0;
44 /// The channel within ManuId() this digit belongs to (manuChannel for tracker, localBoardChannel for trigger)
45 virtual Int_t ManuChannel() const=0;
46
47 /// Whether the ADC has saturated
48 virtual Bool_t IsSaturated() const=0;
49 /// Set the saturation status
50 virtual void Saturated(Bool_t saturated=kTRUE)=0;
51
52 /// Whether this (simulated) digit is purely noise
53 virtual Bool_t IsNoiseOnly() const=0;
54 /// Set the noiseOnly status
55 virtual void NoiseOnly(Bool_t /*value*/=kTRUE) { }
56
57 /// Whether this (simulated) digit got corrected by chamber efficiency
58 virtual Bool_t IsEfficiencyApplied() const=0;
59 /// Set the efficiencyApplied status
60 virtual void EfficiencyApplied(Bool_t /*value*/=kTRUE) {}
61
62 /// Whether this digit has been calibrated or not
63 virtual Bool_t IsCalibrated() const=0;
64 /// Set the calibrated status
65 virtual void Calibrated(Bool_t value)=0;
66
67 /// Whether this digit is used somewhere (typically in a cluster)
68 virtual Bool_t IsUsed() const = 0;
69 /// Set the used status
70 virtual void Used(Bool_t value) = 0;
71
72 /// A word describing the status of the neighbours of this digit
73 virtual UInt_t StatusMap() const=0;
74 /// Set the statusMap
75 virtual void SetStatusMap(UInt_t statusMap)=0;
76
77 /// Set the ADC value
78 virtual void SetADC(Int_t adc)=0;
79 /// Set the ix and iy of this digit
80 virtual void SetPadXY(Int_t padx, Int_t pady)=0;
81 /// Set the charge of this digit
82 virtual void SetCharge(Float_t q)=0;
83 /// Add a charge
84 virtual void AddCharge(Float_t q) { SetCharge(Charge()+q); }
85
86 /// Merge this with other
87 virtual Bool_t MergeWith(const AliMUONVDigit& other)=0;
88
89 /// Whether this digit is a tracker digit (false if belongs to trigger)
90 virtual Bool_t IsTracker() const { return !IsTrigger(); }
91 /** FIXME: how to get this information w/o hard-coding, yet being efficient ?
92 Use one fFlags that must be set when creating the digit for instance ?
93 */
94 virtual Bool_t IsTrigger() const { return DetElemId()>=1100; }
95
96 virtual void Print(Option_t* opt="") const;
97
98 /// Below are methods only relevant for MC digigts.
99
100 /// Whether we implement MC methods.
101 virtual Bool_t HasMCInformation() const = 0;
102
103 /// Hit number that contributed to this simulated digit
104 virtual Int_t Hit() const { return 0; }
105 /// Set the hit number
106 virtual void SetHit(Int_t /*n*/) { }
107 /// Number of tracks contributing to this digit
108 virtual Int_t Ntracks() const { return 0; }
109 /// Add a track (and its charge) to the list of tracks we handle
110 virtual void AddTrack(Int_t /*trackNumber*/, Float_t /*trackCharge*/) {}
111 /// Return the i-th track number
112 virtual Int_t Track(Int_t /*i*/) const { return 0; }
113 /// Return the i-th track charge
114 virtual Float_t TrackCharge(Int_t /*i*/) const { return 0; }
115 /// Patch track with a mask
116 virtual void PatchTracks(Int_t /*mask*/) {}
117
118 static UInt_t BuildUniqueID(Int_t detElemId, Int_t manuId,
119 Int_t manuChannel, Int_t cathode);
120
121 static void DecodeUniqueID(UInt_t uniqueID,
122 Int_t& detElemId, Int_t& manuId,
123 Int_t& manuChannel, Int_t& cathode);
124
125 static Int_t DetElemId(UInt_t uniqueID);
126 static Int_t ManuId(UInt_t uniqueID);
127 static Int_t ManuChannel(UInt_t uniqueID);
128 static Int_t Cathode(UInt_t uniqueID);
129
130 /// Return the localBoardNumber from the uniqueID
131 static Int_t LocalBoardNumber(UInt_t uniqueID) { return ManuId(uniqueID); }
132 /// Return the localBoardChannel from the uniqueID
133 static Int_t LocalBoardChannel(UInt_t uniqueID) { return ManuChannel(uniqueID); }
134
135
136 ClassDef(AliMUONVDigit,0) // ABC of a MUON Digit
137};
138
139#endif