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