]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - MUON/AliMUONPixel.cxx
- Used mapping regional reader, removed useless members
[u/mrichter/AliRoot.git] / MUON / AliMUONPixel.cxx
... / ...
CommitLineData
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//-----------------------------------------------------------------------------
19/// \class AliMUONPixel
20/// Basic object of the cluster / rec. point finder based
21/// on Expectation-Minimization approach (AZ cluster finder)
22///
23/// \author Alexander Zinchenko, JINR Dubna
24//-----------------------------------------------------------------------------
25
26#include "AliMUONPixel.h"
27
28/// \cond CLASSIMP
29ClassImp(AliMUONPixel) // Class implementation in ROOT context
30/// \endcond
31
32//_____________________________________________________________________________
33AliMUONPixel::AliMUONPixel()
34 : TObject(),
35 fCharge(0),
36 fFlag(0)
37{
38/// Default constructor
39 fXY[0] = fXY[1] = fSize[0] = fSize[1] = 0;
40}
41
42//_____________________________________________________________________________
43AliMUONPixel::AliMUONPixel(Double_t xc, Double_t yc, Double_t wx, Double_t wy, Double_t charge)
44 : TObject(),
45 fCharge(charge),
46 fFlag(0)
47{
48/// Constructor
49 fXY[0] = xc; fXY[1] = yc; fSize[0] = wx; fSize[1] = wy;
50}
51
52//_____________________________________________________________________________
53AliMUONPixel::~AliMUONPixel()
54{
55/// Destructor
56}
57
58//__________________________________________________________________________
59Int_t AliMUONPixel::Compare(const TObject* pixel) const
60{
61/// "Compare" function to sort with decreasing pixel charge.
62/// Returns -1 (0, +1) if charge of current pixel
63/// is greater than (equal to, less than) charge of pixel
64 if (fCharge > ((AliMUONPixel*)pixel)->Charge()) return(-1);
65 else if (fCharge == ((AliMUONPixel*)pixel)->Charge()) return( 0);
66 else return(+1);
67}
68
69//__________________________________________________________________________
70void AliMUONPixel::Print(const char* /*opt*/) const
71{
72/// Print function
73 printf("%9.4f %9.4f %9.4f %9.4f %9.4f %1d\n", fXY[0], fXY[1], fSize[0], fSize[1], fCharge, fFlag);
74}