AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONCluster.h
Go to the documentation of this file.
1 #ifndef ALIMUONCLUSTER_H
2 #define ALIMUONCLUSTER_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 
13 // Author Laurent Aphecetche
14 
15 #ifndef ROOT_TObject
16 # include "TObject.h"
17 #endif
18 #ifndef ROOT_TVector2
19 # include "TVector2.h"
20 #endif
21 #ifndef ROOT_TString
22 # include "TString.h"
23 #endif
24 #ifndef ALI_MP_AREA_H
25 # include "AliMpArea.h"
26 #endif
27 #ifndef ALI_MP_DIRECTION_H
28 # include "AliMpDirection.h"
29 #endif
30 #ifndef ALI_MP_ENCODE_PAIR_H
31 # include "AliMpEncodePair.h"
32 #endif
33 
34 #ifndef ROOT_TObjArray
35 # include "TObjArray.h"
36 #endif
37 
38 class AliMUONPad;
39 
40 class AliMUONCluster : public TObject
41 {
42 public:
44  AliMUONCluster(const AliMUONCluster& rhs);
46 
47  virtual ~AliMUONCluster();
48 
49  Bool_t Contains(const AliMUONPad& pad) const;
50 
51  TString AsString() const;
52 
53  static Bool_t AreOverlapping(const AliMUONCluster& c1, const AliMUONCluster& c2);
54 
55  AliMUONPad* AddPad(const AliMUONPad& pad);
56 
58  AliMpArea Area() const;
59 
61  AliMpArea Area(Int_t cathode) const;
62 
63  Float_t Charge() const;
64  Float_t Charge(Int_t cathode) const;
65 
67  Float_t ChargeAsymmetry() const;
68 
70  Float_t Chi2() const { return fChi2; }
71 
72  virtual void Copy(TObject& obj) const;
73 
75  Bool_t HasPosition() const { return fHasPosition; }
76 
78  Bool_t IsSaturated(Int_t cathode) const { return fIsSaturated[cathode]; }
79 
81  Bool_t IsSaturated() const { return IsSaturated(0) && IsSaturated(1); }
82 
84  Int_t MaxChargeCathode() const { return Charge(0) > Charge(1) ? 0:1; }
85 
87  Int_t MaxRawChargeCathode() const { return RawCharge(0) > RawCharge(1) ? 0:1; }
88 
90  TVector2 MaxPadDimensions(Int_t cathode, Int_t statusMask, Bool_t matchMask) const;
91 
93  TVector2 MaxPadDimensions(Int_t statusMask, Bool_t matchMask) const;
94 
96  TVector2 MinPadDimensions(Int_t cathode, Int_t statusMask, Bool_t matchMask) const;
97 
99  TVector2 MinPadDimensions(Int_t statusMask, Bool_t matchMask) const;
100 
101  Int_t Multiplicity() const;
102  Int_t Multiplicity(Int_t cathode) const;
103 
105  Long_t NofPads(Int_t cathode, Int_t statusMask, Bool_t matchMask) const;
106 
108  Long_t NofPads(Int_t statusMask, Bool_t matchMask=kTRUE) const;
109 
111  Bool_t IsSortable() const { return kTRUE; }
112 
113 // Bool_t IsEqual(const TObject* obj) const;
114 
115  virtual Int_t Compare(const TObject* obj) const;
116 
117  AliMUONPad* Pad(Int_t index) const;
118 
119  virtual void Paint(Option_t* opt="");
120 
122  TVector2 Position() const { return fPosition; }
124  TVector2 PositionError() const { return fPositionError; }
125 
126  virtual void Print(Option_t* opt="") const;
127 
129  Float_t RawCharge() const;
130 
132  Float_t RawCharge(Int_t cathode) const;
133 
135  Float_t RawChargeAsymmetry() const;
136 
137  void RemovePad(AliMUONPad* pad);
138 
140  void SetCharge(Float_t chargeCath0, Float_t chargeCath1)
141  { fHasCharge = kTRUE; fCharge[0]=chargeCath0; fCharge[1]=chargeCath1; }
142 
144  void SetChi2(Float_t chi2) { fChi2 = chi2; }
145 
147  void SetPosition(const TVector2& pos, const TVector2& errorOnPos)
148  { fHasPosition = kTRUE; fPosition = pos; fPositionError = errorOnPos; }
149 
150  Int_t Cathode() const;
151 
152  void AddCluster(const AliMUONCluster& cluster);
153 
154  void Clear(Option_t* opt="");
155 
156  Bool_t IsMonoCathode() const;
157 
158 //private:
159  void DumpMe() const;
160 
161 private:
163  Bool_t fHasPosition;
164  TVector2 fPosition;
165  TVector2 fPositionError;
166  Int_t fMultiplicity[2];
167  Float_t fRawCharge[2];
168  Bool_t fHasCharge;
169  Float_t fCharge[2];
170  Float_t fChi2;
171  Bool_t fIsSaturated[2];
172 
173  ClassDef(AliMUONCluster,3) // A cluster of AliMUONPad
174 };
175 
176 #endif
Bool_t HasPosition() const
Return false for pre-cluster.
Int_t MaxChargeCathode() const
Return the max charge on the chathod.
static Bool_t AreOverlapping(const AliMUONCluster &c1, const AliMUONCluster &c2)
TVector2 MaxPadDimensions(Int_t cathode, Int_t statusMask, Bool_t matchMask) const
Return the biggest pad dimensions for a given cathode.
Float_t RawCharge() const
By default, return the average of both cathode RawCharges.
#define TObjArray
Float_t fCharge[2]
cathode (re)computed charges
A group of adjacent pads.
virtual Int_t Compare(const TObject *obj) const
Float_t fChi2
chi2 of the RawCharge fit (if any)
Int_t Cathode() const
TVector2 PositionError() const
Return errors on (x,y)
virtual void Print(Option_t *opt="") const
A rectangle area positioned in plane..
Definition: AliMpArea.h:20
Bool_t IsSaturated() const
Whether we have one saturated pad on each cathode.
Float_t fRawCharge[2]
cathode RawCharges
void Clear(Option_t *opt="")
AliMUONCluster & operator=(const AliMUONCluster &rhs)
Int_t Multiplicity() const
Bool_t fHasPosition
false for pre-cluster (i.e. not yet computed)
void SetPosition(const TVector2 &pos, const TVector2 &errorOnPos)
Set (x,y) of that cluster and errors.
void DumpMe() const
Bool_t IsMonoCathode() const
Bool_t Contains(const AliMUONPad &pad) const
Double_t chi2
Definition: AnalyzeLaser.C:7
TVector2 fPosition
(x,y) of that cluster (only valid if fHasPosition is kTRUE)
TVector2 fPositionError
errors on (x,y)
TString AsString() const
void SetCharge(Float_t chargeCath0, Float_t chargeCath1)
Set cathode (re)computed charges.
Bool_t fIsSaturated[2]
saturation status of cathodes
void RemovePad(AliMUONPad *pad)
Int_t fMultiplicity[2]
number of pads in each cathode
TVector2 Position() const
Return (x,y) of that cluster.
AliMUONPad * AddPad(const AliMUONPad &pad)
void SetChi2(Float_t chi2)
Set chi2 of the RawCharge fit.
Float_t Charge() const
Long_t NofPads(Int_t cathode, Int_t statusMask, Bool_t matchMask) const
Compute number of pads in X and Y direction for a given cathode.
Bool_t IsSortable() const
Return true as the function Compare is implemented.
AliMpArea Area() const
Area that contains all the pads (whatever the cathode)
virtual void Paint(Option_t *opt="")
Bool_t IsSaturated(Int_t cathode) const
Whether we have at least one saturated pad in a given cathode.
Float_t ChargeAsymmetry() const
Return the cathode's charges asymmetry.
virtual void Copy(TObject &obj) const
TVector2 MinPadDimensions(Int_t cathode, Int_t statusMask, Bool_t matchMask) const
Return the smallest pad dimensions for a given cathode.
Int_t MaxRawChargeCathode() const
Return the max raw charge on the chathod.
AliMUONPad * Pad(Int_t index) const
Float_t RawChargeAsymmetry() const
Return the cathode's raw charges asymmetry.
Combination of digit and mppad informations.
Definition: AliMUONPad.h:25
virtual ~AliMUONCluster()
Float_t Chi2() const
Return chi2 of the RawCharge fit (if any)
TObjArray fPads
AliMUONPad(s) composing this cluster.
void AddCluster(const AliMUONCluster &cluster)
Bool_t fHasCharge
false if SetCharge has not been called