1 /***************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 //-----------------------------------------------------//
17 // Date : August 05 2003 //
19 // Store cluster information //
21 //-----------------------------------------------------//
22 #include "Riostream.h"
24 #include "AliPMDcluster.h"
28 ClassImp(AliPMDcluster)
30 AliPMDcluster::AliPMDcluster():
34 // Default constructor
35 for (Int_t i = 0; i < 6; i++)
39 for (Int_t i = 0; i < 19; i++)
41 fClusCellDataX[i] = 0;
42 fClusCellDataY[i] = 0;
43 fClusCellTrack[i] = -1;
49 // --------------------------------------------------------------------- //
50 AliPMDcluster::AliPMDcluster(Int_t idet, Int_t ismn, Float_t *clusdata,
51 Int_t *celldataX, Int_t *celldataY,
52 Int_t *celltrack, Int_t *cellpid,
58 for (Int_t i = 0; i < 6; i++)
60 fClusData[i] = clusdata[i];
63 for (Int_t i = 0; i < 19; i++)
65 fClusCellDataX[i] = celldataX[i];
66 fClusCellDataY[i] = celldataY[i];
67 fClusCellTrack[i] = celltrack[i];
68 fClusCellPid[i] = cellpid[i];
69 fClusCellAdc[i] = celladc[i];
73 // --------------------------------------------------------------------- //
74 AliPMDcluster::AliPMDcluster(AliPMDcluster *pmdcluster):
80 // --------------------------------------------------------------------- //
82 AliPMDcluster::AliPMDcluster(const AliPMDcluster &pmdcluster):
84 fDet(pmdcluster.fDet),
88 for(Int_t i=0; i<6; i++)
90 this->fClusData[i] = pmdcluster.fClusData[i];
92 for(Int_t i=0; i<19; i++)
94 this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
95 this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
96 this->fClusCellTrack[i] = pmdcluster.fClusCellTrack[i];
97 this->fClusCellPid[i] = pmdcluster.fClusCellPid[i];
98 this->fClusCellAdc[i] = pmdcluster.fClusCellAdc[i];
101 // --------------------------------------------------------------------- //
103 AliPMDcluster & AliPMDcluster::operator=(const AliPMDcluster &pmdcluster)
105 // Assignment operator
106 if(this != &pmdcluster)
108 this->fDet = pmdcluster.fDet;
109 this->fSMN = pmdcluster.fSMN;
110 for(Int_t i=0; i<6; i++)
112 this->fClusData[i] = pmdcluster.fClusData[i];
114 for(Int_t i=0; i<19; i++)
116 this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
117 this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
118 this->fClusCellTrack[i] = pmdcluster.fClusCellTrack[i];
119 this->fClusCellPid[i] = pmdcluster.fClusCellPid[i];
120 this->fClusCellAdc[i] = pmdcluster.fClusCellAdc[i];
125 // --------------------------------------------------------------------- //
127 AliPMDcluster::~AliPMDcluster()
131 // --------------------------------------------------------------------- //
133 Int_t AliPMDcluster::GetDetector() const
137 // --------------------------------------------------------------------- //
138 Int_t AliPMDcluster::GetSMN() const
142 // --------------------------------------------------------------------- //
143 Float_t AliPMDcluster::GetClusX() const
147 // --------------------------------------------------------------------- //
148 Float_t AliPMDcluster::GetClusY() const
152 // --------------------------------------------------------------------- //
153 Float_t AliPMDcluster::GetClusADC() const
157 // --------------------------------------------------------------------- //
158 Float_t AliPMDcluster::GetClusCells() const
162 // --------------------------------------------------------------------- //
163 Float_t AliPMDcluster::GetClusSigmaX() const
167 // --------------------------------------------------------------------- //
168 Float_t AliPMDcluster::GetClusSigmaY() const
172 // --------------------------------------------------------------------- //
173 Int_t AliPMDcluster::GetClusCellX(Int_t i) const
175 return fClusCellDataX[i];
177 // --------------------------------------------------------------------- //
178 Int_t AliPMDcluster::GetClusCellY(Int_t i) const
180 return fClusCellDataY[i];
182 // --------------------------------------------------------------------- //
183 Int_t AliPMDcluster::GetClusCellTrack(Int_t i) const
185 return fClusCellTrack[i];
187 // --------------------------------------------------------------------- //
188 Int_t AliPMDcluster::GetClusCellPid(Int_t i) const
190 return fClusCellPid[i];
192 // --------------------------------------------------------------------- //
193 Float_t AliPMDcluster::GetClusCellAdc(Int_t i) const
195 return fClusCellAdc[i];
197 // --------------------------------------------------------------------- //