]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PMD/AliPMDcluster.cxx
new version clustering algo
[u/mrichter/AliRoot.git] / PMD / AliPMDcluster.cxx
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 //                                                     //
17 //  Date   : August 05 2003                            //
18 //                                                     //
19 //  Store cluster information                          //
20 //                                                     //
21 //-----------------------------------------------------//
22 #include "Riostream.h"
23 #include "Rtypes.h"
24 #include "AliPMDcluster.h"
25 #include <stdio.h>
26
27 ClassImp(AliPMDcluster)
28
29 AliPMDcluster::AliPMDcluster():
30   fDet(0),
31   fSMN(0)
32 {
33   // Default constructor
34   for (Int_t i = 0; i < 6; i++)
35     {
36       fClusData[i] = 0.;
37     }
38   for (Int_t i = 0; i < 15; i++)
39     {
40       fClusCellDataX[i] = 0;
41       fClusCellDataY[i] = 0;
42     }
43
44 }
45 AliPMDcluster::AliPMDcluster(Int_t idet, Int_t ismn, Float_t *clusdata,
46                              Int_t *celldataX, Int_t *celldataY)
47 {
48   // Constructor
49   fDet = idet;
50   fSMN = ismn;
51   for (Int_t i = 0; i < 6; i++)
52     {
53       fClusData[i] = clusdata[i];
54     }
55   for (Int_t i = 0; i < 15; i++)
56     {
57       fClusCellDataX[i] = celldataX[i];
58       fClusCellDataY[i] = celldataY[i];
59     }
60
61 }
62 AliPMDcluster::AliPMDcluster(const AliPMDcluster &pmdcluster):TObject(pmdcluster)
63 {
64   //Copy Constructor 
65   if(&pmdcluster == this) return;
66   this->fDet = pmdcluster.fDet;
67   this->fSMN = pmdcluster.fSMN;
68   for(Int_t i=0; i<6; i++)
69     {
70       this->fClusData[i] = pmdcluster.fClusData[i];
71     }
72   for(Int_t i=0; i<15; i++)
73     {
74       this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
75       this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
76     }
77   return;
78 }
79
80 AliPMDcluster & AliPMDcluster::operator=(const AliPMDcluster &pmdcluster)
81 {
82   // Assignment operator 
83   if(&pmdcluster == this) return *this;
84   this->fDet = pmdcluster.fDet;
85   this->fSMN = pmdcluster.fSMN;
86   for(Int_t i=0; i<6; i++)
87     {
88       this->fClusData[i] = pmdcluster.fClusData[i];
89     }
90   for(Int_t i=0; i<15; i++)
91     {
92       this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
93       this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
94     }
95   return *this;
96 }
97
98 AliPMDcluster::~AliPMDcluster()
99 {
100   // Destructor
101 }
102
103 Int_t AliPMDcluster::GetDetector() const
104 {
105   return fDet;
106 }
107 Int_t AliPMDcluster::GetSMN() const
108 {
109   return fSMN;
110 }
111 Float_t AliPMDcluster::GetClusX() const
112 {
113   return fClusData[0];
114 }
115 Float_t AliPMDcluster::GetClusY() const
116 {
117   return fClusData[1];
118 }
119 Float_t AliPMDcluster::GetClusADC() const
120 {
121   return fClusData[2];
122 }
123 Float_t AliPMDcluster::GetClusCells() const
124 {
125   return fClusData[3];
126 }
127 Float_t AliPMDcluster::GetClusSigmaX() const
128 {
129   return fClusData[4];
130 }
131 Float_t AliPMDcluster::GetClusSigmaY() const
132 {
133   return fClusData[5];
134 }
135 Int_t AliPMDcluster::GetClusCellX(Int_t i) const
136 {
137   return fClusCellDataX[i];
138 }
139 Int_t AliPMDcluster::GetClusCellY(Int_t i) const
140 {
141   return fClusCellDataY[i];
142 }