AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONCluster.cxx
Go to the documentation of this file.
1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15 
16 // $Id$
17 
18 #include <Riostream.h>
19 #include <TMath.h>
20 #include <TObjArray.h>
21 #include <TVirtualPad.h>
22 #include <TVirtualX.h>
23 
24 #include "AliMUONCluster.h"
25 #include "AliMUONPad.h"
26 
27 #include "AliMpEncodePair.h"
28 
29 #include "AliLog.h"
30 
31 //-----------------------------------------------------------------------------
41 //-----------------------------------------------------------------------------
42 
43 using std::cout;
44 using std::endl;
48 
49 namespace
50 {
51  //___________________________________________________________________________
52  Bool_t
53  ShouldUsePad(const AliMUONPad& pad,
54  Int_t cathode, Int_t statusMask, Bool_t matchMask)
55  {
56 
57  // FIXME : we should only use >=0 status, so we can fully
58  // use masking possibility ?
59  if ( pad.Status() < 0 ) return kFALSE;
60 
61  if ( pad.Cathode() == cathode && pad.IsReal() && !pad.IsSaturated() )
62  {
63  Bool_t test = ( ( pad.Status() & statusMask ) != 0 );
64  if ( !statusMask )
65  {
66  test = ( pad.Status() == 0 );
67  }
68  if ( ( test && matchMask ) || ( !test && !matchMask ) )
69  {
70  return kTRUE;
71  }
72  }
73  return kFALSE;
74  }
75 
76  //___________________________________________________________________________
77  Int_t Unique(Int_t n, Double_t* array, Double_t precision)
78  {
82 
83  Int_t count(1);
84 
85  Int_t* index = new Int_t[n];
86 
87  TMath::Sort(n,array,index);
88 
89  for ( Int_t i = 1; i < n; ++i )
90  {
91  if ( array[index[i]] - array[index[i-1]] < -precision ) ++count;
92  }
93 
94  delete[] index;
95 
96  return count;
97  }
98 }
99 
100 //_____________________________________________________________________________
102 : TObject(),
103 fPads(),
104 fHasPosition(kFALSE),
105 fPosition(1E9,1E9),
106 fPositionError(1E9,1E9),
107 fHasCharge(kFALSE),
108 fChi2(0)
109 {
112  fRawCharge[0]=fRawCharge[1]=0;
113  fCharge[0]=fCharge[1]=0;
114  fIsSaturated[0]=fIsSaturated[1]=kFALSE;
115  fPads.SetOwner(kTRUE);
116 }
117 
118 //_____________________________________________________________________________
120 : TObject(src),
121 fPads(),
122 fHasPosition(kFALSE),
123 fPosition(1E9,1E9),
124 fPositionError(1E9,1E9),
125 fHasCharge(kFALSE),
126 fChi2(0)
127 {
129  fPads.SetOwner(kTRUE);
130  src.Copy(*this);
131 }
132 
133 //_____________________________________________________________________________
136 {
138  if ( this != &src )
139  {
140  src.Copy(*this);
141  }
142  return *this;
143 }
144 
145 //_____________________________________________________________________________
147 {
149 // fPads.Delete();
150 }
151 
152 //_____________________________________________________________________________
153 void
155 {
157  fPads.Clear();
158 // fPads.Delete();
159 }
160 
161 //_____________________________________________________________________________
162 Bool_t
164 {
166  if (fPads.IsEmpty()) return kFALSE;
167 
168  for ( Int_t i = 0; i < Multiplicity(); ++i )
169  {
170  AliMUONPad* p = Pad(i);
171  if ( pad.Compare(p) == 0 ) return kTRUE;
172  }
173  return kFALSE;
174 }
175 
176 //_____________________________________________________________________________
177 void
179 {
181  for ( Int_t i = 0; i < cluster.Multiplicity(); ++i )
182  {
183  AliMUONPad* p = cluster.Pad(i);
184  if ( Contains(*p) )
185  {
186  AliError("I already got this pad : ");
187  StdoutToAliError(p->Print(););
188  AliFatal("");
189  }
190  AddPad(*p);
191  }
192 
193 }
194 
195 //_____________________________________________________________________________
196 AliMUONPad*
198 {
201 
202  AliMUONPad* p = new AliMUONPad(pad);
203  fPads.AddLast(p);
204  p->SetClusterId(GetUniqueID());
205  Int_t cathode = p->Cathode();
206  ++(fMultiplicity[cathode]);
207  fRawCharge[cathode] += p->Charge();
208  if ( p->IsSaturated() )
209  {
210  fIsSaturated[p->Cathode()]=kTRUE;
211  }
212  return p;
213 }
214 
215 //___________________________________________________________________________
216 TString
218 {
220  TString s(Form("NPADS(%d,%d)",Multiplicity(0),Multiplicity(1)));
221 
222  for (Int_t i = 0; i < Multiplicity(); ++i )
223  {
224  AliMUONPad* p = Pad(i);
225  s += Form(" (%d,%d,%d) ",p->Cathode(),p->Ix(),p->Iy());
226  }
227  return s;
228 }
229 
230 
231 //___________________________________________________________________________
232 Bool_t
234 {
236 
237  static Double_t precision = 1E-4; // cm
238  static TVector2 precisionAdjustment(precision,precision);
239 
240  for ( Int_t i1 = 0; i1 < c1.Multiplicity(); ++i1 )
241  {
242  AliMUONPad* p1 = c1.Pad(i1);
243 
244  for ( Int_t i2 = 0; i2 < c2.Multiplicity(); ++i2 )
245  {
246  AliMUONPad* p2 = c2.Pad(i2);
247  // Note: we use negative precision numbers, meaning
248  // the area of the pads will be *increased* by these small numbers
249  // prior to check the overlap by the AreOverlapping method,
250  // so pads touching only by the corners will be considered as
251  // overlapping.
252  if ( AliMUONPad::AreOverlapping(*p1,*p2,precisionAdjustment) )
253  {
254  return kTRUE;
255  }
256  }
257  }
258  return kFALSE;
259 }
260 
261 //_____________________________________________________________________________
262 AliMpArea
264 {
266 
267  // Start by finding the (x,y) limits of this cluster
268  TVector2 lowerLeft(1E9,1E9);
269  TVector2 upperRight(-1E9,-1E9);
270 
271  for ( Int_t i = 0; i < Multiplicity(); ++i )
272  {
273  AliMUONPad* pad = Pad(i);
274  TVector2 ll = pad->Position() - pad->Dimensions();
275  TVector2 ur = pad->Position() + pad->Dimensions();
276  lowerLeft.Set( TMath::Min(ll.X(),lowerLeft.X()),
277  TMath::Min(ll.Y(),lowerLeft.Y()) );
278  upperRight.Set( TMath::Max(ur.X(),upperRight.X()),
279  TMath::Max(ur.Y(),upperRight.Y()) );
280  }
281 
282  // then construct the area from those limits
283  return AliMpArea((lowerLeft+upperRight).X()/2,(lowerLeft+upperRight).Y()/2,
284  (upperRight-lowerLeft).X()/2, (upperRight-lowerLeft).Y()/2);
285 }
286 
287 //_____________________________________________________________________________
288 AliMpArea
289 AliMUONCluster::Area(Int_t cathode) const
290 {
293 
294  // Start by finding the (x,y) limits of this cluster
295  TVector2 lowerLeft(1E9,1E9);
296  TVector2 upperRight(-1E9,-1E9);
297 
298  for ( Int_t i = 0; i < Multiplicity(); ++i )
299  {
300  AliMUONPad* pad = Pad(i);
301  if ( pad->Cathode() == cathode )
302  {
303  TVector2 ll = pad->Position() - pad->Dimensions();
304  TVector2 ur = pad->Position() + pad->Dimensions();
305  lowerLeft.Set( TMath::Min(ll.X(),lowerLeft.X()),
306  TMath::Min(ll.Y(),lowerLeft.Y()) );
307  upperRight.Set( TMath::Max(ur.X(),upperRight.X()),
308  TMath::Max(ur.Y(),upperRight.Y()) );
309  }
310  }
311 
312  // then construct the area from those limits
313  return AliMpArea((lowerLeft+upperRight).X()/2,(lowerLeft+upperRight).Y()/2,
314  (upperRight-lowerLeft).X()/2, (upperRight-lowerLeft).Y()/2);
315 }
316 
317 //_____________________________________________________________________________
318 Bool_t
320 {
322  return (Cathode()<2);
323 }
324 
325 //_____________________________________________________________________________
326 Int_t
328 {
333 
334  Int_t cathode(-1);
335  if (Multiplicity(0)>0 && Multiplicity(1)>0)
336  {
337  cathode=2;
338  }
339  else if (Multiplicity(0)>0)
340  {
341  cathode=0;
342  }
343  else if (Multiplicity(1)>0)
344  {
345  cathode=1;
346  }
347 
348  return cathode;
349 }
350 
351 //_____________________________________________________________________________
352 void
353 AliMUONCluster::Copy(TObject& obj) const
354 {
358  TObject::Copy(obj);
359  AliMUONCluster& dest = static_cast<AliMUONCluster&>(obj);
360 
361 // dest.fPads.Delete();
362  dest.fPads.Clear();
363 
364  for ( Int_t i = 0; i <= fPads.GetLast(); ++i )
365  {
366  AliMUONPad* p = static_cast<AliMUONPad*>(fPads.UncheckedAt(i));
367  dest.fPads.AddLast(new AliMUONPad(*p));
368  }
369  dest.fHasPosition = fHasPosition;
370  dest.fPosition = fPosition;
372  dest.fHasCharge = fHasCharge;
373  dest.fChi2 = fChi2;
374  for ( Int_t i = 0; i < 2; ++i )
375  {
376  dest.fRawCharge[i] = fRawCharge[i];
377  dest.fCharge[i] = fCharge[i];
378  dest.fMultiplicity[i] = fMultiplicity[i];
379  dest.fIsSaturated[i] = fIsSaturated[i];
380  }
381 }
382 
383 //_____________________________________________________________________________
384 Float_t
386 {
388 
389  if ( Multiplicity(0) && Multiplicity(1) )
390  {
391  return (Charge(0)+Charge(1))/2.0;
392  }
393  else if ( Multiplicity(0) )
394  {
395  return Charge(0);
396  }
397  else if ( Multiplicity(1) )
398  {
399  return Charge(1);
400  }
401  AliError("Should not be here ?!");
402  return -1.0;
403 }
404 
405 //_____________________________________________________________________________
406 Float_t
407 AliMUONCluster::Charge(Int_t cathode) const
408 {
410  if ( !fHasCharge ) return RawCharge(cathode);
411 
412  if ( cathode == 0 || cathode == 1 )
413  {
414  return fCharge[cathode];
415  }
416  return 0;
417 }
418 
419 //_____________________________________________________________________________
420 Float_t
422 {
424  if ( Charge() > 0 )
425  {
426  return TMath::Abs(Charge(0)-Charge(1))/Charge();
427  }
428  return 0;
429 }
430 
431 //_____________________________________________________________________________
432 TVector2
433 AliMUONCluster::MaxPadDimensions(Int_t statusMask, Bool_t matchMask) const
434 {
437 
438  TVector2 cath0(MaxPadDimensions(0,statusMask,matchMask));
439  TVector2 cath1(MaxPadDimensions(1,statusMask,matchMask));
440 
441  return TVector2( TMath::Max(cath0.X(),cath1.X()),
442  TMath::Max(cath0.Y(),cath1.Y()) );
443 }
444 
445 //_____________________________________________________________________________
446 TVector2
448  Int_t statusMask, Bool_t matchMask) const
449 {
453 
454  Double_t xmax(0);
455  Double_t ymax(0);
456 
457  for ( Int_t i = 0; i < Multiplicity(); ++i )
458  {
459  AliMUONPad* pad = Pad(i);
460  if ( ShouldUsePad(*pad,cathode,statusMask,matchMask) )
461  {
462  xmax = TMath::Max(xmax,pad->DX());
463  ymax = TMath::Max(ymax,pad->DY());
464  }
465  }
466  return TVector2(xmax,ymax);
467 }
468 
469 //_____________________________________________________________________________
470 TVector2
471 AliMUONCluster::MinPadDimensions(Int_t statusMask, Bool_t matchMask) const
472 {
475 
476  TVector2 cath0(MinPadDimensions(0,statusMask,matchMask));
477  TVector2 cath1(MinPadDimensions(1,statusMask,matchMask));
478 
479  return TVector2( TMath::Min(cath0.X(),cath1.X()),
480  TMath::Min(cath0.Y(),cath1.Y()) );
481 }
482 
483 //_____________________________________________________________________________
484 TVector2
486  Int_t statusMask, Bool_t matchMask) const
487 {
491 
492  Double_t xmin(1E9);
493  Double_t ymin(1E9);
494 
495  for ( Int_t i = 0; i < Multiplicity(); ++i )
496  {
497  AliMUONPad* pad = Pad(i);
498  if ( ShouldUsePad(*pad,cathode,statusMask,matchMask) )
499  {
500  xmin = TMath::Min(xmin,pad->DX());
501  ymin = TMath::Min(ymin,pad->DY());
502  }
503  }
504  return TVector2(xmin,ymin);
505 }
506 
507 //_____________________________________________________________________________
508 Int_t
510 {
512  return Multiplicity(0)+Multiplicity(1);
513 }
514 
515 //_____________________________________________________________________________
516 Int_t
517 AliMUONCluster::Multiplicity(Int_t cathode) const
518 {
520  if ( cathode == 0 || cathode == 1 )
521  {
522  return fMultiplicity[cathode];
523  }
524  return 0;
525 }
526 
527 //_____________________________________________________________________________
528 Long_t
529 AliMUONCluster::NofPads(Int_t statusMask, Bool_t matchMask) const
530 {
533 
534  Int_t nx, ny;
535 
536  TVector2 dim0(MinPadDimensions(0,statusMask,matchMask));
537  TVector2 dim1(MinPadDimensions(1,statusMask,matchMask));
538 
539  Long_t npad0(NofPads(0,statusMask,matchMask));
540  Long_t npad1(NofPads(1,statusMask,matchMask));
541 
542  if ( TMath::Abs( (dim0-dim1).X() ) < 1E-3 )
543  {
544  nx = TMath::Max( AliMp::PairFirst(npad0), AliMp::PairFirst(npad1) );
545  }
546  else
547  {
548  nx = dim0.X() < dim1.X() ? AliMp::PairFirst(npad0) : AliMp::PairFirst(npad1);
549  }
550 
551  if ( TMath::Abs( (dim0-dim1).Y() ) < 1E-3 )
552  {
553  ny = TMath::Max( AliMp::PairSecond(npad0), AliMp::PairSecond(npad1) );
554  }
555  else
556  {
557  ny = dim0.Y() < dim1.Y() ? AliMp::PairSecond(npad0) : AliMp::PairSecond(npad1);
558  }
559 
560  return AliMp::Pair(nx,ny);
561 }
562 
563 //_____________________________________________________________________________
564 Long_t
566  Int_t statusMask, Bool_t matchMask) const
567 {
570 
571  Int_t n = Multiplicity(cathode);
572  if (!n)
573  {
574  return 0;
575  }
576  Double_t* x = new Double_t[n];
577  Double_t* y = new Double_t[n];
578  Int_t np(0);
579 
580  for ( Int_t i = 0; i < Multiplicity(); ++i )
581  {
582  AliMUONPad* pad = Pad(i);
583  if ( ShouldUsePad(*pad,cathode,statusMask,matchMask) )
584  {
585  x[np] = pad->X();
586  y[np] = pad->Y();
587  ++np;
588  }
589  }
590 
591  Int_t cx = Unique(np,x,0.01);
592  Int_t cy = Unique(np,y,0.01);
593 
594  delete[] x;
595  delete[] y;
596 
597  return AliMp::Pair(cx,cy);
598 }
599 
600 //_____________________________________________________________________________
601 AliMUONPad*
602 AliMUONCluster::Pad(Int_t index) const
603 {
605 
606  if (fPads.IsEmpty()) return 0x0;
607  if ( index < fPads.GetLast()+1 )
608  {
609  return static_cast<AliMUONPad*>(fPads.At(index));
610  }
611  else
612  {
613  AliError(Form("Requested index %d out of bounds (%d) Mult is %d",index,
614  fPads.GetLast(),Multiplicity()));
615  DumpMe();
616  }
617  return 0x0;
618 }
619 
620 
621 //_____________________________________________________________________________
622 void
624 {
626  if (!Multiplicity()) return;
627 
628  AliMpArea area(Area());
629 
630  gPad->Range(area.LeftBorder(),area.DownBorder(),area.RightBorder(),area.UpBorder());
631 
632  gVirtualX->SetFillStyle(0);
633 
634  gVirtualX->SetLineColor(2);
635  gVirtualX->SetLineWidth(4);
636  for ( Int_t i = 0; i < Multiplicity(); ++i)
637  {
638  AliMUONPad* pad = Pad(i);
639  if ( pad->Cathode() == 0 ) pad->Paint();
640  }
641 
642  gVirtualX->SetLineColor(4);
643  gVirtualX->SetLineWidth(2);
644  for ( Int_t i = 0; i < Multiplicity(); ++i)
645  {
646  AliMUONPad* pad = Pad(i);
647  if ( pad->Cathode() == 1 ) pad->Paint();
648  }
649 
650 }
651 
652 //_____________________________________________________________________________
653 void
655 {
657  cout << "Cluster Id " << GetUniqueID() << " npads=" << Multiplicity()
658  << "(" << Multiplicity(0) << "," << Multiplicity(1) << ") RawCharge="
659  << RawCharge() << " (" << RawCharge(0) << "," << RawCharge(1)
660  << ") Charge=(" << Charge(0) << "," << Charge(1) <<")";
661  if ( HasPosition() )
662  {
663  cout << " (x,y)=(" << Position().X() << "," << Position().Y() << ")";
664  cout << " (errX,errY)=(" << PositionError().X() << "," << PositionError().Y() << ")";
665  }
666  cout << endl;
667 // cout << " " << Area() << endl;
668  for (Int_t i = 0; i < fPads.GetSize(); ++i)
669  {
670  cout << Form("fPads[%d]=%p",i,fPads.At(i)) << endl;
671  if ( fPads.At(i) ) fPads.At(i)->Print();
672  }
673 }
674 
675 
676 //_____________________________________________________________________________
677 void
678 AliMUONCluster::Print(Option_t* opt) const
679 {
681  cout << "Cluster Id " << GetUniqueID() << " npads=" << Multiplicity()
682  << "(" << Multiplicity(0) << "," << Multiplicity(1) << ") RawCharge="
683  << RawCharge() << " (" << RawCharge(0) << "," << RawCharge(1)
684  << ") Charge=(" << Charge(0) << "," << Charge(1) <<")";
685  if ( HasPosition() )
686  {
687  cout << " (x,y)=(" << Position().X() << "," << Position().Y() << ")";
688  cout << " (errX,errY)=(" << PositionError().X() << "," << PositionError().Y() << ")";
689  }
690  cout << " " << Area();
691 
692  TObjArray* a = static_cast<TObjArray*>(fPads.Clone());
693  a->Sort();
694  a->Print("",opt);
695  delete a;
696 }
697 
698 //_____________________________________________________________________________
699 //Bool_t
700 //AliMUONCluster::IsEqual(const TObject* obj) const
701 //{
702 // const AliMUONCluster* c = static_cast<const AliMUONCluster*>(obj);
703 // if ( c->Multiplicity() != Multiplicity() ) return kFALSE;
704 //
705 // for ( Int_t i = 0; i < c->Multiplicity(); ++i )
706 // {
707 // AliMUONPad* p = c->Pad(i);
708 // if ( p->Compare(Pad(i)) ) return kFALSE;
709 // }
710 // return kTRUE;
711 //}
712 
713 //_____________________________________________________________________________
714 Int_t
715 AliMUONCluster::Compare(const TObject* obj) const
716 {
718 
719  const AliMUONCluster* cluster = static_cast<const AliMUONCluster*>(obj);
720 
721  AliMpArea carea(cluster->Area());
722  AliMpArea area(Area());
723 
724  if ( carea.GetPositionX() > area.GetPositionX() )
725  {
726  return 1;
727  }
728  else if ( carea.GetPositionX() < area.GetPositionX() )
729  {
730  return -1;
731  }
732  else
733  {
734  if ( carea.GetPositionY() > area.GetPositionY() )
735  {
736  return 1;
737  }
738  else if ( carea.GetPositionY() < area.GetPositionY() )
739  {
740  return -1;
741  }
742  else
743  {
744  if ( cluster->RawCharge() > RawCharge() )
745  {
746  return 1;
747  }
748  else if ( cluster->RawCharge() < RawCharge() )
749  {
750  return -1;
751  }
752  }
753  }
754  return 0;
755 }
756 
757 //_____________________________________________________________________________
758 void
760 {
763 
764  fPads.Remove(pad);
765  fPads.Compress();
766  delete pad;
767  // update cluster's data
768  fIsSaturated[0]=fIsSaturated[1]=kFALSE;
770  fRawCharge[0]=fRawCharge[1]=0;
771  for ( Int_t i = 0; i <= fPads.GetLast(); ++i )
772  {
773  AliMUONPad* p = Pad(i);
774  if ( p->IsSaturated() )
775  {
776  fIsSaturated[p->Cathode()] = kTRUE;
777  }
778  ++fMultiplicity[p->Cathode()];
779  fRawCharge[p->Cathode()] += p->Charge();
780  }
781 }
782 
783 //_____________________________________________________________________________
784 Float_t
786 {
788  return (RawCharge(0)+RawCharge(1))/2.0;
789 }
790 
791 //_____________________________________________________________________________
792 Float_t
793 AliMUONCluster::RawCharge(Int_t cathode) const
794 {
796  if ( cathode == 0 || cathode == 1 )
797  {
798  return fRawCharge[cathode];
799  }
800  return 0;
801 }
802 
803 //_____________________________________________________________________________
804 Float_t
806 {
808  if ( RawCharge() > 0 )
809  {
810  return TMath::Abs(RawCharge(0)-RawCharge(1))/RawCharge();
811  }
812  return 0;
813 }
static Bool_t AreOverlapping(const AliMUONPad &d1, const AliMUONPad &d2, const TVector2 &precision, AliMpArea &overlapArea)
Definition: AliMUONPad.cxx:221
Bool_t HasPosition() const
Return false for pre-cluster.
Bool_t IsReal() const
Return info whether this is a real pad or a virtual one.
Definition: AliMUONPad.h:64
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.
Bool_t IsSaturated() const
Return info whether this pad is saturated or not.
Definition: AliMUONPad.h:67
#define TObjArray
Double_t LeftBorder() const
Definition: AliMpArea.cxx:124
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)
TVector2 Dimensions() const
Return half dimensions in x and y (cm)
Definition: AliMUONPad.h:56
virtual void Print(Option_t *opt="") const
MpPair_t Pair(Int_t first, Int_t second)
Encode the pair of integers to another integer.
A rectangle area positioned in plane..
Definition: AliMpArea.h:20
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
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 DumpMe() const
TObjArray * array
Definition: AnalyzeLaser.C:12
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
Double_t Y() const
Return position in y (cm)
Definition: AliMUONPad.h:128
Bool_t IsMonoCathode() const
Bool_t Contains(const AliMUONPad &pad) const
Int_t Iy() const
Return y-index.
Definition: AliMUONPad.h:80
virtual void Paint(Option_t *opt="")
Definition: AliMUONPad.cxx:409
TVector2 fPosition
(x,y) of that cluster (only valid if fHasPosition is kTRUE)
Double_t X() const
Return position in x (cm)
Definition: AliMUONPad.h:126
TVector2 fPositionError
errors on (x,y)
Int_t Cathode() const
Return cathode number.
Definition: AliMUONPad.h:43
Double_t UpBorder() const
Definition: AliMpArea.cxx:140
TString AsString() const
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)
Double_t DownBorder() const
Definition: AliMpArea.cxx:148
TVector2 Position() const
Return positions in x and y (cm)
Definition: AliMUONPad.h:85
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.
Int_t Ix() const
Return x-index.
Definition: AliMUONPad.h:78
AliMpArea Area() const
Area that contains all the pads (whatever the cathode)
virtual void Paint(Option_t *opt="")
Int_t PairFirst(MpPair_t pair)
Decode the first integer from encoded pair.
void Print(Option_t *opt="") const
Definition: AliMUONPad.cxx:420
Double_t Charge() const
Return pad charge.
Definition: AliMUONPad.h:48
void SetClusterId(Int_t id)
Set cluster id this pad belongs to -1 if not attached to a cluster.
Definition: AliMUONPad.h:108
Float_t ChargeAsymmetry() const
Return the cathode's charges asymmetry.
virtual void Copy(TObject &obj) const
Int_t PairSecond(MpPair_t pair)
Decode the second integer from encoded pair.
TVector2 MinPadDimensions(Int_t cathode, Int_t statusMask, Bool_t matchMask) const
Return the smallest pad dimensions for a given cathode.
Int_t Status() const
Return status word.
Definition: AliMUONPad.h:123
AliMUONPad * Pad(Int_t index) const
Float_t RawChargeAsymmetry() const
Return the cathode's raw charges asymmetry.
Double_t RightBorder() const
Definition: AliMpArea.cxx:132
Combination of digit and mppad informations.
Definition: AliMUONPad.h:25
virtual ~AliMUONCluster()
TObjArray fPads
AliMUONPad(s) composing this cluster.
void AddCluster(const AliMUONCluster &cluster)
Double_t DX() const
Return half dimensions in x (cm)
Definition: AliMUONPad.h:59
Bool_t fHasCharge
false if SetCharge has not been called