]>
Commit | Line | Data |
---|---|---|
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 | ||
0df15a06 | 18 | // Class AliMUONPixel |
19 | // ------------------------------------- | |
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 | ||
0df3ca52 | 25 | #include "AliMUONPixel.h" |
26 | ||
27 | ClassImp(AliMUONPixel) // Class implementation in ROOT context | |
28 | ||
30178c30 | 29 | //_____________________________________________________________________________ |
30 | AliMUONPixel::AliMUONPixel() | |
31 | : TObject() | |
32 | { | |
0df15a06 | 33 | // Default constructor |
34 | fXY[0] = fXY[1] = fSize[0] = fSize[1] = fCharge = 0; | |
35 | fFlag = 0; | |
30178c30 | 36 | } |
37 | ||
0df3ca52 | 38 | //_____________________________________________________________________________ |
39 | AliMUONPixel::AliMUONPixel(Double_t xc, Double_t yc, Double_t wx, Double_t wy, Double_t charge) | |
30178c30 | 40 | : TObject() |
0df3ca52 | 41 | { |
42 | // Constructor | |
43 | fXY[0] = xc; fXY[1] = yc; fSize[0] = wx; fSize[1] = wy; fCharge = charge; | |
0df15a06 | 44 | fFlag = 0; |
0df3ca52 | 45 | } |
46 | ||
47 | //_____________________________________________________________________________ | |
48 | AliMUONPixel::~AliMUONPixel() | |
49 | { | |
50 | // Destructor | |
51 | } | |
52 | ||
53 | //__________________________________________________________________________ | |
54 | Int_t AliMUONPixel::Compare(const TObject* pixel) const | |
55 | { | |
56 | // "Compare" function to sort with decreasing pixel charge. | |
57 | // Returns -1 (0, +1) if charge of current pixel | |
58 | // is greater than (equal to, less than) charge of pixel | |
59 | if (fCharge > ((AliMUONPixel*)pixel)->Charge()) return(-1); | |
60 | else if (fCharge == ((AliMUONPixel*)pixel)->Charge()) return( 0); | |
61 | else return(+1); | |
62 | } | |
337c9041 | 63 | |
64 | //__________________________________________________________________________ | |
65 | void AliMUONPixel::Print(const char* /*opt*/) const | |
66 | { | |
0df15a06 | 67 | // Print function |
68 | printf("%9.4f %9.4f %9.4f %9.4f %9.4f %1d\n", fXY[0], fXY[1], fSize[0], fSize[1], fCharge, fFlag); | |
337c9041 | 69 | } |