]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PMD/AliPMDcluster.cxx
isolated cell serach included in AliPMDClusteringV1 and kept in recpoints for offline...
[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 < 19; i++)
39     {
40       fClusCellDataX[i] = 0;
41       fClusCellDataY[i] = 0;
42       fClusCellTrack[i] = -1;
43       fClusCellPid[i]   = -1;
44     }
45
46 }
47 // --------------------------------------------------------------------- //
48 AliPMDcluster::AliPMDcluster(Int_t idet, Int_t ismn, Float_t *clusdata,
49                              Int_t *celldataX, Int_t *celldataY,
50                              Int_t *celltrack, Int_t *cellpid):
51   fDet(idet),
52   fSMN(ismn)
53 {
54   // Constructor
55   for (Int_t i = 0; i < 6; i++)
56     {
57       fClusData[i] = clusdata[i];
58     }
59   for (Int_t i = 0; i < 19; i++)
60     {
61       fClusCellDataX[i] = celldataX[i];
62       fClusCellDataY[i] = celldataY[i];
63       fClusCellTrack[i] = celltrack[i];
64       fClusCellPid[i]   = cellpid[i];
65     }
66
67 }
68 // --------------------------------------------------------------------- //
69 AliPMDcluster::AliPMDcluster(AliPMDcluster *pmdcluster):
70   fDet(0),
71   fSMN(0)
72 {
73   *this = *pmdcluster;
74 }
75 // --------------------------------------------------------------------- //
76
77 AliPMDcluster::AliPMDcluster(const AliPMDcluster &pmdcluster):
78   TObject(pmdcluster),
79   fDet(pmdcluster.fDet),
80   fSMN(pmdcluster.fSMN)
81 {
82   //Copy Constructor 
83   for(Int_t i=0; i<6; i++)
84     {
85       this->fClusData[i] = pmdcluster.fClusData[i];
86     }
87   for(Int_t i=0; i<19; i++)
88     {
89       this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
90       this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
91       this->fClusCellTrack[i] = pmdcluster.fClusCellTrack[i];
92       this->fClusCellPid[i]   = pmdcluster.fClusCellPid[i];
93     }
94 }
95 // --------------------------------------------------------------------- //
96
97 AliPMDcluster & AliPMDcluster::operator=(const AliPMDcluster &pmdcluster)
98 {
99   // Assignment operator 
100   if(this != &pmdcluster)
101     {
102       this->fDet = pmdcluster.fDet;
103       this->fSMN = pmdcluster.fSMN;
104       for(Int_t i=0; i<6; i++)
105         {
106           this->fClusData[i] = pmdcluster.fClusData[i];
107         }
108       for(Int_t i=0; i<19; i++)
109         {
110           this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
111           this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
112           this->fClusCellTrack[i] = pmdcluster.fClusCellTrack[i];
113           this->fClusCellPid[i]   = pmdcluster.fClusCellPid[i];
114         }
115     }
116   return *this;
117 }
118 // --------------------------------------------------------------------- //
119
120 AliPMDcluster::~AliPMDcluster()
121 {
122   // Destructor
123 }
124 // --------------------------------------------------------------------- //
125
126 Int_t AliPMDcluster::GetDetector() const
127 {
128   return fDet;
129 }
130 // --------------------------------------------------------------------- //
131 Int_t AliPMDcluster::GetSMN() const
132 {
133   return fSMN;
134 }
135 // --------------------------------------------------------------------- //
136 Float_t AliPMDcluster::GetClusX() const
137 {
138   return fClusData[0];
139 }
140 // --------------------------------------------------------------------- //
141 Float_t AliPMDcluster::GetClusY() const
142 {
143   return fClusData[1];
144 }
145 // --------------------------------------------------------------------- //
146 Float_t AliPMDcluster::GetClusADC() const
147 {
148   return fClusData[2];
149 }
150 // --------------------------------------------------------------------- //
151 Float_t AliPMDcluster::GetClusCells() const
152 {
153   return fClusData[3];
154 }
155 // --------------------------------------------------------------------- //
156 Float_t AliPMDcluster::GetClusSigmaX() const
157 {
158   return fClusData[4];
159 }
160 // --------------------------------------------------------------------- //
161 Float_t AliPMDcluster::GetClusSigmaY() const
162 {
163   return fClusData[5];
164 }
165 // --------------------------------------------------------------------- //
166 Int_t AliPMDcluster::GetClusCellX(Int_t i) const
167 {
168   return fClusCellDataX[i];
169 }
170 // --------------------------------------------------------------------- //
171 Int_t AliPMDcluster::GetClusCellY(Int_t i) const
172 {
173   return fClusCellDataY[i];
174 }
175 // --------------------------------------------------------------------- //
176 Int_t AliPMDcluster::GetClusCellTrack(Int_t i) const
177 {
178   return fClusCellTrack[i];
179 }
180 // --------------------------------------------------------------------- //
181 Int_t AliPMDcluster::GetClusCellPid(Int_t i) const
182 {
183   return fClusCellPid[i];
184 }
185 // --------------------------------------------------------------------- //