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