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"
27 ClassImp(AliPMDcluster)
29 AliPMDcluster::AliPMDcluster():
33 // Default constructor
34 for (Int_t i = 0; i < 6; i++)
38 for (Int_t i = 0; i < 19; i++)
40 fClusCellDataX[i] = 0;
41 fClusCellDataY[i] = 0;
42 fClusCellTrack[i] = -1;
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,
57 for (Int_t i = 0; i < 6; i++)
59 fClusData[i] = clusdata[i];
61 for (Int_t i = 0; i < 19; i++)
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];
71 // --------------------------------------------------------------------- //
72 AliPMDcluster::AliPMDcluster(AliPMDcluster *pmdcluster):
78 // --------------------------------------------------------------------- //
80 AliPMDcluster::AliPMDcluster(const AliPMDcluster &pmdcluster):
82 fDet(pmdcluster.fDet),
86 for(Int_t i=0; i<6; i++)
88 this->fClusData[i] = pmdcluster.fClusData[i];
90 for(Int_t i=0; i<19; i++)
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];
99 // --------------------------------------------------------------------- //
101 AliPMDcluster & AliPMDcluster::operator=(const AliPMDcluster &pmdcluster)
103 // Assignment operator
104 if(this != &pmdcluster)
106 this->fDet = pmdcluster.fDet;
107 this->fSMN = pmdcluster.fSMN;
108 for(Int_t i=0; i<6; i++)
110 this->fClusData[i] = pmdcluster.fClusData[i];
112 for(Int_t i=0; i<19; i++)
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];
123 // --------------------------------------------------------------------- //
125 AliPMDcluster::~AliPMDcluster()
129 // --------------------------------------------------------------------- //
131 Int_t AliPMDcluster::GetDetector() const
135 // --------------------------------------------------------------------- //
136 Int_t AliPMDcluster::GetSMN() const
140 // --------------------------------------------------------------------- //
141 Float_t AliPMDcluster::GetClusX() const
145 // --------------------------------------------------------------------- //
146 Float_t AliPMDcluster::GetClusY() const
150 // --------------------------------------------------------------------- //
151 Float_t AliPMDcluster::GetClusADC() const
155 // --------------------------------------------------------------------- //
156 Float_t AliPMDcluster::GetClusCells() const
160 // --------------------------------------------------------------------- //
161 Float_t AliPMDcluster::GetClusSigmaX() const
165 // --------------------------------------------------------------------- //
166 Float_t AliPMDcluster::GetClusSigmaY() const
170 // --------------------------------------------------------------------- //
171 Int_t AliPMDcluster::GetClusCellX(Int_t i) const
173 return fClusCellDataX[i];
175 // --------------------------------------------------------------------- //
176 Int_t AliPMDcluster::GetClusCellY(Int_t i) const
178 return fClusCellDataY[i];
180 // --------------------------------------------------------------------- //
181 Int_t AliPMDcluster::GetClusCellTrack(Int_t i) const
183 return fClusCellTrack[i];
185 // --------------------------------------------------------------------- //
186 Int_t AliPMDcluster::GetClusCellPid(Int_t i) const
188 return fClusCellPid[i];
190 // --------------------------------------------------------------------- //
191 Float_t AliPMDcluster::GetClusCellAdc(Int_t i) const
193 return fClusCellAdc[i];
195 // --------------------------------------------------------------------- //