AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Go to the documentation of this file.
1 #ifndef ALIMUONPAD_H
2 #define ALIMUONPAD_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 // $Id$
13 // Author Laurent Aphecetche
15 #ifndef ROOT_TObject
16 # include "TObject.h"
17 #endif
18 #ifndef ROOT_TVector2
19 # include "TVector2.h"
20 #endif
21 #ifndef ALI_MP_AREA_H
22 # include "AliMpArea.h"
23 #endif
25 class AliMUONPad : public TObject
26 {
27 public:
28  AliMUONPad();
29  AliMUONPad(Double_t x, Double_t y,
30  Double_t dx, Double_t dy, Double_t charge);
31  AliMUONPad(const TVector2& position, const TVector2& dimensions,
32  Double_t charge);
33  AliMUONPad(Int_t detElemId, Int_t cathode,
34  Int_t ix, Int_t iy, Double_t x, Double_t y,
35  Double_t dx, Double_t dy, Double_t charge);
36  virtual ~AliMUONPad();
43  Int_t Cathode() const { return fCathode; }
45  Double_t Coord(Int_t ixy) const;
48  Double_t Charge() const { return fCharge; }
50  Double_t ChargeBackup() const { return fChargeBackup; }
53  Int_t DetElemId() const { return fDetElemId; }
56  TVector2 Dimensions() const { return fDimensions; }
59  Double_t DX() const { return fDimensions.X(); }
61  Double_t DY() const { return fDimensions.Y(); }
64  Bool_t IsReal() const { return fIsReal; }
67  Bool_t IsSaturated() const { return fIsSaturated; }
70  Bool_t IsSortable() const { return kTRUE; }
72  virtual Int_t Compare(const TObject* obj) const;
75  Bool_t IsUsed() const { return fClusterId >= 0; }
78  Int_t Ix() const { return fIx; }
80  Int_t Iy() const { return fIy; }
82  virtual void Paint(Option_t* opt="");
85  TVector2 Position() const { return fPosition; }
87  void Print(Option_t* opt = "") const;
90  void Release() { fClusterId = -1; }
96  void SetCharge(Double_t charge) { fCharge = charge; }
99  void SetChargeBackup(Double_t charge) { fChargeBackup = charge; }
101  void SetCoord(Int_t ixy, Double_t Coord);
104  void SetStatus(Int_t status) { fStatus = status; }
108  void SetClusterId(Int_t id) { fClusterId = id; }
111  void SetSaturated(Bool_t val) { fIsSaturated = val; }
113  void SetSize(Int_t ixy, Double_t Size);
116  void SetReal(Bool_t val) { fIsReal = val; }
118  void Shift(Int_t ixy, Double_t shift);
120  Double_t Size(Int_t ixy) const;
123  Int_t Status() const { return fStatus; }
126  Double_t X() const { return fPosition.X(); }
128  Double_t Y() const { return fPosition.Y(); }
130  static AliMpArea Overlap(const AliMUONPad& d1, const AliMUONPad& d2);
132  static Bool_t AreOverlapping(const AliMUONPad& d1, const AliMUONPad& d2,
133  const TVector2& precision,
134  AliMpArea& overlapArea);
136  static Bool_t AreOverlapping(const AliMUONPad& d1, const AliMUONPad& d2,
137  const TVector2& precision);
139  static Bool_t AreNeighbours(const AliMUONPad& d1, const AliMUONPad& d2);
142 private:
143  void Init(Int_t detElemId, Int_t cathode,
144  Int_t ix, Int_t iy,
145  const TVector2& position,
146  const TVector2& dimensions,
147  Double_t charge);
149 private:
150  Bool_t fIsSaturated;
151  Bool_t fIsReal;
152  Int_t fClusterId;
153  Int_t fCathode;
154  Int_t fDetElemId;
155  Int_t fIx;
156  Int_t fIy;
157  Int_t fStatus;
158  TVector2 fDimensions;
159  TVector2 fPosition;
160  Double_t fCharge;
161  Double_t fChargeBackup;
163  ClassDef(AliMUONPad,2) // A full grown pad
164 };
166 #endif
static Bool_t AreOverlapping(const AliMUONPad &d1, const AliMUONPad &d2, const TVector2 &precision, AliMpArea &overlapArea)
Definition: AliMUONPad.cxx:221
static AliMpArea Overlap(const AliMUONPad &d1, const AliMUONPad &d2)
Definition: AliMUONPad.cxx:398
Bool_t IsReal() const
Return info whether this is a real pad or a virtual one.
Definition: AliMUONPad.h:64
void SetStatus(Int_t status)
Set status word.
Definition: AliMUONPad.h:104
Bool_t IsSaturated() const
Return info whether this pad is saturated or not.
Definition: AliMUONPad.h:67
Bool_t IsSortable() const
Return true as the function Compare is implemented.
Definition: AliMUONPad.h:70
Double_t ChargeBackup() const
Return backup charge.
Definition: AliMUONPad.h:50
void RevertCharge()
Set charge to value in backup charge.
Definition: AliMUONPad.h:93
TVector2 Dimensions() const
Return half dimensions in x and y (cm)
Definition: AliMUONPad.h:56
void SetSaturated(Bool_t val)
Set info whether this pad is saturated or not.
Definition: AliMUONPad.h:111
A rectangle area positioned in plane..
Definition: AliMpArea.h:20
Int_t fIy
Definition: AliMUONPad.h:156
Bool_t fIsSaturated
whether this pad is saturated or not
Definition: AliMUONPad.h:150
virtual Int_t Compare(const TObject *obj) const
Definition: AliMUONPad.cxx:250
Double_t DY() const
Return half dimensions in y (cm)
Definition: AliMUONPad.h:61
static Bool_t AreNeighbours(const AliMUONPad &d1, const AliMUONPad &d2)
Definition: AliMUONPad.cxx:167
void BackupCharge()
Backup charge Usefull if clustering somehow plays with the charge, this one is the "original" one...
Definition: AliMUONPad.h:40
void Shift(Int_t ixy, Double_t shift)
Definition: AliMUONPad.cxx:500
void SetSize(Int_t ixy, Double_t Size)
Definition: AliMUONPad.cxx:481
Double_t Y() const
Return position in y (cm)
Definition: AliMUONPad.h:128
void SetChargeBackup(Double_t charge)
Set charge backup.
Definition: AliMUONPad.h:99
TVector2 fDimensions
half dimensions in x and y (cm)
Definition: AliMUONPad.h:158
Int_t fIx
Definition: AliMUONPad.h:155
void SetCharge(Double_t charge)
Set charge.
Definition: AliMUONPad.h:96
Bool_t fIsReal
whether this is a real pad or a virtual one
Definition: AliMUONPad.h:151
virtual ~AliMUONPad()
Definition: AliMUONPad.cxx:160
Int_t Iy() const
Return y-index.
Definition: AliMUONPad.h:80
void Release()
Detach this pad from a cluster.
Definition: AliMUONPad.h:90
virtual void Paint(Option_t *opt="")
Definition: AliMUONPad.cxx:409
Double_t X() const
Return position in x (cm)
Definition: AliMUONPad.h:126
TVector2 fPosition
positions in x and y (cm)
Definition: AliMUONPad.h:159
Int_t Cathode() const
Return cathode number.
Definition: AliMUONPad.h:43
Bool_t IsUsed() const
Return true if is used.
Definition: AliMUONPad.h:75
Double_t Size(Int_t ixy) const
Definition: AliMUONPad.cxx:508
TVector2 Position() const
Return positions in x and y (cm)
Definition: AliMUONPad.h:85
Double_t fCharge
pad charge
Definition: AliMUONPad.h:160
Int_t fStatus
status word
Definition: AliMUONPad.h:157
void SetCoord(Int_t ixy, Double_t Coord)
Definition: AliMUONPad.cxx:462
Int_t Ix() const
Return x-index.
Definition: AliMUONPad.h:78
Int_t fDetElemId
detection element id
Definition: AliMUONPad.h:154
void Print(Option_t *opt="") const
Definition: AliMUONPad.cxx:420
Double_t Charge() const
Return pad charge.
Definition: AliMUONPad.h:48
Double_t Coord(Int_t ixy) const
Definition: AliMUONPad.cxx:354
Int_t fClusterId
cluster id this pad belongs to (-1 if not attached to a cluster)
Definition: AliMUONPad.h:152
Int_t DetElemId() const
Return detection element id.
Definition: AliMUONPad.h:53
void SetClusterId(Int_t id)
Set cluster id this pad belongs to -1 if not attached to a cluster.
Definition: AliMUONPad.h:108
void Init(Int_t detElemId, Int_t cathode, Int_t ix, Int_t iy, const TVector2 &position, const TVector2 &dimensions, Double_t charge)
Definition: AliMUONPad.cxx:373
Int_t fCathode
cathode number
Definition: AliMUONPad.h:153
Int_t Status() const
Return status word.
Definition: AliMUONPad.h:123
Double_t fChargeBackup
backup charge (usefull if clustering somehow plays with the charge, this one is the "original" one) ...
Definition: AliMUONPad.h:161
Combination of digit and mppad informations.
Definition: AliMUONPad.h:25
Double_t DX() const
Return half dimensions in x (cm)
Definition: AliMUONPad.h:59
void SetReal(Bool_t val)
Set info whether this is a real pad or a virtual one.
Definition: AliMUONPad.h:116