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